/* === Fonts ===
   Self-hosted copies of the Google Fonts files (SIL Open Font License 1.1). Newsreader is
   requested without its optical-size axis, which more than doubled the files. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url(/assets/fonts/inter-v20-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-20C4, 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(/assets/fonts/inter-v20-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: 'Newsreader';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url(/assets/fonts/newsreader-v26-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Newsreader';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url(/assets/fonts/newsreader-v26-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: 'Newsreader';
    font-style: italic;
    font-weight: 400 600;
    font-display: swap;
    src: url(/assets/fonts/newsreader-italic-v26-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Newsreader';
    font-style: italic;
    font-weight: 400 600;
    font-display: swap;
    src: url(/assets/fonts/newsreader-italic-v26-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: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/assets/fonts/ibm-plex-mono-400-v23-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/assets/fonts/ibm-plex-mono-400-v23-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: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/assets/fonts/ibm-plex-mono-500-v23-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/assets/fonts/ibm-plex-mono-500-v23-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;
}

/* === Reset === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === Theme ===
   The page follows the system color scheme. The toggle in the header can pin light or dark by
   setting <meta name="color-scheme"> (see main.js), which the rules at the end of this block
   map onto the color-scheme property; light-dark() then picks each color. */
:root {
    --bg-light: #faf9f6;
    --bg-dark: #141210;
    --bg-elevated-light: #ffffff;
    --bg-elevated-dark: #1e1b17;
    --text-light: #211c15;
    --text-dark: #ece7de;
    --text-muted-light: #62594b;
    --text-muted-dark: #a89f90;
    /* At least 4.5:1 against --bg, since it carries small text */
    --text-subtle-light: #78705f;
    --text-subtle-dark: #8a8173;
    --border-light: #eae5db;
    --border-dark: #2a2620;
    --border-strong-light: #d8d1c3;
    --border-strong-dark: #423c33;
    --accent-light: #97431d;
    --accent-dark: #d9a648;
    --selection-light: #f3e7d2;
    --selection-dark: #41310f;
    /* Logos are drawn for white backgrounds, so they sit on a light tile in dark mode */
    --logo-bg-light: transparent;
    --logo-bg-dark: rgb(255 255 255 / 0.92);

    /* Browsers without light-dark(): light here, dark from the media query below */
    --bg: var(--bg-light);
    --bg-elevated: var(--bg-elevated-light);
    --text: var(--text-light);
    --text-muted: var(--text-muted-light);
    --text-subtle: var(--text-subtle-light);
    --border: var(--border-light);
    --border-strong: var(--border-strong-light);
    --accent: var(--accent-light);
    --selection: var(--selection-light);
    --logo-bg: var(--logo-bg-light);

    /* Values light-dark() cannot express (it only takes colors) */
    --when-light: inline-flex;
    --when-dark: none;
    --logo-opacity: 0.55;
    --logo-padding: 0px;

    --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, 'SF Mono', monospace;

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: var(--bg-dark);
        --bg-elevated: var(--bg-elevated-dark);
        --text: var(--text-dark);
        --text-muted: var(--text-muted-dark);
        --text-subtle: var(--text-subtle-dark);
        --border: var(--border-dark);
        --border-strong: var(--border-strong-dark);
        --accent: var(--accent-dark);
        --selection: var(--selection-dark);
        --logo-bg: var(--logo-bg-dark);

        --when-light: none;
        --when-dark: inline-flex;
        --logo-opacity: 0.72;
        --logo-padding: 3px;
    }
}

@supports (color: light-dark(white, black)) {
    :root {
        --bg: light-dark(var(--bg-light), var(--bg-dark));
        --bg-elevated: light-dark(var(--bg-elevated-light), var(--bg-elevated-dark));
        --text: light-dark(var(--text-light), var(--text-dark));
        --text-muted: light-dark(var(--text-muted-light), var(--text-muted-dark));
        --text-subtle: light-dark(var(--text-subtle-light), var(--text-subtle-dark));
        --border: light-dark(var(--border-light), var(--border-dark));
        --border-strong: light-dark(var(--border-strong-light), var(--border-strong-dark));
        --accent: light-dark(var(--accent-light), var(--accent-dark));
        --selection: light-dark(var(--selection-light), var(--selection-dark));
        --logo-bg: light-dark(var(--logo-bg-light), var(--logo-bg-dark));
    }
}

