/* PAIA Lab site styles */

:root {
    --navy: #0b1f3a;
    --navy-soft: #163054;
    --ink: #1b2430;
    --muted: #5b6776;
    --line: #dde3ec;
    --paper: #ffffff;
    --fog: #f5f7fa;
    --mist: #eef2f6;
    --orange: #e85a20;
    --orange-dark: #c94a16;
    --shadow: 0 12px 30px rgba(11, 31, 58, 0.08);
    /* One content measure for the whole site. Full-bleed bands (navbar, page
       hero, footer) use --gutter so their content shares the .wrap left edge. */
    --measure: 1120px;
    --gutter: max(5%, calc((100% - var(--measure)) / 2));
}

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

body {
    background: var(--fog);
    color: var(--ink);
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    line-height: 1.65;
}

h1, h2, h3, .display-4, .section-title {
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    font-weight: 700;
    color: var(--navy);
}

a {
    color: #1d4f86;
}

a:hover {
    color: var(--orange);
}

.page {
    padding-top: 104px;
}

.page-hero,
.pg-title {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 48px var(--gutter) 36px;
}

.page-hero h1,
.pg-title h1,
.pg-title h2,
.section-title {
    font-size: clamp(2rem, 3vw, 2.7rem);
    font-weight: 700;
    margin-bottom: 10px;
}

.page-kicker {
    display: none;
}

.lead {
    color: var(--muted);
    font-size: 1.08rem;
    max-width: 760px;
}

.wrap {
    width: min(var(--measure), 90%);
    margin: 0 auto;
}

.section {
    padding: 72px 0;
}

.section-alt {
    background: var(--paper);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 32px;
}

.more-link {
    font-weight: 600;
    color: #1d4f86;
    white-space: nowrap;
}

.more-link:hover {
    color: var(--navy);
}

/* Home hero */
.hero {
    position: relative;
    /* Fixed cap rather than vh, so the banner does not grow on large monitors */
    min-height: clamp(360px, 42vw, 500px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 var(--gutter);
    background: #0b1f3a center/cover no-repeat;
    margin-top: 104px;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 31, 58, 0.22) 0%, rgba(11, 31, 58, 0.46) 100%);
}

.hero-card {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 22px;
    width: min(560px, 100%);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(11, 31, 58, 0.12);
    border-radius: 4px;
    padding: 22px 26px;
}

/* The mark only. The navbar carries the full horizontal lockup. */
.hero-card img {
    width: 150px;
    height: auto;
    flex-shrink: 0;
}

.hero-lab {
    margin: 0 0 8px;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy);
}

.hero-affil {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--navy-soft);
}

/* Welcome */
.welcome-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.welcome-copy p {
    color: var(--muted);
    margin-bottom: 16px;
}

.lab-fullname,
.acronym-p,
.acronym-a,
.acronym-i,
.acronym-lab {
    font-weight: 700;
}

.lab-fullname {
    font-size: 1.25em;
}

.research-topic {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--navy);
}

/* Underline every other topic so adjacent ones stay visually separate */
.research-topic:nth-of-type(even) {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.acronym-p,
.acronym-i {
    color: var(--orange);
}

.acronym-a {
    color: #6d6e71;
}

.acronym-lab {
    color: var(--navy);
}

.welcome-photo {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.welcome-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 280px;
    filter: brightness(1.14) contrast(1.04);
}

/* News */
.news-list {
    display: grid;
    gap: 0;
}

.news-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    column-gap: 28px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.news-item:first-child {
    border-top: 1px solid var(--line);
}

.news-item time,
.news-date {
    grid-column: 1;
    grid-row: 1 / span 2;
    padding-top: 3px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.news-item h3 {
    grid-column: 2;
    grid-row: 1;
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.news-item p {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    color: var(--muted);
}

.news-page .news-item {
    padding: 24px 0;
}

/* Research topics */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 44px;
}

.topic-card {
    padding: 0;
}

.topic-card::before {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    background: var(--orange);
    margin-bottom: 16px;
}

.topic-num {
    display: none;
}

.topic-card h3 {
    font-size: 1.35rem;
    margin: 0 0 12px;
}

.topic-card h3 a {
    color: var(--navy);
}

.topic-card h3 a:hover {
    color: #1d4f86;
}

.topic-card p {
    color: var(--muted);
    margin-bottom: 0;
}

/* Acknowledgements */
.ack-note {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 780px;
    margin: -12px 0 34px;
}

.ack-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 32px;
    align-items: center;
}

.ack-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    min-height: 116px;
    min-width: 0;
}

