:root {
  color-scheme: light dark;
  --paper: #fdfdfd;
  --ink: #1d2934;
  --muted: #526273;
  --line: #dce3ea;
  --soft: #edf3f8;
  --accent: #275d87;
  --accent-hover: #153d5e;
  --display: Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Segoe UI", sans-serif;
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@supports (color: light-dark(white, black)) {
  :root {
    --paper: light-dark(#fdfdfd, #151c24);
    --ink: light-dark(#1d2934, #edf2f7);
    --muted: light-dark(#526273, #adbccc);
    --line: light-dark(#dce3ea, #354452);
    --soft: light-dark(#edf3f8, #212e3b);
    --accent: light-dark(#275d87, #a5cceb);
    --accent-hover: light-dark(#153d5e, #d4e9fa);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.25rem; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  font: 1rem/1.67 var(--sans);
  overflow-wrap: anywhere;
}
main { flex: 1; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.32; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1rem; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.site-width {
  width: min(100% - clamp(2rem, 8vw, 7rem), 69rem);
  margin-inline: auto;
}
.skip-link {
  position: absolute;
  z-index: 2;
  top: .75rem;
  left: .75rem;
  padding: .5rem .75rem;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(calc(-100% - 1rem));
}
.skip-link:focus { transform: none; }
.site-header { border-top: 3px solid var(--accent); border-bottom: 1px solid var(--line); }
.header-inner {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  column-gap: clamp(.85rem, 2.2vw, 2rem);
}
.brand {
  display: inline-flex;
  gap: .65rem;
  align-items: baseline;
  padding-block: 1rem;
  color: var(--ink);
  font: 700 1.36rem/1.2 var(--display);
  text-decoration: none;
}
.brand span[lang="zh-CN"] { color: var(--muted); font-size: .85rem; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 clamp(.7rem, 1.6vw, 1.45rem);
}
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 3.7rem;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: .92rem;
  text-decoration: none;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current] { color: var(--accent); border-color: var(--accent); }
.site-preferences { display: flex; align-items: center; gap: .75rem; white-space: nowrap; }
.preference-link, .theme-toggle { font: inherit; font-size: .875rem; }
.preference-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
}
.theme-toggle:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  min-height: 2.75rem;
  padding: 0 .62rem;
  border: 1px solid var(--line);
  border-radius: .25rem;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-icon {
  width: .78rem;
  height: .78rem;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}
.site-footer { margin-top: auto; border-top: 1px solid var(--line); color: var(--muted); font-size: .87rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1.5rem; padding-block: 1rem; }
.site-emails { display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; }

.eyebrow {
  color: var(--accent);
  font-size: .88rem;
  font-weight: 650;
  letter-spacing: .035em;
}
.home-layout {
  display: grid;
  grid-template-columns: minmax(11rem, 13.5rem) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "profile scholarship"
    "resources scholarship";
  column-gap: clamp(2rem, 5vw, 4.5rem);
  row-gap: 1.65rem;
  align-items: start;
  padding-block: clamp(1.65rem, 4vw, 3.25rem);
}
.profile-rail { grid-area: profile; }
.profile-photo { width: min(100%, 10.75rem); }
.profile-photo img {
  width: 100%;
  border-radius: .3rem;
  aspect-ratio: 900 / 920;
  object-fit: cover;
  background: var(--soft);
}
.profile-identity { margin-top: .95rem; }
.profile-identity h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .14em .28em;
  margin-bottom: .42rem;
  font: 700 clamp(1.9rem, 3vw, 2.3rem)/1.15 var(--display);
  letter-spacing: -.027em;
}
.profile-identity h1 span { color: var(--muted); font-size: .53em; letter-spacing: 0; }
.profile-affiliation { font-size: .98rem; font-weight: 620; line-height: 1.45; }
.profile-field { margin-top: .35rem; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.profile-contact { margin-top: .8rem; }
.profile-emails {
  display: grid;
  gap: .16rem;
  font-style: normal;
  font-size: .9rem;
}
.profile-emails a { width: fit-content; max-width: 100%; color: var(--muted); }
.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: .22rem .75rem;
  align-items: center;
  margin-top: .65rem;
  font-size: .89rem;
}
.profile-links a:first-child { flex-basis: 100%; font-weight: 650; }

.home-scholarship {
  grid-area: scholarship;
  min-width: 0;
  padding-left: clamp(1.7rem, 3.3vw, 3rem);
  border-left: 1px solid var(--line);
}
.home-section + .home-section {
  margin-top: 1.65rem;
  padding-top: 1.45rem;
  border-top: 1px solid var(--line);
}
.home-section > h2, .section-heading h2 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); }
.home-about .intro-text { margin-top: .7rem; font-size: 1.075rem; }
.home-about h3 { margin: .95rem 0 .26rem; }
.home-about h3 + p { color: var(--muted); }
.section-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem .8rem;
  margin-bottom: .5rem;
}
.section-heading > a { font-size: .88rem; }
.research-list, .selected-publications, .resource-list { margin: 0; padding: 0; list-style: none; }
.research-list {
  display: grid;
  gap: .7rem;
  margin-top: .8rem;
  padding-left: .95rem;
  border-left: 2px solid var(--line);
}
.research-list p, .selected-publications p { margin-top: .18rem; color: var(--muted); font-size: .94rem; }
.selected-publications li {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr);
  gap: .65rem;
  padding: .7rem 0;
}
.selected-publications li + li { border-top: 1px solid var(--line); }
.selected-publications h3 { line-height: 1.5; }
.selected-publications h3 a { text-decoration: none; }
.selected-publications h3 a:hover { text-decoration: underline; }
.publication-year { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.home-resources { grid-area: resources; min-width: 0; }
.home-resources section { padding-top: .85rem; border-top: 1px solid var(--line); }
.home-resources section + section { margin-top: .9rem; }
.home-resources h2 { margin-bottom: .55rem; font-size: 1.06rem; }
.resource-list li + li { margin-top: .65rem; }
.resource-list h3 { font-size: .94rem; }
.resource-list p, .home-empty { margin-top: .18rem; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.row-detail {
  display: block;
  margin-top: .35rem;
  padding-left: .55rem;
  border-left: 2px solid var(--line);
  font-size: .875rem;
  line-height: 1.4;
  text-decoration: none;
}
.row-detail:hover span:first-child { text-decoration: underline; }
.resource-date { display: block; margin-top: .13rem; color: var(--muted); }
.group-link { display: inline-block; margin-top: .35rem; font-size: .875rem; }
.legacy-link:not(:target) { display: none; }
.legacy-link:target { display: inline-block; margin: 0 0 1rem; }

.interior { padding-block: clamp(2rem, 5.5vw, 4rem); }
.page-header {
  display: grid;
  gap: .65rem;
  margin-bottom: 1.65rem;
  padding-bottom: 1.45rem;
  border-bottom: 1px solid var(--line);
}
.page-header h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5.3vw, 3.6rem);
  letter-spacing: -.026em;
}
.page-header > p { max-width: 50rem; color: var(--muted); }
.article-page { max-width: 50rem; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .55rem; }
.muted, .article-meta time { color: var(--muted); }
.label {
  display: inline-block;
  max-width: 100%;
  padding: .08rem .45rem;
  border-radius: .2rem;
  color: var(--accent);
  background: var(--soft);
  font-size: .875rem;
}
.breadcrumbs { font-size: .9rem; }
.archive-list { max-width: 50rem; margin-block: .65rem 1.65rem; padding: 0; list-style: none; }
.archive-item { padding-block: 1rem; border-bottom: 1px solid var(--line); }
.archive-item:first-child { border-top: 1px solid var(--line); }
.archive-item > * + * { margin-top: .3rem; }
.archive-item .label { margin-left: .4rem; }

.content-layout {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
  gap: clamp(1.6rem, 5vw, 3.5rem);
  align-items: start;
}
.section-nav {
  position: sticky;
  top: 1.25rem;
  align-self: start;
  padding: .9rem;
  background: var(--soft);
  border-radius: .28rem;
}
.section-nav ul { margin: 0; padding: 0; list-style: none; }
.section-nav a { display: inline-block; padding: .22rem 0; color: var(--muted); font-size: .92rem; text-decoration: none; }
.section-nav a:hover { color: var(--accent); text-decoration: underline; }
.cv-directory-heading { margin-bottom: .3rem; color: var(--ink); font-size: .92rem; font-weight: 650; }
.cv-page-header h1 { font-size: clamp(2rem, 5vw, 3.15rem); }
.cv-page-header h1 span { color: var(--muted); font-size: .58em; }
.article-body { max-width: 48rem; word-break: normal; }
.content-section + .content-section { border-top: 1px solid var(--line); margin-top: 1.65rem; padding-top: 1.35rem; }
.content-section h2, .article-body h2 { margin-bottom: .65rem; }
.article-body h3 { margin: 1.1rem 0 .45rem; }
.article-body ul, .article-body ol { margin-block: .65rem 1rem; padding-inline-start: 1.4rem; }
.article-body li + li { margin-top: .65rem; }
.article-body p + p { margin-top: .65rem; }
.article-body details { padding: .7rem .9rem; border: 1px solid var(--line); }
.article-body summary { cursor: pointer; color: var(--accent); }
.article-body .cv-records { padding: 0; list-style: none; }
.cv-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8rem, 11rem);
  gap: .25rem 1rem;
  padding-block: .64rem;
}
.article-body .cv-record + .cv-record { margin-top: 0; border-top: 1px solid var(--line); }
.cv-record-date { font-size: .9rem; font-variant-numeric: tabular-nums; }
.cv-citation { padding-bottom: .3rem; }
.cv-citation-links { display: flex; flex-wrap: wrap; gap: .3rem .4rem; margin-top: .32rem; }
.cv-citation-links a {
  padding: .05rem .43rem;
  border-radius: .2rem;
  background: var(--soft);
  font-size: .85rem;
  text-decoration: none;
}
.cv-citation-links a:hover { text-decoration: underline; }
.prose h2 { margin-top: 1.65rem; }
.prose hr { margin-block: 1.35rem; border: 0; border-top: 1px solid var(--line); }
.prose blockquote { margin-inline: 0; padding-left: 1rem; border-left: 2px solid var(--line); color: var(--muted); }
.prose code { font-size: .94em; }
.prose pre { overflow-x: auto; padding: .7rem 1rem; background: var(--soft); }

@media (max-width: 65rem) {
  .header-inner { grid-template-columns: minmax(0, 1fr) max-content; padding-top: .25rem; }
  .brand { padding-block: .65rem; }
  .site-nav { grid-area: 2 / 1 / 3 / -1; justify-content: start; }
  .site-nav a { min-height: 2.75rem; }
  .site-preferences { grid-column: 2; grid-row: 1; }
}
@media (max-width: 24rem) {
  .brand { font-size: 1.15rem; gap: .38rem; }
  .site-preferences { gap: .52rem; }
  .theme-toggle:not([hidden]) { padding-inline: .42rem; }
}
@media (max-width: 48rem) {
  .home-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas: "profile" "scholarship" "resources";
  }
  .profile-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(5.25rem, 7rem);
    grid-template-areas: "identity photo" "contact contact";
    gap: .55rem 1rem;
    align-items: center;
  }
  .profile-identity { grid-area: identity; margin: 0; }
  .profile-photo { grid-area: photo; }
  .profile-contact { grid-area: contact; margin: 0; }
  .profile-emails { display: flex; flex-wrap: wrap; gap: .12rem .85rem; }
  .profile-links { margin-top: .45rem; }
  .profile-links a:first-child { flex-basis: auto; }
  .home-scholarship { padding: 1rem 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .home-resources h2 { font-size: 1.2rem; }
}
@media (max-width: 42rem) {
  .content-layout { grid-template-columns: 1fr; gap: 1.3rem; }
  .section-nav { position: static; }
  .section-nav ul { display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
  .cv-record { grid-template-columns: 1fr; }
  .selected-publications li { grid-template-columns: 2.5rem minmax(0, 1fr); gap: .35rem; }
}
@media (max-width: 36rem) {
  .site-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 .65rem; }
  .site-nav a { line-height: 1.35; }
}
@media (max-width: 25rem) {
  .profile-rail { grid-template-columns: minmax(0, 1fr) 5.25rem; gap: .55rem .7rem; }
}
@media print {
  :root, :root[data-theme] { color-scheme: light; }
  html { scroll-padding: 0; }
  body { color: #000; background: #fff; }
  .site-header, .site-footer, .skip-link, .section-nav { display: none; }
  .site-width { width: 100%; }
  .content-layout { display: block; }
  .interior { padding: 0; }
  .article-body { max-width: none; }
  h1, h2, h3 { break-after: avoid; }
}
