:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --ink: #1c1b1a;
  --ink-soft: #565250;
  --line: #e7e3dd;
  --accent: #7a2e2e;
  --accent-soft: #f3e9e6;
  --max: 820px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 248, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-brand {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}
.nav-brand:hover { text-decoration: none; }
.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: 0.25s;
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  gap: 36px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 48px;
}
.hero-photo { flex: 0 0 auto; }
.hero-photo img,
.hero-photo-fallback {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}
.hero-photo-fallback {
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: "Newsreader", serif;
  font-size: 3rem;
  font-weight: 600;
}
.hero-text h1 {
  font-size: 2.4rem;
  margin: 0 0 6px;
}
.name-cjk {
  font-size: 1.5rem;
  color: var(--ink-soft);
  font-weight: 400;
  margin-left: 6px;
}
.role { margin: 0; font-weight: 600; font-size: 1.05rem; }
.affiliation { margin: 2px 0 16px; color: var(--ink-soft); }
.lede { margin: 0 0 22px; }

.hero-links { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid var(--accent);
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn-ghost {
  background: transparent;
  color: var(--accent);
}
.btn-ghost:hover { background: var(--accent-soft); }

/* ---------- Sections ---------- */
.section {
  padding-top: 40px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
}
.section h2 {
  font-size: 1.6rem;
  margin: 0 0 18px;
}
.section-intro { color: var(--ink-soft); margin-top: 0; }
.subhead {
  font-size: 1.05rem;
  margin: 26px 0 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.subhead:first-of-type { margin-top: 8px; }

.facts {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
}
.facts li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}
.fact-label {
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  padding-top: 2px;
}

/* ---------- Publications ---------- */
.pub-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.pub {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.pub-title { margin: 0 0 4px; font-size: 1.15rem; }
.pub-meta { margin: 0 0 8px; color: var(--ink-soft); font-size: 0.9rem; }
.pub-desc { margin: 0 0 8px; }
.pub-links a { font-weight: 500; font-size: 0.92rem; margin-right: 14px; }

.note { color: var(--ink-soft); font-size: 0.88rem; font-style: italic; }
code {
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.85em;
}

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  align-items: baseline;
}
.contact-label {
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 40px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links li { padding: 0 24px; }
  .nav-links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }

  .hero {
    flex-direction: column;
    text-align: center;
    gap: 22px;
    padding-top: 44px;
  }
  .hero-links { justify-content: center; }
  .hero-text h1 { font-size: 2rem; }
  .facts li,
  .contact-list li { grid-template-columns: 1fr; gap: 2px; }
}