.ack-logo img {
    max-height: 86px;
    max-width: 210px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.ack-logo.is-tall img {
    max-height: 100px;
}

.ack-logo.is-wide img {
    max-width: 196px;
}

.ack-logo.is-slim img {
    max-width: 240px;
}

.research-block {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 32px 34px;
    margin-bottom: 24px;
}

.research-block h2 {
    font-size: 1.7rem;
    margin-bottom: 14px;
}

.research-block p {
    color: var(--muted);
    margin-bottom: 14px;
}

.related-list {
    margin: 12px 0 0 18px;
    color: var(--ink);
}

.related-list li {
    margin-bottom: 8px;
}

.topic-scope {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 30px 34px 26px;
    margin: 8px 0 28px;
    box-shadow: var(--shadow);
}

.topic-scope-title {
    font-size: 1.7rem;
    margin-bottom: 6px;
}

.topic-scope-intro {
    color: var(--muted);
    margin-bottom: 18px;
}

.topic-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(4, auto);
    grid-auto-flow: column;
    gap: 10px 40px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--ink);
}

.topic-list li {
    position: relative;
    padding-left: 20px;
    break-inside: avoid;
}

.topic-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--orange);
}

.topic-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.topic-chips span {
    display: inline-block;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    background: var(--mist);
}

.research-bridge {
    border-left: 3px solid var(--orange);
    padding: 2px 0 2px 22px;
    margin: 30px 0 34px;
}

.research-bridge p {
    color: var(--muted);
    font-size: 1.08rem;
    margin-bottom: 12px;
}

.research-bridge p:last-child {
    margin-bottom: 0;
    color: var(--navy);
    font-weight: 600;
}

.overview-figure {
    margin: 28px 0 8px;
    text-align: center;
}

.overview-figure img {
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid var(--line);
}

/* People */
.people-section {
    margin-bottom: 52px;
}

.people-section:last-child {
    margin-bottom: 0;
}

.people-section > h2 {
    font-size: 1.4rem;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 28px;
}

.pi-row {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 34px 28px;
}

.person {
    min-width: 0;
}

.person .photo-frame {
    margin-bottom: 14px;
}

.person h3 {
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.person .person-role {
    font-size: 14px;
    margin-bottom: 6px;
}

.person .person-meta {
    margin: 0 0 6px;
    font-size: 14px;
}

.person p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.person p + p {
    margin-top: 4px;
}

/* Same weight and size as .person-role (e.g. "Ph.D. Student") */
.person p strong {
    font-weight: 600;
    font-size: 14px;
    color: var(--muted);
}

.photo-frame {
    width: 100%;
    aspect-ratio: 1;
    background: var(--mist);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pi-row .photo-frame {
    aspect-ratio: auto;
    background: transparent;
    border: 0;
}

.pi-row .photo-frame img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 12px;
}

.pi-row .person-copy h3 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.photo-placeholder {
    color: #8a96a6;
    text-align: center;
    padding: 16px;
    font-size: 14px;
    font-weight: 600;
}

.person-copy h3 {
    margin-bottom: 4px;
}

.person-role {
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 12px;
}

.person-copy p,
.person-meta {
    color: var(--muted);
}

.person-meta {
    margin: 10px 0 0;
    font-size: 15px;
}

/* Publications */
.pub-year,
.term-heading {
    margin: 36px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--navy);
    font-size: 1.4rem;
}

.pub-list {
    list-style: none;
    counter-reset: pub;
}

.pub-list li {
    counter-increment: pub;
    padding: 16px 0 16px 42px;
    border-bottom: 1px solid var(--line);
    position: relative;
    color: var(--ink);
}

.pub-list li::before {
    content: counter(pub) ".";
    position: absolute;
    left: 0;
    top: 16px;
    color: var(--navy);
    font-weight: 700;
}

.pub-list em {
    color: var(--muted);
}

.pub-links {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    color: var(--muted);
}

.pub-links a {
    font-weight: 600;
}

