/* Fonts (self-hosted, SIL Open Font License) */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tokens */
:root {
  color-scheme: light;
  --bg: #f6f5f1;
  --paper: #fcfbf8;
  --ink: #15181d;
  --ink-soft: #3b404a;
  --muted: #6b6f79;
  --faint: #9a9ea6;
  --line: rgba(21, 24, 29, 0.13);
  --line-soft: rgba(21, 24, 29, 0.06);
  --accent: #1f3b6e;
  --glow: rgba(31, 59, 110, 0.07);
  --shadow-figure: 0 1px 2px rgba(21, 24, 29, 0.05), 0 22px 40px -28px rgba(21, 24, 29, 0.45);
  --shadow-lift: 0 2px 4px rgba(21, 24, 29, 0.06), 0 34px 60px -30px rgba(21, 24, 29, 0.5);
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
  --max: 1180px;
  --header-h: 72px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101215;
  --paper: #171a1f;
  --ink: #ebe8e1;
  --ink-soft: #c5c2bb;
  --muted: #8f939b;
  --faint: #6c7078;
  --line: rgba(235, 232, 225, 0.13);
  --line-soft: rgba(235, 232, 225, 0.05);
  --accent: #a9bde3;
  --glow: rgba(169, 189, 227, 0.06);
  --shadow-figure: 0 1px 2px rgba(0, 0, 0, 0.3), 0 22px 40px -28px rgba(0, 0, 0, 0.9);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.35), 0 34px 60px -30px rgba(0, 0, 0, 0.95);
}

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

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: color 0.4s ease, background-color 0.4s ease;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

img,
svg {
  display: block;
}

.shell {
  width: min(calc(100% - 64px), var(--max));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 16px;
  color: var(--bg);
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

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

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

.mini-label {
  margin: 0 0 16px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Background: paper tone, a faint wash, and hairline column guides */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 50% at 76% 34%, var(--glow), transparent 72%);
}

.backdrop::before,
.backdrop::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  content: "";
  background: var(--line-soft);
}

.backdrop::before {
  left: calc((100% - min(100% - 64px, var(--max))) / 2);
}

