:root {
    --ink: #171717;
    --muted: #5f6368;
    --faint: #85898f;
    --line: #e6e8eb;
    --accent: #1859a9;
    --accent-dark: #0d3f7d;
    --focus: #f0b429;
    --page-width: 64rem;
    --content-width: 50rem;
    --display-serif: Georgia, "Times New Roman", Times, serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
}

body {
    margin: 0;
    background: #ffffff;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.56;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--accent);
    text-decoration-thickness: 0.075em;
    text-underline-offset: 0.18em;
}

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

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

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    padding: 0.65rem 0.9rem;
    background: var(--ink);
    color: #ffffff;
    transform: translateY(-160%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    color: #ffffff;
    transform: translateY(0);
}

.page-shell,
.content-shell {
    width: min(100% - 2.5rem, var(--page-width));
    margin-inline: auto;
}

.content-shell {
    width: min(100% - 2.5rem, var(--content-width));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100% - 2.5rem, var(--page-width));
    min-height: 4rem;
    margin-inline: auto;
    gap: 1.5rem;
}

.site-name {
    flex: 0 0 auto;
    color: var(--ink);
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    text-decoration: none;
}

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

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(0.8rem, 2.25vw, 1.6rem);
}

.nav-links a {
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--ink);
}

.hero {
    padding-block: clamp(1.9rem, 3.5vw, 3rem);
}

.hero-grid {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    align-items: start;
    gap: clamp(1.25rem, 3vw, 2.5rem);
}

.portrait-wrap {
    padding-top: 0.35rem;
}

.portrait {
    width: 12rem;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
}

.hero-copy {
    max-width: 45rem;
}

h1,
h2,
h3,
p {
    overflow-wrap: break-word;
}

h1 {
    margin: 0 0 1rem;
    font-family: var(--display-serif);
    font-size: clamp(1.9rem, 3.8vw, 2.75rem);
    font-weight: 400;
    letter-spacing: -0.032em;
    line-height: 1.05;
}

.hero-copy > p {
    max-width: 42rem;
    margin: 0 0 0.7rem;
    color: #000000;
    font-family: var(--display-serif);
    font-size: clamp(1rem, 1.6vw, 1.08rem);
    font-weight: 400;
}

.profile-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1rem;
    margin-top: 0.7rem;
    font-size: 0.93rem;
}

.profile-links a {
    font-weight: 650;
}

.email {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.82rem;
}

.section {
    border-top: 1px solid var(--line);
    padding-block: clamp(1.5rem, 2.75vw, 2.4rem);
}

.compact-section {
    padding-block: clamp(1.35rem, 2.4vw, 2rem);
}

.section-heading {
    margin-bottom: 0.7rem;
}

.section-heading h2 {
    margin: 0;
    font-family: var(--display-serif);
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.publication-list,
.teaching-list {
    border-top: 1px solid var(--line);
}

.publication {
    padding-block: 0.85rem;
    border-bottom: 1px solid var(--line);
}

.publication h3 {
    max-width: 46rem;
    margin: 0;
    font-size: clamp(1.12rem, 2.5vw, 1.28rem);
    font-weight: 690;
    letter-spacing: -0.017em;
    line-height: 1.32;
}

.authors {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.45;
}

.authors strong {
    color: #45484d;
    font-weight: 640;
}

.paper-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem 0.75rem;
    margin-top: 0.4rem;
    font-size: 0.88rem;
}

.paper-meta a {
    font-weight: 650;
}

.venue {
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: #2f6fab;
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 760;
    letter-spacing: 0.055em;
    line-height: 1.55;
    text-transform: uppercase;
}

.award {
    padding: 0.12rem 0.5rem;
    border: 1px solid #a8d9b4;
    border-radius: 999px;
    background: #e4f5e8;
    color: #23633a;
    font-size: 0.74rem;
    font-weight: 720;
    letter-spacing: 0.025em;
    line-height: 1.55;
}

.appearance-note,
.materials {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.35rem;
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.appearance-note {
    display: block;
}

.featured-venue {
    padding: 0.03rem 0.28rem;
    border-radius: 0.22rem;
    background: #edf4fa;
    color: #285d88;
    font-weight: 650;
    white-space: nowrap;
}

.materials {
    gap-inline: 0.9rem;
}

.materials a {
    font-weight: 600;
}

.meta-label {
    color: #34373b;
    font-weight: 720;
}

.service-copy {
    max-width: 45rem;
    margin: 0;
    color: #34373b;
    font-size: 1rem;
}

.teaching-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem 2rem;
    padding-block: 0.7rem;
    border-bottom: 1px solid var(--line);
}

.teaching-item h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 680;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.teaching-item p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.89rem;
}

.teaching-item time {
    padding-top: 0.08rem;
    color: var(--muted);
    font-size: 0.86rem;
    white-space: nowrap;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding-block: 0.9rem;
}

.site-footer .page-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-footer p {
    margin: 0;
    color: var(--faint);
    font-size: 0.78rem;
}

@media (max-width: 46rem) {
    html {
        scroll-padding-top: 8.5rem;
    }

    .page-shell,
    .content-shell,
    .nav-shell {
        width: min(100% - 2rem, var(--page-width));
    }

    .nav-shell {
        display: block;
        padding-block: 0.72rem 0.62rem;
    }

    .site-name {
        display: inline-block;
        margin-bottom: 0.52rem;
    }

    .nav-links {
        justify-content: flex-start;
        gap: 0.4rem 1rem;
        overflow-x: auto;
        padding-bottom: 0.12rem;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        flex: 0 0 auto;
        font-size: 0.8rem;
    }

    .hero {
        padding-block: 1.75rem 2rem;
    }

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

    .portrait {
        width: 8.5rem;
    }

    h1 {
        margin-bottom: 0.8rem;
    }

    .profile-links {
        align-items: flex-start;
    }

    .email {
        flex-basis: 100%;
        margin-top: 0.2rem;
    }

    .section {
        padding-block: 1.6rem;
    }

    .publication {
        padding-block: 0.8rem;
    }

    .paper-meta,
    .materials {
        gap-inline: 0.8rem;
    }

    .teaching-item {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .teaching-item time {
        padding-top: 0;
    }

    .site-footer .page-shell {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .site-header,
    .skip-link {
        display: none;
    }

    .section,
    .site-footer {
        border-color: #bbbbbb;
    }
}
