/* =====================================================================
   KLAUS MUELLER — SITE STYLESHEET
   ---------------------------------------------------------------------
   TABLE OF CONTENTS
     1.  Design tokens (:root)
     2.  Base / reset / typography
     3.  Shared components  (eyebrow, links, buttons, PANELS)
     4.  Header & navigation
     5.  Hero (homepage)
     6.  Homepage panels  (Research / News / Teaching)
     7.  Inner-page shell  (hero band, wrappers, sections)
     8.  Inner-page components  (cards, tables, people, news feed, CV)
     9.  Research page
    10.  About page
    11.  Footer
    12.  Legacy / unused-in-current-pages (kept for old sub-pages)

   DENSITY UNIT  --u
     Homepage font-sizes / paddings / gaps are written as
     calc(var(--u) * k), so type, spacing and images shrink and grow
     together with the viewport.

   PANEL THEME (the "tweak and check visually" knobs live in section 1):
     --panel-tint-a     strength of the faded colour wash (0.02 – 0.08)
     --panel-accent-a   opacity of the coloured top bar   (0 = off)
     --panel-radius / --panel-gap / --panel-pad / --eyebrow-size
   ===================================================================== */


/* =====================================================================
   1. DESIGN TOKENS
   ===================================================================== */
:root {

    /* ---------- Backgrounds and surfaces ---------- */
    --page-bg: #F3F5F7;
    --paper: #FFFFFF;
    --paper-dim: #EEF1F4;
    --surface-soft: #F8F9FB;
    --surface-accent: #F6ECEE;

    /* ---------- Text ---------- */
    --ink: #20242B;
    --ink-soft: #626B76;
    --ink-nav: #494949;

    /* ---------- Borders ---------- */
    --rule: #DCE2E8;
    --rule-strong: #C7D0DA;

    /* ---------- Brand colors ---------- */
    --accent: darkred;
    --accent-dark: darkred;
    --accent-light: #F6ECEE;
    --accent-link: #2054C7;

    --c-analytics: #2054C7;
    --c-xai: #7C3AED;
    --c-sci: #0E9C93;
    --c-agentic: #DD7A2C;

    --dark: #0d1511;
    --dark-soft: #B8BCAE;
    --dark-rule: rgba(238, 239, 233, .14);

    --c1: #0E9C93;
    --c2: #DD7A2C;
    --c3: #2054C7;
    --c4: #9B5B8C;
    --c5: #B79A3E;
    --c6: #a9c78b;

    --btn-secondary: #ccdcff;

    --hero-wash:
        radial-gradient(50rem 22rem at 25% 0%, rgb(var(--tint) / .16), transparent 75%),
        radial-gradient(40rem 20rem at 85% 0%, rgb(var(--tint) / .10), transparent 50%);

    /* ---------- Look & feel settings (safe to edit; see guide §19) ---------- */
    --hero-text-scale: 0.975;
    /* homepage top row: name, roles, bio, buttons (0.85 = 15% smaller) */
    --hover-bg: var(--accent-light);
    /* fill when the mouse is over a box */
    --hover-ring: inset 0 0 0 1px var(--accent);
    /* thin outline on papers and About-page rows */


    /* ---------- Panel theme (card look) ----------
       --tint is an "R G B" triple so one value drives the wash,
       the top bar, header rules, table headers and hovers.          */
    --tint: 175 0 0;
    /* default tint = brand red            */
    --panel-tint-a: .04;
    /* wash strength (hero header uses .16) */
    --panel-accent-a: .55;
    /* top accent bar opacity               */
    --panel-radius: 0.75rem;
    --panel-border: #E3E7EC;
    --panel-gap: clamp(0.5rem, 1.2vw, 1rem);
    --panel-pad: clamp(1rem, 1.8vw, 1.75rem);
    --panel-shadow: 0 1px 2px rgba(20, 24, 31, .04),
        0 10px 24px -18px rgba(20, 24, 31, .25);
    --eyebrow-size: clamp(1.2rem, 0.9rem + 0.5vw, 1.5rem);

    --page-gutter: 2.5vw;

    /* ---------- Typography tokens ---------- */
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-label: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

    --weight-display: 600;
    --weight-heading: 600;
    --weight-strong: 600;
    --weight-label: 500;
    --weight-eyebrow: 600;
    --weight-brand: 700;
    --weight-card-heading: 600;
    --weight-medium: 500;

    --tracking-display: -0.02em;
    --tracking-heading: -0.015em;
    --tracking-eyebrow: 0.12em;
    --tracking-link: 0.04em;
    --tracking-nav: 0.1em;
    --tracking-brand: 0.12em;
    --tracking-search: 0.06em;
    --tracking-button: 0.06em;
    --tracking-timeline: 0.08em;
    --tracking-news-date: 0.03em;
    --tracking-footer: 0.1em;
    --tracking-hint: 0.04em;

    --leading-body: 1.6;
    --leading-display: 1.15;
    --leading-heading: 1.2;
    --leading-role: 1.4;
    --leading-intro: 1.5;
    --leading-link: 1.3;
    --leading-card-heading: 1.25;
    --leading-card-copy: 1.4;
    --leading-lower: 1.3;
    --leading-compact: 1.2;
    --leading-timeline: 1.1;
    --leading-search-result: 1.45;

    --size-h1: calc(var(--u) * 6);
    --size-h2: calc(var(--u) * 3);

    /* ---------- Shape & density ---------- */
    --radius: 0.75rem;
    --u: 0.65rem;
}

/* Desktop density unit */
@media (min-width: 1081px) {
    :root {
        --u: max(min(1vh, 0.8vw), 6px);
    }
}

/* Slightly tighter corners on phones */
@media (max-width: 560px) {
    :root {
        --panel-radius: 0.75rem;
    }
}

