/* ==========================================================================
   Deepak Pathak — site styles
   ========================================================================== */

/* Self-hosted variable fonts (SIL Open Font License, see /fonts) */
@font-face {
  font-family: "Newsreader"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(../fonts/newsreader-latin-ext-standard-normal.woff2) format("woff2-variations"), url(../fonts/newsreader-latin-ext-standard-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(../fonts/newsreader-latin-standard-normal.woff2) format("woff2-variations"), url(../fonts/newsreader-latin-standard-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations"), url(../fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(../fonts/inter-latin-wght-normal.woff2) format("woff2-variations"), url(../fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --tint: #f2eee6;
  --ink: #16150f;
  --ink-2: #3b3932;
  --muted: #6f6b62;
  --faint: #a29d92;
  --rule: #e6e1d7;
  --accent: #8b2e24;          /* a quiet claret — awards, highlights */
  --accent-soft: rgba(139, 46, 36, .08);
  --link: #16150f;
  --link-line: rgba(22, 21, 15, .25);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --label-col: 210px;
  --radius: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11110f;
    --surface: #181815;
    --tint: #1d1c19;
    --ink: #f1ede4;
    --ink-2: #cfcabe;
    --muted: #9a958a;
    --faint: #6e6a61;
    --rule: #2a2925;
    --accent: #e1998d;
    --accent-soft: rgba(225, 153, 141, .1);
    --link: #f1ede4;
    --link-line: rgba(241, 237, 228, .28);
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img, video { display: block; max-width: 100%; }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s var(--ease), text-decoration-color .2s var(--ease);
}
a:hover { color: var(--accent); text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

p { margin: 0 0 1em; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.muted { color: var(--muted); }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 6px; z-index: 100;
}
.skip:focus { left: 12px; }

/* ------------------------------------------------------------- top bar */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.topbar.is-scrolled { border-bottom-color: var(--rule); }
.topbar-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.topbar-name {
  font-family: var(--serif); font-size: 19px; color: var(--ink); text-decoration: none;
  letter-spacing: -.01em;
  opacity: 0; transform: translateY(4px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.topbar.is-scrolled .topbar-name { opacity: 1; transform: none; }
.topbar-nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.topbar-nav a {
  font-size: 13.5px; letter-spacing: .02em; color: var(--muted); text-decoration: none; position: relative; padding: 4px 0;
}
.topbar-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.topbar-nav a:hover, .topbar-nav a.is-active { color: var(--ink); }
.topbar-nav a.is-active::after { transform: scaleX(1); }

/* ------------------------------------------------------------- hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(240px, 27vw, 320px);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
  padding-top: clamp(112px, 16vh, 168px);
  padding-bottom: clamp(56px, 8vw, 96px);
}
.hero-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(46px, 7.2vw, 84px);
  line-height: 1;
  letter-spacing: -.025em;
  color: var(--ink);
  margin: 0 0 26px;
  font-variation-settings: "opsz" 72;
}
.hero-roles {
  list-style: none; margin: 0 0 34px; padding: 0;
  font-family: var(--serif); font-size: clamp(18px, 2vw, 21px); line-height: 1.45; color: var(--ink-2);
}
.hero-roles li + li { margin-top: 2px; }
.hero-bio { max-width: 60ch; font-size: 16.5px; }
.hero-bio p { margin-bottom: .9em; }
.hero-links {
  list-style: none; padding: 0; margin: 30px 0 18px;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.hero-links a, .hero-links button {
  display: inline-flex; cursor: pointer; font-family: inherit; align-items: center; height: 34px; padding: 0 14px;
  border: 1px solid var(--rule); border-radius: 999px;
  font-size: 13.5px; font-weight: 500; letter-spacing: .01em;
  color: var(--ink); text-decoration: none; background: var(--surface);
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.hero-links a:hover, .hero-links button:hover, .hero-links button[aria-expanded="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.hero-email { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin: 0; }
.hero-email .label { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.hero-email .email { font-family: var(--mono); font-size: 13.5px; color: var(--ink-2); }
.hero-email .email a { font-family: var(--sans); font-size: 12.5px; margin-left: 6px; color: var(--muted); }

.hero-portrait { margin: 6px 0 0; }
.hero-portrait a { display: block; border-radius: 14px; overflow: hidden; background: var(--tint); }
.hero-portrait img {
  width: 100%; height: auto; aspect-ratio: 1473 / 1600; object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.hero-portrait a:hover img { transform: scale(1.02); }

/* ------------------------------------------------------------- sections */
.section {
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  padding-top: clamp(44px, 6vw, 72px);
  padding-bottom: clamp(44px, 6vw, 72px);
  position: relative;
}
.section::before {
  content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter);
  height: 1px; background: var(--rule);
}
.section-label h2 {
  font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1;
  letter-spacing: -.015em; color: var(--ink); margin: 0;
  position: sticky; top: 92px;
}
.section-label { position: relative; }
.section-meta { font-size: 12.5px; color: var(--faint); margin: 10px 0 0; letter-spacing: .02em; position: sticky; top: 132px; }
.section-body { min-width: 0; }
.lead { font-size: 16.5px; max-width: 68ch; }

/* ------------------------------------------------------------- news */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li {
  padding: 12px 0; border-bottom: 1px solid var(--rule);
  font-size: 15.5px; line-height: 1.55;
}
.news-list li:first-child { padding-top: 0; }
.collapsible .news-list li:first-child { padding-top: 12px; }

/* ------------------------------------------------------------- collapsibles */
.collapsible {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .5s var(--ease);
}
.collapsible[data-open="true"] { grid-template-rows: 1fr; }
.collapsible-inner { overflow: hidden; min-height: 0; }
.collapsible:not([data-open="true"]) .collapsible-inner { visibility: hidden; transition: visibility 0s .5s; }
.no-js .collapsible { grid-template-rows: 1fr; }
.no-js .collapsible .collapsible-inner { visibility: visible; }
.no-js .more-btn { display: none; }

.more-btn {
  appearance: none; border: 0; background: none; padding: 0; margin-top: 16px; cursor: pointer;
  font: 500 13.5px/1 var(--sans); letter-spacing: .01em; color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
}
.more-btn::after {
  content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .3s var(--ease);
}
.more-btn[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.more-btn:hover { color: var(--accent); }
.more-btn [data-label-open] { display: none; }
.more-btn[aria-expanded="true"] [data-label-open] { display: inline; }
.more-btn[aria-expanded="true"] [data-label-closed] { display: none; }

/* ------------------------------------------------------------- group */
.join {
  margin: 28px 0 36px; padding: 18px 22px;
  background: var(--tint); border-radius: var(--radius);
  font-size: 15px; line-height: 1.6;
}
.join p { margin: 0; }
.people-grid {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px 40px;
}
.people-col { display: grid; gap: 28px; align-content: start; }
.people-col--wide ul { columns: 2 190px; column-gap: 40px; }
.people h3, .people-former h3 {
  font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 12px;
}
.people ul, .alumni { list-style: none; margin: 0; padding: 0; }
.people li { padding: 4px 0; font-size: 15.5px; line-height: 1.45; break-inside: avoid; }
.people li .muted { display: block; }
.people li .muted, .alumni .muted { font-size: 13.5px; }
.people-former { margin-top: 44px; }
.alumni { columns: 2 300px; column-gap: 40px; }
.alumni li { break-inside: avoid; padding: 7px 0; font-size: 15px; line-height: 1.45; border-bottom: 1px solid var(--rule); }
.alumni li .muted { display: block; }

/* ------------------------------------------------------------- publications */
.pub-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px;
  position: sticky; top: 60px; z-index: 5;
  padding: 12px 0; margin-top: -12px;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.seg {
  position: relative; display: inline-flex; padding: 3px; border-radius: 999px;
  background: var(--tint); border: 1px solid var(--rule);
}
.seg button {
  position: relative; z-index: 1; appearance: none; border: 0; background: none; cursor: pointer;
  height: 32px; padding: 0 16px; border-radius: 999px;
  font: 500 13.5px/1 var(--sans); color: var(--muted); letter-spacing: .01em;
  display: inline-flex; align-items: center; gap: 7px;
  transition: color .25s var(--ease);
}
.seg button[aria-pressed="true"] { color: var(--ink); }
.seg .count { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.seg-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: 0; border-radius: 999px;
  background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 0 0 1px var(--rule);
  transition: transform .35s var(--ease), width .35s var(--ease);
}
.search {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--surface);
  color: var(--faint); min-width: min(260px, 100%); flex: 0 1 280px;
  transition: border-color .2s var(--ease);
}
.search:focus-within { border-color: var(--ink-2); color: var(--ink-2); }
.search svg { width: 16px; height: 16px; flex: none; }
.search input {
  border: 0; outline: 0; background: none; width: 100%;
  font: 14px var(--sans); color: var(--ink);
}
.search input::placeholder { color: var(--faint); }
.pub-hint { font-size: 13px; color: var(--faint); margin: 6px 0 10px; }

.pub {
  display: grid;
  grid-template-columns: clamp(180px, 24vw, 260px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 34px);
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}
.pub:first-child { border-top: 0; }
.pub[hidden], .pub.is-filtered, .pub.is-deferred { display: none; }
.js:not(.pubs-ready) .pub:not([data-selected]) { display: none; }


.pub-media {
  display: grid; gap: 6px; align-self: start;
  aspect-ratio: 16 / 10; padding: 0;
  border-radius: var(--radius); overflow: hidden;
  background: var(--tint);
  outline: 1px solid var(--rule); outline-offset: -1px;
}
.pub-media > img, .pub-media > video, .pub-media figure img, .pub-media figure video {
  width: 100%; height: 100%; object-fit: contain; min-height: 0;
  transition: transform .9s var(--ease);
}
.pub-media:hover > img, .pub-media:hover > video { transform: scale(1.025); }
.pub-media.is-pair { grid-template-columns: 1fr 1fr; padding: 6px; }
.pub-media.is-stack { grid-template-rows: 1fr 1fr; padding: 6px; }
.pub-media.is-pair > *, .pub-media.is-stack > * { border-radius: 6px; overflow: hidden; min-height: 0; }
.pub-media figure { margin: 0; position: relative; display: grid; min-height: 0; }
.pub-media figcaption {
  position: absolute; left: 6px; bottom: 6px; font-size: 11px; letter-spacing: .04em;
  background: rgba(0,0,0,.55); color: #fff; padding: 1px 7px; border-radius: 99px;
}

.pub-body { min-width: 0; }
.pub-title {
  font-family: var(--serif); font-weight: 500; font-size: 20.5px; line-height: 1.3;
  letter-spacing: -.008em; margin: -3px 0 8px; color: var(--ink);
  font-variation-settings: "opsz" 24;
}
.pub-title a { text-decoration: none; color: inherit; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .45s var(--ease), color .2s var(--ease); }
.pub-title a:hover { color: var(--accent); background-size: 100% 1px; }
.pub-authors { font-size: 14.5px; line-height: 1.55; color: var(--muted); margin: 0 0 6px; }
.pub-authors .me { color: var(--ink); font-weight: 600; }
.pub-venue { font-size: 14px; font-weight: 500; color: var(--ink-2); margin: 0 0 4px; }
.pub-venue em { font-style: normal; }
.pub-venue a, .pub-note a { color: inherit; }
.flag {
  color: var(--accent); font-weight: 500;
}
.flag::before { content: "·"; color: var(--faint); margin: 0 .45em 0 .35em; }
.pub-award {
  font-size: 13.5px; font-weight: 500; color: var(--accent); margin: 0 0 4px;
  display: flex; gap: 7px; align-items: baseline;
}
.pub-award::before {
  content: ""; flex: none; width: 9px; height: 9px; transform: translateY(-1px) rotate(45deg);
  border: 1.5px solid currentColor; border-radius: 1px;
}
.pub-note { font-size: 13.5px; color: var(--muted); margin: 0 0 4px; }

.pub[data-selected] .pub-venue::after {
  content: "Selected";
  display: none; vertical-align: 1px;
  margin-left: 10px; padding: 2px 8px; border-radius: 99px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
}
[data-mode="all"] .pub[data-selected] .pub-venue::after { display: inline-block; }

.pub-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-top: 12px;
  font-size: 13.5px;
}
.pub-links a { color: var(--ink-2); text-decoration-color: transparent; }
.pub-links a:hover { color: var(--accent); text-decoration-color: currentColor; }
.pub-toggle {
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px;
}
.pub-toggle::after {
  content: ""; width: 6px; height: 6px; border-right: 1.3px solid currentColor; border-bottom: 1.3px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .3s var(--ease);
}
.pub-toggle[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.pub-toggle:hover, .pub-toggle[aria-expanded="true"] { color: var(--accent); }

.pub-panel {
  margin-top: 14px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--tint); position: relative;
  animation: panelIn .4s var(--ease);
}
@keyframes panelIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pub-panel p { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); text-align: left; }
.pub-panel pre {
  margin: 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--ink-2);
  white-space: pre-wrap; overflow-wrap: anywhere; padding-right: 64px;
}
.copy-btn {
  position: absolute; top: 10px; right: 10px;
  appearance: none; border: 1px solid var(--rule); background: var(--surface); color: var(--muted);
  font: 500 12px/1 var(--sans); padding: 7px 10px; border-radius: 6px; cursor: pointer;
}
.copy-btn:hover { color: var(--ink); border-color: var(--ink-2); }

.pub-footer { padding-top: 18px; border-top: 1px solid var(--rule); text-align: center; }
.pub-status { font-size: 13px; color: var(--faint); margin: 0; }
.pub-status:empty { display: none; }
#pub-sentinel { height: 1px; }

mark { background: var(--accent-soft); color: inherit; border-radius: 2px; padding: 0 1px; }

.pub.is-flash { animation: flash 2.2s var(--ease); }
@keyframes flash { 0%, 30% { background: var(--accent-soft); } 100% { background: transparent; } }

/* ------------------------------------------------------------- footer */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px;
  padding-top: 40px; padding-bottom: 56px; position: relative;
}
.site-footer::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--rule); }
.footer-name { font-family: var(--serif); font-size: 20px; color: var(--ink); margin: 0; }
.footer-meta { font-size: 13px; color: var(--faint); margin: 0; flex: 1; }
.to-top { font-size: 13px; color: var(--muted); text-decoration: none; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .section { grid-template-columns: 1fr; gap: 22px; }
  .section-label h2, .section-meta { position: static; }
  .section-label { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
  .section-meta { margin: 0; }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .people-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding-top: 96px; gap: 28px; }
  .hero-portrait { order: -1; max-width: 168px; margin: 0; }
  .hero-portrait a { border-radius: 50%; aspect-ratio: 1; }
  .hero-portrait img { aspect-ratio: 1; object-position: 50% 30%; }
  .hero-name { margin-bottom: 18px; }
  .hero-roles { margin-bottom: 24px; }
  .hero-links { gap: 8px; }
  .hero-links a, .hero-links button { height: 32px; padding: 0 12px; font-size: 13px; }
  .topbar-inner { height: 54px; }
  .topbar-nav { gap: 18px; }
  .topbar-nav a { font-size: 13px; }
  .pub-toolbar { position: static; margin-top: 0; padding-top: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .seg, .search { flex: 1 1 auto; }
  .seg button { flex: 1; justify-content: center; }

  .pub { grid-template-columns: 1fr; gap: 16px; padding: 26px 0; }
  .pub-media { aspect-ratio: 16 / 9; }
  .pub-title { font-size: 19.5px; }
  .alumni { columns: 1; }
  .section-label h2 { font-size: 26px; }
}

@media (max-width: 420px) {
  .topbar-name { display: none; }
  .topbar-inner { justify-content: center; }
}

/* ------------------------------------------------------------- writing (home) */
.writing-list { list-style: none; margin: 0; padding: 0; }
.writing-list li + li { margin-top: 14px; }
.essay-card {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(180px, 22.5vw, 248px); gap: clamp(20px, 3vw, 34px);
  align-items: center; padding: 22px; margin: -22px;
  border-radius: 14px; text-decoration: none; color: inherit;
  transition: background .35s var(--ease);
}
.essay-card:hover { background: var(--tint); color: inherit; }
.essay-card-meta { font-size: 12.5px; letter-spacing: .04em; color: var(--faint); margin: 0 0 8px; }
.essay-card-title {
  font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.5vw, 29px); line-height: 1.15;
  letter-spacing: -.015em; color: var(--ink); margin: 0 0 10px;
}
.essay-card-dek { font-size: 15.5px; color: var(--ink-2); margin: 0 0 14px; max-width: 52ch; }
.essay-card-cta { font-size: 13.5px; font-weight: 500; color: var(--ink); display: inline-flex; gap: 6px; }
.essay-card-cta span { display: inline-block; transition: transform .35s var(--ease); }
.essay-card:hover .essay-card-cta { color: var(--accent); }
.essay-card:hover .essay-card-cta span { transform: translate(2px, -2px); }
.essay-card-thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #111;
  outline: 1px solid var(--rule); outline-offset: -1px;
}
.essay-card-thumb img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.01); transition: transform 1s var(--ease); }
.essay-card:hover .essay-card-thumb img { transform: scale(1.05); }
@media (max-width: 720px) {
  /* phones: small thumbnail beside the title instead of a full-width video preview */
  .essay-card { grid-template-columns: minmax(0, 1fr) 112px; gap: 16px; align-items: start; padding: 18px; margin: 0; }
  .essay-card-thumb { aspect-ratio: 16 / 9; border-radius: 8px; margin-top: 6px; }
  .essay-card-thumb img { transform: scale(1.01); }
      .essay-card-title { font-size: 22px; }
}

