/* ============================================================
   Colors and fonts (change them here to update the whole site)
   ============================================================ */

:root {
    --text: #2b2b2b;
    --muted: #666;
    --line: #e2e2e2;
    --bg: #ffffff;
    --uic-blue: #001e62;   /* UIC navy */
    --uic-red: #d50032;    /* UIC flames red */
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
}

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 40px 60px;
}


/* Blue strip across the top */

.banner {
    height: 8px;
    background: var(--uic-blue);
}


/* Header */

header {
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

h1 {
    font-family: var(--serif);
    font-size: 40px;
    font-weight: 600;
    line-height: 1.15;
    margin: 0;
    color: var(--uic-blue);
}

.subtitle {
    font-size: 17px;
    color: var(--muted);
    margin: 6px 0 0;
}


/* Navigation */

nav {
    margin-top: 22px;
}

nav a {
    color: var(--text);
    text-decoration: none;
    margin-right: 26px;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

nav a:hover {
    border-bottom-color: var(--line);
}

nav a[aria-current="page"] {
    color: var(--uic-blue);
    border-bottom-color: var(--uic-red);
}


/* Two-column layout: sidebar + content */

.layout {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    margin-top: 40px;
}


/* Sidebar */

.sidebar {
    width: 230px;
    flex-shrink: 0;
    position: sticky;
    top: 30px;
}

.avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 2px var(--uic-blue);
}

.sidebar-name {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--uic-blue);
    margin: 20px 0 4px;
    line-height: 1.3;
}

.sidebar-position {
    font-size: 15px;
    color: var(--muted);
    margin: 0 0 18px;
    line-height: 1.5;
}

.sidebar-links {
    list-style: none;
    padding: 14px 0 0;
    margin: 0;
    border-top: 1px solid var(--line);
}

.sidebar-links li {
    margin-bottom: 10px;
}

.sidebar-links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 16px;
}

.sidebar-links a:hover {
    color: var(--uic-blue);
    text-decoration: underline;
}

.sidebar-links svg {
    width: 18px;
    height: 18px;
    fill: var(--uic-blue);
    flex-shrink: 0;
}


/* Main content */

main {
    flex: 1;
    min-width: 0;
}

.page > main {
    margin-top: 36px;
}

h2 {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 600;
    color: var(--uic-blue);
    line-height: 1.25;
    margin: 48px 0 14px;
}

main > section:first-child h2,
.page > main > h2:first-child {
    margin-top: 0;
}

p {
    margin: 0 0 14px;
}

main a {
    color: var(--uic-blue);
    text-underline-offset: 2px;
}

main a:hover {
    color: var(--uic-red);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--uic-red);
    outline-offset: 3px;
}


/* Home page: research themes */

.themes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.theme {
    border-top: 3px solid var(--uic-blue);
    padding-top: 12px;
}

.theme h3 {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 8px;
}

.theme p {
    font-size: 16px;
    margin: 0;
    color: #444;
}

.more-link {
    margin-top: 20px;
    font-weight: 600;
}


/* News */

.news-list {
    max-height: 440px;
    overflow-y: auto;
    border: 1px solid var(--line);
    padding: 0 22px 8px;
}

.news-year {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 600;
    color: var(--uic-blue);
    margin: 0;
    padding: 14px 0 6px;
    border-bottom: 2px solid var(--line);
    background: var(--bg);
    position: sticky;
    top: 0;
}

.news-item {
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item p {
    margin: 0;
}

.news-item p.news-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--uic-red);
    margin-bottom: 3px;
}


/* Photos page */

.photo-intro {
    color: var(--muted);
    max-width: 700px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.gallery figure {
    margin: 0;
}

.gallery button {
    all: unset;
    cursor: zoom-in;
    display: block;
    width: 100%;
}

.gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: #eee;
}

.gallery figcaption {
    font-size: 15px;
    color: #555;
    margin-top: 8px;
    line-height: 1.45;
}

.lightbox {
    border: none;
    padding: 0;
    background: transparent;
    max-width: 92vw;
    max-height: 92vh;
}

.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.85);
}

.lightbox img {
    max-width: 92vw;
    max-height: 82vh;
    display: block;
    margin: 0 auto;
}

.lightbox p {
    color: #eee;
    text-align: center;
    font-size: 15px;
    margin: 12px 0 0;
}

.lightbox-close {
    position: fixed;
    top: 16px;
    right: 22px;
    background: none;
    border: none;
    color: #fff;
    font-size: 34px;
    cursor: pointer;
    line-height: 1;
}


