:root {
  /* Core palette — deep ink, warm parchment, burgundy accent, whisper of gold */
  --ink:            #15233a;
  --ink-2:          #1F3A5F;
  --ink-soft:       #2a3b58;
  --accent:         #1F3A5F;
  --accent-hover:   #2c5185;
  --accent-soft:    rgba(31, 58, 95, 0.085);
  --burgundy:       #8a2a1d;
  --burgundy-soft:  rgba(138, 42, 29, 0.1);
  --gold:           #a68648;
  --parchment:      #f4eeddff;
  --parchment-2:    #ede4cb;
  --surface:        #fffbef;
  --surface-2:      #f9f2dd;
  --rule:           #d9cfac;
  --rule-strong:    #b8a876;
  --badge-bg:       #ece3c1;
  --badge-text:     #574621;

  --text:           #16181d;
  --text-soft:      #2e3240;
  --muted:          #7a7661;
  --bg:             var(--parchment);
  --bg-tint:        var(--parchment-2);

  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans:    "IBM Plex Sans", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --serif:   "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --display: "Fraunces", "Source Serif 4", Charter, Georgia, serif;

  --shadow-soft:  0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-lift:  0 1px 2px rgba(15, 23, 42, 0.05), 0 14px 36px -14px rgba(15, 23, 42, 0.20);
  --shadow-deep:  0 2px 6px rgba(15, 23, 42, 0.06), 0 24px 60px -18px rgba(15, 23, 42, 0.25);

  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --ease-emph: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark variant */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink:           #e3d9b8;
    --ink-2:         #c8c0a0;
    --ink-soft:      #b7b094;
    --accent:        #d9c89a;
    --accent-hover:  #ebddb3;
    --accent-soft:   rgba(217, 200, 154, 0.12);
    --burgundy:      #d96a58;
    --burgundy-soft: rgba(217, 106, 88, 0.13);
    --gold:          #d4b26e;
    --parchment:     #141013;
    --parchment-2:   #1a1619;
    --surface:       #1c1719;
    --surface-2:     #221c1f;
    --rule:          #2c262a;
    --rule-strong:   #453d42;
    --badge-bg:      #2a2316;
    --badge-text:    #e0c97a;
    --text:          #ece5d0;
    --text-soft:     #c9c2ac;
    --muted:         #918874;
    --bg:            var(--parchment);
    --bg-tint:       var(--parchment-2);
    --shadow-soft:   0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-lift:   0 1px 2px rgba(0, 0, 0, 0.35), 0 18px 40px -16px rgba(0, 0, 0, 0.7);
    --shadow-deep:   0 2px 8px rgba(0, 0, 0, 0.45), 0 30px 70px -24px rgba(0, 0, 0, 0.8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink:           #e3d9b8;
  --ink-2:         #c8c0a0;
  --ink-soft:      #b7b094;
  --accent:        #d9c89a;
  --accent-hover:  #ebddb3;
  --accent-soft:   rgba(217, 200, 154, 0.12);
  --burgundy:      #d96a58;
  --burgundy-soft: rgba(217, 106, 88, 0.13);
  --gold:          #d4b26e;
  --parchment:     #141013;
  --parchment-2:   #1a1619;
  --surface:       #1c1719;
  --surface-2:     #221c1f;
  --rule:          #2c262a;
  --rule-strong:   #453d42;
  --badge-bg:      #2a2316;
  --badge-text:    #e0c97a;
  --text:          #ece5d0;
  --text-soft:     #c9c2ac;
  --muted:         #918874;
  --bg:            var(--parchment);
  --bg-tint:       var(--parchment-2);
  --shadow-soft:   0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-lift:   0 1px 2px rgba(0, 0, 0, 0.35), 0 18px 40px -16px rgba(0, 0, 0, 0.7);
  --shadow-deep:   0 2px 8px rgba(0, 0, 0, 0.45), 0 30px 70px -24px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-feature-settings: "kern", "liga", "clig", "calt";
  background-image:
    radial-gradient(1200px 600px at 85% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--burgundy-soft), transparent 60%);
  background-attachment: fixed, fixed;
  position: relative;
}