@media (min-width: 1081px) {
    html:has(body.page) {
        font-size: clamp(1rem, 0.5vw + 0.5625rem, 1.375rem);
    }
}


/* =====================================================================
   2. BASE / RESET / TYPOGRAPHY
   ===================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: var(--leading-body);
    -webkit-font-smoothing: antialiased;
}

.wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    /*padding: 0 clamp(0.75rem, 2vw, 1.5rem);*/
    padding: 0 var(--page-gutter);
}

a {
    color: inherit;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: var(--weight-heading);
    margin: 0;
    letter-spacing: var(--tracking-heading);
}

h1 {
    font-size: var(--size-h1);
    font-weight: var(--weight-display);
    letter-spacing: var(--tracking-display);
    color: var(--ink);
    margin-bottom: calc(var(--u) * 0.5);
    line-height: var(--leading-display);
}

p {
    margin: 0 0;
    color: var(--ink-soft);
}

/* Generic page sections */
section {
    padding: clamp(2.25rem, 5vw, 3.5rem) 0;
}

/* Scroll-reveal */
[data-reveal] {
    opacity: 0;
    transform: translateY(0.875rem);
    transition: opacity .6s ease, transform .6s ease;
}

[data-reveal].vis {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {

    *,
    [data-reveal] {
        transition-duration: .01ms !important;
        opacity: 1 !important;
        transform: none !important;
    }
}


/* =====================================================================
   3. SHARED COMPONENTS
   ===================================================================== */

/* ---------- Eyebrow (section label) ---------- */
.eyebrow {
    font-family: var(--font-label);
    font-size: var(--eyebrow-size);
    font-weight: 700;
    color: rgb(var(--tint));
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0.5rem 0 0;
    line-height: 1.2;
}

.eyebrow-small {
    font-family: var(--font-label);
    font-size: calc(var(--eyebrow-size)*0.75);
    font-weight: 600;
    color: rgb(var(--tint));
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
}

/* ---------- Text link ---------- */
.text-link {
    display: inline;
    align-items: center;
    text-decoration: none;
    color: var(--accent-link);
    border-bottom: 1px solid transparent;
    line-height: var(--leading-link);
    white-space: normal;
}

.text-link:hover {
    color: var(--accent);
}

.text-link.small {
    font-size: calc(var(--u) * 0.95);
}

.text-link svg,
.btn-outline svg,
.area-link svg {
    width: calc(var(--u) * 1.1);
    height: calc(var(--u) * 1.1);
}

/* ---------- Buttons ---------- */
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--u) * 0.6);
    font-size: calc(var(--u) * 1.05);
    font-weight: var(--weight-label);
    letter-spacing: var(--tracking-link);
    text-transform: uppercase;
    text-decoration: none;
    color: var(--accent);
    border: 1px solid var(--rule-strong);
    border-radius: 0.375rem;
    padding: calc(var(--u) * 0.65) calc(var(--u) * 1.2);
    transition: border-color .15s ease, background .15s ease;
    line-height: var(--leading-link);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: #F3F6FD;
}

.btn {
    font-family: var(--font-label);
    font-size: calc(var(--u) * 1.5 * var(--hero-text-scale));
    text-transform: uppercase;
    letter-spacing: var(--tracking-button);
    text-decoration: none;
    padding: calc(var(--u) * 0.75) calc(var(--u) * 1.5);
    border-radius: var(--radius);
    border: 1px solid rgba(238, 239, 233, .45);
    line-height: var(--leading-link);
}

.btn:hover {
    border-color: #fff;
}

.btn.primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn.primary:hover {
    background: var(--accent-light);
    color: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn.secondary {
    background: var(--accent-light);
    color: var(--accent-dark);
    border-color: var(--accent);
}

.btn.secondary:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn.tertiary {
    background: transparent;
    color: var(--ink-soft);
    border-color: var(--rule-strong);
}

.btn.tertiary:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ---------- PANEL (shared card block) ----------
   Every "section block" on every page uses .panel.
   Per-card differences are only the --tint colour (modifiers below)
   and layout classes defined in the sections that use them.          */
.panel,
.news-feed>li {
    position: relative;
    min-width: 0;
    background: radial-gradient(60rem 26rem at 0% 0%, rgb(var(--tint) / var(--panel-tint-a)), transparent 70%), var(--paper);
    border: 1px solid var(--panel-border);
    border-radius: var(--panel-radius);
    /*box-shadow: var(--panel-shadow),
        inset 0 3px 0 rgb(var(--tint) / var(--panel-accent-a));*/
    padding: var(--panel-pad);
}

/* Header row inside a panel: eyebrow on the left, optional link right */
.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin: calc(-1 * var(--panel-pad)) calc(-1 * var(--panel-pad)) calc(var(--u) * 1.4);
    padding: 1rem var(--panel-pad) 0.7rem;
    background: rgb(var(--tint) / .06);
    border-bottom: 1px solid rgb(var(--tint) / .18);
    border-radius: var(--panel-radius) var(--panel-radius) 0 0;
}

.panel-body {
    flex: 1;
}

/* Per-card colour modifiers (homepage) — all three can be set equal */

.panel--bio {
    --tint: 14 156 147;
    padding: calc(var(--panel-gap) * 1.5);
}

.panel--research {
    --tint: 175 0 0;
}

.panel--news {
    --tint: 32 84 199;
}

.panel--teaching {
    --tint: 14 156 147;
}

/* Inner-page headings: first <h2> of a panel looks like an eyebrow */
.panel>h2:first-child {
    font-family: var(--font-label);
    font-size: var(--eyebrow-size);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.2;
    color: rgb(var(--tint));
    margin: calc(-1 * var(--panel-pad)) calc(-1 * var(--panel-pad)) calc(var(--u) * 1.4);
    padding: 0.7rem var(--panel-pad);
    background: rgb(var(--tint) / .06);
    border-bottom: 1px solid rgb(var(--tint) / .18);
    border-radius: var(--panel-radius) var(--panel-radius) 0 0;
}


