:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #303737;
  --muted: #666d6b;
  --accent: #263f50;
  --link: #366577;
  --line: #e1e6e8;
  --tag-border: #bac9d0;
  --hover: #f3f7f9;
  --glow-core: rgb(73 145 217 / .13);
  --glow-halo: rgb(124 154 217 / .04);
  --heading: "Space Grotesk", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #11161e;
  --ink: #e0e6ec;
  --muted: #afb9c5;
  --accent: #eaf1f7;
  --link: #8ebbd6;
  --line: #303c4a;
  --tag-border: #4e6477;
  --hover: #1b2937;
  --glow-core: rgb(88 157 246 / .17);
  --glow-halo: rgb(145 112 221 / .08);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 100px; scroll-padding-bottom: 88px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 5px; border-radius: 2px; }
p { margin: 0 0 20px; }
h1, h2, h3 { color: var(--accent); font-family: var(--heading); font-weight: 500; }
h1 { font-size: clamp(29px, 3.3vw, 32px); line-height: 1.32; letter-spacing: -.7px; margin: 0; }
h2 { font-size: 26px; line-height: 1.35; margin: 0 0 22px; letter-spacing: -.4px; }
h3 { margin: 0; }
strong { font-weight: 600; }
.cursor-glow { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; opacity: 0; transition: opacity .2s ease; }
.cursor-glow::before { content: ""; position: absolute; top: 0; left: 0; width: 640px; height: 640px; background: radial-gradient(circle, var(--glow-core) 0%, var(--glow-halo) 36%, transparent 70%); transform: translate3d(var(--cursor-x, -1000px), var(--cursor-y, -1000px), 0) translate(-50%, -50%); }
.cursor-glow.is-active { opacity: 1; }
.skip-link { position: absolute; top: -80px; left: 20px; background: var(--paper); padding: 10px; z-index: 5; }
.skip-link:focus { top: 8px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner { max-width: 1000px; padding: 0 32px; margin: auto; height: 80px; display: flex; justify-content: center; align-items: center; }
.theme-toggle { position: fixed; right: 24px; right: max(24px, env(safe-area-inset-right, 0px)); bottom: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 4; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--paper); box-shadow: 0 4px 16px rgb(0 0 0 / .06); cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { color: var(--accent); border-color: var(--tag-border); background: var(--hover); }
.theme-icon { width: 20px; height: 20px; }
.theme-icon--sun, :root[data-theme="dark"] .theme-icon--moon { display: none; }
:root[data-theme="dark"] .theme-icon--sun { display: block; }
nav { display: flex; justify-content: space-between; gap: 24px; width: 100%; height: 100%; font-family: var(--heading); }
nav a { display: flex; align-items: center; color: var(--muted); font-size: 18px; font-weight: 500; border-bottom: 2px solid transparent; padding-top: 2px; }
nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
nav a:hover { text-decoration: none; color: var(--accent); }
.page-shell { max-width: 1000px; padding: 64px 32px 80px; margin: auto; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 72px; }
.page-shell--wide { display: block; max-width: 960px; }
.profile { align-self: start; position: sticky; top: 48px; }
.portrait { display: block; width: 184px; height: 184px; object-fit: cover; object-position: 50% 48%; border-radius: 50%; margin-bottom: 26px; }
.profile-name { font-family: var(--heading); font-size: 28px; font-weight: 500; line-height: 1.3; color: var(--accent); letter-spacing: -.6px; display: block; }
.chinese-name { font-family: system-ui, sans-serif; font-size: 15px; letter-spacing: 5px; margin: 6px 0 23px; color: var(--muted); }
.position { line-height: 1.6; font-size: 16px; margin-bottom: 25px; }
.position span { color: var(--muted); }
.profile-links { display: grid; gap: 6px; font-size: 15px; }
.profile-links span { font-size: 12px; padding-left: 3px; }
.email { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; padding-bottom: 7px; }
.main-content { min-width: 0; }
.page-heading { margin: 0 0 29px; }
.eyebrow { text-transform: uppercase; letter-spacing: 2.3px; font-size: 13px; line-height: 1.5; color: var(--muted); margin: 0 0 18px; }
.intro { font-size: 18px; }
section { margin-top: 42px; }
.research-interests { padding: 26px 0 25px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 32px; }
.research-interests h2 { margin-bottom: 14px; }
.research-interests p { font-size: 18px; margin-bottom: 17px; }
.research-interests .exploring-interests { margin: 17px 0 0; color: var(--muted); }
.publication-heading-note { display: inline-block; font-family: var(--body); font-size: 14px; line-height: 1.5; letter-spacing: normal; color: var(--muted); }
.page-heading--research { margin-bottom: 18px; }
#first-author { margin-top: 24px; }
#publications-heading { font-size: 24px; margin-bottom: 12px; }
.publication-list { list-style: none; padding: 0; margin: 0; }
.publication { padding: 0 0 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.publication:last-child { margin-bottom: 0; }
.publication h3 { font-family: var(--body); font-size: 19px; line-height: 1.35; margin-bottom: 3px; color: var(--ink); font-weight: 500; }
.publication-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-bottom: 6px; }
.publication-authors { font-size: 14px; line-height: 1.5; margin: 0; color: var(--muted); }
.publication-authors strong { color: var(--ink); }
.publication-venue { font-size: 14px; line-height: 1.5; font-style: italic; font-weight: 500; margin: 0; color: var(--muted); }
.publication-links { display: flex; flex-wrap: wrap; gap: 7px; font-family: var(--mono); font-size: 11px; line-height: 1.3; }
.publication-links a { padding: 2px 9px; border: 1px solid var(--tag-border); border-radius: 2px; transition: background-color .15s, border-color .15s; }
.publication-links a:hover { background: var(--hover); border-color: var(--link); text-decoration: none; }
.year-heading { font: 12px/1.5 var(--mono); letter-spacing: 1px; color: var(--muted); padding: 2px 0 8px; margin: 6px 0 0; }
.education-section { margin-top: 28px; }
.education-section h2 { margin-bottom: 14px; }
.education-entry { padding: 0 0 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.education-entry:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.education-title { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.education-title h3 { font-size: 16px; line-height: 1.4; color: var(--ink); font-weight: 500; }
.education-title time { font: 11px/1.5 var(--mono); color: var(--muted); white-space: nowrap; }
.education-entry p { font-size: 15px; line-height: 1.5; margin: 3px 0 0; color: var(--muted); }
.education-entry .education-note { font-size: 14px; }
.course-list { list-style: none; padding: 0; }
.course { padding: 0 0 25px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.course h3 { font-size: 22px; line-height: 1.4; }
.course-meta { display: flex; justify-content: space-between; gap: 15px; margin: 10px 0 0; font-size: 16px; line-height: 1.7; color: var(--muted); }
.talk-list { list-style: none; margin: 0; padding: 0; }
.talk { margin-bottom: 26px; }
.talk-row { display: grid; grid-template-columns: 90px 145px minmax(0, 1fr) 155px; gap: 20px; align-items: baseline; font-size: 18px; line-height: 1.5; }
.talk-date { font-family: var(--mono); font-size: 14px; font-weight: 500; white-space: nowrap; }
.talk-type { font-weight: 600; color: var(--ink); }
.talk-content { min-width: 0; }
.talk-event { font-size: 19px; font-weight: 500; line-height: 1.5; color: var(--accent); margin: 0; }
.talk-title, .talk-venue { color: var(--muted); font-size: 16px; line-height: 1.45; margin: 3px 0 0; }
.talk-location { text-align: right; color: var(--muted); font-style: italic; font-weight: 500; margin: 0; }
.previous-talks { margin-top: 32px; }
.previous-talks summary { color: var(--link); font: 15px/1.5 var(--mono); cursor: pointer; width: fit-content; text-decoration: underline; text-underline-offset: 4px; }
.previous-talks summary:focus-visible { outline: 2px solid var(--link); outline-offset: 5px; }
.previous-talks[open] > .talk-list { margin-top: 26px; }
.site-footer { border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; color: var(--muted); }
.floating-tools { max-width: 1000px; margin: auto; padding: 0 32px 88px; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.visitor-globe { --globe-size: 128px; width: var(--globe-size); text-align: center; }
.visitor-globe iframe { display: block; width: 100%; height: calc(var(--globe-size) * 1.1 + 4px); border: 0; background: transparent; color-scheme: light; }
.visitor-globe > a { display: inline-block; color: var(--muted); font: 10px/1.5 var(--mono); }
.footer-meta { max-width: 1000px; padding: 24px 32px; margin: auto; display: flex; justify-content: space-between; gap: 16px; }
@media (min-width: 1280px) {
  .floating-tools { position: fixed; right: 24px; right: max(24px, env(safe-area-inset-right, 0px)); bottom: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 4; padding: 0; pointer-events: none; }
  .floating-tools > * { pointer-events: auto; }
  .floating-tools .theme-toggle { position: static; }
}
@media (max-width: 800px) {
  .page-shell { grid-template-columns: 180px minmax(0, 1fr); gap: 38px; padding-top: 45px; }
  .portrait { width: 150px; height: 150px; }
  .profile-name { font-size: 24px; }
  h1 { font-size: 29px; }
  .education-title { display: block; }
  .talk-row { grid-template-columns: 100px minmax(0, 1fr); gap: 4px 18px; }
  .talk-content, .talk-location { grid-column: 1 / -1; }
  .talk-content { margin-top: 5px; }
  .talk-location { text-align: left; }
}
@media (max-width: 620px) {
  .header-inner { padding: 0 24px; height: 66px; }
  .theme-toggle { right: 16px; right: max(16px, env(safe-area-inset-right, 0px)); bottom: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  nav { gap: 12px; }
  nav a { font-size: 16px; }
  .page-shell { display: block; padding: 34px 24px 48px; }
  .profile { position: static; display: flex; align-items: start; gap: 22px; padding-bottom: 30px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
  .portrait { width: 95px; height: 95px; flex-shrink: 0; margin: 2px 0 0; }
  .profile-name { font-size: 26px; }
  .chinese-name { margin: 5px 0 11px; font-size: 12px; }
  .position { font-size: 16px; margin-bottom: 12px; }
  .profile-links { font-size: 15px; gap: 2px; }
  .email { font-size: 11px; padding-bottom: 5px; }
  h1 { font-size: 29px; }
  h2 { font-size: 22px; }
  .intro { font-size: 18px; }
  .page-heading { margin-bottom: 23px; }
  #publications-heading { font-size: 22px; }
  .publication h3 { font-size: 18px; }
  .footer-meta { padding: 22px 24px; }
  .floating-tools { padding: 0 24px 80px; }
}
@media (max-width: 360px) {
  .header-inner { padding: 0 16px; }
  nav { gap: 8px; }
  .profile { gap: 15px; }
  .portrait { width: 76px; height: 76px; }
  .profile-name { font-size: 22px; }
  nav a { font-size: 15px; }
  h1 { font-size: 25px; }
}
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor-glow, .theme-toggle, .publication-links a { transition: none; }
}
@media print {
  :root[data-theme] { color-scheme: light; --paper: #fff; --ink: #303737; --muted: #666d6b; --accent: #263f50; --link: #366577; --line: #e1e6e8; --tag-border: #bac9d0; }
  body { background: white; font-size: 12pt; }
  .site-header, .profile, .site-footer, .skip-link, .cursor-glow, .theme-toggle { display: none; }
  .page-shell { display: block; padding: 0; max-width: none; }
  .publication, .education-entry, .course, .talk { break-inside: avoid; }
  a { color: inherit; }
}