/* Paper grain texture overlay — subtle SVG noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0 0.04 0 0 0 0.065 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
:root[data-theme="dark"] body::before,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::before { opacity: 0.35; mix-blend-mode: screen; }
}
:root[data-theme="dark"] body::before { opacity: 0.35; mix-blend-mode: screen; }

main, .masthead, .mininav { position: relative; z-index: 2; }

/* ---------- Masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--parchment-2) 70%, transparent);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.masthead-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.55rem 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.masthead-left, .masthead-right {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
}
.masthead .dot { color: var(--rule-strong); }
.ce-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  border-radius: 2px;
  font-feature-settings: "ss01";
  font-variation-settings: "opsz" 24;
}

/* ---------- Sticky mini-nav ---------- */
.mininav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--rule);
  transform: translateY(-100%);
  transition: transform 260ms var(--ease-emph), opacity 240ms var(--ease);
  opacity: 0;
  pointer-events: none;
}
.mininav.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mininav-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.mininav-brand {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 24, "SOFT" 30;
}
.mininav-links {
  display: flex;
  gap: 1.2rem;
  margin-left: auto;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.mininav-links a {
  color: var(--text-soft);
  text-decoration: none;
  padding: 0.15rem 0;
  position: relative;
  transition: color 160ms ease;
}
.mininav-links a.is-active { color: var(--burgundy); }
.mininav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: var(--burgundy);
}
.mininav-links a:hover { color: var(--accent); }
.mininav .short-label { display: none; }
.mininav .long-label { display: inline; }

/* ---------- Research subnav ---------- */
.subnav {
  position: fixed;
  top: 0;
  left: 0; right: 0;
  z-index: 49;
  background: color-mix(in srgb, var(--bg-tint) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--rule);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 320ms var(--ease-emph), opacity 260ms var(--ease);
}
.subnav.is-visible {
  transform: translateY(3rem);
  opacity: 1;
  pointer-events: auto;
}
.subnav-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0.45rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav-label {
  font-family: var(--display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--burgundy);
  flex-shrink: 0;
  font-variation-settings: "opsz" 24, "SOFT" 50;
  letter-spacing: 0.02em;
}
.subnav-links {
  display: flex;
  gap: 1.1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.subnav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.15rem 0;
  position: relative;
  transition: color 160ms ease;
}
.subnav-links a:hover { color: var(--burgundy); }
.subnav-links a.is-active { color: var(--burgundy); }
.subnav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: var(--burgundy);
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-soft);
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease, background 160ms ease;
  flex-shrink: 0;
  padding: 0;
}
.theme-toggle:hover {
  color: var(--burgundy);
  border-color: var(--burgundy);
  transform: translateY(-1px) rotate(-12deg);
}
.theme-toggle svg {
  width: 0.95rem; height: 0.95rem;
  stroke: currentColor; stroke-width: 1.6; fill: none;
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

main {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 5rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2.5px;
  transition: color 140ms ease;
}
a:hover { color: var(--accent-hover); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 1rem 0 3rem;
  margin-bottom: 2rem;
}
.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.nav-primary {
  display: flex;
  gap: 1.4rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.nav-primary a {
  color: var(--text-soft);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}
.nav-primary a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--burgundy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
}
.nav-primary a:hover { color: var(--burgundy); }
.nav-primary a:hover::after { transform: scaleX(1); }

.hero-body { position: relative; }

.hero-year {
  position: absolute;
  top: 3rem;
  right: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(0.85rem, 2vw, 1rem);
  letter-spacing: 0.22em;
  color: var(--gold);
  opacity: 0.75;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-variation-settings: "opsz" 24, "SOFT" 30;
  pointer-events: none;
  user-select: none;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 1.1rem;
  padding-right: 2.5rem;
}
.kicker-line {
  display: block;
  width: 2.2rem;
  height: 1px;
  background: var(--burgundy);
}

h1.display {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.028em;
  color: var(--ink);
  margin: 0 0 1.2rem;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
  font-feature-settings: "ss01", "ss02", "kern", "liga", "dlig";
  text-wrap: balance;
  display: block;
}
h1.display .fore {
  display: block;
}
h1.display .surname {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--burgundy);
  margin-left: 0.8em;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

.lede {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 38rem;
  margin: 1.5rem 0 1.8rem;
  text-wrap: pretty;
}
.lede em {
  font-style: italic;
  color: var(--ink);
  font-family: var(--display);
  font-variation-settings: "opsz" 24, "SOFT" 30;
  font-weight: 500;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.85rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.58rem 1.15rem;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: all 220ms var(--ease-emph);
  cursor: pointer;
  line-height: 1;
}
.btn svg { width: 0.88rem; height: 0.88rem; stroke: currentColor; transition: transform 220ms var(--ease-emph); }
.btn-primary {
  background: var(--ink);
  color: var(--parchment);
  border-color: var(--ink);
}
.btn-primary:hover {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--parchment);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--rule-strong);
}
.btn-ghost:hover {
  color: var(--burgundy);
  border-color: var(--burgundy);
  transform: translateY(-2px);
}
.btn-ghost:hover svg { transform: translateX(3px); }