/* Empty placeholder panels (heading only) hide themselves until filled */
.panel:has(> h2:only-child) {
    display: none;
}


/* =====================================================================
   4. HEADER & NAVIGATION
   ===================================================================== */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(5px);
    z-index: 40;
    border-bottom: 1px solid var(--rule);
    max-height: 10vh;
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--u) * 2.2);
    height: clamp(3.75rem, 7vw, 4.25rem);
    padding: 0 var(--page-gutter);
}

@media (min-width: 1081px) {
    .site-header {
        height: 10vh;
    }

    .site-header .wrap {
        height: 100%;
    }
}

.brand {
    font-size: calc(var(--u) * 2.5);
    font-weight: var(--weight-brand);
    letter-spacing: var(--tracking-brand);
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    white-space: nowrap;
}

.main-nav {
    display: flex;
    gap: calc(var(--u) * 8);
    margin: 0 1rem;
}

.main-nav a {
    font-size: calc(var(--u) * 2);
    font-weight: var(--weight-heading);
    letter-spacing: var(--tracking-nav);
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink-nav);
    transition: color .15s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.125rem;
    height: 2.125rem;
    background: none;
    border: 1px solid var(--rule-strong);
    border-radius: 0.375rem;
    cursor: pointer;
    margin-left: auto;
}

.nav-toggle span {
    display: block;
    height: 1.5px;
    margin: 0 6px;
    background: var(--ink);
}

/* Mobile navigation dropdown */
@media (max-width: 980px) {
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: auto;
        background: var(--paper);
        border-bottom: 1px solid var(--rule);
        flex-direction: column;
        padding: 1rem clamp(2rem, 4vw, 3rem) 1rem;
        display: none;
        gap: 1rem;
        margin: 0;
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        font-size: calc(var(--u) * 1.5);
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--rule);
    }
}


/* =====================================================================
   5. HERO (homepage)
   ===================================================================== */
.hero {
    position: relative;
    overflow: hidden;
    padding: 0;
    padding-bottom: calc(var(--u) * 1.5);
    min-height: 0;
    border-bottom: 1px solid var(--rule);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    /*background:
        radial-gradient(50rem 22rem at 25% 0%, rgba(175, 0, 0, 0.16), transparent 75%),
        radial-gradient(40rem 20rem at 85% 0%, rgba(75, 0, 0, 0.1), transparent 50%);*/
    background: var(--hero-wash);
}

.hero-wrap {
    position: relative;
    z-index: 1;
}

.hero-grid {
    display: grid;
    grid-template-columns:
        minmax(190px, 0.70fr) minmax(310px, 1.20fr) minmax(310px, 1.35fr);
    gap: clamp(1rem, 1.5vw, 1.5rem);
    align-items: stretch;
    padding-top: 1rem;
    padding-bottom: 0;
}

@media (min-width: 681px) {
    .hero {
        --u: clamp(8px, 0.65vw, 11px);
        --size-h1: clamp(2rem, 3.2vw, 3.25rem);
    }
}

@media (min-width: 1081px) {
    .hero {
        height: auto;
    }

    .hero-wrap {
        height: auto;
    }

    .hero-grid {
        height: auto;
        min-height: 30vh;
        grid-template-rows: auto;
    }
}

@media (min-width: 1201px) {
    .hero-grid {
        min-height: min(30vh, calc(var(--u) * 40));
    }
}

.hero-portrait {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

.hero-portrait img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: var(--radius);
}

.hero-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 1rem;
    container-type: inline-size;
}

.hero h1 {
    font-size: calc(var(--size-h1) * var(--hero-text-scale));
}

.role-line {
    font-size: calc(var(--u) * 2 * var(--hero-text-scale));
    color: var(--ink-soft);
    margin: 0 0 calc(var(--u) * 0.5);
    line-height: var(--leading-role);
}

.role-line strong {
    color: var(--ink);
    font-weight: var(--weight-strong);
}

.role-line a {
    font-size: calc(var(--u) * 1.85 * var(--hero-text-scale));
    color: var(--accent);
    text-decoration: none;
    /*transition: font-size .15s ease, text-decoration .15s ease;*/
}

.role-line a:hover {
    text-decoration: underline;
}

.cta {
    display: flex;
    gap: calc(var(--u) * 1);
    margin-top: calc(var(--u) * 3);
    flex-wrap: wrap;
}

/* (The old .hero-about gradient had a trailing comma and never rendered;
   the hero backdrop already provides the wash, so it is omitted.) */
.hero-about {
    min-width: 0;
}

.hero-about .short-bio {
    font-size: calc(var(--u) * 1.75 * var(--hero-text-scale));
    line-height: 1.5;
    text-align: justify;
    color: var(--ink);
}


@media (min-width: 1081px) {
    .hero-about {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-self: stretch;
    }
}

@media (max-width: 1200px) and (min-width: 681px) {
    .hero-grid {
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    }

    .hero-portrait {
        position: relative;
        border-radius: var(--radius);
        overflow: hidden;
    }

    .hero-portrait img {
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
        border-radius: var(--radius);
        max-height: clamp(16rem, 38vw, 24rem);
    }

    .hero-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 680px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero h1 {
        font-size: calc(var(--size-h1) * 0.85 * var(--hero-text-scale));
    }

    .hero-portrait {
        min-height: 16rem;
        position: relative;
        overflow: hidden;
        justify-self: center;
    }

    .hero-portrait img {
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
        border-radius: inherit;
        max-height: clamp(16rem, 75vw, 20rem);
    }

    .hero-body {
        align-items: center;
        text-align: center;
    }

    .hero-body .cta {
        justify-content: center;
    }

    .role-line,
    .role-line a {
        font-size: 1rem;
    }

    .hero-about {
        grid-column: auto;
        padding: calc(var(--u) * 1.5) 0;
    }

    .hero-about .short-bio {
        font-size: calc(var(--u) * 1.5);
    }
}

