/* ============================================================
   Aishwarya Deep Shukla — academic site
   Editorial, paper-inspired styling. No build step: this file is
   served as written. If you change it, bump the ?v= value on the
   <link rel="stylesheet"> line of every page so returning
   visitors do not keep a cached copy.
   ============================================================ */

/* ---------- Self-hosted fonts (variable woff2, latin + latin-ext) ---------- */

@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/source-serif-4-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/source-serif-4-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Source Serif 4';
    font-style: italic;
    font-weight: 400 600;
    font-display: swap;
    src: url('/fonts/source-serif-4-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Source Serif 4';
    font-style: italic;
    font-weight: 400 600;
    font-display: swap;
    src: url('/fonts/source-serif-4-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */

:root {
    --paper:        #fbf9f4;
    --paper-soft:   #f4efe4;
    --paper-deep:   #ece5d6;
    --rule:         #e3dbc9;
    --rule-strong:  #cfc5ae;
    --ink:          #1b1a18;
    --ink-soft:     #3b3833;
    --ink-muted:    #625c51;
    --accent:       #7a1f1f;       /* deep maroon */
    --accent-deep:  #5a1313;
    --accent-soft:  #f0e2dd;
    --on-accent:    #fbf9f4;
    --focus:        #7a1f1f;

    --serif: 'Source Serif 4', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
    --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

    --page:      1080px;   /* outer container */
    --measure:   43rem;    /* comfortable line length for prose */
    --label-col: 11.5rem;  /* left-hand label column on wide screens */
    --gutter:    2rem;
    --nav-h:     60px;

    --nav-bg:    rgba(251, 249, 244, 0.9);
    --selection: #ecd9d3;
    --shadow-portrait: 0 1px 2px rgba(40, 28, 16, 0.08), 0 18px 40px -12px rgba(40, 28, 16, 0.22);

    color-scheme: light;
}

[data-theme="dark"] {
    --paper:        #171512;
    --paper-soft:   #201d19;
    --paper-deep:   #2a2621;
    --rule:         #332e27;
    --rule-strong:  #4a433a;
    --ink:          #eee8dc;
    --ink-soft:     #d5cec0;
    --ink-muted:    #a89f8f;
    --accent:       #e39a8c;
    --accent-deep:  #f2bdb1;
    --accent-soft:  #2e211e;
    --on-accent:    #1b1310;
    --focus:        #e39a8c;

    --nav-bg:    rgba(23, 21, 18, 0.9);
    --selection: #55352f;
    --shadow-portrait: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 40px -12px rgba(0, 0, 0, 0.6);

    color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 24px);
}

@view-transition { navigation: auto; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) {
        animation: none !important;
    }
}

body {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    border-top: 4px solid var(--accent);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern", "liga";
    text-rendering: optimizeLegibility;
}

main { display: block; }
main:focus { outline: none; }

::selection { background: var(--selection); color: var(--ink); }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

p, li, dd, dt, h1, h2, h3, h4 { overflow-wrap: break-word; }

p { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }

cite { font-style: italic; }
strong { font-weight: 600; }

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--rule-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover {
    color: var(--accent-deep);
    text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
    border-radius: 2px;
}

.nowrap { white-space: nowrap; }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    z-index: 2000;
    padding: 10px 16px;
    font-family: var(--sans);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--on-accent);
    background: var(--accent);
    border-radius: 3px;
    text-decoration: none;
}
.skip-link:focus {
    top: 12px;
    color: var(--on-accent);
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

/* ---------- Layout ---------- */

.wrap {
    max-width: var(--page);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section {
    padding-block: 4.5rem;
    border-top: 1px solid var(--rule);
}
.section.tinted { background: var(--paper-soft); }

/* Label on the left, content on the right */
.section-grid {
    display: grid;
    grid-template-columns: var(--label-col) minmax(0, 1fr);
    column-gap: 3.5rem;
    align-items: start;
}

.section-label {
    position: sticky;
    top: calc(var(--nav-h) + 28px);
    padding-top: 0.5rem;
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.015em;
    text-wrap: balance;
    margin-bottom: 1.25rem;
}

.section-intro {
    max-width: var(--measure);
    color: var(--ink-soft);
    margin-bottom: 2.25rem;
}

.prose { max-width: var(--measure); }
.prose > * + h3 { margin-top: 2.5rem; }

.subhead {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.005em;
    margin: 2.75rem 0 1rem;
}
.subhead:first-child { margin-top: 0; }

.more-link {
    display: inline-block;
    margin-top: 2rem;
    font-family: var(--sans);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 2px;
}
.more-link:hover { border-bottom-color: currentColor; }

/* ---------- Navigation ---------- */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    background: var(--nav-bg);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--rule);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-nav { background: var(--paper); }
}