/* A scheme pinned with the toggle wins over the system preference */
:root:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
    --when-light: inline-flex;
    --when-dark: none;
    --logo-opacity: 0.55;
    --logo-padding: 0px;
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
    --when-light: none;
    --when-dark: inline-flex;
    --logo-opacity: 0.72;
    --logo-padding: 3px;
}

/* === Base === */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    font-family: var(--sans);
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.2s ease, color 0.2s ease;
}

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

.visually-hidden:where(:not(:focus-within, :active)) {
    position: absolute !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: nowrap !important;
}

/* === Layout === */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === Typography === */
h1, h2, h3 {
    text-wrap: balance;
}

p, dd {
    text-wrap: pretty;
}

p {
    margin-bottom: 0.875rem;
    color: var(--text-muted);
}

a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--border-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

a:hover {
    text-decoration-color: var(--accent);
    color: var(--accent);
}

strong {
    font-weight: 600;
    color: var(--text);
}

code, .mono {
    font-family: var(--mono);
    font-size: 0.875em;
    font-feature-settings: "liga" 0;
}

/* === Navigation === */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    padding: 0.9rem 0;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Homepage header: brand, section links, theme toggle, on three columns. The links sit inline
   when the row fits and otherwise open from a Menu button as a popover; main.js measures which.
   Only the last column's flex changes between the two states below, so the row keeps the same
   minimum width (and the same wide/collapsed outcome) in both. */
.navbar .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 0fr;
    align-items: center;
    column-gap: 1rem;
}

.header-inner > * {
    white-space: nowrap;
}

.header-inner .nav-brand {
    justify-self: start;
    transition: color 0.15s ease, opacity 0.3s ease 0.12s, translate 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.12s;
}

.header-inner .theme-toggle {
    justify-self: end;
}

/* While the hero's name is in view the header leaves the name to it: the sections sit centred
   and the brand is hidden. Once the name has scrolled under the header (main.js watches it and
   sets data-brand), the last column gives up its share, the sections slide over to the toggle
   and the brand rises in. Without scripting the header stays in its full state. */
@media (scripting: enabled) {
    .site-header:not([data-brand="shown"], .no-popover) .header-inner {
        grid-template-columns: 1fr auto 1fr;
    }

    .site-header:not([data-brand="shown"], .no-popover) .nav-brand {
        opacity: 0;
        visibility: hidden;
        transition: color 0.15s ease, opacity 0.15s ease, translate 0.15s ease, visibility 0s linear 0.15s;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .navbar .header-inner {
        transition: grid-template-columns 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    }

    @media (scripting: enabled) {
        .site-header:not([data-brand="shown"], .no-popover) .nav-brand {
            translate: 0 0.45rem;
        }
    }
}

.menu-button,
.theme-toggle {
    font: inherit;
    font-size: 0.85rem;
    line-height: 1;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.menu-button {
    padding: 0.35rem 0.6rem;
    anchor-name: --menu-button;
}

.theme-toggle {
    padding: 0.35rem 0.45rem;
}

.menu-button:hover,
.theme-toggle:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: var(--bg-elevated);
}

.theme-toggle .when-light { display: var(--when-light); }
.theme-toggle .when-dark { display: var(--when-dark); }

.site-menu {
    list-style: none;
    scroll-target-group: auto;
}

.site-menu a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s ease;
}

.site-menu a:hover {
    color: var(--accent);
}

/* The section in view: color plus an underline, so the cue is not color alone */
.site-menu a:is(:target-current, .target-current) {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: currentColor;
}