/* =====================================================================
   6. HOMEPAGE PANELS  (Research full width; News + Teaching share a row)
   ===================================================================== */
.home-panels {
    padding: calc(var(--u) * 1.5) 0 calc(var(--u) * 3);
    border-top: 0;
}

@media (min-width: 1081px) {
    .home-panels {
        --u: max(min(1.4vh, 1.1vw), 12px);
    }
}

.home-panels .wrap {
    display: grid;
    gap: var(--panel-gap);
}

.home-panels .panel-head .text-link {
    font-size: calc(var(--u) * 1.25);
    white-space: nowrap;
}

/* News + Teaching: two equal cards */
.panel-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--panel-gap);
}

.panel-row>.panel {
    display: flex;
    flex-direction: column;
}

@media (max-width: 1080px) {
    .panel-row {
        grid-template-columns: 1fr;
    }
}

/* ---------- Research panel ---------- */
.research-grid {
    display: block;
}

@media (min-width: 1081px) {
    .research-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 3.4fr);
        column-gap: calc(var(--u) * 3);
        align-items: stretch;
    }

    .research-intro {
        display: flex;
        flex-direction: column;
    }

    .research-intro .btn-outline {
        align-self: flex-start;
        margin-top: auto;
    }
}

@media (max-width: 780px) {
    .research-intro {
        margin-bottom: calc(var(--u) * 2.4);
    }
}

.research-intro h2 {
    font-size: var(--size-h2);
    line-height: var(--leading-heading);
    margin-bottom: calc(var(--u) * 0.8);
}

.research-intro p {
    font-size: calc(var(--u) * 1.3);
    line-height: var(--leading-intro);
    margin-bottom: calc(var(--u) * 1);
}

.research-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: calc(var(--u) * 2.4);
}

@media (max-width: 1000px) {
    .research-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .research-cards {
        grid-template-columns: 1fr;
    }
}

/* Area cards = white tiles inside the tinted panel */
.area-card {
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: calc(var(--u) * 0.9);
    padding: calc(var(--u) * 0.8);
}

.area-thumb {
    display: block;
    aspect-ratio: 200/110;
    border-radius: calc(var(--u) * 0.6);
    overflow: hidden;
    margin-bottom: calc(var(--u) * 0.7);
}

.area-thumb svg {
    width: 100%;
    height: 100%;
    display: block;
}

.area-card h3 {
    font-family: var(--font-body);
    font-weight: var(--weight-card-heading);
    font-size: calc(var(--u) * 1.5);
    color: var(--c);
    margin-bottom: calc(var(--u) * 0.3);
    line-height: var(--leading-card-heading);
}

.area-card p {
    font-size: calc(var(--u) * 1.3);
    line-height: var(--leading-card-copy);
    flex: 1;
    margin-bottom: calc(var(--u) * 0.4);
}

.area-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: calc(var(--u) * 0.4);
    font-size: calc(var(--u) * 1.0);
    font-weight: var(--weight-card-heading);
    letter-spacing: var(--tracking-link);
    text-transform: uppercase;
    color: var(--c);
    margin-top: calc(var(--u) * 0.2);
    border: 1px solid var(--rule-strong);
    border-radius: calc(var(--u) * 0.4);
    padding: calc(var(--u) * 0.5) calc(var(--u) * 1.0);
    transition: border-color .15s ease, background .15s ease;
    max-width: 50%;
    line-height: var(--leading-link);
}

.area-link:hover {
    border-color: var(--c);
}

/* ---------- News panel (list filled by assets/js/recent-news.js) ---------- */
.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-list li {
    display: flex;
    gap: calc(var(--u) * 2);
    padding: calc(var(--u) * 1) 0;
    border-bottom: 1px solid rgb(var(--tint) / .15);
    font-size: calc(var(--u) * 1.3);
    line-height: var(--leading-lower);
}

.news-list li:first-child {
    padding-top: 0;
}

.news-list li:last-child {
    border-bottom: 0;
}

.news-list .date {
    flex-shrink: 0;
    width: 8rem;
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
}

/* ---------- Teaching panel (list filled by assets/js/teaching-preview.js) ---------- */
.feature-row {
    display: flex;
    gap: calc(var(--u) * 1.6);
    margin-bottom: calc(var(--u) * 0.4);
    align-items: center;
}

.feature-row:last-child {
    margin-bottom: 0;
}

.teaching-row {
    border: 0;
    margin: 0;
    padding: 0;
}

.feature-row>div {
    flex: 1;
    min-width: 0;
}

.feature-thumb {
    flex-shrink: 0;
    align-self: center;
    width: calc(var(--u) * 12);
    height: auto;
    aspect-ratio: 4/3;
    border-radius: calc(var(--u) * 0.6);
    overflow: hidden;
}

.feature-thumb svg,
.feature-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.teaching-preview-item {
    margin: calc(var(--u) * 0.8) 0;
}

.teaching-preview-item:first-child {
    margin-top: 0;
}

.teaching-preview-item:last-child {
    margin-bottom: 0;
}

.feature-title {
    display: inline;
    font-family: var(--font-display);
    font-weight: var(--weight-heading);
    font-size: calc(var(--u) * 1.35);
    color: var(--accent-link);
    text-decoration: none;
    line-height: var(--leading-card-heading);
}

.feature-meta {
    font-size: calc(var(--u) * 1.0);
    color: var(--ink-soft);
    margin-bottom: calc(var(--u) * 0.25);
    line-height: var(--leading-compact);
}

