:root {
  --ink: #263146;
  --muted: #626d80;
  --accent: #3159a7;
  --accent-hover: #193f87;
  --paper: #fff;
  --surface: #f7f8fb;
  --line: #e5e8ee;
  --tag: #edf2fb;
  --shadow: 0 3px 12px #2631460a;
  color-scheme: light;
  font-size: 16px;
}
:root[data-theme=dark] {
  --ink: #e5eaf4;
  --muted: #acb6c8;
  --accent: #a5bff7;
  --accent-hover: #d0dfff;
  --paper: #151c29;
  --surface: #1b2535;
  --line: #303d51;
  --tag: #253755;
  --shadow: none;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; line-height: 1.65; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, figure { margin: 0; }
a { color: var(--accent); text-decoration: none; transition: color .15s, border-color .15s; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible, canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 3px; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: #dce6fa; color: #19335e; }
[hidden] { display: none !important; }
html:not([data-lang=zh]) .i18n-zh, html[data-lang=zh] .i18n-en { display: none !important; }
html[data-lang=zh] body { line-height: 1.7; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 30; padding: 10px 16px; background: var(--paper); }
.skip-link:focus { top: 10px; }

/* A compact header and a stable academic profile column. */
.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 20; }
.header-inner { max-width: 1360px; margin: auto; min-height: 60px; padding: 10px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.wordmark { font-size: 21px; font-weight: 650; letter-spacing: -.7px; color: var(--ink); white-space: nowrap; }
.wordmark-dot { color: var(--accent); }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-left: auto; font-size: .875rem; font-weight: 500; }
.main-nav a { color: var(--muted); white-space: nowrap; padding: 8px 0; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--accent); }
.main-nav a[aria-current] { text-decoration: underline; text-underline-offset: 22px; text-decoration-thickness: 2px; }
.preferences { display: flex; gap: 7px; align-items: center; }
.language-switch { display: flex; padding: 2px; border: 1px solid var(--line); border-radius: 5px; }
.language-switch button { border: 0; background: none; color: var(--muted); padding: 2px 9px; font-size: .875rem; font-weight: 500; min-height: 30px; }
.language-switch button[aria-pressed=true] { color: var(--accent); background: var(--tag); border-radius: 3px; }
.theme-switch { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); }
.site-shell { max-width: 1360px; padding: 24px 24px 0; margin: 0 auto; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.site-main { min-width: 0; min-height: 60vh; }
.site-shell-wide { display: block; max-width: 1120px; }
.profile-sidebar { min-width: 0; align-self: stretch; }
.profile-sticky { position: sticky; top: 84px; }
.profile-photo { display: block; width: 156px; margin-bottom: 17px; }
.profile-photo img { width: 156px; height: 156px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.profile-name { display: inline-block; font-family: 'Newsreader', Georgia, serif; font-size: 2rem; font-weight: 500; letter-spacing: -.04em; line-height: 1.2; color: var(--ink); }
.profile-role { font-size: .9375rem; margin-top: 4px; color: var(--muted); }
.profile-affiliation { display: flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--ink); }
.profile-affiliation img { width: 32px; height: 32px; object-fit: contain; background: #fff; border-radius: 5px; padding: 2px; }
.profile-affiliation strong { display: block; font-size: .9375rem; font-weight: 600; line-height: 1.45; }
.profile-affiliation small { display: block; font-size: .8125rem; color: var(--muted); }
.profile-location { margin-top: 12px; font-size: .875rem; color: var(--muted); }
.profile-links { display: grid; gap: 5px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); font-size: .875rem; overflow-wrap: anywhere; }
.profile-links a { width: fit-content; }
.profile-links a:first-child { margin-bottom: 5px; }
.profile-links a span { color: var(--muted); padding-left: 4px; }

/* Short introduction and closely spaced sections keep research near the top. */
.about-section h1, .section-heading h2, .prose h2 { font-family: 'Newsreader', Georgia, 'Songti SC', serif; font-size: 1.75rem; font-weight: 500; line-height: 1.3; letter-spacing: -.025em; }
.about-section h1 { margin-bottom: 12px; }
.about-section p + p { margin-top: 10px; }
.about-section strong { font-weight: 600; }
.about-section p a:hover { text-decoration: underline; text-underline-offset: 3px; }
.research-interests { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 16px; row-gap: 3px; margin-top: 13px; font-size: .875rem; color: var(--muted); }
.research-interests > strong { color: var(--ink); font-weight: 600; }
.research-interests > span { display: inline-flex; }
.content-section { padding-top: 24px; scroll-margin-top: 86px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 11px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.section-link { font-size: .875rem; white-space: nowrap; }
.news-list { list-style: none; padding: 0; display: grid; gap: 7px; }
.news-list li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 13px; font-size: .9375rem; }
.news-list time { font-size: .8125rem; font-variant-numeric: tabular-nums; color: var(--muted); padding-top: 2px; }
.news-list strong { font-weight: 600; }
.older-news { margin-top: 9px; }
.older-news summary { cursor: pointer; color: var(--accent); font-size: .875rem; width: fit-content; }
.older-news .news-list { margin-top: 10px; }

/* Figures retain their full scientific content, with no cropping. */
.paper-list { border-top: 1px solid var(--line); }
.section-heading + .paper-list { border-top: 0; }
.paper-row, .model-family { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.paper-authors .author-equal { font-size: .75em; line-height: 0; vertical-align: super; }
.paper-copy { min-width: 0; overflow-wrap: anywhere; }
.paper-row:first-child { padding-top: 6px; }
.page-heading + .paper-list .paper-row:first-child, .bibliography-links + .paper-list .paper-row:first-child { padding-top: 14px; }
.paper-visual { display: flex; align-items: center; justify-content: center; position: relative; align-self: start; min-width: 0; }
.paper-visual img { width: 100%; height: auto; max-height: 165px; object-fit: contain; object-position: top center; }
.paper-visual .zoom-hint { position: absolute; bottom: 3px; right: 5px; color: #626d80; font-size: .75rem; background: #fff; padding: 0 3px; }
.paper-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 0; font-size: .8125rem; color: var(--muted); }
.venue { padding: 1px 7px; border-radius: 3px; background: var(--tag); color: var(--accent); font-weight: 600; }
.paper-row h3 { font-size: 1.0625rem; line-height: 1.45; letter-spacing: -.015em; font-weight: 600; }
.paper-row h3 a { color: var(--accent); }
.paper-row h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.paper-authors { margin-top: 3px; font-size: .8125rem; color: var(--muted); line-height: 1.6; }
.paper-authors strong { color: var(--ink); font-weight: 650; text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.paper-summary { margin-top: 4px; font-size: .875rem; color: var(--muted); line-height: 1.6; }
.resource-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.resource-link { display: inline-flex; gap: 5px; align-items: center; min-height: 30px; padding: 2px 9px; font-size: .875rem; font-weight: 500; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); }
.resource-link:hover { color: var(--accent); border-color: var(--accent); background: var(--tag); }
.paper-row.paper-row-text { grid-template-columns: 1fr; }

/* Projects share the same image treatment and restrained resource buttons. */
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 18px; align-items: stretch; }
.project-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--paper); }
.project-image { display: flex; align-items: center; justify-content: center; flex-shrink: 0; height: 210px; padding: 6px; background: #fff; border-bottom: 1px solid var(--line); }
.project-image img { width: 100%; height: 100%; object-fit: contain; }
.project-body { display: flex; flex-direction: column; flex: 1; padding: 14px 17px 17px; }
.project-body > .resource-links { margin-top: auto; padding-top: 10px; }
.project-body h3 { font-size: 1.125rem; letter-spacing: -.02em; font-weight: 600; line-height: 1.4; }
.project-body h3 a { color: var(--accent); }
.project-body p { font-size: .875rem; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.project-body .project-type { margin: 0 0 5px; font-size: .75rem; color: var(--muted); letter-spacing: .015em; }
.education-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.education-item { display: flex; align-items: center; gap: 13px; padding: 8px 0; }
.education-item img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; }
.education-item h3 { font-size: 1rem; font-weight: 600; }
.education-item p { font-size: .875rem; color: var(--muted); }
.game-callout { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 28px; border-top: 1px solid var(--line); padding-top: 18px; }
.game-callout h3 { font-size: 1.0625rem; font-weight: 600; }
.game-callout p { color: var(--muted); font-size: .875rem; margin-top: 2px; }

.page-heading { padding-bottom: 16px; }
.site-shell-publications { grid-template-columns: 180px minmax(0, 1fr); gap: 24px; }
.publication-index .page-heading .eyebrow { display: none; }
.publication-index .page-intro { margin-top: 7px; }
.publication-index .bibliography-links { margin-bottom: 10px; }
.eyebrow { font-size: .75rem; letter-spacing: .1em; font-weight: 500; color: var(--muted); margin-bottom: 7px; }
.page-heading h1 { font-family: 'Newsreader', Georgia, 'Songti SC', serif; font-size: 2.125rem; line-height: 1.2; font-weight: 500; letter-spacing: -.025em; }
.page-intro { color: var(--muted); margin-top: 10px; font-size: 1rem; }
.prose { max-width: 900px; overflow-wrap: anywhere; }
.prose h2 { margin: 27px 0 13px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 12px 0; }
.prose ul { padding-left: 21px; }
.prose li { margin-bottom: 9px; }
.prose .paper-authors { margin-top: 10px; }
.affiliation-strip { display: flex; align-items: center; padding: 14px 17px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.affiliation { display: flex; align-items: center; gap: 13px; color: var(--ink); }
.affiliation > img { width: 38px; height: 38px; object-fit: contain; background: #fff; border-radius: 5px; padding: 3px; }
.affiliation strong { display: block; font-size: 1rem; font-weight: 600; }
.affiliation small { display: block; color: var(--muted); font-size: .875rem; }
.detail-image { margin: 20px 0; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.detail-image img { max-height: 460px; object-fit: contain; width: 100%; }
.citation { font-size: .875rem; color: var(--muted); padding: 15px; border: 1px solid var(--line); border-radius: 5px; margin-top: 22px; overflow-wrap: anywhere; }
.bibliography-links { display: flex; flex-wrap: wrap; gap: 16px; font-size: .875rem; margin-bottom: 17px; }
.site-footer { max-width: 1312px; margin: 28px auto 0; border-top: 1px solid var(--line); padding: 20px 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-footer .wordmark { font-size: 1rem; letter-spacing: -.4px; }
.site-footer p { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.footer-right { display: flex; flex-wrap: wrap; gap: 16px; font-size: .8125rem; color: var(--muted); }


.experience-list { display: grid; gap: 14px; }
.experience-item { display: grid; grid-template-columns: 150px 48px minmax(0, 1fr); gap: 14px; align-items: start; }
.experience-logo { width: 48px; height: 48px; object-fit: contain; margin-top: 2px; }
.experience-copy { min-width: 0; }
.experience-item h3 { font-size: 1rem; font-weight: 600; line-height: 1.5; }
.experience-item p { font-size: .875rem; margin: 3px 0 0; color: var(--muted); line-height: 1.6; }
.experience-item .experience-date { font-size: .8125rem; margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.experience-item .experience-role { color: var(--ink); }
.education-item .education-date { font-size: .8125rem; margin-top: 3px; font-variant-numeric: tabular-nums; }

.model-family { padding: 6px 0 12px; }
.model-copy { container-type: inline-size; }
.model-family-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.model-family-heading h3 { margin: 0; font-size: 1.0625rem; line-height: 1.45; }
.model-license { color: var(--muted); font-size: .78rem; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.model-intro { color: var(--muted); margin: 4px 0 6px; font-size: .875rem; line-height: 1.5; }
.model-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; list-style: none; margin: 0; padding: 0; }
.model-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-width: 0; gap: 4px 8px; padding: 4px 0; border-top: 1px solid var(--line); }
.model-name { font-size: .8125rem; font-weight: 600; overflow-wrap: anywhere; }
.model-variants { display: flex; flex-wrap: wrap; gap: 4px; flex-shrink: 1; }
.model-variants .resource-link { min-height: 24px; padding: 1px 6px; font-size: .75rem; }
@container (max-width: 540px) { .model-list { grid-template-columns: 1fr; } }

@media (max-width: 1360px) {
  .site-footer { margin-left: 28px; margin-right: 28px; }
}
@media (max-width: 1080px) {
  .site-shell { grid-template-columns: 190px minmax(0, 1fr); gap: 30px; padding-left: 24px; padding-right: 24px; }
  .paper-row, .model-family { grid-template-columns: 215px minmax(0, 1fr); gap: 18px; }
  .header-inner { padding-left: 24px; padding-right: 24px; gap: 22px; }
  .main-nav { gap: 20px; }
  .profile-links { font-size: .8125rem; }
}
@media (max-width: 900px) {
  .site-shell { display: block; padding-top: 24px; }
  .profile-sidebar { border-bottom: 1px solid var(--line); margin-bottom: 24px; padding-bottom: 20px; }
  .profile-sticky { position: static; display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 22px; align-items: start; }
  .profile-photo { width: 112px; grid-row: 1 / 3; margin: 0; }
  .profile-photo img { width: 112px; height: 112px; }
  .profile-name { font-size: 1.875rem; }
  .profile-role { display: block; margin: 2px 0 0; font-size: .875rem; }
  .profile-affiliation { margin-top: 7px; gap: 8px; }
  .profile-affiliation img { width: 28px; height: 28px; }
  .profile-affiliation strong { display: inline; font-size: .875rem; }
  .profile-affiliation small { display: inline; margin-left: 8px; }
  .profile-location { margin-top: 5px; font-size: .8125rem; }
  .profile-links { display: flex; flex-wrap: wrap; column-gap: 15px; row-gap: 4px; border: 0; padding: 0; margin-top: 9px; font-size: .875rem; }
  .profile-links a:first-child { margin: 0; }
  .paper-row, .model-family { grid-template-columns: 225px minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .header-inner { padding: 10px 20px 6px; gap: 8px; flex-wrap: wrap; }
  .preferences { margin-left: auto; order: 1; }
  .main-nav { width: 100%; margin: 0; order: 2; justify-content: space-between; gap: 12px; font-size: .875rem; }
  .main-nav a { padding: 4px 0; }
  .main-nav a[aria-current] { text-underline-offset: 12px; }
  .site-shell { padding: 22px 20px 0; }
  .paper-row, .model-family { grid-template-columns: 185px minmax(0, 1fr); gap: 16px; }
  .project-grid { gap: 14px; }
  .project-image { height: 180px; }
  .project-body { padding: 12px 14px 15px; }
  .education-grid { gap: 14px; }
  .site-footer { margin: 30px 20px 0; align-items: flex-start; flex-direction: column; gap: 12px; }
}
@media (max-width: 560px) {
  .experience-item { grid-template-columns: 40px minmax(0, 1fr); gap: 3px 12px; }
  .experience-item .experience-date { grid-column: 2; }
  .experience-logo { grid-column: 1; grid-row: 1 / 3; width: 40px; height: 40px; }
  .experience-copy { grid-column: 2; }
  .experience-list { gap: 16px; }
  .profile-sticky { grid-template-columns: 88px minmax(0, 1fr); gap: 12px 17px; }
  .profile-photo, .profile-photo img { width: 88px; }
  .profile-photo img { height: 88px; }
  .profile-photo { grid-row: 1; }
  .profile-name { font-size: 1.75rem; }
  .profile-role { display: block; margin: 2px 0 0; }
  .profile-affiliation { margin-top: 6px; }
  .profile-affiliation small { display: block; margin-left: 0; font-size: .75rem; }
  .profile-location { margin-top: 4px; }
  .profile-links { grid-column: 1 / -1; margin: 0; gap: 5px 17px; }
  .profile-links a:first-child { flex-basis: 100%; }
  .about-section h1, .section-heading h2, .prose h2 { font-size: 1.625rem; }
  .section-heading { gap: 10px; }
  .section-link { font-size: .8125rem; }
  .research-interests { gap: 3px 12px; }
  .research-interests > strong { flex-basis: 100%; }
  .news-list li { grid-template-columns: 63px minmax(0, 1fr); gap: 10px; }
  .paper-row, .model-family { grid-template-columns: 1fr; gap: 10px; padding: 16px 0; }
  .paper-visual { width: 100%; min-height: 0; }
  .paper-visual img { max-height: 220px; }
  .paper-row h3 { font-size: 1.125rem; }
  .resource-link { min-height: 34px; }
  .project-grid, .education-grid { grid-template-columns: 1fr; }
  .project-grid { grid-auto-rows: auto; }
  .project-image { height: 200px; }
  .project-body { padding: 14px 17px 17px; }
  .education-grid { gap: 6px; }
  .game-callout { align-items: flex-start; }
  .game-callout > a { flex-shrink: 0; }
  .page-heading h1 { font-size: 1.875rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media (max-height: 650px) and (min-width: 901px) {
  .profile-sticky { position: static; }
}
@media print {
  .site-header, .site-footer, .preferences, .game-callout, .profile-sidebar { display: none; }
  .site-shell { display: block; max-width: none; padding: 0; }
  .paper-row, .project-card { break-inside: avoid; }
  .content-section { padding-top: 20px; }
}
