:root {
  --bg: #f7f7f5;
  --panel: #ffffff;
  --text: #151515;
  --muted: #5f6368;
  --soft: #8a8d91;
  --line: #deded8;
  --accent: #111111;
  --chip: #efefeb;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
strong { font-weight: 800; }
[hidden] { display: none !important; }

.site-header {
  background:
    radial-gradient(circle at top right, rgba(0,0,0,0.08), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: flex-end;
  font-size: 14px;
  font-weight: 650;
  color: var(--muted);
}
.nav a { text-decoration: none; }
.nav a:hover { color: var(--text); }
.nav-divider {
  width: 1px;
  min-height: 1.15em;
  background: var(--line);
  align-self: center;
}
.language-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.language-button:hover,
.language-button:focus-visible,
.language-button.is-active {
  color: var(--text);
}
.language-button.is-active { text-decoration: underline; text-underline-offset: 0.28em; }

.lang-panel-zh {
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
.lang-panel-zh .eyebrow,
.lang-panel-zh dt {
  text-transform: none;
  letter-spacing: 0.08em;
}
.lang-panel-zh h1 { letter-spacing: -0.04em; }

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 66px 20px 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 42px;
  align-items: end;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
h1 {
  margin: 0;
  font-size: clamp(56px, 10vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.08em;
}
.position {
  max-width: 780px;
  margin: 24px 0 4px;
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.institution {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 750;
  font-size: 14px;
  background: transparent;
  transition: transform .16s ease, background .16s ease;
}
.button.primary { background: var(--accent); color: #fff; }
.button:hover { transform: translateY(-1px); }

.contact-card, .prose-card, .publication-card, .entry-card, .skill-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.contact-card { padding: 28px; }
.contact-card h2 { margin: 0 0 18px; font-size: 18px; letter-spacing: -0.02em; }
dl { margin: 0; display: grid; gap: 18px; }
dt { color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .12em; }
dd { margin: 4px 0 0; color: var(--text); overflow-wrap: anywhere; }

.cv-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 42px 20px 0;
}
.cv-section {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  padding: 34px 0;
}
.section-heading {
  position: sticky;
  top: 20px;
  align-self: start;
  padding-top: 8px;
}
.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -0.055em;
}
.section-body { min-width: 0; }
.prose-card, .publication-card { padding: 28px; }
.prose-card p { margin: 0; color: var(--muted); font-size: 16px; }
.stack { display: grid; gap: 18px; }
.compact-stack { gap: 14px; }

.entry-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 26px;
  padding: 26px;
}
.feature-entry { border-left: 6px solid var(--accent); }
.compact-entry { padding: 22px; }
.entry-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  gap: 8px;
  line-height: 1.35;
}
.entry-content h3, .skill-card h3 {
  margin: 0 0 6px;
  line-height: 1.16;
  letter-spacing: -0.028em;
  font-size: 20px;
}
.role {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 650;
}
ul, ol { margin: 10px 0 0; padding-left: 20px; }
li { margin-bottom: 8px; }
.entry-content p { color: var(--muted); margin: 0; }

.publication-list {
  margin: 0;
  padding-left: 24px;
  counter-reset: item;
}
.publication-list li {
  padding: 0 0 16px 2px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.publication-list li:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

.simple-list { margin: 0; }
.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.skill-card { padding: 22px; }
.skill-card p { color: var(--muted); margin: 0; }
.footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 58px 20px 42px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 920px) {
  .nav { justify-content: flex-start; overflow-x: auto; }
  .hero, .cv-section { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; align-items: start; }
  .contact-card { max-width: none; }
  .section-heading { position: static; }
  .entry-card { grid-template-columns: 1fr; gap: 12px; }
  .entry-meta { flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
  .skill-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero, .cv-shell { padding-left: 16px; padding-right: 16px; }
  .nav { padding-left: 16px; padding-right: 16px; }
  .entry-card, .prose-card, .publication-card, .contact-card, .skill-card { border-radius: 18px; padding: 20px; }
  h1 { letter-spacing: -0.065em; }
  .position { font-size: 23px; }
}

@media print {
  :root { --bg: #fff; --panel: #fff; --shadow: none; }
  .nav, .cta-row, .footer { display: none; }
  body { background: #fff; font-size: 11pt; }
  .site-header { background: #fff; border-bottom: 1px solid #111; }
  .hero, .cv-shell { max-width: none; padding: 0; }
  .hero { display: block; margin-bottom: 18px; }
  .contact-card { box-shadow: none; border: 0; padding: 12px 0 0; }
  dl { display: flex; flex-wrap: wrap; gap: 12px 24px; }
  dt { display: none; }
  dd { margin: 0; }
  .cv-section { display: block; padding: 14px 0; break-inside: avoid; }
  .section-heading { position: static; border-bottom: 1px solid #111; margin-bottom: 10px; }
  .section-heading .eyebrow { display: none; }
  .section-heading h2 { font-size: 16pt; letter-spacing: 0; }
  .entry-card, .prose-card, .publication-card, .skill-card { box-shadow: none; border: 0; padding: 0; break-inside: avoid; }
  .entry-card { display: block; margin-bottom: 12px; }
  .feature-entry { border-left: 0; }
  .skill-grid { display: block; }
}