.feature-desc {
    display: inline;
    font-size: calc(var(--u) * 1.3);
    line-height: var(--leading-card-copy);
}

@media (max-width: 1080px) {
    .feature-thumb {
        width: 8rem;
    }
}


/* =====================================================================
   7. INNER-PAGE SHELL  (People, Research, Teaching, News, About)
   ===================================================================== */
.page main {
    font-size: 1rem;
}

.page-wrap {
    width: calc(100% - 2 * var(--page-gutter));
    max-width: none;
    margin: 0 auto;
}

.page-wrap h2 {
    margin-top: clamp(0.25rem, 0.5vw, 0.5rem);
}

.page-wrap p {
    margin: 0;
}

/* A .page-wrap that is also a .panel becomes a card */
.page-wrap.panel {
    margin: 0 auto var(--panel-gap);
    padding: var(--panel-pad);
}

/* Strong gradient band under the header (page identity) */
.page-hero {
    position: relative;
    padding: clamp(0.5rem, 1vw, 1rem) 0;
    /*background:
        radial-gradient(50rem 22rem at 25% 0%, rgba(255, 73, 73, 0.16), transparent 75%),
        radial-gradient(40rem 20rem at 85% 0%, rgba(255, 162, 162, 0.16), transparent 75%);*/
    background: var(--hero-wash);
    padding: clamp(0.75rem, 1.5vw, 1.5rem) 0;
    border-bottom: 1px solid var(--rule);
}

.page-hero h1 {
    font-size: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
    margin-bottom: 0.5rem;
}

.page-hero .lead {
    line-height: 1.25;
    max-width: 75vw;
    color: var(--ink);
    margin: 0;
}

/* Content area: panels are separated by gap, not by rules */
.page-section {
    padding: var(--panel-gap) 0 0;
    border-top: 0;
}

.page-section h3 {
    font-size: 1.0625rem;
    margin: 1.5rem 0 0.5rem;
}

/* Optional hue cycle down a page (delete this block for all-red panels) */
.page-section>.panel:nth-child(3n+2) {
    --tint: 32 84 199;
}

.page-section>.panel:nth-child(3n) {
    --tint: 14 156 147;
}


/* =====================================================================
   8. INNER-PAGE COMPONENTS
   ===================================================================== */

/* ---------- Cards ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 1rem;
}

.card {
    display: block;
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1.125rem 1.25rem;
    background: var(--paper);
}

.card h3 {
    margin: 0 0 0.35rem;
    font-size: 1.0625rem;
    color: var(--accent);
}

.card p {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.45;
}

.card .meta {
    margin-top: 0.6rem;
    font-size: 0.8125rem;
    color: var(--ink-soft);
}

/* ---------- Tables ---------- */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    min-width: 34rem;
    /* narrow screens scroll sideways instead of squeezing */
    border-collapse: collapse;
    font-size: 0.9375rem;
    line-height: 1.45;
}

.table th,
.table td {
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgb(var(--tint) / .15);
}

.table td {
    padding: 0.35rem 0.5rem;
}

.table th {
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    background: rgb(var(--tint) / .06);
    border-bottom: 1px solid rgb(var(--tint) / .25);
    white-space: nowrap;
}

.table td.num,
.table th.num {
    white-space: nowrap;
}

.table td a {
    color: var(--accent-link);
    text-decoration: none;
    font-weight: 500;
}

.table td a:hover {
    color: var(--accent);
}

.people-table th.num,
.people-table td.num {
    width: 6rem;
    min-width: 6rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.people-table .sub {
    font-size: 0.875rem;
    color: var(--ink-soft);
    margin: 0 0 0.15rem;
}

.people-table .sub::before {
    content: "\A(";
    white-space: pre;
}

.people-table .sub::after {
    content: ")"
}

/* ---------- People ---------- */
.person-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr));
    gap: 1rem 1.5rem;
}

.person {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.75rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: calc(var(--panel-radius) * 0.7);
}

.person .avatar {
    flex: 0 0 7.5rem;
    width: 7.5rem;
    height: 7.5rem;
    overflow: hidden;
    background: var(--paper-dim);
    border: 1px solid var(--rule);
}

.person .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person h3 {
    margin: 0 0 0.15rem;
    font-size: 1.0625rem;
}

.person h3 a {
    color: var(--accent-link);
    text-decoration: none;
}

.person h3 a:hover {
    color: var(--accent);
}

.person .from,
.person .who {
    font-size: 0.875rem;
    color: var(--ink-soft);
    margin: 0 0 0.15rem;
}

.person .from::before {
    content: "(";
}

.person .from::after {
    content: ")";
}

.person .topic {
    font-size: 0.875rem;
    margin: 0;
    color: var(--ink);
}

.group-photo {
    max-width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--rule);
    background: var(--paper-dim);
    min-height: 15vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

/* ---------- Teaching: course cards ---------- */
.course-head,
.course-list {
    /* thumb | code | name | time | venue */
    --course-cols: 5.5rem 6rem minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1.2fr);
}

.course-head,
.course-card {
    display: grid;
    grid-template-columns: var(--course-cols);
    column-gap: 1.25rem;
    align-items: center;
}

