/* Fonts */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant';
  src: url('../fonts/cormorant-regular.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant';
  src: url('../fonts/cormorant-italic.woff2') format('woff2');
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

/* Design tokens */
:root {
  --bg:           #FAF6EE;
  --bg-soft:      #F2ECDF;
  --bg-card:     #FFFFFF;
  --ink:         #11161F;
  --ink-2:       #2A3242;
  --muted:       #5E6675;
  --line:        #E3DCCB;
  --line-2:      #D6CDB8;

  --accent:      #B4884B;
  --accent-2:    #8C6831;
  --accent-soft: #EDE0C7;

  --dark:        #0E1B2E;
  --dark-2:      #142339;
  --dark-ink:    #DCE5F0;
  --dark-muted:  #8B98AE;
  --dark-line:   #1E2E47;

  --teal:        #1F5F62;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(17,22,31,.05), 0 2px 6px rgba(17,22,31,.04);
  --shadow-md: 0 6px 24px rgba(17,22,31,.06), 0 2px 8px rgba(17,22,31,.04);
  --shadow-lg: 0 18px 60px rgba(17,22,31,.10), 0 6px 18px rgba(17,22,31,.06);

  --container: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --nav-h: 68px;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Cormorant', 'Iowan Old Style', 'Apple Garamond', Georgia, 'Times New Roman', serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

/* Dark theme */
html[data-theme="dark"] {
  --bg:           #0B1422;
  --bg-soft:      #0F1B2D;
  --bg-card:      #122036;
  --ink:          #E9EEF6;
  --ink-2:        #C5CEDD;
  --muted:        #93A0B6;
  --line:         #1B2A44;
  --line-2:       #233556;
  --accent:       #D5A86A;
  --accent-2:     #E8C28A;
  --accent-soft:  #1E2C46;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 6px 24px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.25);
  --shadow-lg: 0 18px 60px rgba(0,0,0,.5), 0 6px 18px rgba(0,0,0,.3);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  width: 100%;
  max-width: 100vw;
}
img, svg { display: block; max-width: 100%; height: auto; }
svg.ico, .ico { display: inline-block; vertical-align: -2px; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: #fff; }

.container {
  width: min(var(--container), 100%);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0;
}
em { font-style: italic; }
strong { font-weight: 600; color: var(--ink); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}
.eyebrow__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.kicker {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
  font-weight: 500;
}
.kicker span {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
  font-size: 18px;
  color: var(--accent);
  text-transform: none;
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 80;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 24px rgba(17,22,31,.05);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}
.nav__brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  background: var(--ink);
  color: var(--bg);
  flex: none;
}
.nav__brand-text {
  font-size: 14px;
  letter-spacing: -0.01em;
}
.nav__brand-suffix { color: var(--muted); font-weight: 400; }

.nav__links {
  margin-left: 28px;
  display: flex;
  gap: 22px;
  font-size: 14px;
  flex: 1;
}
.nav__links a {
  position: relative;
  color: var(--ink-2);
  padding: 8px 0;
  transition: color .2s ease;
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s cubic-bezier(.65,.05,.36,1);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after,
.nav__links a.is-active::after { transform: scaleX(1); }
.nav__links a.is-active { color: var(--ink); }

.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__menu { display: none; padding: 8px; color: var(--ink); }

.theme-toggle {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: transparent;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.theme-toggle:hover { background: var(--bg-soft); color: var(--ink); }
.theme-toggle .ico--moon { display: none; }
html[data-theme="dark"] .theme-toggle .ico--sun { display: none; }
html[data-theme="dark"] .theme-toggle .ico--moon { display: inline-block; }

.nav__progress {
  position: absolute;
  left: 0; bottom: -1px;
  width: 0%; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .12s linear;
  border-radius: 0 2px 2px 0;
}

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 90;
  padding: 80px 28px 28px;
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.5,.1,.2,1);
  visibility: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu.is-open { transform: translateY(0); visibility: visible; }
.mobile-menu__close {
  position: absolute;
  top: 18px; right: 18px;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  z-index: 2;
}
.mobile-menu__nav {
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--font-serif);
  font-size: clamp(22px, 6.5vw, 30px);
  font-weight: 500;
  line-height: 1.1;
}
.mobile-menu__nav a {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu__nav a:last-child { border-bottom: 0; }
/* Short viewport */
@media (max-height: 700px) {
  .mobile-menu { padding-top: 70px; }
  .mobile-menu__nav { font-size: 20px; }
  .mobile-menu__nav a { padding: 9px 0; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn--sm { padding: 8px 14px; font-size: 13px; }

.btn--primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn--ghost:hover { background: var(--bg-card); border-color: var(--ink); }

.btn--link {
  padding: 8px 4px;
  color: var(--ink-2);
  border-radius: var(--r-sm);
}
.btn--link:hover { color: var(--ink); }
.btn--link span { border-bottom: 1px solid var(--line-2); padding-bottom: 2px; }
.btn--link:hover span { border-color: var(--ink); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 80px) 0 clamp(60px, 8vw, 120px);
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%);
  opacity: .6;
}
.hero__glow {
  position: absolute; width: 480px; height: 480px; border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
}
.hero__glow--a {
  background: radial-gradient(circle, var(--accent), transparent 60%);
  top: -120px; left: -120px;
}
.hero__glow--b {
  background: radial-gradient(circle, color-mix(in srgb, var(--teal) 60%, var(--bg)), transparent 60%);
  bottom: -160px; right: -100px;
  width: 540px; height: 540px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: 70vh;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0 0 22px;
}
.hero__title-line { display: block; }
.hero__title-line--accent { color: var(--ink); }
.hero__title-line--accent em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  font-size: 0.62em;
  letter-spacing: 0;
  margin-left: 4px;
}
.hero__title-comma { color: var(--accent); margin-right: 6px; }

.hero__lede {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0 0 26px;
  line-height: 1.6;
}
.hero__lede strong { color: var(--ink); font-weight: 600; }

.hero__chips {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero__chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.hero__chips svg { color: var(--accent); }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.hero__meta > div {
  padding: 16px 18px 16px 0;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.hero__meta > div:first-child { padding-left: 0; }
.hero__meta > div:last-child { border-right: 0; padding-right: 0; padding-left: 18px; }
.hero__meta dt {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.hero__meta dd {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
  word-break: break-word;
}
.hero__meta dd a { color: var(--ink); border-bottom: 1px solid var(--line-2); }
.hero__meta dd a:hover { border-color: var(--accent); }

/* portrait */
.hero__portrait {
  position: relative;
  margin: 0;
  justify-self: end;
  width: 100%;
  max-width: 460px;
}
.hero__portrait-frame {
  position: relative;
  aspect-ratio: 1 / 1.05;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--dark);
  box-shadow:
    0 30px 80px rgba(17,22,31,.18),
    0 10px 30px rgba(17,22,31,.12),
    inset 0 0 0 1px rgba(255,255,255,.05);
  transform: rotate(-1.2deg);
}
.hero__portrait-frame::before {
  /* light wash */
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.25));
  z-index: 1;
  pointer-events: none;
}
.hero__portrait-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.hero__portrait-tag {
  position: absolute;
  left: -14px;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  z-index: 2;
}
.hero__portrait-tag svg { color: var(--accent); }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero__scroll svg { animation: bob 2.2s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

/* Stats */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.stats__row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
}
.stat {
  padding: 28px 16px;
  text-align: center;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; }
.stat__num {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat__plus { color: var(--accent); margin-left: 2px; }
.stat__label {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Section */
.section {
  padding: clamp(64px, 8vw, 120px) 0;
  position: relative;
  scroll-margin-top: var(--nav-h);
}
.section--alt { background: var(--bg-soft); }
.section__head { margin-bottom: 48px; max-width: 720px; }
.section__head--center { text-align: center; margin: 0 auto 56px; }
.section__title {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.section__title em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}
.section__sub {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 60ch;
}
.section__head--center .section__sub { margin-inline: auto; }

.section__grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.section__grid .section__head { margin-bottom: 0; }
.section__body p {
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.75;
  max-width: 64ch;
}
.about__lede {
  font-family: var(--font-serif);
  font-size: clamp(20px, 1.8vw, 26px) !important;
  line-height: 1.45 !important;
  color: var(--ink) !important;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.about__highlights {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 14px;
}
.about__highlights li {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: start;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.about__highlights svg { color: var(--accent); margin-top: 2px; }
.about__highlights strong { display: block; font-size: 15px; }
.about__highlights span { color: var(--muted); font-size: 13.5px; }

/* Research Cards */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto;
}
.cards > .card { flex: 1 1 280px; max-width: 340px; }
.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px 28px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity .25s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-2);
}
.card:hover::before { opacity: 1; }
.card__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-2);
  margin-bottom: 18px;
}
.card h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 10px;
  line-height: 1.2;
}
.card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* Publications */
.pub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink-2);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.chip:hover { color: var(--ink); border-color: var(--line-2); }
.chip.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.pubs {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
.pub {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: background .2s ease;
}
.pub:hover { background: color-mix(in srgb, var(--accent-soft) 50%, transparent); padding-inline: 12px; margin-inline: -12px; border-radius: var(--r-md);}
.pub.is-hidden { display: none; }
.pub__year {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
  color: var(--accent);
  padding-top: 2px;
}
.pub__title {
  font-family: var(--font-serif);
  font-size: clamp(19px, 1.6vw, 23px);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 8px;
}
.pub__meta { margin: 0 0 8px; color: var(--ink-2); font-size: 14px; line-height: 1.55;}
.pub__meta em { font-weight: 600; font-style: normal; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.pub__venue { color: var(--muted); }
.pub__doi {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 2px;
}
.pub__doi:hover { color: var(--accent-2); border-color: var(--accent); }

.pub-foot { margin-top: 32px; display: flex; justify-content: center; }

/* Timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 150px;
  top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-2) 12%, var(--line-2) 88%, transparent);
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 32px;
  padding: 18px 0;
  align-items: start;
}
.timeline__when {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--ink-2);
  font-size: 15px;
  text-align: right;
  padding-top: 18px;
}
.timeline__card {
  position: relative;
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.timeline__card:hover { transform: translateX(3px); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.timeline__card::before {
  content: '';
  position: absolute;
  left: -39px;
  top: 28px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline__card::after {
  content: '';
  position: absolute;
  left: -25px;
  top: 34px;
  width: 18px; height: 1px;
  background: var(--line-2);
}
.timeline__card h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.timeline__tag {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  background: var(--accent-soft);
  color: var(--accent-2);
  border-radius: 999px;
}
.timeline__where { margin: 0; color: var(--muted); font-size: 14px; }

/* Teaching */
.courses {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
  border-top: 1px solid var(--line);
}
.courses li {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-2);
}
.courses svg { color: var(--accent); }

.books {
  margin-top: 36px;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.books__title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 18px; }
.books__title svg { color: var(--accent); }
.books ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.books li {
  padding-left: 14px;
  border-left: 2px solid var(--accent-soft);
}
.books strong { display: block; font-family: var(--font-serif); font-size: 18px; font-weight: 600; }
.books span { display: block; font-size: 13.5px; color: var(--muted); }

/* Skills */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.skill {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 24px 22px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.skill:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.skill header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.skill header svg { color: var(--accent); }
.skill h3 { font-size: 17px; font-weight: 600; margin: 0; }
.skill ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 7px;
  font-size: 14px;
  color: var(--ink-2);
}
.skill li {
  position: relative;
  padding-left: 18px;
}
.skill li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
  border-radius: 1px;
}