/* ---------- Ornament ---------- */
.ornament {
  text-align: center;
  margin: 3rem 0 2rem;
  line-height: 1;
  user-select: none;
}
.ornament span {
  font-family: var(--display);
  color: var(--gold);
  font-size: 1.7rem;
  letter-spacing: 0.8em;
  padding-left: 0.8em;
  opacity: 0.7;
  font-variation-settings: "opsz" 48;
  display: inline-block;
  position: relative;
}
.ornament span::before,
.ornament span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 3.5rem;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--rule-strong));
  opacity: 0.6;
}
.ornament span::before { right: calc(100% + 0.8rem); background: linear-gradient(to left, var(--rule-strong), transparent); }
.ornament span::after { left: calc(100% - 0.3rem); }
.ornament--small {
  margin: 2.5rem 0 1.5rem;
}
.ornament--small span {
  font-size: 0.95rem;
  color: var(--rule-strong);
  letter-spacing: 0.5em;
  padding-left: 0.5em;
  opacity: 0.8;
}
.ornament--small span::before,
.ornament--small span::after { width: 2.2rem; }

/* ---------- Sections ---------- */
section {
  margin: 0 0 1rem;
  scroll-margin-top: 4.5rem;
}

section > h2 {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 0 0 1.9rem;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}
section > h2 .h-num {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--burgundy);
  text-transform: none;
  min-width: 1.5rem;
  font-variation-settings: "opsz" 48, "SOFT" 60;
}
section > h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--rule-strong), transparent 85%);
  margin-left: 0.5rem;
  align-self: center;
  opacity: 0.7;
}

h3.subhead {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 2.4rem 0 1.2rem;
  position: relative;
  padding-left: 1rem;
  scroll-margin-top: 7rem;
}
h3.subhead::before {
  content: "§";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-55%);
  font-family: var(--display);
  font-style: italic;
  color: var(--burgundy);
  font-size: 1rem;
  font-weight: 400;
  font-variation-settings: "opsz" 24;
}
h3.subhead:first-of-type { margin-top: 0.25rem; }

p { margin: 0 0 1rem; }
em { font-style: italic; }