/* column labels; padding matches the card's padding + border so columns line up */
.course-head {
    padding: 0 calc(0.75rem + 1px);
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.course-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.course-card {
    padding: 0.6rem 0.75rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: calc(var(--panel-radius) * 0.7);
}

.course-thumb {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 0.4rem;
    overflow: hidden;
    background: var(--paper-dim);
}

.course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* code = small tinted pill, same language as the eyebrow */
.course-code {
    justify-self: start;
    padding: 0.2rem 0.6rem;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    color: rgb(var(--tint));
    background: rgb(var(--tint) / .08);
    border-radius: 999px;
}

.course-name a {
    font-weight: 600;
    color: var(--accent-link);
    text-decoration: none;
}

.course-name a:hover {
    color: var(--accent);
}

.course-name .sub {
    display: block;
    font-size: 0.875rem;
    color: var(--ink-soft);
}

.course-name .sub::before {
    content: "(";
}

.course-name .sub::after {
    content: ")";
}

.course-time,
.course-venue {
    font-size: 0.9rem;
    color: var(--ink);
}

/* phones: thumb on the left, code + name beside it, time and venue below */
@media (max-width: 760px) {
    .course-head {
        display: none;
    }

    .course-card {
        grid-template-columns: 5rem minmax(0, 1fr);
        grid-template-areas:
            "thumb code"
            "thumb name"
            "time  time"
            "venue venue";
        row-gap: 0.35rem;
    }

    .course-thumb {
        grid-area: thumb;
        align-self: start;
    }

    .course-code {
        grid-area: code;
    }

    .course-name {
        grid-area: name;
    }

    .course-time {
        grid-area: time;
    }

    .course-venue {
        grid-area: venue;
    }

    .course-time::before,
    .course-venue::before {
        content: attr(data-label) ":";
        margin-right: 0.4rem;
        font-weight: 600;
        color: var(--ink-soft);
    }
}

/* ---------- Chips ---------- */
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.chip-row a {
    display: inline-block;
    font-size: 0.875rem;
    padding: 0.3rem 0.75rem;
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    text-decoration: none !important;
    color: var(--ink) !important;
}

.chip-row a:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
}

/* ---------- News feed (each <li> is a tinted card; see shared .panel rule) ---------- */
.news-feed {
    list-style: none;
    margin: 0 0 var(--panel-gap);
    padding: 0;
    display: grid;
    gap: var(--panel-gap);
}

.news-feed>li {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 0.5rem 1.25rem;
}

.news-feed>li:nth-child(3n+2) {
    --tint: 32 84 199;
}

.news-feed>li:nth-child(3n) {
    --tint: 14 156 147;
}

.news-feed a {
    text-decoration: none;
    color: var(--accent-link);
}

.news-feed a:hover {
    color: var(--accent);
}

.news-feed .date {
    font-size: 0.875rem;
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
    padding-top: 0.1rem;
}

.news-feed p {
    margin: 0;
    color: var(--ink);
}

.news-feed .sub {
    display: block;
    font-size: 0.875rem;
    color: var(--ink-soft);
}

@media (max-width: 560px) {
    .news-feed>li {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }
}

/* ---------- CV lists ---------- */
.cv-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cv-list li {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 0.25rem 1.25rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgb(var(--tint) / .15);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.cv-list .when {
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
    font-size: 0.875rem;
}

.cv-plain {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.9375rem;
    line-height: 1.55;
}

.cv-plain li {
    margin: 0.35rem 0;
    font-size: 0.9375rem;
}

.cv-plain ul {
    margin-top: 0.25rem;
}

@media (max-width: 560px) {
    .cv-list li {
        grid-template-columns: 1fr;
    }
}

/* ---------- Collapsible blocks ---------- */
details.fold {
    border-top: 1px solid rgb(var(--tint) / .15);
    padding: 0.75rem 0;
}

details.fold summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.0625rem;
}

details.fold[open] summary {
    margin-bottom: 0.75rem;
}

/* ---------- Contact box ---------- */
.contact-box {
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    background: var(--paper);
    font-size: 0.9375rem;
}

.contact-box p {
    margin: 0 0 0.25rem;
    color: var(--ink);
    font-size: 0.9375rem;
}


/* =====================================================================
   9. RESEARCH PAGE  (area menu + paper list — both are panels)
   ===================================================================== */
.research-layout {
    display: grid;
    grid-template-columns: minmax(14rem, 20rem) 1fr;
    gap: var(--panel-gap);
    align-items: start;
    margin-bottom: var(--panel-gap);
}

/* ---------- LEFT: area menu ---------- */
.area-menu {
    position: sticky;
    top: 5rem;
    /* below the sticky header */
}

@media (min-width: 1081px) {
    .area-menu {
        top: calc(10vh + 1rem);
        /* desktop header is 10vh tall */
    }
}

.area-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.area-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--ink);
    padding: 0.55rem 0.75rem;
    border-radius: 0.4rem;
    cursor: pointer;
}

.area-btn.active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

/* ---------- RIGHT: paper list ---------- */
.paper-list-panel {
    min-width: 0;
}

.paper-area-title {
    font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
    margin: 0 0 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgb(var(--tint) / .18);
    line-height: 1.25;
}

.area-thumb-wrap {
    margin-bottom: 1rem;
}

.area-thumb-img {
    max-width: 160px;
    height: auto;
    border-radius: 0.4rem;
    border: 1px solid var(--rule);
}

.paper-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.paper-item {
    display: flex;
    gap: 1rem;
    padding: 0.9rem 0.5rem;
    border-bottom: 1px solid rgb(var(--tint) / .15);
    border-radius: 0.4rem;
}

.paper-thumb {
    flex: 0 0 100px;
    width: 100px;
    height: 80px;
    overflow: hidden;
    border-radius: 0.35rem;
    background: var(--paper-dim);
}

.paper-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.paper-thumb-placeholder {
    background: var(--paper-dim);
}

.paper-citation {
    flex: 1;
    min-width: 0;
}

.paper-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.35;
    margin: 0 0 0.2rem;
    color: var(--ink);
}

.paper-authors {
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0 0 0.15rem;
    color: var(--ink-soft);
}

.paper-venue {
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0 0 0.35rem;
    color: var(--ink-soft);
    font-style: italic;
}

.paper-links {
    font-size: 0.9rem;
    margin: 0;
}