/* Service */
.service {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  align-items: stretch;
}
.service__col {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
}
.service__col h3 {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.service__col h3 svg { color: var(--accent); }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: 14.5px; color: var(--ink-2); }
.plain li { line-height: 1.55; }
.plain strong { display: inline; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font-size: 12.5px;
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
}

/* Contact */
.section--contact {
  background: var(--bg-soft);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.section--contact::before {
  content: '';
  position: absolute;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%);
  top: -180px; left: -180px;
  filter: blur(80px);
  opacity: .7;
  pointer-events: none;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  position: relative;
}
.contact__card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: background .2s ease, transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  color: var(--ink);
}
.contact__card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.contact__card svg { color: var(--accent); margin-top: 4px; }
.contact__card strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 500;
}
.contact__card span { color: var(--muted); font-size: 14.5px; word-break: break-word; }
.contact__card--static { cursor: default; }
.contact__card--static:hover { transform: none; border-color: var(--line); box-shadow: none; }

/* Footer */
.footer {
  background: var(--bg-soft);
  color: var(--muted);
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer__brand { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.footer__brand strong { display: block; font-size: 14px; }
.footer__brand span { font-size: 12.5px; color: var(--muted); }
.footer__mark,
html[data-theme="dark"] .footer__mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: #ffffff !important;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 14px;
}
.footer__nav { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 13.5px; }
.footer__nav a { color: var(--muted); }
.footer__nav a:hover { color: var(--ink); }
.footer__copy { margin: 0; font-size: 12.5px; }

/* To Top */
.to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 60;
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--accent); color: var(--ink); }