.scholar-link {
    display: inline-block;
    margin-top: 8px;
    font-weight: 700;
}

/* Teaching */
.term-heading:first-child {
    margin-top: 0;
}

.course {
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.course:first-child {
    border-top: 1px solid var(--line);
}

.course-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.course-code {
    margin-right: 10px;
    color: var(--orange);
    font-weight: 700;
}

.course-summary {
    max-width: 760px;
    margin: 0 0 16px;
    color: var(--muted);
}

.course-meta {
    display: grid;
    grid-template-columns: 130px 1fr;
    column-gap: 24px;
    row-gap: 6px;
    /* The label is set smaller than the value, so align on the text baseline */
    align-items: baseline;
    max-width: 680px;
    margin: 0;
}

.course-meta dt {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.course-meta dd {
    margin: 0;
    color: var(--ink);
}

.course-note {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 15px;
}

/* Projects */
.project-list {
    display: grid;
    gap: 24px;
}

.project-card {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.project-thumb {
    flex: 0 0 360px;
}

.project-body {
    flex: 1;
    min-width: 0;
}

/* Media keeps its natural aspect ratio — never cropped */
.media-auto {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(11, 31, 58, .12);
}

.media-auto img {
    width: 100%;
    height: auto;
    display: block;
}

.project-system {
    color: var(--muted);
    margin-bottom: 4px;
}

.project-title {
    margin: 0 0 4px;
    font-size: 1.25rem;
    line-height: 1.3;
}

.project-conf {
    margin: 2px 0 6px;
    color: var(--muted);
}

.project-authors {
    margin: 4px 0 6px;
    color: var(--muted);
}

.project-links {
    margin: 4px 0 8px;
}

.project-links a {
    font-weight: 700;
}

.project-abs summary {
    cursor: pointer;
    margin: 6px 0;
    color: var(--navy);
    font-weight: 600;
    list-style: none;
}

.project-abs summary::marker,
.project-abs summary::-webkit-details-marker {
    display: none;
    content: "";
}

.project-abs summary::after {
    content: " \2304";
    font-weight: 600;
    color: #9aa3b0;
}

.project-abs[open] summary::after {
    content: " \2303";
}

.project-abs p {
    margin: 6px 0 0;
    color: var(--muted);
}

/* Openings */
.opening-panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 36px;
    box-shadow: var(--shadow);
}

.opening-panel .topic-list {
    margin: 12px 0 20px;
}

.btn-paia {
    display: inline-block;
    background: var(--orange);
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
}

.btn-paia:hover {
    background: var(--orange-dark);
    color: #fff;
    text-decoration: none;
}

@media only screen and (max-width: 900px) {
    .page {
        padding-top: 92px;
    }

    .hero {
        min-height: 320px;
        margin-top: 92px;
    }

    .welcome-grid,
    .topic-grid,
    .pi-row {
        grid-template-columns: 1fr;
    }

    .pi-row .photo-frame {
        max-width: 220px;
    }

    .topic-grid {
        gap: 28px;
    }

    .topic-list {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        grid-auto-flow: row;
    }

    .project-card {
        flex-direction: column;
    }

    .project-thumb {
        flex-basis: auto;
        width: 100%;
    }

    .news-item {
        grid-template-columns: 1fr;
    }

    .news-item time,
    .news-date,
    .news-item h3,
    .news-item p {
        grid-column: 1;
        grid-row: auto;
    }

    .news-item time,
    .news-date {
        padding-top: 0;
        margin-bottom: 4px;
    }

    .course-meta {
        grid-template-columns: 1fr;
        row-gap: 2px;
    }

    .course-meta dd {
        margin-bottom: 8px;
    }

    .ack-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 16px;
    }

    .ack-logo {
        min-height: 104px;
        padding: 8px;
    }

    .ack-logo img,
    .ack-logo.is-tall img,
    .ack-logo.is-wide img,
    .ack-logo.is-slim img {
        max-height: 62px;
        max-width: 100%;
    }

    .section {
        padding: 52px 0;
    }
}

/* Side by side, the mark leaves too little room for the caption to set well */
@media only screen and (max-width: 620px) {
    .hero-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 18px 20px;
    }

    .hero-card img {
        width: 128px;
    }
}
