@font-face {
  font-family: 'Source Serif 4';
  src: url('assets/source-serif-400.woff') format('woff');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('assets/source-serif-600.woff') format('woff');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f3f2f2;
  --ink: #201e1d;
  --muted: #605e5d;
  --accent: #006786;
  --accent-hover: #0088b0;
  --rule: #bebdbd;
  --divider: #d1d0d0;
  --soft: #eae9e9;
  --serif: 'Source Serif 4', Georgia, 'Songti SC', SimSun, serif;
  --gutter: 76px;
  --sidebar: 268px;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --paper: #1a1817;
  --ink: #e8e6e3;
  --muted: #aba9a6;
  --accent: #58c8ea;
  --accent-hover: #8fdcf5;
  --rule: #4e4c4a;
  --divider: #3b3938;
  --soft: #252221;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 28px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.8 var(--serif);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, figure { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button { font: inherit; }
::selection { background: var(--soft); color: var(--accent); }
.shell { width: min(1320px, 100%); padding-inline: var(--gutter); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--divider); }
.header-inner { padding-block: 30px; }
.name-heading { font-size: 38px; font-weight: 600; letter-spacing: -.015em; line-height: 1.15; }
.site-title { color: var(--ink); text-decoration: none; }
.chinese-name { font-family: 'Songti SC', SimSun, serif; font-size: .86em; font-weight: 400; color: var(--muted); margin-left: .3em; letter-spacing: 0; }
.layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); gap: 64px; padding-top: 52px; padding-bottom: 96px; }
.sidebar { padding-top: 6px; min-width: 0; position: sticky; top: 28px; align-self: start; max-height: calc(100dvh - 56px); overflow-y: auto; }
.profile { display: flex; flex-direction: column; gap: 24px; }
.portrait { width: 200px; aspect-ratio: 5/6; border: 1px solid var(--divider); border-radius: 50%; overflow: hidden; background: var(--soft); }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-name { font-size: 25px; font-weight: 600; letter-spacing: -.015em; line-height: 1.15; }
.profile-role { margin-top: 8px; font-size: 16px; line-height: 1.55; }
.profile-affiliation { margin-top: 0; font-size: 16px; line-height: 1.55; }
.links { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 14px; }
.side-link { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; column-gap: 9px; color: var(--accent); font-size: 15.5px; line-height: 1.4; text-align: left; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.side-link:hover { text-decoration: underline; }
.icon { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.65; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.section-nav { display: flex; flex-direction: column; border-top: 1px solid var(--divider); margin-top: 28px; padding-top: 16px; }
.section-nav a { border-left: 2px solid transparent; padding: 5px 0 5px 12px; font-size: 14px; line-height: 1.4; color: var(--muted); text-decoration: none; }
.section-nav a:hover, .section-nav a[aria-current="location"] { color: var(--accent); }
.section-nav a[aria-current="location"] { border-left-color: var(--accent); }
.mobile-section-nav { display: none; }
main { min-width: 0; }
section + section { margin-top: 56px; }
h2 { font-size: 30px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; margin-bottom: 24px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.prose { display: flex; flex-direction: column; gap: 18px; }
.prose strong { font-weight: 600; }
.entries { display: flex; flex-direction: column; gap: 20px; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: baseline; }
.entry-main { min-width: 0; }
h3 { font-size: 17px; line-height: 1.8; font-weight: 600; }
.entry-main h3 a { color: inherit; text-decoration: none; }
.entry-main h3 a:hover { color: var(--accent); text-decoration: underline; }
.entry-role { font-size: 15.5px; line-height: 1.8; margin-top: 4px; }
.entry-detail, .entry-location { font-size: 15.5px; line-height: 1.6; color: var(--muted); margin-top: 4px; }
.entry-description { font-size: 15.5px; line-height: 1.6; margin-top: 5px; }
.entry-date { font-size: 15px; line-height: 1.8; white-space: nowrap; color: var(--muted); }
.with-logo .entry { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 20px; align-items: start; }
.institution-logo { width: 72px; height: 48px; display: block; }
.institution-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
:root[data-theme=dark] .institution-logo img { background: #f3f2f2; border-radius: 4px; padding: 3px; }
.papers { display: flex; flex-direction: column; gap: 40px; }
.work-papers { gap: 28px; }
.paper-title { font-size: 17.5px; line-height: 1.5; font-weight: 600; }
.paper-title a { text-decoration: none; color: var(--ink); }
.paper-title a:hover { text-decoration: underline; color: var(--accent); }
.authors { margin-top: 6px; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.authors strong { color: var(--ink); font-weight: 600; }
.authors sup { font-size: .72em; line-height: 0; }
.venue { margin-top: 2px; font-size: 15.5px; line-height: 1.5; }
.venue-name { font-style: italic; }
.status { color: var(--muted); }
.paper-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.paper-link { display: inline-flex; align-items: center; border: 1px solid var(--divider); padding: 6px 11px; border-radius: 3px; font-size: 13.5px; line-height: 1; text-decoration: none; }
.paper-link:hover { border-color: var(--accent); background: var(--soft); }
.subheading { font-size: 17px; font-weight: 600; line-height: 1.6; margin: 34px 0 20px; }
.research-entries { gap: 36px; }
.research-item { scroll-margin-top: 28px; }
.research-item .entry-description { font-size: 16px; line-height: 1.75; margin-top: 8px; }
.research-index { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: -4px 0 30px; font-size: 15px; }
.research-area + .research-area { padding-top: 36px; border-top: 1px solid var(--divider); }
.research-area > .entry h3 { font-size: 21px; line-height: 1.4; }
.research-study { margin-top: 20px; scroll-margin-top: 84px; }
.research-study h4 { font-size: 16.5px; font-weight: 600; line-height: 1.5; }
.research-study > p { font-size: 16px; line-height: 1.7; margin-top: 5px; }
.research-study > .study-status { font-size: 14px; color: var(--muted); margin-top: 4px; }
.research-related { margin-top: 20px; font-size: 15px; line-height: 1.65; color: var(--muted); }
.research-gallery { margin-top: 16px; }
.gallery-toolbar { display: flex; align-items: center; gap: 12px; margin: 20px 0 12px; }
.gallery-picker { flex: 1; min-width: 0; }
.gallery-select { width: 100%; min-height: 40px; padding: 6px 8px; border: 1px solid var(--divider); border-radius: 2px; color: var(--ink); background: var(--paper); font: inherit; font-size: 14px; text-overflow: ellipsis; }
.gallery-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.figure-title { margin-bottom: 10px; font-size: 15px; font-weight: 600; line-height: 1.5; }
.figure-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.animation-toggle { min-height: 40px; color: var(--accent); font-size: 14px; padding: 4px 10px; border: 1px solid var(--divider); background: transparent; cursor: pointer; }
.gallery-stage { touch-action: pan-y; }
.figure-open { display: block; text-decoration: none; cursor: zoom-in; }
.figure-open img { display: block; width: 100%; height: auto; max-width: 100%; margin-inline: auto; background: #fff; }
.figure-open img.figure-compact { width: min(100%, 600px); padding: 12px; }
.gallery-controls { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-shrink: 0; }
.gallery-controls button { width: 36px; height: 32px; padding: 0; border: 1px solid var(--divider); border-radius: 2px; color: var(--accent); background: transparent; cursor: pointer; line-height: 1; }
.gallery-controls button:hover { background: var(--soft); border-color: var(--accent); }
.gallery-count { min-width: 40px; text-align: center; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.figure-caption { margin-top: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.figure-enlarge { display: inline-block; font-size: 13.5px; margin-top: 5px; }
body:has(#figure-viewer[open]) { overflow: hidden; }
#figure-viewer { width: min(1400px, calc(100vw - 48px)); height: calc(100dvh - 48px); max-width: none; max-height: none; margin: auto; padding: 0; border: 1px solid var(--rule); color: var(--ink); background: var(--paper); }
#figure-viewer[open] { display: flex; flex-direction: column; }
#figure-viewer::backdrop { background: rgb(0 0 0 / .72); }
.viewer-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 10px 16px; border-bottom: 1px solid var(--divider); flex-shrink: 0; font-size: 15px; }
.viewer-toolbar button { min-height: 44px; padding: 6px 12px; border: 1px solid var(--divider); background: var(--paper); color: var(--accent); cursor: pointer; }
.viewer-toolbar button:hover { border-color: var(--accent); }
#viewer-close { margin-left: auto; }
.viewer-stage { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px; background: var(--soft); }
#viewer-image { display: block; width: 100%; height: 100%; object-fit: contain; margin: auto; }
.viewer-stage.is-zoomed #viewer-image { width: var(--figure-width); height: auto; max-width: none; max-height: none; object-fit: initial; }
#viewer-caption { padding: 10px 16px; font-size: 14px; line-height: 1.5; flex-shrink: 0; }
.compact-list { display: flex; flex-direction: column; gap: 20px; }
.compact-list .entry-role { font-size: 17px; line-height: 1.8; margin: 0; }
.bullet-list { display: flex; flex-direction: column; gap: 20px; padding-left: 1.25em; list-style: disc; }
.bullet-list li { padding-left: .2em; }
.presentation-list p { font-size: 16px; line-height: 1.8; }
.presentation-list strong { font-weight: 600; }
.skills p { display: grid; grid-template-columns: 152px minmax(0, 1fr); gap: 8px 24px; align-items: baseline; font-size: 15.5px; line-height: 1.8; }
.skills p + p { margin-top: 14px; }
.skills p > strong { display: block; font-weight: 600; }
.skills b { font-weight: 600; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 64px; color: var(--muted); font-size: 14px; }
.skip-link { position: fixed; top: 10px; left: 16px; transform: translateY(-200%); z-index: 10; background: var(--paper); padding: 8px 14px; border: 1px solid var(--accent); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1100px) {
  :root { --gutter: 48px; --sidebar: 220px; }
  .layout { gap: 48px; }
  .with-logo .entry { grid-template-columns: 56px minmax(0, 1fr); gap: 10px 16px; }
  .with-logo .entry-date { grid-column: 2; }
  .institution-logo { width: 56px; }
}
@media (max-width: 900px) {
  :root { --gutter: 24px; }
  body { font-size: 16px; line-height: 1.75; }
  .header-inner { padding-block: 22px; }
  .name-heading { font-size: 30px; }
  html { scroll-padding-top: 64px; }
  .layout { grid-template-columns: 1fr; gap: 24px; padding-top: 22px; padding-bottom: 64px; }
  .sidebar { position: static; max-height: none; overflow: visible; padding-top: 0; }
  .profile-name { display: none; }
  .profile-intro { position: relative; }
  .profile-role { margin-top: 0; padding-right: 48px; }
  .links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 0 16px; margin-top: 8px; }
  .side-link { min-height: 40px; font-size: 15px; }
  #theme-toggle { position: absolute; right: 0; top: 0; width: 40px; justify-content: center; grid-template-columns: 18px; }
  #theme-toggle .button-label { display: none; }
  .section-nav { display: none; }
  .mobile-section-nav { display: block; position: sticky; top: 0; z-index: 5; background: var(--paper); border-block: 1px solid var(--divider); }
  .mobile-section-nav summary { min-height: 44px; padding: 8px 2px; font-size: 15px; cursor: pointer; color: var(--accent); }
  .mobile-section-nav summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .mobile-section-nav nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border: 1px solid var(--divider); padding: 8px 12px; max-height: calc(100dvh - 70px); overflow-y: auto; }
  .mobile-section-nav nav a { display: block; padding: 10px 4px; font-size: 15px; line-height: 1.6; text-decoration: none; }
  .mobile-section-nav nav a[aria-current="location"] { text-decoration: underline; font-weight: 600; }
  .research-item { scroll-margin-top: 8px; }
  .research-area > .entry h3 { font-size: 20px; }
  .research-index { gap: 8px 18px; }
  .portrait { width: 150px; }
  h2 { font-size: 25px; }
  .entry { grid-template-columns: 1fr; gap: 8px; }
  .entry-date { white-space: normal; }
  .with-logo .entry { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .with-logo .entry-date { grid-column: 2; }
  .institution-logo { width: 72px; }
  .compact-list .entry { grid-template-columns: minmax(0,1fr) auto; gap: 18px; }
  .gallery-controls { gap: 16px; }
  .gallery-controls button { width: 44px; height: 44px; }
  .figure-enlarge { min-height: 40px; padding-block: 8px; }
  #figure-viewer { width: 100vw; height: 100dvh; border: 0; }
  .viewer-toolbar { gap: 8px; padding: 8px; font-size: 14px; }
  .viewer-toolbar button { padding-inline: 10px; }
  .viewer-stage { padding: 8px; }
  #viewer-caption { padding: 10px 12px; }
}
@media (max-width: 600px) {
  .skills p { grid-template-columns: 1fr; gap: 2px; }
  .bullet-list .entry { grid-template-columns: 1fr; gap: 4px; }
  .gallery-toolbar { flex-wrap: wrap; gap: 8px; }
  .gallery-picker { flex-basis: 100%; }
  .gallery-controls { margin-left: auto; }
}
@media print {
  :root { --paper: white; --ink: black; --muted: #444; --rule: #aaa; }
  .shell { width: 100%; padding: 0; }
  .layout { display: block; padding-top: 20px; }
  .sidebar, .mobile-section-nav, #figure-viewer, .paper-actions, .skip-link, .figure-enlarge, .gallery-toolbar, .animation-toggle { display: none !important; }
  .name-heading { font-size: 26px; }
  body { font-size: 11pt; }
  h2 { font-size: 18pt; break-after: avoid; }
  .paper, .entry, .research-item { break-inside: avoid; }
  .figure-open img { max-height: 280px; }
  .gallery-controls { display: none; }
  section + section { margin-top: 28px; }
}
.profile-role, .side-info { color: var(--muted); }
.side-info { cursor: default; }
a.side-info { cursor: pointer; }
.nankai-logo { display: grid; place-items: center; }
.nankai-symbol {
  display: block;
  width: 48px;
  height: 48px;
  background: #812363;
  -webkit-mask: url('assets/institutions/nankai-official-white.png') left center / 217.6px 48px no-repeat;
  mask: url('assets/institutions/nankai-official-white.png') left center / 217.6px 48px no-repeat;
}
:root[data-theme=dark] .nankai-symbol { background: #d8a6cf; }
