:root {
  color-scheme: light dark;
  --paper: #fffefd;
  --ink: #161717;
  --muted: #60676a;
  --rule: #d9dddc;
  --accent: #315c9c;
  --accent-2: #9b3d51;
  --wash-1: #9ab6ff;
  --wash-2: #d980a1;
  --wash-3: #cdd8f5;
  --glass-1: #2a55a8;
  --glass-2: #6438ad;
  --glass-3: #c11f3c;
  --glass-4: #d4a83f;
  --title-saturation: 1.05;
  --title-contrast: 0.95;
  --title-brightness: 1.12;
  --panel: #ffffff;
  --soft: #e8edf6;
  --code: #263247;
  --font-body: "Newsreader", Georgia, Cambria, serif;
  --font-heading: "Newsreader", Georgia, Cambria, serif;
  --font-name: "Newsreader", Georgia, Cambria, serif;
  --font-ui: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --name-weight: 700;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101314;
    --ink: #edf2eb;
    --muted: #a7b2a6;
    --rule: #323b39;
    --accent: #8fd8bc;
    --accent-2: #f3b36f;
    --wash-1: #314842;
    --wash-2: #5b4937;
    --wash-3: #23302d;
    --glass-1: #6f93dd;
    --glass-2: #9a7ce0;
    --glass-3: #e35e72;
    --glass-4: #e3c478;
    --panel: #171c1d;
    --soft: #23302d;
    --code: #e4f4ed;
  }
}

:root[data-mode="light"] {
  color-scheme: light;
}

:root[data-palette="indigo"] {
  --paper: #fffefd;
  --ink: #161717;
  --muted: #60676a;
  --rule: #d9dddc;
  --accent: #315c9c;
  --accent-2: #9b3d51;
  --wash-1: #9ab6ff;
  --wash-2: #d980a1;
  --wash-3: #cdd8f5;
  --glass-1: #2a55a8;
  --glass-2: #6438ad;
  --glass-3: #c11f3c;
  --glass-4: #d4a83f;
  --panel: #ffffff;
  --soft: #e8edf6;
  --code: #263247;
}

:root[data-mode="dark"] {
  color-scheme: dark;
  --paper: #101314;
  --ink: #edf2eb;
  --muted: #a7b2a6;
  --rule: #323b39;
  --accent: #8fd8bc;
  --accent-2: #f3b36f;
  --wash-1: #314842;
  --wash-2: #5b4937;
  --wash-3: #23302d;
  --glass-1: #6f93dd;
  --glass-2: #9a7ce0;
  --glass-3: #e35e72;
  --glass-4: #e3c478;
  --panel: #171c1d;
  --soft: #23302d;
  --code: #e4f4ed;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-optical-sizing: auto;
  font-size: 1.02rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Fine grain overlay — atmosphere over the flat paper, on both themes. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.04;
  mix-blend-mode: multiply;
}

:root[data-mode="dark"] body::after {
  opacity: 0.06;
  mix-blend-mode: screen;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-2);
}

::selection {
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--ink);
}

/* Keyboard focus: a clear accent ring, never shown on mouse clicks. */
:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 72%, transparent);
  outline-offset: 3px;
  border-radius: 2px;
}

.mode-toggle:focus-visible {
  outline-offset: 2px;
}

.link-row a,
.paper-action,
footer a {
  background-image: linear-gradient(104deg,
    var(--glass-1) 0%,
    var(--glass-2) 32%,
    var(--glass-3) 66%,
    var(--glass-4) 100%);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 2px;
  transition:
    background-size 220ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.link-row a:hover,
.link-row a:focus-visible,
.paper-action:hover,
.paper-action:focus-visible,
footer a:hover,
footer a:focus-visible {
  background-size: 100% 2px;
  color: var(--ink);
}

.site-header {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 28px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: flex-end;
  font-family: var(--font-ui);
  font-size: 0.92rem;
}

nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  background-image: linear-gradient(104deg,
    var(--glass-1) 0%,
    var(--glass-2) 32%,
    var(--glass-3) 66%,
    var(--glass-4) 100%);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 2px;
  transition:
    background-size 260ms ease,
    color 200ms ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--ink);
  background-size: 100% 2px;
}

/* The current page in the top-level site nav. */
nav a[aria-current="page"] {
  color: var(--ink);
  background-size: 100% 2px;
}

