
:root {
  color-scheme: light;
  --bg: #f6f5f1;
  --surface: rgba(255, 255, 252, 0.82);
  --surface-solid: #fffefa;
  --text: #20221f;
  --muted: #666b65;
  --faint: #8a8e88;
  --line: #deddd6;
  --line-strong: #c9c6ba;
  --accent: #8b6f2f;
  --accent-soft: #eee6d1;
  --accent-ink: #5c481b;
  --shadow: 0 24px 70px rgba(31, 33, 29, 0.08);
  --shadow-small: 0 10px 30px rgba(31, 33, 29, 0.055);
  --max: 1040px;
  --reading: 760px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151715;
  --surface: rgba(29, 32, 29, 0.86);
  --surface-solid: #1c1f1c;
  --text: #f0eee7;
  --muted: #a9ada6;
  --faint: #858a83;
  --line: #343832;
  --line-strong: #4c5149;
  --accent: #d3b260;
  --accent-soft: #302a1b;
  --accent-ink: #e1c476;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --shadow-small: 0 10px 30px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 2%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 31rem),
    radial-gradient(circle at 88% 100%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", sans-serif;
  font-size: 16.5px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px) saturate(130%);
}

.shell {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.nav-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: Georgia, "Times New Roman", "Noto Serif CJK SC", serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.brand-icon {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  display: block;
  object-fit: cover;
}

.nav-side {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  position: relative;
  flex: 0 0 auto;
  padding: 7px 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 3px;
  height: 1px;
  background: var(--accent);
  transition: right 160ms ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { right: 0; }

.theme-toggle {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-solid) 80%, transparent);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.94rem;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}
.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  color: var(--text);
}

main { min-height: calc(100vh - 151px); }

.home-main {
  position: relative;
  display: grid;
  align-items: center;
  padding: clamp(58px, 10vh, 112px) 0 70px;
}

.profile-panel {
  display: grid;
  grid-template-columns: minmax(210px, 286px) minmax(0, 1fr);
  gap: clamp(44px, 7vw, 88px);
  align-items: center;
}

.portrait-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-solid) 82%, transparent), color-mix(in srgb, var(--accent-soft) 58%, transparent));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.portrait-frame::before,
.portrait-frame::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.portrait-frame::before {
  width: 82%;
  aspect-ratio: 1;
  left: -42%;
  top: -24%;
}
.portrait-frame::after {
  width: 52%;
  aspect-ratio: 1;
  right: -24%;
  bottom: -12%;
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.affiliation-kicker {
  display: grid;
  gap: 2px;
  margin: 0 0 17px;
  color: var(--accent-ink);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.035em;
  line-height: 1.45;
}
.affiliation-kicker span { display: block; }
.affiliation-kicker .affiliation-primary {
  margin-bottom: 2px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", "Noto Serif CJK SC", serif;
  text-wrap: balance;
}

.profile-name {
  margin: 0 0 25px;
  font-size: clamp(2.75rem, 6.4vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
}
.profile-name .cn-name {
  display: inline-block;
  margin-left: 0.28em;
  color: var(--muted);
  font-family: "Noto Serif CJK SC", "Songti SC", SimSun, Georgia, serif;
  font-size: 0.56em;
  font-weight: 500;
  letter-spacing: 0.02em;
  vertical-align: 0.14em;
}

.profile-intro {
  max-width: 700px;
  margin: 0;
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.27rem);
  line-height: 1.72;
}
.profile-intro a {
  color: var(--accent-ink);
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 17px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 0.91rem;
}
.contact-line a {
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.contact-line .dot { color: var(--line-strong); }

.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 30px;
}
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-solid) 72%, transparent);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 680;
  text-decoration: none;
  box-shadow: 0 2px 0 color-mix(in srgb, var(--line) 45%, transparent);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}
.home-link::after { content: "↗"; color: var(--accent); font-size: 0.88em; }
.home-link:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--surface-solid);
}
.home-link.cv::after { content: "↓"; }

