:root {
  --paper: #FCFBF8;
  --ink: #1C1B18;
  --ink-soft: #55534C;
  --ink-faint: #8C897F;
  --accent: #1F3A5F;
  --hairline: #E3E0D8;
  --serif: "Spectral", Georgia, serif;
  --sans: "Geist", -apple-system, "Helvetica Neue", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s ease; }
a:hover { border-bottom-color: var(--accent); }

main { max-width: 880px; margin: 0 auto; padding: 0 24px; }

h2 {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

/* ---------- nav ---------- */
.masthead { border-bottom: 1px solid var(--hairline); }
.nav {
  max-width: 880px; margin: 0 auto; padding: 18px 24px;
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 6px 16px;
}
.nav-name { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; display: inline-flex; align-items: center; gap: 9px; }
.nav-logo { height: 22px; width: auto; }
.nav-links { display: flex; gap: 22px; align-items: baseline; }
.nav-links a { color: var(--ink-soft); font-size: 0.9rem; }
.nav-links a:hover { color: var(--accent); }
#lang-toggle {
  font-family: var(--mono); font-size: 0.78rem; color: var(--accent);
  background: none; border: 1px solid var(--hairline); border-radius: 3px;
  padding: 3px 10px; cursor: pointer; transition: border-color 0.15s ease;
}
#lang-toggle:hover { border-color: var(--accent); }

/* Chinese mode: favor system CJK fonts for body text */
body.lang-zh {
  font-family: var(--sans), "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* ---------- hero ---------- */
.hero {
  display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start;
  padding: 64px 0 48px;
}
.hero-text { flex: 1; min-width: 0; }
.hero-kicker {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.hero h1 {
  font-family: var(--serif); font-size: 2.7rem; font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 20px;
}
.hero h1 .cn {
  display: block; font-size: 1.15rem; font-weight: 400;
  color: var(--ink-faint); margin-top: 6px; letter-spacing: 0.15em;
}
.hero-lede { color: var(--ink-soft); margin-bottom: 14px; max-width: 56ch; }
.hero-lede em { font-style: italic; color: var(--ink); }

.hero-contacts {
  list-style: none; margin-top: -20px;
  display: flex; flex-wrap: nowrap; gap: 8px 28px;
  width: 100%; flex-basis: 100%;
  align-items: baseline;
}
.hero-contacts .label {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ink-faint); margin-right: 6px;
}
.hero-contacts li { font-size: 0.92rem; white-space: nowrap; }

.hero-photo { flex-shrink: 0; align-self: center; }
.hero-photo img {
  width: 320px; height: auto; display: block;
  border: 1px solid var(--hairline);
}

/* ---------- news ---------- */
.news { padding: 36px 0; border-top: 1px solid var(--hairline); }
.news-list { list-style: none; margin-top: 14px; }
.news-list li {
  padding: 7px 0; font-size: 0.95rem; color: var(--ink-soft);
  display: flex; gap: 18px; align-items: baseline;
}
.news-date { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-faint); flex-shrink: 0; width: 60px; }
.news-list strong { color: var(--accent); font-weight: 600; }

/* ---------- publications ---------- */
.pubs { padding: 44px 0 40px; border-top: 1px solid var(--hairline); }
.pubs-note { font-size: 0.85rem; color: var(--ink-faint); margin-bottom: 26px; }

.pub {
  display: grid; grid-template-columns: 300px 1fr; gap: 32px;
  padding: 30px 0; border-top: 1px solid var(--hairline);
}
.pub:first-of-type { border-top: none; }
.pub-fig { align-self: center; }
.pub-fig img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--hairline); background: #fff; padding: 8px;
}
.pub-venue {
  font-family: var(--mono); font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.pub h3 {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  color: #1C1B18;
}
.pub-acronym {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #1C1B18;
  text-decoration: none;
  border-bottom: none;
}
.pub h3 .acro {
  font-weight: 800;
  font-size: 1.28em;
  color: #1C1B18;
  text-decoration: none;
  border-bottom: none;
}
.pub-authors { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 10px; }
.pub-authors strong { color: var(--ink); }
.pub-desc { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 12px; }
.pub-links { display: flex; gap: 18px; font-size: 0.88rem; }
.pub-links a { font-family: var(--mono); font-size: 0.8rem; }

/* ---------- experience ---------- */
.experience { padding: 44px 0 56px; border-top: 1px solid var(--hairline); }
.timeline { list-style: none; margin-top: 18px; }
.timeline li {
  display: grid; grid-template-columns: 160px 1fr; gap: 24px;
  padding: 10px 0;
}
.tl-when { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-faint); padding-top: 3px; }
.tl-what h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1px; }
.tl-what p { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 26px 24px 40px; text-align: center;
  font-size: 0.82rem; color: var(--ink-faint);
}

/* ---------- motion ---------- */
[data-anim] { opacity: 0; transform: translateY(14px); }
.no-js [data-anim], .anim-ready-fallback [data-anim] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-anim] { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .hero { flex-direction: column; gap: 28px; padding-top: 40px; }
  .hero-photo img { width: 100%; }
  .hero h1 { font-size: 2.1rem; }
  .pub { grid-template-columns: 1fr; gap: 16px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .nav-links { gap: 12px; flex-wrap: wrap; }
  .nav-links a { font-size: 0.82rem; }
  .news-list li { flex-direction: column; gap: 0; }
  .hero-contacts {
    margin-top: 4px; flex-wrap: wrap; gap: 6px 20px;
  }
}

body { overflow-x: hidden; }
