:root {
    color-scheme: light;
    --background: #ffffff;
    --surface: #f6f8fa;
    --text: #252d36;
    --muted: #596674;
    --accent: #225b87;
    --border: #dce2e8;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --background: #151a20;
        --surface: #1c232b;
        --text: #e4e9ee;
        --muted: #aebac7;
        --accent: #93c5ec;
        --border: #36424e;
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --background: #151a20;
    --surface: #1c232b;
    --text: #e4e9ee;
    --muted: #aebac7;
    --accent: #93c5ec;
    --border: #36424e;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font: 1.0625rem/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
[hidden] { display: none !important; }
button { font: inherit; }
button, summary { cursor: pointer; }
.container { max-width: 880px; margin-inline: auto; padding-inline: 28px; }
.header { text-align: center; padding: 36px 24px 28px; }
.profile-pic { width: 128px; height: 128px; object-fit: cover; border-radius: 50%; }
h1, h2, h3 { line-height: 1.3; }
.header h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 14px 0 10px; letter-spacing: -.025em; }
.affiliation { font-size: 1.25rem; line-height: 1.5; margin: 0; }
.affiliation span { font-size: 1.0625rem; color: var(--muted); }
.profile-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; }
.profile-links a { padding-block: 5px; }
.link-note { font-size: .875rem; color: var(--muted); }
nav { position: sticky; top: 0; z-index: 10; background: var(--background); border-block: 1px solid var(--border); }
.nav-inner { max-width: 1040px; margin: auto; padding: 8px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
nav a { display: inline-block; padding-block: 8px; font-size: .9375rem; color: var(--text); text-decoration: none; }
nav a:hover { color: var(--accent); text-decoration: underline; }
.theme-toggle, .menu-toggle { padding: 8px 12px; min-height: 44px; border: 1px solid var(--border); border-radius: 4px; background: var(--background); color: var(--text); font-size: .875rem; white-space: nowrap; }
.theme-toggle:hover, .menu-toggle:hover { background: var(--surface); }
.theme-toggle[aria-pressed="true"] { border-color: var(--accent); }
.menu-toggle { display: none; }
section { padding: 32px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 100px; }
section:last-of-type { border: 0; }
.section-title { font-size: 1.875rem; font-weight: 600; letter-spacing: -.02em; margin: 0 0 22px; }
p { margin: 0 0 16px; }
section > :last-child { margin-bottom: 0; }
.related-project { font-size: .9375rem; color: var(--muted); }
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-list > li { margin: 0 0 28px; }
.pub-list > li:last-child { margin-bottom: 0; }
.pub-title { font-size: 1.125rem; font-weight: 600; margin: 0 0 6px; line-height: 1.5; }
.pub-title a { text-decoration: none; }
.pub-title a:hover { text-decoration: underline; }
.pub-authors, .pub-venue, .pub-media { color: var(--muted); font-size: .9375rem; }
.pub-summary { margin: 10px 0 8px; }
.abstract { margin: 8px 0 12px; }
summary { color: var(--accent); padding: 6px 0; width: fit-content; min-height: 40px; }
summary:hover { text-decoration: underline; text-underline-offset: .2em; }
.abstract p { border-left: 2px solid var(--border); padding-left: 18px; margin: 10px 0 16px; }
#teaching h3 { font-size: 1.125rem; margin: 0 0 12px; }
#teaching ul { padding-left: 22px; }
#teaching li { margin-bottom: 8px; }
.teaching-history { margin-top: 18px; }
footer { background: var(--surface); border-top: 1px solid var(--border); padding: 32px 0; font-size: .9375rem; color: var(--muted); scroll-margin-top: 100px; }
footer p { margin: 4px 0; }
.secondary-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 18px; }
.secondary-links a { padding-block: 5px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 20; padding: 10px 16px; background: var(--background); }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }
@media (max-width: 800px) {
    .container { padding-inline: 22px; }
    .header { padding: 28px 22px 24px; }
    .affiliation { font-size: 1.125rem; }
    .nav-inner { padding: 8px 22px; flex-wrap: wrap; }
    .menu-toggle:not([hidden]) { display: inline-block; }
    .theme-toggle { margin-left: auto; }
    nav ul { width: 100%; order: 3; gap: 0; }
    nav ul li { width: 50%; }
    nav a { padding: 10px 8px; width: 100%; }
    nav.enhanced ul:not(.active) { display: none; }
    nav.enhanced ul.active { max-height: 55vh; overflow-y: auto; border-top: 1px solid var(--border); padding-top: 8px; }
    section { padding-block: 28px; }
    .section-title { font-size: 1.75rem; }
}
@media print {
    nav, .skip-link, .profile-links, .secondary-links { display: none; }
    :root, :root[data-theme] { --background: #fff; --surface: #fff; --text: #000; --muted: #333; --accent: #000; --border: #ccc; color-scheme: light; }
    .header { padding-top: 0; }
    section { break-inside: auto; }
    .pub-list > li { break-inside: avoid; }
}