.quick-nav {
  margin-top: clamp(60px, 9vh, 92px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.quick-nav-label {
  margin: 0 0 14px;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.quick-card {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  text-decoration: none;
  box-shadow: var(--shadow-small);
  transition: transform 160ms ease, border-color 160ms ease;
}
.quick-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.quick-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 600;
}
.quick-card span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.quick-card em {
  color: var(--accent);
  font-style: normal;
  align-self: flex-end;
}


.secret-tile {
  position: absolute;
  right: 0;
  bottom: 16px;
  width: 38px;
  height: 40px;
  display: block;
  border-radius: 5px;
  opacity: 0.38;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(31, 33, 29, 0.10);
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.secret-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.secret-tile:hover,
.secret-tile:focus-visible {
  opacity: 0.92;
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 7px 20px rgba(31, 33, 29, 0.16);
}
.secret-page {
  min-height: calc(100vh - 151px);
}

.page-main { padding: 78px 0 88px; }
.page-header {
  max-width: var(--reading);
  margin-bottom: 56px;
}
.compact-page-header { margin-bottom: 42px; }
.page-kicker {
  margin: 0 0 9px;
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 780;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.page-title {
  margin: 0 0 18px;
  font-size: clamp(2.35rem, 5vw, 3.55rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.page-intro {
  max-width: 730px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.content-stack { max-width: 880px; }
.content-section {
  padding: 38px 0;
  border-top: 1px solid var(--line);
}
.content-section:first-child { border-top: 0; padding-top: 0; }
.section-title {
  margin: 0 0 18px;
  font-size: clamp(1.55rem, 3vw, 2.08rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.section-lead {
  max-width: var(--reading);
  margin: 0 0 24px;
  color: var(--muted);
}

.prose { max-width: var(--reading); }
.prose p { margin: 0 0 1.05em; }
.prose p:last-child { margin-bottom: 0; }
.prose a,
.inline-link {
  color: var(--accent-ink);
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.tag-list li {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-solid) 65%, transparent);
  color: var(--muted);
  font-size: 0.8rem;
}

.timeline { margin: 0; padding: 0; list-style: none; }
.timeline-item {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 28px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.timeline-item:first-child { border-top: 0; padding-top: 0; }
.timeline-date {
  color: var(--faint);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.timeline-body h3 {
  margin: -3px 0 6px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.48;
}
.timeline-body p { margin: 0; color: var(--muted); font-size: 0.91rem; }
.timeline-body ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }

.research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.research-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  box-shadow: var(--shadow-small);
}
.research-card .number {
  display: block;
  margin-bottom: 20px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.88rem;
}
.research-card h2,
.research-card h3 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
  font-weight: 600;
}
.research-card p { margin: 0; color: var(--muted); font-size: 0.93rem; }

.pub-group + .pub-group { margin-top: 48px; }
.group-label {
  margin: 0 0 18px;
  color: var(--faint);
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.publication-list { margin: 0; padding: 0; list-style: none; }
.publication-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 25px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.publication-item:first-child { border-top: 0; padding-top: 0; }
.status {
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}
.pub-title {
  margin: -3px 0 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.48;
}
.pub-title a { text-decoration: none; }
.pub-title a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 4px; }
.pub-meta { margin: 0; color: var(--muted); font-size: 0.91rem; }
.pub-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pub-links a {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 720;
  text-decoration: none;
}
.pub-links a:hover { border-color: var(--accent); }

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 52px;
}
.mini-heading {
  margin: 0 0 14px;
  color: var(--faint);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.clean-list { margin: 0; padding: 0; list-style: none; }
.clean-list li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.clean-list li:first-child { border-top: 0; padding-top: 0; }
.clean-list strong { display: block; font-size: 0.94rem; }
.clean-list span { color: var(--muted); font-size: 0.84rem; }

.note-box {
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--accent-soft) 58%, transparent);
  color: var(--muted);
  font-size: 0.91rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.79rem;
}
.footer-row {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-row a { color: var(--muted); text-decoration: none; }
.footer-row a:hover { color: var(--text); }

@media (max-width: 860px) {
  .nav-row { align-items: flex-start; flex-direction: column; gap: 8px; padding: 13px 0 10px; }
  .nav-side { width: 100%; justify-content: space-between; }
  .site-nav { justify-content: flex-start; }
  .profile-panel { grid-template-columns: 200px minmax(0, 1fr); gap: 38px; }
  .quick-nav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  body { font-size: 16px; }
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .nav-side { position: relative; align-items: flex-start; }
  .site-nav { max-width: calc(100% - 48px); flex-wrap: wrap; overflow: visible; gap: 0 14px; padding-bottom: 2px; }
  .site-nav a { font-size: 0.81rem; }
  .theme-toggle { position: absolute; top: 0; right: 0; }
  .home-main { padding-top: 44px; padding-bottom: 64px; }
  .secret-tile { right: 2px; bottom: 12px; width: 33px; height: 35px; }
  .profile-panel { grid-template-columns: 1fr; gap: 34px; }
  .portrait-frame { width: min(57vw, 220px); }
  .profile-name { font-size: clamp(2.55rem, 14vw, 3.75rem); }
  .profile-name .cn-name { display: block; margin: 0.28em 0 0; font-size: 0.45em; vertical-align: 0; }
  .affiliation-kicker { max-width: 34rem; }
  .quick-nav { margin-top: 58px; }
  .quick-nav-grid,
  .research-grid,
  .two-column { grid-template-columns: 1fr; }
  .page-main { padding: 54px 0 66px; }
  .page-header { margin-bottom: 42px; }
  .timeline-item,
  .publication-item { grid-template-columns: 1fr; gap: 8px; }
  .footer-row { align-items: flex-start; flex-direction: column; justify-content: center; padding: 20px 0; gap: 5px; }
}

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

@media print {
  .site-header, .theme-toggle, .home-links, .quick-nav, .secret-tile, .site-footer { display: none !important; }
  body { background: #fff; color: #000; }
  .home-main, .page-main { padding: 20px 0; }
  .portrait-frame { box-shadow: none; }
}