/* Tablets and phones */

@media (max-width: 900px) {
    .themes {
        grid-template-columns: 1fr;
        gap: 22px;
    }
}

@media (max-width: 760px) {
    .page {
        padding: 24px 22px 48px;
    }


    h1 {
        font-size: 32px;
    }

    nav a {
        display: inline-block;
        margin: 0 18px 8px 0;
    }

    .layout {
        flex-direction: column;
        gap: 30px;
    }

    .sidebar {
        position: static;
        width: 100%;
        text-align: center;
    }

    .avatar {
        margin: 0 auto;
        width: 150px;
        height: 150px;
    }

    .sidebar-links a {
        justify-content: center;
    }
}

.photo-section {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin: 40px 0 8px;
}


/* Shared: lead paragraph and image placeholders */

.lead {
    font-size: 18px;
}

.placeholder {
    margin: 0;
}

.placeholder img {
    width: 100%;
    display: block;
}

.placeholder-box {
    aspect-ratio: 4 / 3;
    border: 2px dashed #c9ced8;
    background: #f5f6f8;
    color: #8a93a3;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 14px;
    padding: 16px;
}

.placeholder figcaption {
    font-size: 14px;
    font-style: italic;
    color: var(--muted);
    margin-top: 8px;
}

.placeholder.wide .placeholder-box {
    aspect-ratio: 16 / 5;
}

.placeholder.wide {
    margin: 10px 0 24px;
}


/* Research page */

.area-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    font-weight: 600;
    font-size: 15px;
}

.research-area {
    scroll-margin-top: 20px;
}

.area-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}

.research-area.flip .area-grid {
    grid-template-columns: 300px 1fr;
}

.research-area.flip .area-text {
    order: 2;
}


/* Team page */

.team-heading {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--uic-blue);
    border-bottom: 2px solid var(--line);
    padding-bottom: 6px;
    margin: 40px 0 18px;
}

.member {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 26px;
}

.member-photo {
    width: 130px;
    height: 130px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 4px;
}

.placeholder-photo {
    border: 2px dashed #c9ced8;
    background: #f5f6f8;
    color: #8a93a3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 30px;
}

.member-info h3 {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.member-info p {
    margin: 0 0 6px;
    font-size: 16px;
}

.member-info p.member-role {
    color: var(--uic-red);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
}

.former-ug {
    font-size: 16px;
    margin-top: 10px;
}


/* Publications page */

.updated {
    color: var(--muted);
    font-size: 15px;
}

.pub-key {
    font-size: 14px;
    color: var(--muted);
}

.pub-year {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--uic-blue);
    border-bottom: 2px solid var(--line);
    padding-bottom: 4px;
    margin: 32px 0 12px;
}

.pubs {
    padding-left: 38px;
    margin: 0;
}

.pubs li {
    margin-bottom: 14px;
    font-size: 16px;
    line-height: 1.55;
}

.pubs li::marker {
    color: var(--muted);
    font-size: 14px;
}

.pubs a {
    word-break: break-word;
}


@media (max-width: 900px) {
    .area-grid,
    .research-area.flip .area-grid {
        grid-template-columns: 1fr;
    }

    .research-area.flip .area-text {
        order: 0;
    }
}

@media (max-width: 560px) {
    .member {
        flex-direction: column;
        gap: 12px;
    }
}


/* Research page figures */

.area-grid {
    grid-template-columns: 1fr 360px;
}

.research-area.flip .area-grid {
    grid-template-columns: 360px 1fr;
}

.research-fig {
    margin: 0;
}

.research-fig img {
    width: 100%;
    display: block;
    border: 1px solid var(--line);
}

.research-fig a:hover img {
    opacity: 0.92;
}

.research-fig figcaption {
    font-size: 14px;
    color: var(--muted);
    margin-top: 8px;
    line-height: 1.45;
}

.research-fig.wide {
    margin-top: 18px;
}

.research-area.below .area-grid {
    grid-template-columns: 1fr;
}

@media (max-width: 900px) {
    .area-grid,
    .research-area.flip .area-grid {
        grid-template-columns: 1fr;
    }
}

.pub-photo {
    margin: 10px 0 24px;
}

/* Photo gallery: three per row */
.gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}

.gallery.gallery-two {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 520px) {
    .gallery.gallery-two {
        grid-template-columns: 1fr;
    }
}
