:root {
    --bg: #f7f8f8;
    --surface: #ffffff;
    --text: #2f3437;
    --muted: #66727a;
    --soft: #eef1f2;
    --line: #d9e0e4;
    --accent: #1f4f6f;
    --accent-hover: #12384f;
    --link: #0f5f8f;
    --link-hover: #0a4569;
    --max-width: 800px;
    --content-gap: clamp(1rem, 2.4vw, 2rem);
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: Georgia, "Times New Roman", Times, serif;
}

html {
    box-sizing: border-box;
    scroll-behavior: smooth;
    scroll-padding-top: 4.5rem;
}

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

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.58;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: 1px;
    background: var(--line);
    z-index: 30;
}

a {
    color: var(--link);
    text-decoration: none;
    text-underline-offset: 0.18em;
    transition: color 160ms ease, text-decoration-color 160ms ease;
}

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

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(31, 79, 111, 0.28);
    outline-offset: 3px;
    border-radius: 4px;
}

p,
ul,
ol {
    margin-top: 0;
}

p:last-child,
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}

strong {
    color: #202426;
    font-weight: 700;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: 0.75rem;
    z-index: 50;
    transform: translateY(-160%);
    padding: 0.45rem 0.7rem;
    color: var(--surface);
    background: var(--accent);
    border-radius: 4px;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(247, 248, 248, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.nav-inner {
    width: min(calc(100% - 2rem), var(--max-width));
    min-height: 3.5rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-name {
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
}

.nav-name:hover {
    color: var(--accent);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.86rem;
}

.nav-links a {
    color: var(--muted);
    line-height: 1;
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="true"] {
    color: var(--accent);
    text-decoration: none;
}

.nav-links a[aria-current="true"] {
    box-shadow: inset 0 -2px 0 var(--accent);
}

.nav-toggle {
    display: none;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.nav-toggle-line {
    display: block;
    width: 1rem;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
}

.page-shell {
    width: min(calc(100% - 2rem), var(--max-width));
    margin: 0 auto;
    padding: clamp(1.15rem, 3vw, 2.4rem) 0 clamp(2rem, 5vw, 3.3rem);
}

.hero {
    padding-bottom: clamp(1rem, 2.6vw, 1.8rem);
}

.hero::after {
    content: "";
    display: table;
    clear: both;
}

.eyebrow,
.section-kicker {
    margin-bottom: 0.55rem;
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.3;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 0.62rem;
    color: #202426;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    line-height: 1;
}

.name-signature {
    display: block;
    height: auto;
}

.name-signature-en {
    width: clamp(7.8rem, 21vw, 12rem);
}

.name-signature-zh {
    width: clamp(4.6rem, 12vw, 6.8rem);
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin-top: 0.52rem;
    font-size: 0.9rem;
}

.contact-links a {
    position: relative;
    font-weight: 600;
}

.contact-links a:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 0.38em;
    right: -0.56rem;
    width: 1px;
    height: 0.9em;
    background: var(--line);
}

.intro-summary {
    max-width: none;
    margin-top: 0.75rem;
    color: #495158;
    font-size: 0.9rem;
    line-height: 1.42;
}

.intro-summary p {
    margin-bottom: 0.46rem;
}

.intro-summary p:last-child {
    margin-bottom: 0;
}

.research-inline {
    color: var(--text);
}

.profile-figure {
    float: left;
    width: min(50%, 380px);
    margin: 0 0.88rem 0.88rem 0;
}

.profile-photo {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--soft);
}

main {
    display: grid;
    gap: 0;
}

.content-section {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: var(--content-gap);
    padding: clamp(1.25rem, 3vw, 2.15rem) 0;
    border-bottom: 1px solid var(--line);
}

.content-section:last-child {
    border-bottom: 0;
}

.publications-section {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 0;
}

.publications-section .section-heading {
    padding-bottom: 0.55rem;
    margin-bottom: 0.68rem;
    border-bottom: 1px solid var(--line);
}

.section-heading {
    position: relative;
}

h2,
h3 {
    margin: 0;
    color: #202426;
    letter-spacing: 0;
}

h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.28rem, 2.1vw, 1.6rem);
    font-weight: 500;
    line-height: 1.18;
}

