/* ==========================================================================
   Meng Lou — academic homepage
   Design system: warm paper, ink, deep emerald, restrained gold
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-cjk: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;

  --container: 1180px;
  --gutter: clamp(20px, 4vw, 44px);
  --header-h: 76px;
  --radius: 12px;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);

  --bg: #f7f5ee;
  --surface: #fffdf7;
  --surface-2: #f0ede4;
  --ink: #16191c;
  --ink-2: #3f464c;
  --muted: #626b72;
  --line: rgba(22, 25, 28, 0.105);
  --line-strong: rgba(22, 25, 28, 0.22);
  --accent: #0d5c46;
  --accent-strong: #0a4836;
  --accent-soft: #e6efe9;
  --accent-line: rgba(13, 92, 70, 0.26);
  --gold: #8a5a17;
  --gold-soft: #f5ead6;
  --gold-line: rgba(138, 90, 23, 0.26);
  --blue: #2e86c1;
  --blue-soft: #eaf4fa;
  --blue-line: rgba(46, 134, 193, 0.28);
  --rose: #9a4a42;
  --rose-soft: #f7e8e5;
  --rose-line: rgba(154, 74, 66, 0.28);
  --stamp-bg: rgba(255, 253, 247, 0.90);
  --header-bg: rgba(247, 245, 238, 0.82);
  --shadow: 0 1px 2px rgba(22, 25, 28, 0.04), 0 18px 42px -26px rgba(22, 25, 28, 0.28);
  --grain-opacity: 0.03;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0c0e10;
  --surface: #121619;
  --surface-2: #171c1f;
  --ink: #efece4;
  --ink-2: #c3c8c8;
  --muted: #98a2a8;
  --line: rgba(239, 236, 228, 0.11);
  --line-strong: rgba(239, 236, 228, 0.24);
  --accent: #63d2a8;
  --accent-strong: #8ee6c3;
  --accent-soft: rgba(99, 210, 168, 0.1);
  --accent-line: rgba(99, 210, 168, 0.26);
  --gold: #d9ad68;
  --gold-soft: rgba(217, 173, 104, 0.1);
  --gold-line: rgba(217, 173, 104, 0.26);
  --blue: #8ec9e8;
  --blue-soft: rgba(142, 201, 232, 0.12);
  --blue-line: rgba(142, 201, 232, 0.28);
  --rose: #e2a49e;
  --rose-soft: rgba(226, 164, 158, 0.12);
  --rose-line: rgba(226, 164, 158, 0.28);
  --stamp-bg: rgba(18, 22, 25, 0.90);
  --header-bg: rgba(12, 14, 16, 0.8);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 22px 50px -28px rgba(0, 0, 0, 0.85);
  --grain-opacity: 0.045;
  color-scheme: dark;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 88% -8%, rgba(13, 92, 70, 0.075), transparent 62%),
    radial-gradient(900px 520px at -8% 24%, rgba(138, 90, 23, 0.05), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

html[data-theme="dark"] body {
  background-image:
    radial-gradient(1100px 620px at 88% -8%, rgba(99, 210, 168, 0.085), transparent 62%),
    radial-gradient(900px 520px at -8% 24%, rgba(217, 173, 104, 0.045), transparent 60%);
}

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

img { max-width: 100%; height: auto; }

a { color: inherit; }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 3px solid var(--bg);
  border-radius: 99px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: min(calc(100% - 2 * var(--gutter)), var(--container));
  margin-inline: auto;
}

.legacy-anchor {
  display: block;
  height: 0;
  visibility: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.icon--small { width: 14px; height: 14px; }
.icon--xs { width: 13px; height: 13px; }

/* ---------- Skip link / progress ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: none; }

.progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 120;
  pointer-events: none;
}
.progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  backdrop-filter: blur(16px) saturate(1.35);
  border-bottom: 1px solid transparent;
  transition:
    height 0.3s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    background-color 0.4s var(--ease);
}
.site-header.is-scrolled {
  --header-h: 64px;
  border-bottom-color: var(--line);
  box-shadow: 0 12px 34px -26px rgba(0, 0, 0, 0.45);
}

.header__inner {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 30px);
  margin-left: 0;
}
.nav > a {
  position: relative;
  padding: 8px 0;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.25s var(--ease);
}
.nav > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.nav > a:hover,
.nav > a.is-active { color: var(--ink); }
.nav > a:hover::after,
.nav > a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__extra { display: none; }

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  text-decoration: none;
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    background-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.theme-toggle .icon--sun { display: none; }
.theme-toggle .icon--moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon--sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon--moon { display: none; }

.nav-toggle { display: none; }
.nav-toggle .icon--close { display: none; }
.nav-toggle[aria-expanded="true"] .icon--menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon--close { display: block; }

/* ---------- Hero ---------- */
.hero {
  padding: calc(var(--header-h) + clamp(40px, 5vw, 64px)) 0 clamp(56px, 6vw, 82px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.45fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}

.hero__content > * {
  animation: rise 0.85s var(--ease) both;
}
.hero__content > *:nth-child(1) { animation-delay: 0.04s; }
.hero__content > *:nth-child(2) { animation-delay: 0.09s; }
.hero__content > *:nth-child(3) { animation-delay: 0.14s; }
.hero__content > *:nth-child(4) { animation-delay: 0.19s; }
.hero__content > *:nth-child(5) { animation-delay: 0.24s; }
.hero__content > *:nth-child(6) { animation-delay: 0.29s; }
.hero__content > *:nth-child(7) { animation-delay: 0.34s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}
.eyebrow__index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.eyebrow__rule {
  width: 26px;
  height: 1px;
  background: var(--accent-line);
}

.hero__name {
  margin: 16px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(34px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.hero__name-cn {
  display: inline-block;
  margin-left: 10px;
  font-family: var(--font-cjk);
  font-size: 0.38em;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--muted);
  vertical-align: 0.3em;
}

.hero__affil {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 18px 0 0;
  font-size: 15px;
  color: var(--ink-2);
}
.hero__affil a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.25s var(--ease), text-decoration-color 0.25s var(--ease);
}
.hero__affil a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
.sep { color: var(--muted); }

.hero__bio {
  max-width: 62ch;
  margin: 24px 0 0;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-2);
  text-wrap: pretty;
}
.hero__bio a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.25s var(--ease), text-decoration-color 0.25s var(--ease);
}
.hero__bio a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.focus {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  max-width: 560px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.focus li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.25s var(--ease);
}
.focus li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.focus li:hover { color: var(--accent); }
.focus li:hover::before { background: var(--accent); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.hero-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid transparent;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 12px 24px -18px rgba(22, 25, 28, 0.55);
  transition:
    transform 0.25s var(--ease),
    filter 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.hero-btn .icon { width: 20px; height: 20px; }
.hero-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 16px 28px -18px rgba(22, 25, 28, 0.6);
}
.hero-btn--scholar { background: var(--accent); color: #fffdf7; }
.hero-btn--mail { background: var(--gold); color: #fffdf7; }
.hero-btn--github { background: var(--ink); color: var(--bg); }
html[data-theme="dark"] .hero-btn--scholar,
html[data-theme="dark"] .hero-btn--mail { color: #0c0e10; }

.hero__location {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 22px 0 0;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0;
  color: var(--muted);
}
.hero__location .icon { color: var(--accent); }

/* portrait */
.hero__portrait {
  position: relative;
  justify-self: end;
  width: min(100%, 152px);
  margin-top: 8px;
  isolation: isolate;
  animation: rise 1s 0.16s var(--ease) both;
}

.portrait-frame {
  position: relative;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(22, 25, 28, 0.03);
}
.portrait-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 32%;
  border-radius: 1px;
  filter: saturate(0.92) contrast(1.02);
}
html[data-theme="dark"] .portrait-frame img {
  filter: saturate(0.84) contrast(1.02) brightness(0.9);
}
html[data-theme="dark"] .portrait-frame {
  box-shadow: none;
}

/* ---------- Sections ---------- */
.section { padding: 0 0 clamp(64px, 7vw, 96px); }

.section > .container {
  padding-top: clamp(28px, 3vw, 36px);
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: clamp(30px, 3.5vw, 44px);
}
.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  margin: 0 0 8px 8px;
  background: var(--line);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker__index { color: var(--accent); }

.section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(25px, 2.4vw, 30px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
}

/* reveal */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s var(--ease) var(--delay, 0s),
    transform 0.8s var(--ease) var(--delay, 0s);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- News ---------- */
.news-shell {
  position: relative;
  max-width: 920px;
}

.news-panel {
  max-height: 560px;
  overflow-y: auto;
  padding: 6px 18px 6px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease);
}
html.js .news-panel { scrollbar-width: none; }
html.js .news-panel::-webkit-scrollbar { display: none; }
.news-panel:hover { border-color: var(--line-strong); }

.news-bar {
  display: none;
  position: absolute;
  top: 12px;
  right: 4px;
  bottom: 12px;
  width: 8px;
  border-radius: 99px;
  background: var(--surface-2);
}
html.js .news-bar { display: block; }
.news-bar__thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  border-radius: 99px;
  background: var(--muted);
  opacity: 0.6;
  cursor: grab;
  touch-action: none;
  transition: background-color 0.2s var(--ease), opacity 0.2s var(--ease);
}
.news-bar__thumb:hover,
.news-bar__thumb.is-dragging {
  background: var(--accent);
  opacity: 1;
}
.news-bar__thumb.is-dragging { cursor: grabbing; }

