:root {
    --paper: #fafbf7;
    --white: #ffffff;
    --ink: #1b2521;
    --text: #59635f;
    --muted: #66716b;
    --accent: #2f6658;
    --accent-dark: #224c42;
    --line: #dfe5e1;
    --content-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 3px solid rgba(47, 102, 88, 0.28); outline-offset: 3px; }

.page-width, .nav-inner { width: min(calc(100% - 40px), var(--content-width)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1001; top: 8px; left: 8px; transform: translateY(-160%); padding: 8px 12px; border-radius: 5px; color: #fff; background: var(--accent-dark); }
.skip-link:focus { transform: translateY(0); }

.site-header {
    position: sticky;
    z-index: 1000;
    top: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(250, 251, 247, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.wordmark { color: var(--ink); font-size: 14px; font-weight: 750; text-decoration: none; }
.nav-inner ul { display: flex; gap: 26px; margin: 0; padding: 0; list-style: none; }
.nav-inner li { display: flex; }
.nav-inner ul a { color: var(--text); font-size: 13px; font-weight: 650; text-decoration: none; }
.nav-inner ul a:hover { color: var(--accent); }

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 80px;
    align-items: center;
    min-height: 490px;
    padding-block: 58px 42px;
}

.profile-text { max-width: 760px; }
.profile-text h1 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: baseline;
    margin: 0 0 15px;
    font-family: Manrope, "Helvetica Neue", Arial, sans-serif;
    font-size: 54px;
    font-weight: 650;
    letter-spacing: -0.04em;
    line-height: 1.12;
}
.chinese-name { color: var(--accent); font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 0.42em; font-weight: 500; letter-spacing: 0.08em; white-space: nowrap; }

.profile-text p { max-width: 760px; margin: 0 0 14px; color: var(--text); }
.profile-text .pronunciation { margin: 22px 0 17px; color: var(--muted); font-size: 13px; }
.profile-image { width: 268px; margin: 0; padding: 4px; border: 1px solid var(--accent); border-radius: 2px; background: var(--paper); }
.profile-image img { width: 100%; height: auto; }

.profile-links, .paper-links { display: flex; flex-wrap: wrap; gap: 9px; }
.profile-links a, .paper-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid #dbe0e5;
    border-radius: 6px;
    color: #303741;
    background: var(--white);
    font-size: 13px;
    font-weight: 680;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(20, 27, 38, 0.03);
}
.profile-links a:hover, .paper-links a:hover { border-color: #b7c8c2; color: var(--accent); }
.profile-links .primary-link { border-color: var(--accent); color: #fff; background: var(--accent); }
.profile-links .primary-link:hover { border-color: var(--accent-dark); color: #fff; background: var(--accent-dark); }

.content-section { scroll-margin-top: 64px; padding: 40px 0 54px; border-top: 1px solid var(--line); }
.section-header { max-width: 680px; margin-bottom: 20px; }
.section-header h2, .panel-header h2 { margin: 0 0 6px; font-family: Manrope, "Helvetica Neue", Arial, sans-serif; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.25; }
.section-header p, .panel-header p { margin: 0; color: var(--text); }

.details-section { padding-block: 42px 48px; }
.details-grid { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(350px, 0.84fr); gap: clamp(42px, 6vw, 70px); align-items: start; }
.panel-header { margin-bottom: 18px; }
.updates-list { border-top: 1px solid var(--line); }
.update-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.update-item time { padding-top: 1px; color: var(--accent); font-size: 12px; font-weight: 720; white-space: nowrap; }
.update-item p { margin: 0; color: var(--text); font-size: 14px; line-height: 1.5; }
.earlier-updates { margin-top: 10px; }
.earlier-updates summary { width: fit-content; padding: 5px 0; color: var(--accent); cursor: pointer; font-size: 12px; font-weight: 700; }
.earlier-updates[open] summary { margin-bottom: 8px; }

.experience-list { display: grid; margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.experience-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.experience-list img { width: 48px; height: 48px; padding: 4px; border-radius: 6px; background: #fff; object-fit: contain; }
.experience-list h3, .experience-list p { margin: 0; }
.experience-list h3 { font-size: 14px; line-height: 1.3; }
.experience-list h3 a { color: inherit; text-decoration-color: #bdc7d1; }
.experience-list p { color: var(--text); font-size: 14px; }
.experience-list .meta { margin-top: 3px; color: var(--muted); font-size: 12px; }

.publication-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; margin-bottom: 18px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 9px; }
.filter-button, .year-filter select {
    min-height: 38px;
    padding: 7px 13px;
    border: 1px solid #dbe0e5;
    border-radius: 6px;
    color: #414852;
    background: var(--white);
    font: inherit;
    font-size: 13px;
    font-weight: 680;
}
.filter-button { cursor: pointer; }
.filter-button:hover { border-color: #b9c6d4; }
.filter-button.is-active { border-color: var(--accent); color: #fff; background: var(--accent); }
.year-filter select { min-width: 124px; cursor: pointer; }
.publication-count { margin: 0; color: var(--muted); font-size: 12px; white-space: nowrap; }

.publication-list { display: grid; gap: 12px; }
.paper-entry {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e5e9e6;
    border-radius: 8px;
    background: var(--white);
    transition: border-color 160ms ease;
}
.paper-entry[hidden] { display: none; }
.paper-entry:hover { border-color: #c9d7cf; }
.paper-entry > img { width: 100%; aspect-ratio: 2 / 1; border: 1px solid #edf0f2; border-radius: 4px; background: #f5f6f7; object-fit: cover; }
.stacked-teaser { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 4px; width: 100%; aspect-ratio: 2 / 1; padding: 4px; overflow: hidden; border: 1px solid #edf0f2; border-radius: 4px; background: #f5f6f7; }
.teaser-half { position: relative; display: block; min-height: 0; overflow: hidden; background: #fff; }
.teaser-half img { position: absolute; top: 50%; left: 0; width: 202%; max-width: none; height: auto; transform: translateY(-50%); }
.teaser-half + .teaser-half img { left: -102%; }
.venue { margin: 0 0 4px; color: var(--accent); font-size: 11px; font-weight: 760; letter-spacing: 0.075em; text-transform: uppercase; }
.paper-details h3 { margin: 0 0 6px; font-family: "Source Serif 4", Georgia, serif; font-size: 19px; font-weight: 700; letter-spacing: -0.012em; line-height: 1.25; }
.authors, .summary { margin: 0 0 6px; color: var(--text); font-size: 14px; line-height: 1.5; }
.authors strong { color: var(--ink); }
.summary { color: #68707a; }
.paper-links { margin-top: 10px; }
.paper-links a { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.equal-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; }

footer { padding: 30px 0 42px; border-top: 1px solid var(--line); }
.footer-inner { display: grid; justify-items: center; gap: 18px; text-align: center; }
.visitor-tracker { width: 250px; max-width: 100%; overflow: hidden; }
.footer-inner p { margin: 0; color: var(--text); font-size: 13px; }

@media (max-width: 820px) {
    .hero { grid-template-columns: minmax(0, 1fr) 220px; gap: 42px; }
    .profile-image { width: 220px; }
    .profile-text h1 { font-size: 48px; }
    .details-grid { grid-template-columns: 1fr; }
    .paper-entry { grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
    .publication-tools { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
    .filter-group { grid-column: 1 / -1; }
    .publication-count { justify-self: end; }
}

@media (max-width: 640px) {
    html { scroll-padding-top: 70px; }
    .page-width, .nav-inner { width: min(calc(100% - 28px), var(--content-width)); }
    .nav-inner { min-height: 58px; }
    .nav-inner ul { gap: 13px; }
    .nav-inner ul a { font-size: 11.5px; }
    .hero { grid-template-columns: 1fr; gap: 34px; min-height: 0; padding: 46px 0 48px; }
    .profile-text h1 { margin-bottom: 12px; font-size: clamp(40px, 12vw, 48px); }
    .profile-text .role { font-size: 17px; }
    .profile-image { width: min(72vw, 268px); margin: 0 auto; }
    .content-section { padding: 34px 0 44px; }
    .section-header h2, .panel-header h2 { font-size: 26px; }
    .publication-tools, .filter-group { gap: 7px; }
    .filter-button, .year-filter select { min-height: 36px; padding: 6px 10px; font-size: 12px; }
    .paper-entry { grid-template-columns: 1fr; gap: 14px; padding: 13px; }
    .paper-details h3 { font-size: 18px; }
}

@media (max-width: 390px) {
    .wordmark { font-size: 13px; }
    .nav-inner ul { gap: 10px; }
    .nav-inner ul a { font-size: 10.5px; }
    .profile-links a { flex: 1 1 calc(50% - 9px); }
    .profile-links .primary-link { flex-basis: 100%; }
}

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

@media print {
    .site-header, .skip-link, .profile-links, .paper-links, .publication-tools { display: none; }
    body { background: #fff; }
    .hero { min-height: 0; padding-top: 0; }
    .paper-entry { break-inside: avoid; box-shadow: none; }
    .details-grid { grid-template-columns: 1fr 1fr; }
}