.paper-links a {
    color: var(--accent-link);
    text-decoration: none;
    font-weight: 500;
}

.paper-links a:hover {
    color: var(--accent);
}

.paper-list-empty {
    font-size: 0.9rem;
    color: var(--ink-soft);
    padding: 1.5rem 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
    .research-layout {
        grid-template-columns: 1fr;
    }

    .area-menu {
        position: static;
    }

    .area-menu-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .area-btn {
        width: auto;
        padding: 0.35rem 0.7rem;
        font-size: 0.82rem;
        background: var(--paper);
        border: 1px solid var(--rule-strong);
        border-radius: 999px;
    }

    .area-btn.active {
        background: var(--accent);
        border-color: var(--accent);
    }
}


/* =====================================================================
   10. ABOUT PAGE
   ===================================================================== */

.about-layout {
    display: grid;
    grid-template-columns: minmax(10rem, 12.5rem) minmax(0, 1fr);
    width: calc(100% - 2 * var(--page-gutter));
    max-width: none;
    margin: 0 auto;
    padding: 1rem 0 0;
    /* was 1rem 2rem 0 */
    gap: var(--panel-gap);
    /* optional: matches the Research page spacing */
    align-items: start;
}

.about-content.page-wrap {
    width: auto;
    max-width: none;
    margin: 0;
}

/* ---------- Sidebar ---------- */
.about-nav {
    position: sticky;
    top: 5rem;
    /* below the sticky header (mobile / tablet) */
}

@media (min-width: 1081px) {
    .about-nav {
        top: calc(10vh + 1rem);
        /* desktop header is 10vh tall */
    }
}

.about-nav-list {
    list-style: none;
    margin: 1.2rem 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.about-nav-list a {
    display: block;
    text-align: left;
    padding: 0.3rem 1rem;
    padding-right: 0;
    border-left: 2px solid transparent;
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.about-nav-list a:hover {
    color: var(--accent);
    background: var(--paper-dim);
}

.about-nav-list a.active {
    color: var(--ink);
    font-weight: 600;
    border-left-color: var(--accent);
}

/* ---------- Content sections (each is a .panel) ---------- */
.about-content {
    min-width: 0;
}

.about-content>.about-section {
    margin-bottom: var(--panel-gap);
}

.about-content>.about-section:nth-child(3n+2) {
    --tint: 32 84 199;
}

.about-content>.about-section:nth-child(3n) {
    --tint: 14 156 147;
}

.about-section {
    scroll-margin-top: var(--about-scroll-offset, 5rem);
}

.about-section h3 {
    font-size: 1rem;
    margin: 0.75rem 0 0.4rem;
    color: var(--ink);
}

.about-text {
    margin: 0 0 0.75rem;
    color: var(--ink);
    line-height: 1.6;
    text-align: justify;
}

.about-note {
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
    color: var(--ink-soft);
}

/* Quick-facts strip in the biography */
.about-facts {
    max-width: 50%;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.75rem;
    margin: 1rem 0;
}

.about-fact {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--paper);
}

.about-fact-num {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: var(--tracking-heading);
    color: var(--accent);
    line-height: 1.1;
}

.about-fact-label {
    font-size: 0.8125rem;
    color: var(--ink-soft);
}

/* ---------- .cv-list inside About ---------- */
.about-page .cv-list {
    border-top: 1px solid rgb(var(--tint) / .15);
}

.about-page .cv-list li {
    grid-template-columns: 9.5rem 1fr;
}

.about-page .cv-list li {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: .4rem;
}

.about-page .cv-list li>span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.about-page .contact-box a {
    overflow-wrap: anywhere;
}

/* ---------- Static cards (interests) ---------- */
.about-page .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

.about-page .card h3 {
    margin: 0 0 0.35rem;
    color: var(--accent);
    font-size: 1rem;
}

.about-page .card p {
    color: var(--ink-soft);
}

/* ---------- Society chips (non-link) ---------- */
.about-chip {
    display: inline-block;
    font-size: 0.875rem;
    padding: 0.3rem 0.75rem;
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    color: var(--ink);
}

/* ---------- Collapsible blocks (talks, earlier appointments) ---------- */
.about-page details.fold {
    padding: 0.6rem 0;
}

.about-page details.fold summary:hover {
    color: var(--accent);
}

.about-page details.fold>.cv-list {
    margin-top: 0.25rem;
}

/* ---------- Responsive About navigation ---------- */
@media (max-width: 780px) {

    .about-layout {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .about-content {
        order: 0;
        width: 100%;
        min-width: 0;
    }

    .about-nav {
        order: -1;
        position: sticky;
        top: clamp(3.75rem, 7vw, 4.25rem);
        z-index: 30;
        width: auto;
        max-width: 100%;

    }

    .about-nav-list {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        gap: 0.4rem;
        overflow: visible;
    }

    .about-nav-list li {
        flex: 0 1 auto;
        min-width: 0;
        max-width: 100%;
    }

    .about-nav-list a {
        display: block;
        max-width: 100%;
        padding: 0.35rem 0.7rem;
        font-size: 0.82rem;
        white-space: normal;
        overflow-wrap: anywhere;
        border: 1px solid var(--rule-strong);
        border-radius: 999px;
    }

    .about-nav-list a.active {
        background: var(--accent);
        color: #fff;
        border-color: var(--accent);
    }

    .about-facts {
        max-width: 100%;
    }
}

@media (max-width: 560px) {
    .about-page .cv-list li {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.1rem;
    }

    .about-page .card-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* =====================================================================
   11. FOOTER
   ===================================================================== */
footer {
    background: #3C4142;
    color: rgb(236, 236, 236);
    padding: clamp(1rem, 2.5vw, 2rem) 0;
    margin-top: clamp(0.25rem, 1vw, 1rem);
}

footer a {
    font-size: 0.9rem;
    color: rgb(236, 236, 236);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer p {
    color: rgb(236, 236, 236);
    font-size: 0.9rem;
    margin: 0;
}

.foot-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: clamp(1rem, 2vw, 2rem);
    border-bottom: 1px solid rgb(236, 236, 236);
}

footer h4 {
    font-family: var(--font-label);
    font-size: 0.9rem;
    letter-spacing: var(--tracking-footer);
    text-transform: uppercase;
    color: rgb(236, 236, 236);
    margin: 0 0 0.875rem;
}

footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

footer li {
    margin: 0;
    padding: 0;
}

footer li a {
    font-size: 0.9rem;
    color: rgb(236, 236, 236);
    margin: 0;
    padding: 0;
}

footer li a:hover {
    text-decoration: underline;
}

.foot-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 1.25rem;
    font-family: var(--font-label);
    font-size: 0.9rem;
    color: rgb(236, 236, 236);
    flex-wrap: wrap;
    gap: 0.625rem;
}

.site-credit,
.site-credit a {
    font-size: 0.8rem;
    color: rgba(236, 236, 236, 0.65);
}

.site-credit a:hover {
    color: rgb(236, 236, 236);
    text-decoration: underline;
}

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

    .foot-grid>div:first-child {
        grid-column: 1 / -1;
    }
}


/* =====================================================================
   12. LEGACY / NOT USED BY THE CURRENT PAGES
   Kept so older sub-pages (research/pages/*, research/<area>.html)
   that share this stylesheet do not break. Safe to delete once checked.
   ===================================================================== */
.note {
    font-size: 0.875rem;
    color: var(--ink-soft);
}

/* Placeholder marker: remove the whole element once real content is in */
.placeholder-flag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #8A4B00;
    background: #FFF1D6;
    border: 1px dashed #E0A94B;
    border-radius: 0.375rem;
    padding: 0.15rem 0.5rem;
    margin-right: 0.5rem;
}