.nav-inner {
    width: 100%;
    max-width: var(--page);
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-name {
    margin-right: auto;
    font-family: var(--serif);
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: 0.005em;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
}
.nav-name:hover { color: var(--accent); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.nav-links a {
    display: block;
    padding: 6px 0;
    font-family: var(--sans);
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: 0.015em;
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover,
.nav-links a.active-link {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-links .nav-cv a {
    padding: 6px 13px;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 3px;
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-links .nav-cv a:hover {
    background: var(--accent);
    color: var(--on-accent);
}

button.theme-toggle {
    appearance: none;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
    background: transparent;
    border: 1px solid var(--rule-strong);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
button.theme-toggle:hover {
    color: var(--accent);
    background: var(--paper-soft);
    border-color: var(--accent);
}
.theme-toggle .toggle-icon { width: 16px; height: 16px; display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.hamburger-menu {
    display: none;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    background: none;
    border: none;
    cursor: pointer;
}
.hamburger-menu .bar {
    display: block;
    width: 22px;
    height: 1.5px;
    margin: 5px auto;
    background: var(--ink);
    transition: transform 0.25s ease, opacity 0.25s ease;
}
body.nav-open .hamburger-menu .bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.nav-open .hamburger-menu .bar:nth-child(2) { opacity: 0; }
body.nav-open .hamburger-menu .bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Buttons and link rows ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.72em 1.15em;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: var(--accent);
    text-decoration: none;
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
    color: var(--on-accent);
    background: var(--accent);
}
.btn-primary {
    color: var(--on-accent);
    background: var(--accent);
}
.btn-primary:hover {
    color: var(--on-accent);
    background: var(--accent-deep);
    border-color: var(--accent-deep);
}
.btn svg { width: 1em; height: 1em; flex-shrink: 0; }

.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.4rem;
    font-family: var(--sans);
    font-size: 0.875rem;
}
.inline-links a {
    color: var(--ink-muted);
    text-decoration-color: var(--rule-strong);
}
.inline-links a:hover { color: var(--accent); }
.inline-links a.primary { color: var(--accent); font-weight: 500; }
.inline-links a.primary:hover { color: var(--accent-deep); }

/* ---------- Home: hero ---------- */

.hero { padding-block: 5rem 4.25rem; }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18.75rem;
    column-gap: 4.5rem;
    align-items: center;
}

.eyebrow {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.1rem;
}
.eyebrow span { display: block; color: var(--ink-muted); font-weight: 500; }

.hero h1 {
    font-size: clamp(2.6rem, 5.6vw, 4.1rem);
    font-weight: 600;
    line-height: 1.03;
    letter-spacing: -0.022em;
    margin-bottom: 1.6rem;
    text-wrap: balance;
}

.hero-lead {
    font-size: clamp(1.25rem, 1.9vw, 1.5rem);
    line-height: 1.42;
    letter-spacing: -0.005em;
    color: var(--ink);
    max-width: 34em;
    margin-bottom: 1rem;
    text-wrap: pretty;
}

.hero-sub {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink-soft);
    max-width: 38em;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1.4rem;
}

.portrait {
    position: relative;
    margin: 0;
}
.portrait::before {
    content: "";
    position: absolute;
    inset: 1.1rem -1.1rem -1.1rem 1.1rem;
    background: var(--accent-soft);
    border-radius: 4px;
}
.portrait img {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 22%;
    border-radius: 4px;
    background: var(--paper-soft);
    box-shadow: var(--shadow-portrait);
}

/* ---------- Home: journals strip ---------- */

.journals {
    border-top: 1px solid var(--rule);
    padding-block: 1.6rem;
}
.journals .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 2.25rem;
}
.journals-label {
    margin: 0;
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.journals ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 2.25rem;
}
.journals a {
    font-size: 1.14rem;
    font-style: italic;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.journals a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Findings ---------- */

.finding {
    display: grid;
    grid-template-columns: 9.5rem minmax(0, 1fr);
    column-gap: 2rem;
    padding-block: 2rem;
    border-top: 1px solid var(--rule);
}
.finding:first-of-type { border-top: none; padding-top: 0.25rem; }
.finding:last-of-type { padding-bottom: 0; }

.finding-meta {
    padding-top: 0.35rem;
    font-family: var(--sans);
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--ink-muted);
}
.finding-meta cite {
    display: block;
    font-family: var(--serif);
    font-size: 1rem;
    color: var(--ink);
}

.finding h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.012em;
    margin-bottom: 0.65rem;
    text-wrap: balance;
}
.finding p {
    font-size: 1.0625rem;
    line-height: 1.62;
    color: var(--ink-soft);
    max-width: 40rem;
    margin-bottom: 0.85rem;
}
.finding .inline-links { margin-top: 0.2rem; }

/* ---------- Timelines (dated rows) ---------- */

.timeline > li,
.timeline > div {
    display: grid;
    grid-template-columns: 9.5rem minmax(0, 1fr);
    column-gap: 2rem;
    padding-block: 0.95rem;
    border-top: 1px solid var(--rule);
}
.timeline > li:first-child,
.timeline > div:first-child { border-top: none; padding-top: 0.2rem; }
.timeline > li:last-child,
.timeline > div:last-child { padding-bottom: 0; }

.timeline .when {
    padding-top: 0.22rem;
    font-family: var(--sans);
    font-size: 0.8125rem;
    line-height: 1.5;
    letter-spacing: 0.01em;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
}
.timeline .what {
    font-size: 1.0625rem;
    line-height: 1.55;
}
.timeline .what strong { display: inline; }
.timeline .note {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--ink-muted);
}
.timeline.with-amount > li { grid-template-columns: 9.5rem minmax(0, 1fr) auto; }
.timeline .amount {
    padding-top: 0.2rem;
    font-family: var(--sans);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    color: var(--ink-soft);
    white-space: nowrap;
    text-align: right;
}