.news-list {
  display: flex;
  flex-direction: column;
  padding: 1px 0;
}

.news-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 10px;
  border-top: 1px solid var(--line);
  transition: background-color 0.2s var(--ease);
}
.news-item:first-child { border-top: 0; }
.news-item:hover { background: var(--surface-2); }

.news-date {
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}

.news-text {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}
.news-ico {
  display: inline-block;
  margin-right: 6px;
  font-size: 15px;
  line-height: 1;
  transform: translateY(1px);
}
.news-text a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}
.news-text a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
.news-text strong { color: var(--ink); font-weight: 600; }

code {
  padding: 0.1em 0.42em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.86em;
}

/* ---------- Publications ---------- */
.pubs { border-top: 1px solid var(--line); }

.pub {
  position: relative;
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: clamp(24px, 3vw, 38px);
  margin: 0 -18px;
  padding: 28px 18px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s var(--ease);
}
.pub:hover { background: var(--surface); }

.pub__stamp {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  align-self: start;
  min-height: 88px;
  padding: 15px 16px;
  overflow: hidden;
  background: var(--stamp-bg);
  border: 1px solid var(--blue);
  border-radius: 8px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.pub__stamp::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--blue);
}
.pub__stamp--journal::before { background: var(--accent); }
.pub__stamp--journal {
  background: var(--surface);
  border-color: var(--line);
}
.pub__stamp--oral::before { background: var(--blue); }
.pub__oral {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 2px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold);
  color: #fffdf7;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
}
html[data-theme="dark"] .pub__oral { color: #0c0e10; }
.pub:hover .pub__stamp {
  border-color: var(--blue);
  box-shadow: 0 1px 2px rgba(22, 25, 28, 0.04);
}
.pub:hover .pub__stamp--journal { border-color: var(--accent-line); }
html[data-theme="dark"] .pub:hover .pub__stamp { box-shadow: none; }

.pub__venue {
  font-family: var(--font-sans);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.15;
  color: var(--blue);
  white-space: nowrap;
}
.pub__stamp--journal .pub__venue { color: var(--accent); }
.pub__year {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.pub__content { min-width: 0; }

.pub__title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(21px, 1.9vw, 23px);
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: pretty;
}
.pub__title a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: color 0.3s var(--ease), background-size 0.4s var(--ease);
}
.pub__title a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