/* flywheel thumbnail (Writing card): drawn in the page's own ink, so it follows light/dark mode */
.essay-card-thumb--loop { background: var(--ink); color: var(--bg); display: grid; place-items: center; outline: 0; }
.essay-card-thumb--loop svg { width: 100%; height: 100%; display: block; }
.essay-card-thumb--loop path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.essay-card-thumb--loop circle { fill: currentColor; }
.essay-card-thumb--loop text { fill: currentColor; font-family: var(--serif); font-size: 18.5px; letter-spacing: .01em; }
.essay-card-thumb--loop marker path { fill: currentColor; stroke: none; }
.loop-spin { transform-origin: 160px 98px; transform-box: view-box; }
@media (prefers-reduced-motion: no-preference) {
  .loop-spin { transition: transform 1.6s cubic-bezier(.45, 0, .2, 1); }
  .essay-card:hover .loop-spin { transform: rotate(120deg); }
}
@media (max-width: 720px) {
  /* too small for words on phones: just the loop, drawn a little bolder */
  .essay-card-thumb--loop .loop-labels { display: none; }
  .essay-card-thumb--loop path { stroke-width: 3; }
  .essay-card-thumb--loop circle { r: 6px; }
}

/* touch screens have no hover: show the card tint all the time so each piece reads as its own card */
@media (hover: none) {
  .essay-card { background: var(--tint); }
  .essay-card:active { background: color-mix(in srgb, var(--tint) 80%, var(--ink) 6%); }
}