/* Collapsed: a popover panel under the Menu button */
.site-menu[popover] {
    position: fixed;
    inset: auto;
    inset-block-start: 3.75rem;
    inset-block-start: anchor(--menu-button bottom);
    inset-inline-end: 1rem;
    margin: 0.5rem 0 0;
    min-inline-size: 12rem;
    max-block-size: calc(100dvh - 6rem);
    overflow: auto;
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-elevated);
    color: var(--text);
    box-shadow: 0 12px 32px rgb(0 0 0 / 0.14);
}

.site-menu[popover] a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

.site-menu[popover] a:hover {
    background: var(--bg);
}

/* Inline: once main.js has measured the row, or before it runs on a wide viewport */
.site-header[data-nav="wide"] .menu-button {
    display: none;
}

.site-header[data-nav="wide"] .site-menu {
    position: static;
    display: flex;
    gap: 1.4rem;
    inline-size: auto;
    max-block-size: none;
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.site-header[data-nav="wide"] .site-menu a {
    display: inline;
    padding: 0;
    font-size: 0.85rem;
    background: none;
}

@media (min-width: 40em) {
    .site-header:not([data-nav]) .menu-button {
        display: none;
    }

    .site-header:not([data-nav]) .site-menu {
        position: static;
        display: flex;
        gap: 1.4rem;
        inline-size: auto;
        max-block-size: none;
        overflow: visible;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .site-header:not([data-nav]) .site-menu a {
        display: inline;
        padding: 0;
        font-size: 0.85rem;
        background: none;
    }
}

/* No popover support: keep the links inline and let the row wrap */
.site-header.no-popover .header-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-header.no-popover .site-nav {
    margin-inline-start: auto;
}

.site-header.is-measuring * {
    transition: none !important;
}

/* === Hero === */
.hero {
    padding: 4.75rem 0 3rem;
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(2.25rem, 1.75rem + 2vw, 2.75rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.015em;
}

/* Name, pronunciation button and pronouns on one line; they wrap under a long name */
.hero-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.name-say {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.name-say:hover,
.name-say.is-playing {
    color: var(--accent);
    border-color: var(--border-strong);
}

.name-say:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.name-pronouns {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-subtle);
}

@media (prefers-reduced-motion: no-preference) {
    .name-say.is-playing svg {
        animation: speakerPulse 0.9s ease-in-out infinite;
    }
}

@keyframes speakerPulse {
    50% { opacity: 0.45; }
}

.hero-subtitle {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.32rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    background: var(--bg-elevated);
}

.hero-badge .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.hero-description {
    color: var(--text-muted);
    max-width: 56ch;
    margin-bottom: 0;
}

.hero-description + .hero-description {
    margin-top: 0.875rem;
}

/* Entrance motion moves the hero text but never hides it, so it paints (and counts
   for LCP) on the first frame. The badge pulses twice, then rests. */
@media (prefers-reduced-motion: no-preference) {
    .hero > * {
        animation: rise 0.6s ease-out both;
    }

    .hero > :nth-child(2) { animation-delay: 0.05s; }
    .hero > :nth-child(3) { animation-delay: 0.1s; }
    .hero > :nth-child(n + 4) { animation-delay: 0.15s; }

    .hero-badge .badge-dot {
        animation: badgePulse 2.5s ease-in-out 2;
    }
}

@keyframes rise {
    from { translate: 0 8px; }
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* === Sections === */
section {
    padding: 2.75rem 0;
    border-top: 1px solid var(--border);
    scroll-margin-top: 4.5rem;
}

/* Sections rise into place as they scroll into view, driven by the scroll position itself: no
   script, and a section already in view (on load or after a jump) is in place. Movement only,
   no fade: a section left part-way into view at the bottom edge keeps full text contrast. */
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        main section {
            animation: reveal linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 25%;
        }
    }
}

@keyframes reveal {
    from { translate: 0 14px; }
}

.section-label {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-subtle);
    margin-bottom: 1.5rem;
}

/* === About === */
.interests {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem 2.25rem;
    margin: 1.5rem 0;
}

.interest dt {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.1rem;
}

.interest dd {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.aside {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.02rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
    margin-bottom: 0;
}

/* === Org Rows (Education + Experience) === */
.org-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.org-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.org-logo {
    width: 64px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
    padding: var(--logo-padding);
    background: var(--logo-bg);
    opacity: var(--logo-opacity);
    filter: saturate(0.85);
    transition: filter 0.25s ease, opacity 0.25s ease;
}

/* Keeps names aligned when an entry has no logo */
.org-row .org-logo.org-logo-empty {
    display: block;
    background: none;
}

.org-row:hover .org-logo {
    opacity: 1;
    filter: saturate(1.12);
}

/* Touch screens have no hover — keep logos near full strength */
@media (hover: none) {
    .org-logo {
        opacity: 0.92;
        filter: saturate(1);
    }
}

.org-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.org-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.35;
}

.org-degree {
    font-family: var(--serif);
    font-weight: 400;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.org-meta {
    font-size: 0.78rem;
    color: var(--text-subtle);
    font-family: var(--mono);
}

.org-meta a {
    color: var(--text-subtle);
}

.org-meta a:hover {
    color: var(--accent);
}

/* === Publications === */
.pub-group {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0 1rem;
    margin-bottom: 1.6rem;
}

.pub-group:last-child {
    margin-bottom: 0;
}

.pub-year {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-subtle);
    padding-top: 0.3rem;
}

.pub {
    margin-bottom: 1.4rem;
}

.pub:last-child {
    margin-bottom: 0;
}

.pub-title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.08rem;
    color: var(--text);
    margin-bottom: 0.2rem;
    line-height: 1.45;
}