.pub__authors {
  margin: 0 0 7px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}
.pub__authors strong {
  color: var(--ink);
  font-weight: 600;
}

.pub__venue-line {
  margin: 0 0 15px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
}
.pub__venue-line strong {
  color: var(--ink-2);
  font-weight: 600;
}

.award {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  margin: 0 0 15px;
  padding: 2px 0 2px 12px;
  border-left: 2px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.5;
}
.award > span[aria-hidden] { font-size: 16px; }
.award__label {
  font-weight: 700;
}
.award__detail {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 400;
}

.pub__honor {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0 0 15px;
  padding: 2px 0 2px 12px;
  border-left: 2px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
}
.pub__honor > span[aria-hidden] { font-size: 16px; }

.pub__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition:
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    background-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.link-pill .icon { width: 14px; height: 14px; opacity: 0.7; }
.link-pill:hover {
  transform: translateY(-1px);
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}
.link-pill--paper {
  border-color: var(--rose-line);
  background: var(--rose-soft);
  color: var(--rose);
}
.link-pill--paper:hover {
  border-color: var(--rose);
  background: var(--rose);
  color: #fffdf7;
}
.link-pill--code {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}
.link-pill--code:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffdf7;
}
html[data-theme="dark"] .link-pill--paper:hover,
html[data-theme="dark"] .link-pill--code:hover { color: #0c0e10; }

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), gap 0.25s var(--ease);
}
.more-link:hover {
  gap: 12px;
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Experience ---------- */
.exp { border-top: 1px solid var(--line); }

.exp-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 44px;
  gap: clamp(18px, 3vw, 44px);
  align-items: baseline;
  margin: 0 -14px;
  padding: 30px 14px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s var(--ease);
}
.exp-item:hover { background: var(--surface); }