/* Sections still in construction: muted, with a small "soon" chip. */
.nav-soon {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.nav-soon::after {
  content: "soon";
  margin-left: 7px;
  padding: 1px 6px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  vertical-align: 1.5px;
}

.mode-toggle {
  min-width: 78px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 700;
}

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

.mode-icon {
  width: 14px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -4px -3px 0 var(--panel);
}

.mode-toggle[aria-pressed="true"] .mode-icon {
  background: var(--accent-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 26%, transparent);
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 28px 44px;
}

.hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: center;
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--rule);
}

.index-hero {
  position: relative;
  isolation: isolate;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  padding-top: 58px;
  padding-bottom: 44px;
}

.profile-card {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: color-mix(in srgb, var(--panel) 64%, transparent);
  box-shadow: none;
}

.profile-photo {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 6 / 5;
  overflow: hidden;
  background: var(--soft);
}

/* Soft fade of the photo into the panel body, plus a faint pastel
   tint so the portrait sits inside the gradient theme. */
.profile-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 58%,
      color-mix(in srgb, var(--panel) 80%, transparent) 100%),
    radial-gradient(120% 90% at 50% 0%,
      color-mix(in srgb, var(--wash-1) 20%, transparent), transparent 58%);
}

.profile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Both source photos differ in orientation; cover + the fixed
     aspect-ratio above keep them rendered at identical dimensions. */
  transition:
    opacity 650ms ease,
    transform 850ms cubic-bezier(0.45, 0, 0.18, 1),
    filter 650ms ease;
  will-change: opacity, transform;
}

/* Focal points: the day shot is landscape; the night shot is portrait and
   needs a higher focal point to keep the face visible in the shorter frame. */
.profile-img--day {
  object-position: 36% 42%;
}

.profile-img--night {
  object-position: center 24%;
}

/* Light mode (default): day photo in focus, night photo waiting. */
.profile-img--day {
  opacity: 1;
  transform: scale(1);
  filter: saturate(0.78) contrast(0.92) blur(0);
}

.profile-img--night {
  opacity: 0;
  transform: scale(1.06);
  filter: saturate(0.78) contrast(0.92) blur(6px);
}

/* Dark mode: cross-dissolve to the night photo. */
:root[data-mode="dark"] .profile-img--day {
  opacity: 0;
  transform: scale(1.06);
  filter: saturate(0.78) contrast(0.92) blur(6px);
}

:root[data-mode="dark"] .profile-img--night {
  opacity: 1;
  transform: scale(1);
  filter: saturate(0.78) contrast(0.92) blur(0);
}

/* System-dark before the inline script assigns a mode (avoids a flash). */
@media (prefers-color-scheme: dark) {
  :root:not([data-mode]) .profile-img--day {
    opacity: 0;
    transform: scale(1.06);
    filter: saturate(0.78) contrast(0.92) blur(6px);
  }

  :root:not([data-mode]) .profile-img--night {
    opacity: 1;
    transform: scale(1);
    filter: saturate(0.78) contrast(0.92) blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-img {
    transition: opacity 250ms ease;
    transform: none !important;
    filter: none !important;
  }
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
}

h1 {
  max-width: 820px;
  margin-bottom: 16px;
  font-size: clamp(2.65rem, 7vw, 5.25rem);
  line-height: 0.94;
  letter-spacing: 0;
}

#intro-title {
  position: relative;
  display: inline-block;
  /* Roomy line box so tall glyphs aren't clipped by background-clip:text
     once the gradient shows; negative margins keep the visual position. */
  line-height: 1.22;
  margin-top: -0.14em;
  margin-bottom: calc(16px - 0.14em);
  color: transparent;
  font-family: var(--font-name);
  font-weight: var(--name-weight);
  background:
    linear-gradient(104deg in oklab,
      var(--glass-1) 0%,
      var(--glass-2) 20%,
      var(--glass-3) 40%,
      var(--glass-4) 55%,
      var(--glass-3) 70%,
      var(--glass-2) 85%,
      var(--glass-1) 100%),
    radial-gradient(ellipse at 16% 42%, color-mix(in srgb, var(--panel) 52%, transparent), transparent 34%),
    radial-gradient(ellipse at 78% 34%, color-mix(in srgb, var(--ink) 20%, transparent), transparent 42%);
  background-size: 260% 100%, 140% 120%, 160% 120%;
  background-position: 0% 50%, 12% 48%, 88% 40%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: saturate(var(--title-saturation)) contrast(var(--title-contrast)) brightness(var(--title-brightness));
  /* Gradient lives here; the ink overlay (::before) wipes off at 5s to
     reveal it right-to-left, then the gradient drifts once and holds. */
  animation:
    refracted-name 16s cubic-bezier(0.45, 0, 0.18, 1) 6s 2 alternate forwards,
    rise-in 820ms cubic-bezier(0.45, 0, 0.18, 1) 40ms backwards;
}

