:root {
  --paper: #f4f0e8;
  --paper-light: #faf8f3;
  --ink: #17211d;
  --muted: #68716b;
  --line: #d7d2c7;
  --accent: #a23c28;
  --green: #2e4a3f;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Avenir Next", Avenir, "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 1rem;
  padding: .6rem 1rem;
  background: var(--ink);
  color: white;
  transform: translateY(-120%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(var(--max), calc(100% - 48px));
  min-height: 82px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 38px;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
}

.wordmark-name {
  font-family: "Iowan Old Style", Baskerville, "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.wordmark-cn { color: var(--muted); font-size: 14px; }

.main-nav {
  display: flex;
  justify-content: center;
  gap: 25px;
}

.main-nav a {
  position: relative;
  padding: 29px 0 26px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 20px;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transition: transform .2s ease;
}

.main-nav a:hover,
.main-nav a.active { color: var(--ink); }

.main-nav a:hover::after,
.main-nav a.active::after { transform: scaleX(1); }

.language-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--line);
}

.language-switcher button {
  padding: 7px 2px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.language-switcher button[aria-pressed="true"] { color: var(--accent); }

main,
footer {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.page-section {
  padding: 112px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 80px;
}

.hero {
  min-height: calc(100vh - 82px);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, .65fr);
  align-items: center;
  gap: clamp(54px, 9vw, 136px);
  padding-top: 82px;
}

.eyebrow,
.section-number,
.role-label,
.contact-label,
.teaching-year {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1,
h2 {
  font-family: "Iowan Old Style", Baskerville, "Songti SC", "Noto Serif CJK SC", serif;
  font-weight: 400;
}

h1 {
  margin: 16px 0 24px;
  font-size: clamp(34px, 3.8vw, 46px);
  letter-spacing: -.035em;
  line-height: 1.03;
}

h1 span { display: block; }

.h1-cn {
  margin-top: 10px;
  color: var(--accent);
  font-family: "Songti SC", "Noto Serif CJK SC", "Iowan Old Style", serif;
  font-size: .65em;
  letter-spacing: .06em;
}

.hero-lede {
  max-width: 690px;
  margin-bottom: 36px;
  color: #39443f;
  font-family: "Iowan Old Style", Baskerville, "Songti SC", "Noto Serif CJK SC", serif;
  font-size: clamp(18px, 1.65vw, 22px);
  line-height: 1.58;
}

.current-role {
  max-width: 690px;
  padding: 21px 0;
  display: grid;
  grid-template-columns: 115px 1fr auto;
  gap: 20px;
  align-items: baseline;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.current-role p { margin: 0; font-size: 14px; line-height: 1.55; }
.role-date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.current-role-secondary { border-top: 0; }

.hero-actions { display: flex; gap: 12px; margin-top: 32px; }

.button {
  min-height: 48px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}

.button:hover { transform: translateY(-2px); }
.button-dark { color: var(--paper-light); background: var(--ink); }
.button-light:hover { background: var(--paper-light); }

.portrait-wrap { justify-self: center; }

.portrait-frame {
  position: relative;
  width: min(100%, 310px);
  padding: 13px;
  background: var(--paper-light);
  box-shadow: 18px 20px 0 var(--green);
  transform: rotate(1.4deg);
}

.portrait-frame::before {
  position: absolute;
  z-index: -1;
  inset: -16px 20px 18px -14px;
  border: 1px solid var(--accent);
  content: "";
}

.portrait-frame img { width: 100%; height: auto; display: block; filter: saturate(.78) contrast(1.04); }
.portrait-frame img[data-portrait] { aspect-ratio: 210 / 275; object-fit: cover; }
[hidden] { display: none !important; }
.slideshow-toggle {
  display: block;
  margin: 8px auto 0;
  padding: 3px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.portrait-caption {
  margin: 31px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.section-heading {
  margin-bottom: 65px;
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 24px;
}

.section-heading h2 {
  margin-bottom: 12px;
  font-size: clamp(27px, 2.8vw, 34px);
  letter-spacing: -.025em;
  line-height: 1.12;
}

.section-heading > div > p { margin: 0; color: var(--muted); }

.timeline { margin-bottom: 40px; }

.timeline-item {
  padding: 28px 0;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 30px;
  border-top: 1px solid var(--line);
}

.timeline-item:last-child { border-bottom: 1px solid var(--line); }
.timeline-date { color: var(--accent); font-size: 13px; font-weight: 700; }
.timeline-item h3 { margin-bottom: 7px; font-family: "Iowan Old Style", Baskerville, "Songti SC", "Noto Serif CJK SC", serif; font-size: 22px; font-weight: 400; }
.timeline-item p:last-child { margin-bottom: 0; color: var(--muted); }

.text-link {
  display: inline-block;
  border-bottom: 1px solid currentColor;
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover { color: var(--accent); }
.text-link-muted { color: var(--muted); font-weight: 600; }

.research-intro {
  max-width: 860px;
  margin: 0 0 58px 110px;
}

.research-intro h3 {
  margin-bottom: 18px;
  font-family: "Iowan Old Style", Baskerville, "Songti SC", "Noto Serif CJK SC", serif;
  font-size: clamp(22px, 2.3vw, 29px);
  font-weight: 400;
  line-height: 1.2;
}

.research-intro p { color: var(--muted); font-size: 17px; }

.paper {
  padding: 25px 0;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  border-top: 1px solid var(--line);
}

.paper:last-child { border-bottom: 1px solid var(--line); }
.paper-year { color: var(--accent); font-size: 13px; font-weight: 750; }
.paper h3 { max-width: 850px; margin-bottom: 6px; font-size: 18px; line-height: 1.45; }
.paper p { margin: 0; color: var(--muted); font-size: 13px; }
.paper h3 a { text-decoration: none; }
.paper h3 a:hover { color: var(--accent); }
.paper p a { text-underline-offset: 3px; }
.section-copy { max-width: 900px; font-size: 18px; line-height: 1.8; }
.talk { display: grid; grid-template-columns: 110px 1fr; gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); }
.talk:last-child { border-bottom: 1px solid var(--line); }
.talk time, .talk-date { color: var(--accent); font-size: 13px; font-weight: 750; }
.talk-date small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 400; }
.talk h3 { margin-bottom: 9px; font-size: 18px; line-height: 1.45; }
.talk h3 a { text-decoration: none; }
.talk h3 a:hover { color: var(--accent); }
.talk p { margin-bottom: 3px; color: var(--muted); font-size: 14px; }
.subpage-intro { max-width: 950px; }
.subpage-intro h1 { line-height: 1.2; }
.topic-nav { display: grid; gap: 12px; margin-top: 36px; }
.topic-nav a { text-decoration: none; color: var(--green); font-weight: 650; }
.topic-nav a:hover { color: var(--accent); }
.research-detail .section-heading { margin-bottom: 30px; }
.research-detail .section-copy { margin-left: 110px; margin-bottom: 42px; }
.link-row { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 30px; }

.teaching-grid,
.misc-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.teaching-grid { grid-template-columns: repeat(3, 1fr); }
.misc-grid { grid-template-columns: repeat(2, 1fr); }

.teaching-grid article,
.misc-grid article { padding: 34px; background: var(--paper-light); }
.teaching-grid h3,
.misc-grid h3 { margin: 14px 0 22px; font-family: "Iowan Old Style", Baskerville, "Songti SC", "Noto Serif CJK SC", serif; font-size: 21px; font-weight: 400; }
.teaching-grid ul { margin: 0; padding-left: 18px; color: var(--muted); }
.teaching-grid li + li { margin-top: 8px; }

.contact-card {
  display: grid;
  grid-template-columns: .8fr 1.2fr 1.5fr;
  background: var(--green);
  color: var(--paper-light);
}

.contact-card > div { min-height: 190px; padding: 36px; border-right: 1px solid rgba(255,255,255,.16); }
.contact-card > div:last-child { border-right: 0; }
.contact-card .contact-label { color: #ddb0a4; }
.contact-card a { font-family: "Iowan Old Style", Baskerville, serif; font-size: 18px; text-underline-offset: 5px; }
.contact-card p:last-child { margin: 14px 0 0; color: #e7e9e6; }

.clean-list { margin: 0; padding: 0; list-style: none; }
.link-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.link-list a { font-weight: 650; text-decoration: none; }
.link-list a:hover { color: var(--accent); }
.detail-list li { padding: 10px 0; display: grid; grid-template-columns: 45px 1fr; gap: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.detail-list li span:first-child { color: var(--accent); font-weight: 700; }

footer {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

footer p { margin: 0; }
footer a { font-weight: 700; text-decoration: none; }

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

@media (max-width: 980px) {
  .header-inner { min-height: 76px; grid-template-columns: 1fr auto; gap: 12px; }
  .main-nav { grid-column: 1 / -1; order: 3; justify-content: flex-start; gap: 24px; overflow-x: auto; scrollbar-width: none; }
  .main-nav a { padding: 10px 0 14px; }
  .main-nav a::after { bottom: 8px; }
  .hero { min-height: auto; padding-top: 100px; }
  .teaching-grid, .misc-grid { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr; }
  .contact-card > div { min-height: 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.16); }
}

@media (max-width: 720px) {
  .header-inner, main, footer { width: min(100% - 30px, var(--max)); }
  .wordmark-cn { display: none; }
  .page-section { padding: 78px 0; scroll-margin-top: 118px; }
  .hero { grid-template-columns: 1fr; gap: 72px; }
  .hero-copy { order: 2; }
  .portrait-wrap { order: 1; }
  .portrait-frame { width: 205px; box-shadow: 12px 13px 0 var(--green); }
  .portrait-caption { margin-top: 25px; }
  h1 { font-size: clamp(34px, 10vw, 42px); }
  .current-role { grid-template-columns: 1fr; gap: 7px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .section-heading { grid-template-columns: 42px 1fr; gap: 12px; margin-bottom: 45px; }
  .timeline-item, .paper, .talk { grid-template-columns: 1fr; gap: 5px; }
  .research-intro { margin-left: 0; }
  .research-detail .section-copy { margin-left: 0; }
  .teaching-grid article, .misc-grid article, .contact-card > div { padding: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