.backdrop::after {
  right: calc((100% - min(100% - 64px, var(--max))) / 2);
}

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.no-webgl .scene {
  display: none;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

main {
  overflow-x: clip;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition: height 0.35s var(--ease), background-color 0.35s ease, box-shadow 0.35s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  height: 62px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  height: 100%;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  width: fit-content;
  line-height: 1;
}

.brand-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.brand-field {
  padding-left: 14px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  gap: 30px;
}

.site-nav a {
  position: relative;
  padding: 4px 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

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

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.control {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--ink);
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.control:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.language-toggle {
  display: inline-flex;
  gap: 4px;
  width: auto;
  min-width: 56px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.language-toggle .language-sep,
.language-toggle [data-language-target] {
  color: var(--faint);
}

.theme-icon {
  position: absolute;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transition: opacity 0.3s ease, transform 0.4s var(--ease);
}

.theme-icon-moon,
html[data-theme="dark"] .theme-icon-sun {
  opacity: 0;
  transform: scale(0.6) rotate(-45deg);
}

html[data-theme="dark"] .theme-icon-moon {
  opacity: 1;
  transform: none;
}

.nav-toggle {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 72px;
  align-items: center;
  min-height: min(100svh, 790px);
  padding-top: calc(var(--header-h) + 36px);
  padding-bottom: 56px;
}

.hero-copy {
  max-width: 680px;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker::before {
  flex: 0 0 auto;
  width: 40px;
  height: 1px;
  content: "";
  background: var(--ink);
}

.hero-title {
  margin: 0;
  font-weight: inherit;
}

.hero-name-primary {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(54px, 7.4vw, 104px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.028em;
}

.hero-name-secondary {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 400;
  letter-spacing: 0.1em;
}

html[data-language="zh"] .hero-name-primary {
  font-weight: 600;
  letter-spacing: 0.06em;
}

html[data-language="zh"] .hero-name-secondary {
  letter-spacing: 0.02em;
}

.hero-tagline {
  max-width: 580px;
  margin: 34px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(20px, 1.85vw, 25px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
}

html[data-language="zh"] .hero-tagline {
  font-style: normal;
  letter-spacing: 0.04em;
}

.hero-lead {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.8;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 30px;
  margin-top: 38px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding: 0 22px;
  color: var(--bg);
  background: var(--ink);
  border-radius: 2px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background-color 0.3s ease, transform 0.3s var(--ease);
}

.button:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.text-link {
  padding-bottom: 3px;
  color: var(--ink);
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.text-link:hover {
  color: var(--accent);
}

.hero-visual {
  display: grid;
  justify-items: center;
}

.portrait {
  --rx: 0deg;
  --ry: 0deg;
  width: min(100%, 360px);
  margin: 0;
  transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 1.1s var(--ease);
}

.portrait.is-tilting {
  transition: transform 0.25s linear;
}

.portrait-frame {
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-figure);
  transition: box-shadow 0.5s ease;
}

.portrait.is-tilting .portrait-frame {
  box-shadow: var(--shadow-lift);
}

.portrait-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1086 / 1448;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.02);
}

.portrait-caption {
  display: grid;
  gap: 2px;
  margin-top: 16px;
  text-align: center;
}

.portrait-place {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
}

html[data-language="zh"] .portrait-place {
  font-style: normal;
}

.portrait-advisor {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.portrait-advisor a {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.portrait-advisor a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Sections */
.section {
  position: relative;
  padding: 40px 0 120px;
}

.section-grid {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 48px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.section-label {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  align-items: baseline;
  gap: 12px;
  align-self: start;
  margin: 0;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-no {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.section-title {
  max-width: 900px;
  margin: 0 0 60px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(34px, 4.1vw, 56px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.section-title em {
  color: var(--accent);
  font-style: italic;
}

html[data-language="zh"] .section-title {
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: 0.02em;
}

html[data-language="zh"] .section-title em {
  font-style: normal;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 64px;
}

.statement {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(19px, 1.55vw, 22px);
  font-weight: 400;
  line-height: 1.68;
}

html[data-language="zh"] .statement {
  line-height: 1.95;
  letter-spacing: 0.02em;
}

.focus .mini-label {
  margin-top: 6px;
}

.focus-list {
  padding: 0;
  margin: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.focus-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.focus-no {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  line-height: 1.6;
}

.focus-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.focus-text strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.focus-text small {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.education {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.7fr) minmax(0, 1.2fr);
  gap: 48px;
  margin-top: 80px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.education h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.education-degree {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.education-time {
  margin: 2px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
}

html[data-language="zh"] .education-time {
  font-style: normal;
}

.education-advisor {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.education-advisor a {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: border-color 0.2s ease;
}

.education-advisor a:hover {
  border-color: var(--accent);
}

.education-stats {
  display: grid;
  align-content: start;
  gap: 22px;
  margin: 0;
}

.education-stats dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.education-stats dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.education-stats dd small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 16px;
  letter-spacing: 0;
}

.course-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.course-list li {
  padding: 10px 0;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
}

/* Publications */
.section-head-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 40px;
  align-items: end;
  margin-bottom: 44px;
}

.section-head-row .section-title {
  margin: 0;
}

.section-intro {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.pub-list {
  border-top: 1px solid var(--line);
}

.pub {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 48px;
  align-items: start;
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}

/* Paper figures: a journal-style plate resting on a small stack of sheets */
.pub-media {
  position: relative;
  margin: 0 14px 14px 0;
}

.pub-media::before,
.pub-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--paper);
  border: 1px solid var(--line);
  transform-origin: 30% 100%;
  transition: transform 0.9s var(--ease), opacity 0.6s ease;
}

.pub-media::before {
  z-index: 0;
  opacity: 0.55;
  transform: translate(14px, 14px);
}

.pub-media::after {
  z-index: 0;
  opacity: 0.85;
  transform: translate(7px, 7px);
}

.pub-media:hover::before {
  transform: translate(22px, 14px) rotate(2.6deg);
}

.pub-media:hover::after {
  transform: translate(12px, 9px) rotate(1.3deg);
}

.pub-figure {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  z-index: 1;
  display: block;
  padding: 14px 14px 44px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-figure);
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 1.1s var(--ease), box-shadow 0.5s ease;
}

.pub-figure.is-tilting {
  box-shadow: var(--shadow-lift);
  transition: transform 0.25s linear, box-shadow 0.5s ease;
}

.pub-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  padding: 16px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--line-soft);
}

.pub-figure::before,
.pub-figure::after {
  position: absolute;
  bottom: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  transition: color 0.3s ease, opacity 0.4s ease, translate 0.5s var(--ease);
}

.pub-figure::before {
  left: 15px;
  content: "arXiv:" attr(data-arxiv);
  font-variant-numeric: tabular-nums;
}

.pub-figure::after {
  right: 15px;
  content: "View paper \2197";
  color: var(--accent);
  opacity: 0;
  translate: -6px 0;
}

html[data-language="zh"] .pub-figure::after {
  content: "\67E5\770B\8BBA\6587 \2197";
  letter-spacing: 0.04em;
}

.pub-figure:hover::after,
.pub-figure:focus-visible::after {
  opacity: 1;
  translate: 0 0;
}

.pub-figure:hover::before {
  color: var(--ink);
}

abbr.equal {
  cursor: help;
  text-decoration: none;
}

.pub-body {
  min-width: 0;
}

.pub-venue {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pub-no {
  color: var(--faint);
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.venue-accent {
  color: var(--accent);
}

.venue-accent::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  content: "";
  vertical-align: 0.08em;
  background: var(--accent);
  transform: rotate(45deg);
}

.pub-body h3 {
  max-width: 660px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(20px, 1.75vw, 24px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.01em;
}

.pub-body h3 a {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: color 0.25s ease, background-size 0.45s var(--ease);
}

.pub-body h3 a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

.pub-authors {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.pub-authors strong {
  color: var(--ink);
  font-weight: 600;
}

.pub-summary {
  max-width: 650px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin: 18px 0 0;
  font-size: 13px;
  font-weight: 600;
}

.pub-links a {
  padding-bottom: 2px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.pub-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Experience and honors */
.record-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 64px;
}

.record-col .mini-label {
  margin-bottom: 14px;
}

.timeline,
.honors-list {
  padding: 0;
  margin: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.timeline li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.timeline time,
.honors-list time {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.timeline strong {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.45;
}

.timeline p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.honors-list li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.honors-list strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

.honors-list time {
  flex: 0 0 auto;
}

/* Contact and footer */
.site-footer {
  padding: 40px 0 0;
}

.contact-title {
  max-width: 760px;
  margin-bottom: 48px;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 28px 72px;
}

.contact-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-link .mini-label {
  margin: 0;
}

.contact-link strong {
  padding-bottom: 8px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  overflow-wrap: anywhere;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.contact-link:hover strong {
  color: var(--accent);
  border-color: var(--accent);
}

.footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 140px;
  padding: 26px 0 34px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom p:nth-child(2) {
  text-align: center;
}

.footer-bottom a {
  justify-self: end;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.footer-bottom a:hover {
  color: var(--accent);
}

/* Reveal motion: quiet fade and rise */
.js [data-reveal] {
  opacity: 0;
  translate: 0 22px;
  transition: opacity 1s var(--ease), translate 1.1s var(--ease);
}

.js [data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
}

.js [data-reveal-delay="1"] { transition-delay: 0.1s; }
.js [data-reveal-delay="2"] { transition-delay: 0.2s; }
.js [data-reveal-delay="3"] { transition-delay: 0.3s; }
.js [data-reveal-delay="4"] { transition-delay: 0.4s; }
.js [data-reveal-delay="5"] { transition-delay: 0.5s; }

/* Responsive */
@media (max-width: 1100px) {
  .hero {
    gap: 48px;
  }

  .section-grid {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 36px;
  }

  .education {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
  }

  .education-courses {
    grid-column: 1 / -1;
  }

  .pub {
    gap: 36px;
  }
}

@media (max-width: 920px) {
  :root {
    --header-h: 64px;
  }

  .shell {
    width: min(calc(100% - 40px), var(--max));
  }

  .backdrop::before,
  .backdrop::after {
    display: none;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .brand-field {
    display: none;
  }

  .nav-toggle {
    display: grid;
    grid-template-rows: repeat(2, 1px);
    gap: 6px;
    align-content: center;
    justify-items: center;
  }

  .nav-toggle span:not(.sr-only) {
    display: block;
    width: 16px;
    height: 1px;
    background: currentColor;
    transition: transform 0.3s var(--ease);
  }

  .site-header.is-open .nav-toggle span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .site-header.is-open .nav-toggle span:nth-child(2) {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    top: 62px;
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    padding: 8px 20px 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.35s var(--ease);
  }

  .site-header.is-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .site-nav a {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }

  .site-nav a::after {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 44px;
    min-height: 0;
    padding-top: calc(var(--header-h) + 48px);
    padding-bottom: 80px;
  }

  .hero-visual {
    order: -1;
    justify-items: start;
  }

  .portrait {
    width: min(100%, 260px);
  }

  .portrait-caption {
    text-align: left;
  }

  .section-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .section-label {
    position: static;
  }

  .section-title {
    margin-bottom: 40px;
  }

  .about-grid,
  .record-grid,
  .section-head-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .section-head-row {
    gap: 14px;
  }

  .education {
    margin-top: 56px;
  }

  .pub {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 36px 0;
  }

  .contact-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .shell {
    width: min(calc(100% - 32px), var(--max));
  }

  .hero {
    gap: 64px;
    padding-bottom: 64px;
  }

  .portrait {
    width: min(100%, 200px);
  }

  .portrait-frame {
    padding: 7px;
  }

  .kicker {
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .kicker::before {
    width: 24px;
  }

  .hero-lead {
    font-size: 15.5px;
  }

  .hero-links {
    gap: 16px 24px;
  }

  .hero-links .button {
    width: 100%;
    justify-content: space-between;
  }

  .section {
    padding-bottom: 96px;
  }

  .education {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .education-stats {
    grid-template-columns: 1fr 1fr;
  }

  .course-list {
    grid-template-columns: 1fr;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .footer-bottom {
    grid-template-columns: 1fr auto;
    margin-top: 96px;
  }

  .footer-bottom p:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }
}

@media (hover: none) {
  .pub-figure::after {
    opacity: 1;
    translate: 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    translate: none;
  }
}

@media print {
  .backdrop,
  .scene,
  .scroll-progress,
  .site-header,
  .hero-links {
    display: none !important;
  }

  .js [data-reveal] {
    opacity: 1;
    translate: none;
  }

  .section-label {
    position: static;
  }

  .pub {
    break-inside: avoid;
  }
}