.exp-period {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}
.exp-role {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.exp-org {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.exp-num {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  color: var(--line-strong);
  text-align: right;
  opacity: 0.6;
}

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  align-items: start;
}

.service-card { padding: 0; }
.service-card:first-child {
  padding-right: clamp(26px, 3vw, 44px);
}
.service-card + .service-card {
  padding-left: clamp(28px, 4vw, 56px);
  border-left: 1px solid var(--line);
}
.service-card h3 {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.service-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.service-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
  transition: color 0.2s var(--ease);
}
.service-list li:first-child { padding-top: 0; border-top: 0; }
.service-list li:hover { color: var(--accent); }
.service-list .years {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}
.service-list--journals li { font-size: 13.5px; }
.service-more {
  color: var(--muted) !important;
  letter-spacing: 0.3em;
  padding-top: 10px;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: clamp(32px, 4vw, 44px) 0 26px;
  border-top: 1px solid var(--line);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 26px;
  padding-top: 0;
}
.footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
  font-size: 13.5px;
  text-decoration: none;
  transition: color 0.25s var(--ease);
}
.footer__links a:hover { color: var(--accent); }
.footer__links .icon { width: 15px; height: 15px; color: var(--muted); }
.footer__links a:hover .icon { color: var(--accent); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.back-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s var(--ease), gap 0.25s var(--ease);
}
.back-top:hover { gap: 9px; color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .header__social { display: none; }
  .header__actions { margin-left: auto; }
  .hero__grid { grid-template-columns: minmax(0, 1.55fr) minmax(200px, 0.45fr); gap: 44px; }
}

@media (max-width: 900px) {
  .nav-toggle { display: grid; }

  .nav {
    position: fixed;
    top: calc(var(--header-h) + 10px);
    left: var(--gutter);
    right: var(--gutter);
    z-index: 95;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    max-height: calc(100vh - var(--header-h) - 30px);
    margin: 0;
    padding: 10px;
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition:
      opacity 0.28s var(--ease),
      transform 0.28s var(--ease),
      visibility 0.28s;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav > a {
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 14.5px;
  }
  .nav > a:hover,
  .nav > a.is-active { background: var(--accent-soft); }
  .nav > a::after { display: none; }

  .nav__extra {
    display: flex;
    flex-direction: column;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
  .nav__extra a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12.5px;
    text-decoration: none;
    transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
  }
  .nav__extra a:hover { color: var(--accent); background: var(--accent-soft); }
  .nav__extra .icon { width: 15px; height: 15px; }

  .hero { padding-top: calc(var(--header-h) + 40px); }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .hero__portrait {
    justify-self: start;
    width: min(48%, 140px);
  }
  .hero__name { font-size: clamp(32px, 4vw, 38px); }

  .news-shell { max-width: 100%; }
}

@media (max-width: 720px) {
  .header__actions { margin-left: auto; }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .section-head::after { display: none; }

  .pub {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin: 0 -10px;
    padding: 22px 10px;
  }
  .pub__stamp {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    justify-self: start;
    gap: 10px;
    width: fit-content;
    min-height: 0;
    padding: 10px 16px;
  }
  .pub__stamp::before { height: 2px; }
  .pub__venue { font-size: 20px; }

  .exp-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding: 22px 14px;
  }
  .exp-num { display: none; }
  .exp-role { font-size: 20px; }

  .service-grid { grid-template-columns: minmax(0, 1fr); }
  .service-card:first-child { padding-right: 0; }
  .service-card + .service-card {
    margin-top: 34px;
    padding-top: 30px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .footer__links {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 0;
  }
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .eyebrow {
    display: block;
    font-size: 12px;
    line-height: 1.6;
  }
  .eyebrow__index { margin-right: 7px; }
  .eyebrow__rule { display: none; }

  .hero__name { font-size: clamp(30px, 8vw, 36px); }
  .hero__name-cn {
    display: block;
    margin: 8px 0 0;
    font-size: 14px;
    letter-spacing: 0.16em;
    vertical-align: baseline;
  }
  .hero__affil { font-size: 14px; }
  .sep { display: none; }
  .hero__bio { font-size: 15.5px; }
  .focus { grid-template-columns: minmax(0, 1fr); }
  .focus li { padding: 11px 0 12px; }

  .news-panel {
    max-height: 520px;
    padding: 4px 12px 4px 16px;
  }
  .news-item {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 8px;
  }
  .news-text { font-size: 14.5px; }
  .news-date { font-size: 12px; }

  .pub { padding: 20px 10px; }
  .pub__title { font-size: 20px; }
  .pub__authors { font-size: 14px; }

  .hero__portrait { width: min(44%, 132px); }

  .footer__bottom { font-size: 12px; }
}

/* ---------- Reduced motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }
  body::after,
  .site-header,
  .progress,
  .skip-link,
  .nav-toggle,
  .hero__actions,
  .hero__location,
  .footer__links,
  .back-top { display: none !important; }

  .hero { padding-top: 0; }
  .section > .container,
  .site-footer { border-color: #ddd; }
  .pub,
  .service-card { break-inside: avoid; border-color: #ddd; box-shadow: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  a { color: #000; text-decoration: underline; }
}