/* ---------- Bio ---------- */
.bio {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 2rem;
  align-items: start;
}
.portrait-wrap {
  margin: 0;
  position: relative;
}
.portrait-wrap::before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px dashed var(--rule-strong);
  border-radius: 50%;
  opacity: 0.5;
  pointer-events: none;
}
.portrait-wrap::after {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  opacity: 0.35;
  pointer-events: none;
}
.portrait {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-lift);
  transition: transform 520ms var(--ease-emph), filter 520ms var(--ease);
  filter: saturate(0.92) contrast(1.03);
}
.portrait:hover { transform: scale(1.03) rotate(-1deg); filter: saturate(1) contrast(1); }
.portrait-wrap figcaption {
  margin-top: 0.85rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.bio-text p { text-wrap: pretty; hyphens: auto; }
.bio-text p:last-of-type { margin-bottom: 0.75rem; }

.dropcap {
  float: left;
  font-family: var(--display);
  font-weight: 400;
  font-size: 4.8rem;
  line-height: 0.82;
  margin: 0.4rem 0.7rem 0 0;
  color: var(--burgundy);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  font-feature-settings: "ss01";
  font-style: italic;
}

.topic-chips {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.4rem;
}
.topic-chips li {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--text-soft);
  border-radius: 2px;
  transition: all 180ms var(--ease);
}
.topic-chips li:hover {
  border-color: var(--burgundy);
  color: var(--burgundy);
  background: var(--surface);
  transform: translateY(-1px);
}

/* ---------- At a glance ---------- */
.glance-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
  border: 1px solid var(--rule);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.glance-item {
  padding: 1.1rem 1.15rem;
  border-right: 1px solid var(--rule);
  min-width: 0;
  position: relative;
}
.glance-item:last-child { border-right: none; }
.glance-item dt {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.glance-item dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.2;
  font-variation-settings: "opsz" 48, "SOFT" 30;
}
.big-num {
  font-size: 2.3rem;
  line-height: 1;
  display: block;
  color: var(--burgundy);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  letter-spacing: -0.015em;
  font-style: italic;
  font-variant-numeric: lining-nums;
}
.glance-sub {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.25rem;
  letter-spacing: 0.02em;
}

/* ---------- Paper cards ---------- */
.paper {
  margin-bottom: 1.6rem;
  line-height: 1.55;
  padding: 0.15rem 0 0.3rem;
  position: relative;
  transition: background 180ms var(--ease);
}
.paper + .paper {
  border-top: 1px solid var(--rule);
  padding-top: 1.4rem;
}
.paper::before {
  content: "";
  position: absolute;
  left: -1rem; top: 0.7rem;
  width: 2px; height: 0;
  background: var(--burgundy);
  transition: height 320ms var(--ease-emph);
}
.paper:hover::before { height: calc(100% - 1.1rem); }

.paper .title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0.35rem;
  letter-spacing: -0.008em;
  text-wrap: balance;
  font-variation-settings: "opsz" 48, "SOFT" 50;
}
.venue-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--burgundy);
  background: var(--burgundy-soft);
  padding: 0.22rem 0.5rem;
  border-radius: 2px;
  margin-right: 0.6rem;
  vertical-align: 0.15em;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--burgundy) 20%, transparent);
}
.paper .title a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--burgundy), var(--burgundy));
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 260ms var(--ease-emph), color 200ms ease;
  padding-bottom: 2px;
}
.paper .title a:hover {
  color: var(--burgundy);
  background-size: 100% 1px;
}

.paper .authors {
  font-size: 1rem;
  color: var(--text-soft);
  margin-bottom: 0.25rem;
}

.paper--compact {
  margin-bottom: 0;
  padding: 0.1rem 0;
}
.paper--compact + .paper--compact {
  border-top: none;
  padding-top: 0.1rem;
}
.paper + .paper--compact {
  padding-top: 0.7rem;
}
.paper--compact .authors {
  margin-bottom: 0;
  font-size: 0.92rem;
}
.paper--compact .compact-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.7rem;
  padding-right: 0.7rem;
  border-right: 1px solid var(--rule-strong);
}
.paper .authors em {
  font-style: italic;
  font-family: var(--display);
  font-variation-settings: "opsz" 24, "SOFT" 30;
  font-weight: 500;
}
.paper .authors a { color: var(--text-soft); text-decoration-color: var(--rule-strong); }
.paper .authors a:hover { color: var(--burgundy); }