h3 {
    margin: 1.05rem 0 0.42rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.section-body {
    max-width: 760px;
}

.publications-section .section-body {
    max-width: none;
}

.section-body p {
    margin-bottom: 0.55rem;
}

.compact-list {
    padding-left: 1.1rem;
    margin-bottom: 0.55rem;
}

.compact-list li {
    padding-left: 0.15rem;
    margin-bottom: 0.35rem;
}

.note {
    color: var(--muted);
    font-size: 0.88rem;
}

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

.publication-item {
    position: relative;
    padding: 0 0 0.58rem;
    margin-bottom: 0.58rem;
    border-bottom: 1px solid var(--soft);
}

.publication-item:last-child {
    margin-bottom: 0;
    border-bottom: 0;
}

.publication-item p {
    margin-bottom: 0.1rem;
}

.pub-title {
    color: #202426;
    font-weight: 700;
    line-height: 1.26;
}

.pub-authors {
    color: #495158;
    font-size: 0.9rem;
    line-height: 1.28;
}

.pub-meta {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.28;
}

.pub-link {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    margin-left: 0.35rem;
    padding: 0.12rem 0.48rem;
    color: var(--accent);
    background: #ffffff;
    border: 1px solid #cbd8df;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    vertical-align: 0.04em;
}

.pub-link:hover {
    color: var(--accent-hover);
    background: #f3f7f9;
    border-color: #a9bdc9;
    text-decoration: none;
}

.pub-honor {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    margin-left: 0.35rem;
    padding: 0.12rem 0.52rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.2;
    vertical-align: 0.04em;
}

.pub-honor-oral {
    color: #8b3f05;
    background: #fff4dc;
    border: 1px solid #e7bd6f;
}

.pub-honor-spotlight {
    color: #1f4f6f;
    background: #eaf3f8;
    border: 1px solid #a9c9db;
}

.pub-rank-note {
    display: inline-block;
    margin-left: 0.08rem;
    color: #7b858b;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    vertical-align: -0.08em;
    white-space: nowrap;
}

.project-entry h3 {
    margin-top: 0;
    margin-bottom: 0.45rem;
    font-size: 0.94rem;
}

.project-entry p {
    color: #495158;
}

@media (max-width: 820px) {
    html {
        scroll-padding-top: 4.1rem;
    }

    body {
        background: var(--surface);
    }

    .site-nav {
        background: rgba(255, 255, 255, 0.96);
    }

    .nav-inner {
        width: min(calc(100% - 1.5rem), var(--max-width));
        min-height: 3.75rem;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: 0;
        right: 0;
        top: 3.75rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.35rem 0.75rem 0.8rem;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        padding: 0.78rem 0;
        border-bottom: 1px solid var(--soft);
    }

    .nav-links a:last-child {
        border-bottom: 0;
    }

    .nav-links a[aria-current="true"] {
        box-shadow: none;
    }

    .page-shell {
        width: min(calc(100% - 1.5rem), var(--max-width));
        padding-top: 1.15rem;
    }

    .hero {
        display: block;
    }

    .profile-figure {
        float: none;
        width: min(100%, 330px);
        max-width: 330px;
        margin: 0 0 0.95rem;
    }

    .name-signature-en {
        width: clamp(7.8rem, 50vw, 11rem);
    }

    .name-signature-zh {
        width: clamp(4.8rem, 28vw, 6.5rem);
    }

    .content-section {
        grid-template-columns: 1fr;
        gap: 0.55rem;
        padding: 1.25rem 0;
    }

    .publications-section {
        padding-top: 0;
    }

    .section-body {
        max-width: none;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 14.5px;
    }

    .contact-links {
        display: grid;
        gap: 0.35rem;
    }

    .contact-links a:not(:last-child)::after {
        content: none;
    }

    .profile-figure {
        max-width: 100%;
    }

    .pub-honor {
        min-height: 1.8rem;
        margin-top: 0.25rem;
        margin-left: 0.2rem;
    }

    .pub-rank-note {
        white-space: normal;
    }

    .pub-link {
        min-height: 1.8rem;
        margin-top: 0.25rem;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    body {
        background: #ffffff;
        color: #000000;
        font-size: 11pt;
    }

    .site-nav,
    .skip-link,
    .nav-toggle {
        display: none;
    }

    .page-shell {
        width: 100%;
        padding: 0;
    }

    .hero,
    .content-section {
        display: block;
        padding: 1rem 0;
        border-color: #cccccc;
    }

    .profile-figure {
        display: none;
    }

    a {
        color: #000000;
        text-decoration: none;
    }
}