/* ---------- Stats ---------- */

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    margin-block: 2rem;
    padding-block: 1.6rem;
    border-block: 1px solid var(--rule-strong);
}
.stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stats dt {
    margin-top: 0.4rem;
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.stats dd {
    font-size: 2.35rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--accent);
    font-variant-numeric: lining-nums;
}

.callout {
    max-width: var(--measure);
    margin-block: 1.75rem;
    padding: 1rem 1.25rem;
    font-size: 1.03rem;
    line-height: 1.6;
    color: var(--ink-soft);
    background: var(--paper);
    border-left: 2px solid var(--accent);
    border-radius: 0 3px 3px 0;
}
.section:not(.tinted) .callout { background: var(--paper-soft); }

/* ---------- Subpage header ---------- */

.page-head { padding-block: 4.25rem 3.5rem; }
.page-head .eyebrow { margin-bottom: 0.9rem; }
.page-head h1 {
    font-size: clamp(2.3rem, 4.6vw, 3.3rem);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.02em;
    margin-bottom: 1.4rem;
    text-wrap: balance;
}
.page-lead {
    font-size: clamp(1.2rem, 1.7vw, 1.4rem);
    line-height: 1.48;
    color: var(--ink-soft);
    max-width: 44rem;
    text-wrap: pretty;
}
.page-lead + .page-lead { margin-top: 0.9rem; }

/* ---------- Three-up themes ---------- */

.themes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.25rem;
}
.themes h3 {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.55rem;
    padding-top: 0.9rem;
    border-top: 2px solid var(--accent);
}
.themes p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