/* ------------------------------------------------------------- videos: never hijack taps (no fullscreen on phones) */
.pub-media video { pointer-events: none; -webkit-touch-callout: none; }

/* ------------------------------------------------------------- scroll reveal */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal:not(.is-in) { opacity: 0; }
  .js .reveal { transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
  .js .reveal:not(.is-in) { transform: translateY(40px); }

  .js .pub.reveal .pub-media { transition: clip-path 1.2s cubic-bezier(.65,.05,.2,1), opacity .8s var(--ease); }
  .js .pub.reveal:not(.is-in) .pub-media { clip-path: inset(14% 10% 14% 10% round 18px); opacity: .2; }
  .js .pub.reveal.is-in .pub-media { clip-path: inset(0 0 0 0 round var(--radius)); }
  .js .pub.reveal .pub-media > img, .js .pub.reveal .pub-media > video,
  .js .pub.reveal .pub-media figure { transition: transform 1.6s cubic-bezier(.2,.7,.1,1); }
  .js .pub.reveal:not(.is-in) .pub-media > img, .js .pub.reveal:not(.is-in) .pub-media > video,
  .js .pub.reveal:not(.is-in) .pub-media figure { transform: scale(1.18); }

  .js .pub.reveal .pub-body > * { transition: opacity .8s var(--ease), transform .9s var(--ease), filter .8s var(--ease); }
  .js .pub.reveal:not(.is-in) .pub-body > * { opacity: 0; transform: translateY(18px); filter: blur(4px); }
  .js .pub.reveal.is-in .pub-body > :nth-child(1) { transition-delay: .12s; }
  .js .pub.reveal.is-in .pub-body > :nth-child(2) { transition-delay: .2s; }
  .js .pub.reveal.is-in .pub-body > :nth-child(3) { transition-delay: .27s; }
  .js .pub.reveal.is-in .pub-body > :nth-child(4) { transition-delay: .33s; }
  .js .pub.reveal.is-in .pub-body > :nth-child(5) { transition-delay: .38s; }
  .js .pub.reveal.is-in .pub-body > :nth-child(n+6) { transition-delay: .42s; }
  .js .pub.reveal.is-in .pub-body > .pub-panel { transition-delay: 0s; }

  .js .hero .hero-text > *, .js .hero .hero-portrait { animation: heroIn 1.1s var(--ease) both; }
  .js .hero .hero-text > :nth-child(2) { animation-delay: .08s; }
  .js .hero .hero-text > :nth-child(3) { animation-delay: .16s; }
  .js .hero .hero-text > :nth-child(n+4) { animation-delay: .24s; }
  .js .hero .hero-portrait { animation-name: portraitIn; animation-duration: 1.4s; animation-delay: .1s; }
}
@keyframes heroIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes portraitIn { from { opacity: 0; clip-path: inset(8% 8% 8% 8% round 24px); } to { opacity: 1; clip-path: inset(0 round 14px); } }