.paper .meta {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}
.paper .meta .venue {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink);
  font-size: 0.98rem;
  font-variation-settings: "opsz" 24, "SOFT" 50;
  letter-spacing: 0;
}
.paper .meta a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease, color 160ms ease;
}
.paper .meta a:hover { border-bottom-color: var(--burgundy); color: var(--burgundy); }
.paper .meta .sep {
  margin: 0 0.55rem;
  color: var(--rule-strong);
  font-weight: 300;
}

.paper-tags {
  list-style: none;
  padding: 0;
  margin: 0 0 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.paper-tags li {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.14rem 0.5rem;
  border-radius: 1px;
  background: transparent;
  border: 1px solid var(--rule);
  transition: all 180ms var(--ease);
}
.paper-tags li:hover {
  color: var(--burgundy);
  border-color: var(--burgundy);
  background: var(--burgundy-soft);
}
.paper-tags li.tag-status {
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment);
  background: var(--burgundy);
  border-color: var(--burgundy);
  padding: 0.14rem 0.55rem;
  position: relative;
}
.paper-tags li.tag-status::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 0.45rem;
  vertical-align: 0.1em;
  box-shadow: 0 0 0 0 rgba(166, 134, 72, 0.7);
  animation: beacon 2.4s var(--ease) infinite;
}
@keyframes beacon {
  0%   { box-shadow: 0 0 0 0 rgba(166, 134, 72, 0.6); }
  70%  { box-shadow: 0 0 0 6px rgba(166, 134, 72, 0); }
  100% { box-shadow: 0 0 0 0 rgba(166, 134, 72, 0); }
}
.paper-tags li.tag-status:hover {
  color: var(--parchment);
  background: var(--burgundy);
  border-color: var(--burgundy);
  transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
  .paper-tags li.tag-status::before { animation: none; }
}

.paper details { margin-top: 0.45rem; }
.paper details + details { margin-top: 0.3rem; }
.paper summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.18rem 0;
  user-select: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 140ms ease;
}
.paper summary::-webkit-details-marker { display: none; }
.paper summary::before {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.4px solid currentColor;
  border-top: 1.4px solid currentColor;
  transform: rotate(45deg);
  transition: transform 220ms var(--ease-emph);
}
.paper details[open] > summary::before { transform: rotate(135deg); }
.paper summary:hover { color: var(--burgundy); }
.paper details[open] > summary { color: var(--burgundy); }

.paper .abstract,
.paper .bibtex {
  margin: 0.65rem 0 0 0;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--burgundy);
  border-radius: 2px;
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--text-soft);
  box-shadow: var(--shadow-soft);
  animation: slide-in 280ms var(--ease-emph);
}
.paper .bibtex {
  font-family: var(--mono);
  font-size: 0.78rem;
  white-space: pre-wrap;
  color: var(--text-soft);
  line-height: 1.6;
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.paper .note {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem;
  line-height: 1.5;
}
.paper .note strong {
  color: var(--badge-text);
  background: var(--badge-bg);
  padding: 0.12rem 0.5rem;
  border-radius: 1px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--mono);
  white-space: nowrap;
  flex-shrink: 0;
}
.paper .note > span { flex: 1 1 auto; }
.paper .note a { color: var(--burgundy); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.65rem;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  padding: 0.9rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
  text-decoration: none;
  color: var(--text-soft);
  transition: all 240ms var(--ease-emph);
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--burgundy);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 280ms var(--ease-emph);
}
.contact-card::after {
  content: "→";
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  color: var(--rule-strong);
  font-size: 0.9rem;
  transition: transform 240ms var(--ease-emph), color 180ms ease;
}
.contact-card:hover {
  border-color: var(--rule-strong);
  color: var(--burgundy);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}