.methods {
    margin-top: 2.5rem;
    max-width: var(--measure);
    font-size: 1.03rem;
    color: var(--ink-soft);
}
.methods strong { color: var(--ink); }

.themes.directions {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
    max-width: var(--measure);
    margin-top: 2rem;
}
.themes.directions p { font-size: 1.03rem; }

.footnote {
    margin: 1.75rem 0 0;
    font-size: 0.95rem;
    color: var(--ink-muted);
}

.cta-row { margin: 1.9rem 0 0; }

/* ---------- Link rows, numbered steps, FAQ ---------- */

.link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 2rem;
    margin: 2rem 0 0;
}
.link-row .more-link { margin-top: 0; }

.page-actions { margin: 1.9rem 0 0; }

.themes.steps { counter-reset: step; }
.themes.steps > li { counter-increment: step; }
.themes.steps h3::before {
    content: counter(step) ". ";
    color: var(--accent);
    font-variant-numeric: lining-nums;
}

.faq { max-width: var(--measure); }
.faq-item {
    padding-block: 1.35rem;
    border-top: 1px solid var(--rule);
}
.faq-item:first-child { border-top: none; padding-top: 0.25rem; }
.faq-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.45rem;
}
.faq-item p {
    font-size: 1.03rem;
    line-height: 1.62;
    color: var(--ink-soft);
}

/* ---------- Publications ---------- */

.pub {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    column-gap: 1.5rem;
    padding-block: 2.1rem;
    border-top: 1px solid var(--rule);
}
.pub:first-child { border-top: none; padding-top: 0.25rem; }
.pub:last-child { padding-bottom: 0; }

.pub-year {
    padding-top: 0.3rem;
    font-family: var(--sans);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
}

.pub-title {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.28;
    letter-spacing: -0.008em;
    margin-bottom: 0.45rem;
    text-wrap: balance;
}
.pub-title a { color: var(--ink); text-decoration: none; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }

.pub-authors {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ink-soft);
    margin-bottom: 0.15rem;
}
.pub-authors strong { color: var(--ink); }
.pub-venue {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ink-soft);
    margin-bottom: 0.85rem;
}
.pub-venue cite { color: var(--ink); }

.pub-summary {
    max-width: 41rem;
    font-size: 1.03rem;
    line-height: 1.62;
    color: var(--ink-soft);
    margin-bottom: 0.9rem;
}

.pub-links {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 1.35rem;
    font-family: var(--sans);
    font-size: 0.875rem;
    color: var(--ink-muted);
}
.pub-links a { font-weight: 500; }
.pub-links .press a { font-weight: 400; color: var(--ink-muted); }
.pub-links .press a:hover { color: var(--accent); }

.tag {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.12em 0.55em;
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    vertical-align: 0.15em;
    color: var(--accent);
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    white-space: nowrap;
}

/* Expandable abstract / long lists */
details { margin-top: 0.9rem; }
summary {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    font-family: var(--sans);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent);
    cursor: pointer;
    list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::before {
    content: "";
    width: 0.42em;
    height: 0.42em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-0.12em) rotate(-45deg);
    transition: transform 0.15s ease;
}
details[open] > summary::before { transform: translateY(-0.2em) rotate(45deg); }
summary:hover { color: var(--accent-deep); }

.abstract {
    max-width: 41rem;
    margin-top: 0.85rem;
    padding: 1rem 1.25rem;
    font-size: 0.97rem;
    line-height: 1.62;
    color: var(--ink-soft);
    background: var(--paper-soft);
    border-left: 2px solid var(--accent);
    border-radius: 0 3px 3px 0;
}
.abstract p { margin-bottom: 0.7em; }

/* Plain reference lists (talks, working papers) */
.ref-list > li {
    max-width: 46rem;
    padding-block: 0.8rem;
    font-size: 1.03rem;
    line-height: 1.55;
    color: var(--ink-soft);
    border-top: 1px solid var(--rule);
}
.ref-list > li:first-child { border-top: none; padding-top: 0.2rem; }
.ref-list > li:last-child { padding-bottom: 0; }
.ref-list .ref-title { color: var(--ink); font-weight: 600; }