/* Responsive */
@media (max-width: 980px) {
  :root { --nav-h: 60px; }
  .nav__links { display: none; }
  .nav__brand-suffix { display: none; }
  .nav__actions .btn { display: none; }
  .nav__menu { display: inline-flex; }
  .hero__inner { grid-template-columns: 1fr; min-height: auto; gap: 40px; padding-top: 10px; }
  .hero__portrait { max-width: 340px; margin: 0 auto; justify-self: center; }
  .hero__portrait-tag { left: 50%; transform: translateX(-50%); right: auto; bottom: -16px; white-space: nowrap; }
  .hero__title { font-size: clamp(40px, 12vw, 64px); }
  .hero__scroll { display: none; }
  .hero__meta { grid-template-columns: 1fr; }
  .hero__meta > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 0; }
  .hero__meta > div:last-child { border-bottom: 0; padding-left: 0; }
  .stats__row { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
  .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .stat:nth-child(5) {
    border-top: 1px solid var(--line);
    border-left: 0;
    grid-column: 1 / -1;
  }
  .section__grid { grid-template-columns: 1fr; }
  .timeline::before { left: 8px; }
  .timeline li { grid-template-columns: 1fr; gap: 8px; padding-left: 28px; }
  .timeline__when { text-align: left; padding-top: 0; font-size: 13px; color: var(--accent-2); }
  .timeline__card::before { left: 1px; top: 8px; }
  .timeline__card::after { display: none; }
  .courses { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .pub { grid-template-columns: 1fr; gap: 6px; }
  .pub__year { font-size: 18px; }
  .pub:hover { padding-inline: 0; margin-inline: 0; }
  .hero__cta { gap: 8px; }
  .hero__cta .btn { padding: 10px 14px; font-size: 13.5px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .nav__brand-text { display: none; }
}

/* Micro-animations */
@media (prefers-reduced-motion: no-preference) {
  .eyebrow,
  .hero__title-line,
  .hero__lede,
  .hero__chips,
  .hero__cta,
  .hero__meta,
  .hero__portrait {
    opacity: 0;
    animation: rise .9s cubic-bezier(.16,1,.3,1) forwards;
  }
  .eyebrow                          { animation-delay: .08s; }
  .hero__title-line:nth-of-type(1)  { animation-delay: .18s; }
  .hero__title-line:nth-of-type(2)  { animation-delay: .32s; }
  .hero__lede                       { animation-delay: .50s; }
  .hero__chips                      { animation-delay: .64s; }
  .hero__cta                        { animation-delay: .78s; }
  .hero__meta                       { animation-delay: .92s; }
  .hero__portrait                   { animation: rise 1.2s cubic-bezier(.16,1,.3,1) .32s forwards; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .eyebrow__dot { animation: dotPulse 2.8s ease-in-out infinite; }
  @keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
    50%      { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 26%, transparent); }
  }

  .hero__glow--a { animation: driftA 16s ease-in-out infinite alternate; }
  .hero__glow--b { animation: driftB 20s ease-in-out infinite alternate; }
  @keyframes driftA { to { transform: translate(18px, 10px); } }
  @keyframes driftB { to { transform: translate(-14px, -8px); } }

  .hero__portrait-frame { animation: float 7.5s ease-in-out infinite alternate; }
  @keyframes float {
    from { transform: rotate(-1.2deg) translateY(0); }
    to   { transform: rotate(-1.6deg) translateY(-4px); }
  }

  .hero__portrait-tag {
    animation: rise .9s cubic-bezier(.16,1,.3,1) 1.1s forwards;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* Print friendliness */
@media print {
  .nav, .mobile-menu, .to-top, .hero__scroll, .hero__bg, .pub-filters, .section--contact::before, .footer { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 12px 0; }
  .hero { padding: 0 0 8px; }
  a { color: #000; text-decoration: underline; }
  .card, .timeline__card, .service__col, .skill, .books, .about__highlights li { box-shadow: none; border-color: #ccc; }
}