.contact-card:hover::before { transform: scaleY(1); }
.contact-card:hover::after { color: var(--burgundy); transform: translate(3px, -3px); }
.contact-label {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-card:hover .contact-label { color: var(--burgundy); }
.contact-value {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 400;
  color: inherit;
  font-variation-settings: "opsz" 24, "SOFT" 30;
}
.contact-footnote {
  margin: 1.25rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
  letter-spacing: 0.02em;
}

/* ---------- Footer ---------- */
footer {
  margin-top: 4.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.ce-mark-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 2px;
  font-variation-settings: "opsz" 24;
}
.footer-name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-soft);
  font-variation-settings: "opsz" 24, "SOFT" 30;
}
.footer-role { color: var(--muted); font-size: 0.76rem; font-family: var(--mono); letter-spacing: 0.02em; }
.footer-right { text-align: right; font-family: var(--mono); letter-spacing: 0.03em; font-size: 0.74rem; }
.footer-meta { margin-top: 0.25rem; font-size: 0.7rem; }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 720ms var(--ease-emph), transform 720ms var(--ease-emph);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .portrait { transition: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .glance-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .glance-item { border-right: 1px solid var(--rule); }
  .glance-item:nth-child(2n) { border-right: none; }
  .glance-item:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .hero-year { right: 0; top: -0.25rem; writing-mode: horizontal-tb; font-size: 0.78rem; }
  .kicker { padding-right: 4.5rem; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  main { padding: 1.5rem 1.1rem 3rem; }
  section { margin-bottom: 0.75rem; }
  .masthead { font-size: 0.62rem; }
  .masthead-inner { padding: 0.5rem 1.1rem; gap: 0.6rem; flex-wrap: wrap; }
  .masthead-left .masthead-tag,
  .masthead-right .masthead-dept { display: none; }
  .hero { padding: 0.5rem 0 2.25rem; margin-bottom: 1.5rem; }
  .hero-top { margin-bottom: 1.7rem; }
  .lede { font-size: 1.06rem; }
  .paper .title { font-size: 1.08rem; }
  .mininav-inner { padding: 0.5rem 1.1rem; gap: 0.5rem; }
  .mininav-links { gap: 0.8rem; font-size: 0.74rem; }
  .mininav-brand { font-size: 0.92rem; }
  .mininav .long-label { display: none; }
  .mininav .short-label { display: inline; }
  .ornament { margin: 2.2rem 0 1.5rem; }
  .ornament--small { margin: 1.8rem 0 1.1rem; }
  .dropcap { font-size: 3.8rem; margin-right: 0.5rem; }
  .paper-tags li.tag-status { font-size: 0.6rem; }
  .big-num { font-size: 2rem; }
}
@media (max-width: 560px) {
  .nav-primary { gap: 0.9rem; flex-wrap: wrap; font-size: 0.8rem; }
  h1.display .surname { margin-left: 0.3em; }
}
@media (max-width: 520px) {
  .bio {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    justify-items: start;
  }
  .portrait-wrap { align-self: center; }
  .portrait { width: 130px; height: 130px; }
  .portrait-wrap figcaption { display: none; }
  .paper .meta { font-size: 0.75rem; }
  .paper .meta .sep { margin: 0 0.4rem; }
  .glance-grid { grid-template-columns: 1fr; }
  .glance-item { border-right: none !important; border-bottom: 1px solid var(--rule); }
  .glance-item:last-child { border-bottom: none; }
  .footer-grid { flex-direction: column; }
  .footer-right { text-align: left; }
}
@media (max-width: 420px) {
  .theme-toggle--hero { display: none; }
  .hero-year { display: none; }
  h1.display { font-size: clamp(2.3rem, 12vw, 3rem); }
}

/* ---------- Teaching ---------- */
.teaching-honour {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 0.4rem 0 2.2rem;
  padding: 1rem 1.2rem 1rem 1.05rem;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--burgundy);
  border-radius: 2px;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.honour-ornament {
  font-family: var(--display);
  font-style: italic;
  color: var(--burgundy);
  font-size: 1.7rem;
  line-height: 1;
  margin-top: 0.15rem;
  font-variation-settings: "opsz" 48, "SOFT" 80, "WONK" 1;
  flex-shrink: 0;
}
.honour-body { flex: 1 1 auto; min-width: 0; }
.honour-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 0.35rem;
}
.teaching-honour p {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.97rem;
  line-height: 1.55;
  color: var(--text);
  text-wrap: pretty;
}
.teaching-honour p em {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
  font-variation-settings: "opsz" 48, "SOFT" 40, "WONK" 1;
}