/* Solid-ink twin of the name, laid over the gradient. A mask wipes it away
   from the rightmost letter leftward, so the color dyes in right-to-left. */
#intro-title::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 40%, transparent 60%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 40%, transparent 60%, transparent 100%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 0% 50%;
  mask-position: 0% 50%;
  pointer-events: none;
  /* Solid ink for 6s, dye to color, hold ~30s, then settle back to ink.
     One iteration; linear base timing (dye segments ease themselves). */
  animation: name-reveal-settle 34.8s linear 6s 1 both;
}

#intro-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: transparent;
  background:
    linear-gradient(100deg in oklab,
      transparent 0%,
      color-mix(in srgb, var(--panel) 86%, transparent) 22%,
      transparent 38%,
      color-mix(in srgb, var(--panel) 58%, transparent) 64%,
      transparent 82%);
  background-size: 240% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  mix-blend-mode: soft-light;
  pointer-events: none;
  /* A single shine sweep just after the color reveal, then vanishes. */
  animation: glass-sheen-once 2.4s ease-in-out 8500ms 1 both;
}

/* One-shot over ~34.8s: dye to color (~2.4s), hold color ~30s, then wipe
   back to ink and stay. Paired with a 6s start delay + both-fill on ::before
   so the name reads as plain ink before and after. */
@keyframes name-reveal-settle {
  0% {
    -webkit-mask-position: 0% 50%;
    mask-position: 0% 50%;
    animation-timing-function: cubic-bezier(0.45, 0, 0.18, 1);
  }

  6.9% {
    -webkit-mask-position: 100% 50%;
    mask-position: 100% 50%;
  }

  93.1% {
    -webkit-mask-position: 100% 50%;
    mask-position: 100% 50%;
    animation-timing-function: cubic-bezier(0.45, 0, 0.18, 1);
  }

  100% {
    -webkit-mask-position: 0% 50%;
    mask-position: 0% 50%;
  }
}

@keyframes refracted-name {
  0% {
    background-position: 0% 50%, 12% 48%, 88% 40%;
  }

  45% {
    background-position: 48% 50%, 62% 38%, 36% 64%;
  }

  100% {
    background-position: 100% 50%, 90% 54%, 10% 42%;
  }
}

@keyframes glass-sheen-once {
  0% {
    background-position: 0% 50%;
    opacity: 0;
  }

  20% {
    opacity: 0.62;
  }

  80% {
    opacity: 0.62;
  }

  100% {
    background-position: 100% 50%;
    opacity: 0;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Orchestrated load: hero copy and side column rise in sequence. */
.index-hero .intro-copy > *:not(#intro-title),
.index-hero .profile-card {
  animation: rise-in 760ms cubic-bezier(0.45, 0, 0.18, 1) backwards;
}

.index-hero .intro-copy > .lead { animation-delay: 120ms; }
.index-hero .intro-copy > p:nth-of-type(2) { animation-delay: 200ms; }
.index-hero .intro-copy > p:nth-of-type(3) { animation-delay: 270ms; }
.index-hero .intro-copy > .link-row { animation-delay: 340ms; }
.index-hero .profile-card { animation-delay: 220ms; }

@media (prefers-reduced-motion: reduce) {
  #intro-title,
  #intro-title::before,
  #intro-title::after,
  .index-hero .intro-copy > *,
  .index-hero .profile-card {
    animation: none;
  }
  /* With no animation the ink overlay stays at its default (full ink), so the
     name shows as plain ink — the same calm resting state as everyone else. */
}

h2 {
  color: color-mix(in srgb, var(--ink) 62%, var(--muted));
  font-family: var(--font-ui);
  font-weight: 700;
  margin-bottom: 22px;
  font-size: clamp(0.98rem, 1.8vw, 1.22rem);
  line-height: 1.1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h3 {
  margin-bottom: 6px;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.lead {
  max-width: 600px;
  margin-bottom: 15px;
  color: color-mix(in srgb, var(--ink) 76%, var(--muted));
  font-size: 1.22rem;
  line-height: 1.52;
}

.intro-copy > p:not(.lead) {
  max-width: 600px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.62;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  font-family: var(--font-ui);
}

.link-row a {
  min-width: 68px;
  padding: 8px 0;
  border-bottom: 2px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.link-row a:hover {
  border-color: transparent;
}

.current-panel {
  padding: 15px 18px 17px;
}

.current-panel ul {
  margin: 0;
  padding-left: 18px;
}

.current-panel li {
  color: var(--muted);
  line-height: 1.55;
}

.current-panel a,
.news-band a,
.intro-copy > p a,
.research-authors a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--muted) 42%, transparent);
}

.current-panel a:hover,
.news-band a:hover,
.intro-copy > p a:hover,
.research-authors a:hover {
  color: var(--accent);
}

.current-panel li + li {
  margin-top: 12px;
}

.content-split,
.news-band {
  position: relative;
  padding: 48px 0 46px;
  border-bottom: 1px solid var(--rule);
}

.content-split::before,
.news-band::before {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  margin-bottom: 20px;
  background: color-mix(in srgb, var(--accent-2) 58%, var(--rule));
}

.education-item p {
  color: var(--muted);
  margin-bottom: 0;
}

.content-split {
  display: block;
}

#education {
  padding-top: 36px;
  padding-bottom: 24px;
}

.education-list {
  display: grid;
  gap: 0;
}

.education-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 9px 0;
  border-top: 1px solid var(--rule);
}

.education-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.education-date {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.84rem;
  white-space: nowrap;
}

.education-item h3 {
  margin-bottom: 2px;
  font-family: var(--font-ui);
  font-size: 0.98rem;
  font-weight: 700;
}

.education-item .school-upenn {
  color: #7a1f24;
}

.education-item .school-uw {
  color: #51406f;
}

/* Dark mode: the print-dark school hues fall below readable contrast on
   the near-black paper, so lift them to legible tints. */
:root[data-mode="dark"] .education-item .school-upenn {
  color: #e8959a;
}

:root[data-mode="dark"] .education-item .school-uw {
  color: #b6a6da;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-mode]) .education-item .school-upenn {
    color: #e8959a;
  }

  :root:not([data-mode]) .education-item .school-uw {
    color: #b6a6da;
  }
}