/* Research-area rows & collapsible paper lists */
.area-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--rule);
}

.area-list li {
    border-bottom: 1px solid var(--rule);
}

.area-list a {
    display: block;
    padding: 0.25rem 0;
    text-decoration: none !important;
    color: var(--ink) !important;
}

.area-list a:hover strong {
    color: var(--accent);
}

.area-list strong {
    display: block;
    font-weight: 600;
    font-size: 1.0625rem;
}

.area-list span {
    display: block;
    font-size: 0.9375rem;
    color: var(--ink-soft);
}

.area-list details summary {
    cursor: pointer;
    display: list-item;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.area-list details summary>strong {
    display: inline;
}

.area-list details summary>span {
    display: block;
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 2px;
}

.area-list details summary:hover {
    color: var(--accent);
}

/* scoped so it no longer collides with the research page's .paper-list */
.area-list .paper-list {
    margin-top: 8px;
    margin-bottom: 15px;
    padding-left: 20px;
    list-style-type: disc;
}

.area-list .paper-list li {
    margin-bottom: 5px;
    font-size: 0.95em;
}

/* Old news-item list */
.news-item {
    display: block;
    padding: clamp(0.5rem, 1vw, 4rem) 0;
    border-bottom: 1px solid var(--rule);
    color: var(--ink);
    text-decoration: none;
    transition: background .15s ease, padding-left .15s ease;
}

.news-item:hover {
    background: var(--paper-dim);
    padding-left: 0.75rem;
}

.news-item .date {
    font-family: var(--font-label);
    font-size: 0.65625rem;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: var(--tracking-news-date);
}

.news-item h4 {
    font-family: var(--font-body);
    font-weight: var(--weight-heading);
    font-size: 0.9375rem;
    margin: 0.625rem 0 0;
    line-height: var(--leading-card-copy);
}


/* =====================================================================
   13. INTERACTION STATES  (one look for links, one for boxes)
   To give a new kind of link/box the same look, add its selector to a list.
   ===================================================================== */

/* ---- 13a. LINKS: --accent-link normally, --accent on hover, no underline ---- */
:is(.text-link, .table td a, .person h3 a, .course-name a, .paper-links a,
    .news-feed a, .news-list a, .page-hero .lead a, .feature-title) {
    color: var(--accent-link);
    text-decoration: none;
    transition: color .15s ease;
}

:is(.text-link, .table td a, .person h3 a, .course-name a, .paper-links a,
    .news-feed a, .news-list a, .page-hero .lead a, .feature-title):hover {
    color: var(--accent);
    text-decoration: none;
}

/* ---- 13b. BOXES / CARDS: accent border + pale-red fill, no movement ---- */
.course-card, .card, .person, .news-feed > li, .paper-item, .area-btn {
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.course-card:hover, .person:hover,
.news-feed > li:hover, .card:hover {
    border-color: var(--accent);
    background-color: var(--hover-bg);
    box-shadow: none;
    transform: none;
}

/* line items without a full border: fill + inset ring */
.paper-item:hover,
.about-page .cv-list li:hover,
.area-btn:not(.active):hover {
    background-color: var(--hover-bg);
    box-shadow: var(--hover-ring);
}

/* table rows: fill only */
.table tbody tr:hover td {
    background-color: var(--hover-bg);
}

/* ---- 13c. WHOLE-CARD CLICK: the title link covers its entire card ---- */
.course-card, .person {
    position: relative;
}

.course-name a::after,
.person h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

/* ---- 13d. HOMEPAGE RESEARCH CARDS: hover uses each card's own colour (--c) ---- */
.area-card {
    transition: border-color .15s ease, background-color .15s ease;
}
.area-card:hover {
    border-color: var(--c);
    background-color: color-mix(in srgb, var(--c) 10%, white);   /* 10% = how tinted the fill is */
    box-shadow: none;
    transform: none;
}