@media (max-width: 560px) {
  .teaching-honour { padding: 0.9rem 1rem; gap: 0.75rem; }
  .honour-ornament { font-size: 1.4rem; }
}

.module {
  margin: 0;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 7rem;
}
.module:last-of-type {
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0.8rem;
}

.module-summary {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 0.2rem 1rem 1.1rem;
  cursor: pointer;
  position: relative;
  list-style: none;
  user-select: none;
  transition: background 160ms var(--ease);
}
.module-summary::-webkit-details-marker { display: none; }
.module-summary::marker { content: ""; }

.module-summary::before {
  content: "§";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-55%);
  font-family: var(--display);
  font-style: italic;
  color: var(--burgundy);
  font-size: 1rem;
  font-variation-settings: "opsz" 24;
}
.module-summary:hover { background: var(--surface); }
.module-summary:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: -2px;
}

.module-title {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink);
  transition: color 160ms var(--ease);
}
.module-summary:hover .module-title { color: var(--burgundy); }
.module[open] .module-title { color: var(--burgundy); }

.module-count {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.module-chevron {
  width: 12px;
  height: 12px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 260ms var(--ease-emph), color 160ms var(--ease);
}
.module[open] .module-chevron {
  transform: rotate(180deg);
  color: var(--burgundy);
}

.module > .lecture-list {
  margin: 0 0 1rem;
}

@media (max-width: 480px) {
  .module-summary { padding: 0.85rem 0.15rem 0.85rem 1rem; gap: 0.6rem; }
  .module-count { display: none; }
}

.lecture-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.6rem;
  border-top: 1px solid var(--rule);
}
.lecture-list li {
  display: grid;
  grid-template-columns: 4.8rem 1fr auto;
  align-items: baseline;
  column-gap: 1.2rem;
  padding: 0.7rem 0.5rem 0.7rem 0.05rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
  transition: background 160ms var(--ease);
}
.lecture-list li::before {
  content: "";
  position: absolute;
  left: -1rem; top: 50%;
  width: 2px; height: 0;
  background: var(--burgundy);
  transform: translateY(-50%);
  transition: height 260ms var(--ease-emph);
}
.lecture-list li:hover { background: var(--surface); }
.lecture-list li:hover::before { height: 1.1rem; }

.lecture-week {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.lecture-title {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  text-wrap: balance;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.lecture-title:hover {
  color: var(--burgundy);
  border-bottom-color: var(--burgundy);
}
.lecture-format {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .lecture-list li {
    grid-template-columns: 1fr auto;
    row-gap: 0.15rem;
    column-gap: 0.8rem;
  }
  .lecture-week { grid-column: 1 / -1; }
}

/* ---------- Print ---------- */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; background-image: none; }
  body::before { display: none; }
  .masthead, .mininav, .hero-top, .theme-toggle, .hero-cta, .contact-grid, nav, footer, .ornament, .hero-year { display: none !important; }
  .paper .abstract, .paper .bibtex { box-shadow: none; border-left-width: 1px; }
  details { display: block; }
  details summary { display: none; }
  details .abstract, details .bibtex { display: block !important; }
  .reveal { opacity: 1; transform: none; }
  .paper::before { display: none; }
  h1.display { font-size: 2.2rem; color: #000; }
  h1.display .surname { color: #000; }
}