.name-columns {
    margin-top: 1rem;
    columns: 3 12rem;
    column-gap: 2rem;
    font-size: 0.97rem;
    line-height: 1.5;
    color: var(--ink-soft);
}
.name-columns li {
    break-inside: avoid;
    padding-block: 0.22rem;
}
.name-columns .when {
    font-family: var(--sans);
    font-size: 0.78rem;
    color: var(--ink-muted);
}

/* ---------- Courses ---------- */

.course {
    padding-block: 1.5rem;
    border-top: 1px solid var(--rule);
    max-width: 46rem;
}
.course:first-child { border-top: none; padding-top: 0.25rem; }
.course:last-child { padding-bottom: 0; }
.course-code {
    font-family: var(--sans);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.25rem;
}
.course h3 {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.45rem;
}
.course p {
    font-size: 1.03rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

/* ---------- Bulleted prose lists ---------- */

.bullets > li {
    position: relative;
    max-width: var(--measure);
    padding-left: 1.4rem;
    margin-bottom: 0.9rem;
    font-size: 1.0625rem;
    line-height: 1.6;
}
.bullets > li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.68em;
    width: 0.38rem;
    height: 0.38rem;
    background: var(--accent);
    border-radius: 50%;
}
.bullets > li:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */

.contact-list > div {
    display: grid;
    grid-template-columns: 9.5rem minmax(0, 1fr);
    column-gap: 2rem;
    padding-block: 0.85rem;
    border-top: 1px solid var(--rule);
}
.contact-list > div:first-child { border-top: none; padding-top: 0.2rem; }
.contact-list dt {
    padding-top: 0.3rem;
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.contact-list dd { font-size: 1.0625rem; line-height: 1.55; }

.bio-block {
    max-width: var(--measure);
    padding: 1.4rem 1.6rem;
    background: var(--paper-soft);
    border: 1px solid var(--rule);
    border-radius: 4px;
}
.bio-block p { font-size: 1.03rem; line-height: 1.62; color: var(--ink-soft); }
.bio-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.25rem;
}

/* ---------- Error page ---------- */

.error-page { padding-block: 6rem 7rem; }
.error-code {
    font-size: 6rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--accent);
    margin-bottom: 1rem;
}
.error-page h1 { font-size: 1.8rem; font-weight: 600; margin-bottom: 1rem; }
.error-page p { max-width: var(--measure); }

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--rule);
    background: var(--paper-soft);
    padding-block: 3.25rem 2.5rem;
    font-family: var(--sans);
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--ink-muted);
}
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
}
.footer-name {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.4rem;
}
.site-footer p { margin-bottom: 0.3rem; }
.footer-heading {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.7rem;
}
.site-footer li { margin-bottom: 0.3rem; }
.site-footer a {
    color: var(--ink-soft);
    text-decoration-color: var(--rule-strong);
}
.site-footer a:hover { color: var(--accent); }
.footer-base {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.4rem 2rem;
    margin-top: 2.75rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--rule);
    font-size: 0.8rem;
}
.footer-base p { margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
    :root { --label-col: 9rem; }
    .section-grid { column-gap: 2.5rem; }
    .hero-grid { grid-template-columns: minmax(0, 1fr) 15.5rem; column-gap: 3rem; }
    .nav-links { gap: 1.15rem; }
    .finding, .timeline > li, .timeline > div, .contact-list > div { grid-template-columns: 8rem minmax(0, 1fr); column-gap: 1.5rem; }
    .timeline.with-amount > li { grid-template-columns: 8rem minmax(0, 1fr) auto; }
}