/* loader shown while the next batch of papers is being revealed */
.pub-loader { display: flex; justify-content: center; gap: 7px; height: 0; overflow: hidden; opacity: 0; transition: opacity .3s var(--ease), height .3s var(--ease); }
.pub-loader.is-on { height: 40px; opacity: 1; align-items: center; }
.pub-loader span { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: dot 1s var(--ease) infinite; }
.pub-loader span:nth-child(2) { animation-delay: .15s; }
.pub-loader span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-6px); opacity: 1; } }

/* ------------------------------------------------------------- bio (opens in place) */
.bio-toggle { gap: 7px; }
.bio-toggle::after {
  content: ""; width: 5px; height: 5px; border-right: 1.3px solid currentColor; border-bottom: 1.3px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .35s var(--ease);
}
.bio-toggle[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.bio-panel { margin: -4px 0 0; }
.bio-panel[data-open="true"] { margin-bottom: 22px; }
.bio-card {
  margin-top: 4px; padding: 20px 24px 22px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--rule);
  box-shadow: 0 18px 40px -28px rgba(22, 21, 15, .35);
}
.bio-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.bio-card-label { font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.bio-card-actions { display: inline-flex; gap: 16px; font-size: 12.5px; }
.bio-card-actions a, .bio-copy { color: var(--muted); text-decoration: none; }
.bio-copy { appearance: none; border: 0; background: none; padding: 0; font: inherit; cursor: pointer; }
.bio-card-actions a:hover, .bio-copy:hover { color: var(--accent); }
.bio-card p {
  margin: 0; font-family: var(--serif); font-size: 17.5px; line-height: 1.62; color: var(--ink-2);
  font-variation-settings: "opsz" 18; max-width: 62ch;
}
.bio-card p a { color: inherit; }
@media (prefers-reduced-motion: no-preference) {
  .js .bio-panel .bio-card { opacity: 0; transform: translateY(-8px) scale(.985); filter: blur(4px); transform-origin: 50% 0;
    transition: opacity .5s var(--ease), transform .7s var(--ease), filter .5s var(--ease); }
  .js .bio-panel[data-open="true"] .bio-card { opacity: 1; transform: none; filter: none; transition-delay: .08s; }
  .bio-panel { transition: grid-template-rows .7s cubic-bezier(.2, .7, .1, 1), margin .7s cubic-bezier(.2, .7, .1, 1); }
}
@media (max-width: 720px) {
  .bio-card { padding: 16px 18px 18px; }
  .bio-card p { font-size: 16.5px; }
}

/* ------------------------------------------------------------- compact News & Research Group */
.news-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.news-list li, .news-list li:first-child, .collapsible .news-list li:first-child { padding: 6px 0; font-size: 15px; line-height: 1.5; }
#news .news-list li { border-bottom: 0; }
#ResearchGroup .lead { font-size: 15.5px; line-height: 1.65; }
.join { margin: 20px 0 30px; padding: 14px 18px; font-size: 14.5px; }
.people-grid { gap: 24px 40px; }
.people h3, .people-former h3 { margin-bottom: 8px; }
.people li { padding: 2px 0; font-size: 15px; }
.people li .muted { font-size: 12.5px; margin-top: -1px; }
.people-former { margin-top: 32px; }
.alumni li { border-bottom: 0; padding: 4px 0; font-size: 14.5px; line-height: 1.45; }
.alumni li .muted { display: inline; font-size: 13px; }
@media (max-width: 720px) {
  .news-list { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------- "Show more" unrolls item by item */
.collapsible { transition: grid-template-rows .75s cubic-bezier(.2, .7, .1, 1); }
@media (prefers-reduced-motion: no-preference) {
  .js .collapsible li {
    opacity: 0; transform: translateY(16px); filter: blur(4px);
    transition: opacity .55s var(--ease), transform .8s var(--ease), filter .55s var(--ease);
    transition-delay: calc(var(--i, 0) * 45ms + 90ms);
  }
  .js .collapsible[data-open="true"] li { opacity: 1; transform: none; filter: none; }
  .js .collapsible:not([data-open="true"]) li { transition-delay: 0s; transition-duration: .2s; }
}

@media print {
  .reveal, .reveal * { opacity: 1 !important; transform: none !important; clip-path: none !important; filter: none !important; }
  .topbar, .pub-toolbar, .more-btn, .pub-toggle, .copy-btn, .pub-footer { display: none !important; }
  .pub.is-deferred, .pub.is-filtered { display: grid !important; }
  .collapsible { grid-template-rows: 1fr !important; }
  .collapsible-inner { visibility: visible !important; }
  body { background: #fff; }
}
