* { margin: 0; padding: 0; box-sizing: border-box; }

/* Accent color: wordmark, headings, links, awards. Change it here. */
:root { --accent: #2774ae; } /* UCLA blue */
img { max-width: 100%; height: auto; }

body {
    font-family: "Source Serif 4", Georgia, serif;
    line-height: 1.6;
    color: #333;
}

a { color: var(--accent); }

/* Header */
header {
    max-width: 1060px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
}
.wordmark {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}
nav { display: flex; gap: 2rem; }
nav a { color: #999; text-decoration: none; }
nav a:hover, nav a.active { color: var(--accent); text-decoration: underline; }

/* Page */
.content {
    max-width: 1060px;
    margin: 16px auto 0;
    padding: 0 2rem 3rem;
    min-height: calc(100vh - 180px);
}
.content p { font-size: 1.05rem; }
.content p + p { margin-top: 0.9rem; }
.home-title { font-size: 1.6rem; font-weight: 700; line-height: 1.25; color: var(--accent); margin: 0.25rem 0 0.9rem; }

.section-header {
    font-size: 1.05rem;
    color: var(--accent);
    margin: 1.75rem 0 1rem;
    padding-bottom: 0.15rem;
    border-bottom: 1px solid #ccc;
}
.section-header:first-child { margin-top: 0.5rem; }

.page-title { font-size: 1.3rem; color: var(--accent); margin: 0.5rem 0 0.25rem; }

/* News */
.updates-list { list-style: disc; padding-left: 1.2rem; }
.updates-list li { margin: 0.4rem 0; }
.update-date {
    display: inline-block;
    width: 4.5rem;
    margin-right: 0.4rem;
    font-size: 0.875rem;
    color: #999;
}
.updates-list a { font-weight: 600; }
.news-trophy { margin-right: 0.3rem; }
#news-more {
    margin-top: 0.6rem;
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.9rem;
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
}
[hidden] { display: none !important; }

/* People */
.people-grid { display: flex; flex-wrap: wrap; gap: 1rem 0.75rem; }
.person { width: 130px; text-align: center; }
.photo-frame {
    display: block;
    width: 110px;
    height: 110px;
    margin: 0 auto 0.1rem;
    border-radius: 4px;
    overflow: hidden;
    background: #f2f2f2;
}
.person-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.6s ease, filter 0.6s ease, transform 0.6s ease;
}
/* Photos of people with a link_url are links: a slight fade on hover shows it. */
.photo-link { display: block; }
.photo-link:hover .person-image, .photo-link:focus-visible .person-image { opacity: 0.85; transition-duration: 0.15s; }
/* While photos are loading they stay hidden; then all fade in from blurry together. */
.photos-loading .person-image {
    opacity: 0;
    filter: blur(12px);
    transform: scale(1.05);
}
@media (prefers-reduced-motion: reduce) {
    .person-image { transition: none; }
}
.person-name { font-size: 0.8rem; font-weight: 600; line-height: 1.35; }
.person-info { font-size: 0.7rem; color: #999; line-height: 1.35; }
.person-info a { color: #777; }

.content p.footnote { font-size: 0.8rem; color: #666; margin-top: 0.5rem; }
.footnote + .section-header { margin-top: 1.1rem; }
.footnote a { color: #666; }
.content p.people-more { font-size: 0.9rem; margin-top: 0.85rem; }

/* Publications */
.publication { margin-bottom: 1.5rem; }
.publication h3 { font-size: 0.95rem; font-weight: 600; color: #000; margin-bottom: 0.2rem; }
.publication h3 a { color: inherit; text-decoration: none; }
.publication h3 a:hover { text-decoration: underline; }
.publication .authors { font-size: 0.85rem !important; color: #444; }
.publication .venue { font-size: 0.85rem !important; font-style: italic; color: #666; }
.publication .award { font-size: 0.85rem !important; font-weight: 600; color: var(--accent); margin-top: 0.1rem; }
.publication .award-star { font-style: normal; font-size: 0.8em; }
.publication .accepted { font-style: normal; font-weight: 600; color: var(--accent); }
.publication .links { margin-top: 0.3rem; }
.publication .links a { font-size: 0.85rem; margin-right: 0.8rem; text-decoration: none; }
.publication .links a:hover { text-decoration: underline; }

/* Footer */
footer {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 2rem;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}
footer a { color: #666; }

.error { background: #fdf1ee; border-left: 3px solid #c0523d; padding: 0.75rem 1.25rem; margin-bottom: 1.5rem; font-size: 0.95rem; }

@media (max-width: 568px) {
    header { padding: 1rem; }
    nav { gap: 1.25rem; }
    .content { padding: 0 1rem 3rem; }
    .person { width: calc(33% - 0.5rem); }
    .photo-frame { width: 100%; height: auto; aspect-ratio: 1; }
}

/* Home: group photo */
.group-photo { margin: 1.5rem auto 0.5rem; width: 50%; }
@media (max-width: 700px) { .group-photo { width: 100%; } }
.group-photo-frame { overflow: hidden; border-radius: 4px; }
.group-photo img {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.6s ease, filter 0.6s ease, transform 0.6s ease;
}
/* Same blurry fade-in as the People photos, while the photo loads. */
.group-photo.photo-loading img {
    opacity: 0;
    filter: blur(12px);
    transform: scale(1.05);
}
@media (prefers-reduced-motion: reduce) {
    .group-photo img { transition: none; }
}
.group-photo figcaption {
    margin-top: 0.4rem;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

/* Click-to-enlarge overlay (see setupZoom in site.js) */
img.zoomable { cursor: zoom-in; }
.zoom-overlay {
    margin: auto;
    padding: 0;
    border: 0;
    background: none;
    max-width: 95vw;
    max-height: 95vh;
    overflow: visible;
    cursor: zoom-out;
}
.zoom-overlay::backdrop { background: rgba(0, 0, 0, 0.85); }
.zoom-overlay img {
    display: block;
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    border-radius: 4px;
}

/* Alumni / affiliates: stacked entries in a grid */
.alum-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem 1.5rem;
}
@media (max-width: 760px) { .alum-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .alum-grid { grid-template-columns: 1fr; } }
.alum { line-height: 1.35; }
.alum-name { font-weight: 600; color: #222; }
.alum-line { font-size: 0.85rem; color: #777; }
.alum-link a { color: #777; }
.alum-note { color: #222; margin-top: 0.675em; } /* half a line (line-height 1.35) */