time {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.84rem;
}

.pub-doi {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.paper-action {
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.research-list {
  display: grid;
  gap: 0;
}

.research-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 26px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}

.research-item:first-child {
  padding-top: 0;
  border-top: 0;
}

/* Right-aligned venue/status margin note, matching the news/pub rhythm. */
.research-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-top: 0.32em;
  text-align: right;
}

.research-venue {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.research-year {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--muted);
}

.research-detail {
  display: grid;
  gap: 9px;
}

.research-title-line {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--ink);
}

.research-desc {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.62;
}

.research-authors {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.research-authors strong {
  font-weight: 700;
  color: var(--ink);
}

.research-actions {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 2px;
}

.news-band {
  display: block;
}

.news-band ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-band li {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 20px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  line-height: 1.5;
}

.news-band li:first-child {
  padding-top: 0;
  border-top: 0;
}

.news-band time {
  padding-top: 0.1em;
}

.blog-index {
  display: block;
  padding: 72px 0 64px;
}

.blog-index h1 {
  margin-bottom: 16px;
}

.post-list {
  display: grid;
  gap: 0;
}

.post-list-item {
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}

.post-list-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.post-list-item h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
}

.post-list-item h2 a {
  color: var(--ink);
  text-decoration: none;
}

.post-list-item h2 a:hover {
  color: var(--accent);
}

.post-list-item p,
.empty-note {
  max-width: 680px;
  color: var(--muted);
}

.construction-note {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.92rem;
}

.post-shell {
  max-width: 760px;
  padding: 72px 0 64px;
}

.post-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}

.post-header h1 {
  margin: 12px 0 14px;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
}

.back-link {
  color: var(--accent-2);
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.post-content {
  padding-top: 34px;
  font-size: 1.05rem;
}

.post-content h2,
.post-content h3 {
  margin-top: 2em;
}

.post-content p,
.post-content li {
  color: color-mix(in srgb, var(--ink) 84%, var(--muted));
}

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

.post-content pre {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--panel);
}

.post-content code {
  color: var(--code);
  font-family: var(--font-mono);
  font-size: 0.92em;
}

footer {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.84rem;
}

footer p {
  margin: 0;
}

@media (max-width: 820px) {
  .site-header,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .header-tools {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .hero,
  .content-split,
  .news-band,
  .blog-index {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero {
    min-height: 0;
    padding-top: 54px;
  }

  .profile-card {
    max-width: 320px;
  }
}

@media (max-width: 520px) {
  .site-header,
  main,
  footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  h1 {
    font-size: 2.45rem;
  }

  .education-item,
  .research-item,
  .news-band li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .research-meta {
    flex-direction: row;
    gap: 8px;
    text-align: left;
  }
}