.pub-code {
    display: inline-flex;
    align-items: center;
    margin-left: 0.45rem;
    vertical-align: -1px;
    color: var(--text-subtle);
    text-decoration: none;
}

.pub-code:hover {
    color: var(--accent);
}

.pub-authors {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.pub-venue {
    font-size: 0.82rem;
    color: var(--text-subtle);
    font-style: italic;
}

.pub-venue a {
    color: var(--text-subtle);
}

.pub-venue a:hover {
    color: var(--accent);
}

.pub-award {
    display: inline-block;
    font-family: var(--mono);
    font-style: normal;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    border-radius: 999px;
    padding: 0.05rem 0.5rem;
    margin-left: 0.4rem;
    vertical-align: 1px;
    white-space: nowrap;
}

/* === Footer === */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0 2.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-subtle);
    gap: 1rem;
}

.visit-stat {
    font-family: var(--mono);
    font-size: 0.95em;
}

/* Icon-only links. Each has a 2rem target; the negative margin keeps the icons themselves
   lined up with the footer text. */
.footer-links {
    display: flex;
    gap: 0.25rem;
    margin: -0.45rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 2rem;
    block-size: 2rem;
    border-radius: 6px;
    transition: color 0.15s ease;
}

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

.footer-links a svg {
    width: 18px;
    height: 18px;
}

/* === Not found page === */
.not-found {
    padding: 6rem 0 5rem;
}

.not-found h1 {
    font-family: var(--serif);
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

/* === Responsive === */
@media (max-width: 37.5em) {
    .hero {
        padding: 3.25rem 0 2.25rem;
    }

    .interests {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .org-row {
        gap: 0.75rem;
    }

    .org-logo {
        width: 56px;
        height: 32px;
    }

    .pub-group {
        display: block;
    }

    .pub-year {
        padding-top: 0;
        margin-bottom: 0.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.875rem;
        text-align: center;
    }
}

/* === Print === */
@media print {
    .navbar,
    footer,
    .theme-toggle,
    .hero-badge {
        display: none;
    }

    main section {
        animation: none;
    }

    section {
        scroll-margin-top: 0;
    }
}