/* Hamburger breakpoint */
@media (max-width: 900px) {
    :root { --gutter: 1.5rem; }

    .nav-inner { gap: 0.5rem; }
    .nav-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 0 1rem;
        background: var(--paper);
        border-bottom: 1px solid var(--rule);
        max-height: calc(100vh - var(--nav-h));
        max-height: calc(100dvh - var(--nav-h));
        overflow-y: auto;
    }
    body.nav-open .nav-links {
        display: flex;
        box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    }
    body.nav-open { overflow: hidden; }

    .nav-links a {
        padding: 0.85rem var(--gutter);
        min-height: 44px;
        font-size: 1rem;
        border-bottom: none;
    }
    .nav-links .nav-cv { padding: 0.6rem var(--gutter) 0; }
    .nav-links .nav-cv a { display: inline-block; padding: 0.6rem 1.1rem; min-height: 0; }

    .hamburger-menu { display: block; }
    button.theme-toggle { width: 40px; height: 40px; }

    .section { padding-block: 3.25rem; }
    .section-grid { grid-template-columns: minmax(0, 1fr); }
    .section-label { position: static; padding-top: 0; margin-bottom: 0.9rem; }
    .section-title { font-size: 1.7rem; }

    /* the label column is gone, so dated rows get their full meta column back */
    .finding, .timeline > li, .timeline > div, .contact-list > div { grid-template-columns: 9.5rem minmax(0, 1fr); column-gap: 2rem; }
    .timeline.with-amount > li { grid-template-columns: 9.5rem minmax(0, 1fr) auto; }

    .hero { padding-block: 3.5rem 3.25rem; }
    .hero-grid { grid-template-columns: minmax(0, 1fr) 13.5rem; column-gap: 2.5rem; }

    .page-head { padding-block: 3rem 2.5rem; }

    .themes { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
    .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .hero { padding-block: 2.75rem 3rem; }
    .hero-grid { grid-template-columns: minmax(0, 1fr); row-gap: 2.25rem; }
    .portrait { order: -1; width: 10.5rem; }
    .portrait::before { inset: 0.7rem -0.7rem -0.7rem 0.7rem; }
}

@media (max-width: 600px) {
    :root { --gutter: 1.25rem; --nav-h: 56px; }
    body { font-size: 1.0625rem; }

    .nav-name { font-size: 1rem; }

    .hero h1 { font-size: 2.35rem; }
    .hero-lead { font-size: 1.2rem; }
    .hero-sub { font-size: 1rem; }
    .portrait { width: 9rem; }

    .journals .wrap { flex-direction: column; gap: 0.6rem; }
    .journals ul { flex-direction: column; gap: 0.25rem; }
    .journals a { font-size: 1.08rem; }

    .finding, .timeline > li, .timeline > div, .contact-list > div,
    .timeline.with-amount > li {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0.3rem;
    }
    .timeline .amount { text-align: left; padding-top: 0; }
    .finding-meta { padding-top: 0; }
    .finding-meta cite { display: inline; }
    .finding h3 { font-size: 1.32rem; }
    .timeline .when, .contact-list dt { padding-top: 0; }

    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 1rem; }
    .stats dd { font-size: 2rem; }

    .pub { grid-template-columns: minmax(0, 1fr); row-gap: 0.25rem; }
    .pub-year { padding-top: 0; }
    .pub-title { font-size: 1.22rem; }
    .abstract { padding: 0.9rem 1rem; }

    .bio-block { padding: 1.15rem 1.2rem; }
    .error-code { font-size: 4.5rem; }

    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}

/* ---------- Print ---------- */

@media print {
    :root, [data-theme="dark"] {
        --paper: #fff; --paper-soft: #fff; --paper-deep: #fff;
        --rule: #ccc; --rule-strong: #999;
        --ink: #000; --ink-soft: #222; --ink-muted: #555;
        --accent: #7a1f1f; --accent-deep: #7a1f1f; --accent-soft: #fff;
    }
    body { font-size: 11pt; border-top: none; }
    .site-nav, .skip-link, .hero-actions, .bio-actions, .more-link, .portrait::before { display: none !important; }
    .section { padding-block: 18pt; }
    .section-label { position: static; }
    .hero { padding-block: 0 18pt; }
    .portrait img { box-shadow: none; }
    a { color: inherit; text-decoration: none; }
    details > *:not(summary) { display: block; }
    summary { display: none; }
    .pub, .finding, .course, .timeline > li, .timeline > div { break-inside: avoid; }
    .site-footer { background: none; padding-block: 12pt 0; }
}
