/* ============================================================
   Shujaatali Badami — Faculty-page aesthetic
   Light default · EB Garamond + Inter + JetBrains Mono
   Single muted crimson accent
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f5f1;       /* warm cream for rails/cards */
  --bg-sunken: #f0ede6;
  --ink: #1a1a1a;           /* body text */
  --ink-soft: #3a3a3a;
  --ink-dim: #666360;
  --ink-faint: #9a9790;
  --rule: #e3ddd1;          /* hairlines */
  --rule-strong: #c9c1b0;

  /* Single accent — muted academic crimson */
  --accent: oklch(0.45 0.12 20);
  --accent-soft: oklch(0.92 0.05 20);
  --accent-ink: oklch(0.35 0.14 20);

  --font-serif: "EB Garamond", "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1180px;
  --rail: 260px;
}

[data-theme="dark"] {
  --bg: #14130f;
  --bg-soft: #1c1b17;
  --bg-sunken: #0f0e0b;
  --ink: #ece8dd;
  --ink-soft: #c9c4b6;
  --ink-dim: #8a8578;
  --ink-faint: #5a564c;
  --rule: #2a281f;
  --rule-strong: #3a382d;
  --accent: oklch(0.72 0.12 20);
  --accent-soft: oklch(0.28 0.06 20);
  --accent-ink: oklch(0.8 0.1 20);
}

/* ---------- reset ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 0.5px; text-underline-offset: 2px; transition: color .15s; }
a:hover { color: var(--ink); text-decoration-thickness: 1px; }
[data-theme="dark"] a:hover { color: #fff; }

img { max-width: 100%; display: block; }
ul { padding-left: 1.2em; }
em { font-style: italic; }
strong, b { font-weight: 600; color: var(--ink); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.mono { font-family: var(--font-mono); font-feature-settings: normal; }
.sans { font-family: var(--font-sans); }

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

.noise-overlay { display: none; }

/* ---------- top bar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.5) blur(8px);
  -webkit-backdrop-filter: saturate(1.5) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 13px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav-brand:hover { color: var(--accent-ink); }
.brand-dot { display:none; }
.brand-id { color: var(--ink-faint); font-family: var(--font-mono); font-size: 11px; font-weight: 400; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none;
  font-weight: 400; letter-spacing: 0.01em;
  padding: 4px 0; border-bottom: 1px solid transparent;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent-ink); border-bottom-color: var(--accent); }
.nav-links .num { display: none; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  background: none; border: 1px solid var(--rule); color: var(--ink-soft);
  width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; font-size: 14px;
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }

.btn {
  display: inline-block; font-family: var(--font-sans);
  font-size: 13px; font-weight: 500;
  padding: 8px 14px; border: 1px solid var(--rule-strong);
  background: var(--bg); color: var(--ink);
  text-decoration: none; cursor: pointer;
  transition: all .15s;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn-primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }

/* ---------- hero (faculty page style) ---------- */
.hero { padding: 56px 0 40px; border-bottom: 1px solid var(--rule); }
.hero-grid {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  gap: 56px;
  align-items: start;
}

/* LEFT RAIL: headshot + identity */
.hero-left { position: sticky; top: 80px; }
.portrait-frame {
  width: 100%; aspect-ratio: 1/1;
  overflow: hidden;
  margin-bottom: 18px;
  position: relative;
  background: var(--bg);
}
.portrait-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 15%;
  filter: contrast(1.02) saturate(0.92);
}
.portrait-frame img.light-src { mix-blend-mode: multiply; }
.portrait-frame img.dark-src { mix-blend-mode: normal; filter: contrast(1.0) saturate(0.9) brightness(0.98); }
.identity-name {
  font-family: var(--font-serif);
  font-size: 26px; font-weight: 500;
  line-height: 1.15; margin: 0 0 4px;
  color: var(--ink);
}
.identity-title {
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}
.identity-affils {
  font-family: var(--font-sans);
  font-size: 12px; color: var(--ink-dim);
  line-height: 1.6;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
  margin-bottom: 14px;
}
.identity-affils div { margin-bottom: 7px; display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: start; line-height: 1.5; }
.identity-affils .k { color: var(--ink-faint); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; padding-top: 3px; white-space: nowrap; }
.identity-affils div > span:not(.k) { min-width: 0; word-break: break-word; }

.identity-links {
  list-style: none; padding: 0; margin: 0;
  font-family: var(--font-sans); font-size: 12.5px;
}
.identity-links li { padding: 5px 0; border-bottom: 1px dotted var(--rule); display: flex; justify-content: space-between; gap: 12px;}
.identity-links li:last-child { border-bottom: 0; }
.identity-links .lbl { color: var(--ink-faint); text-transform: lowercase; letter-spacing: 0.04em; }
.identity-links a { color: var(--ink-soft); text-decoration: none; }
.identity-links a:hover { color: var(--accent-ink); text-decoration: underline; }

/* RIGHT content */
.hero-right .eyebrow {
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 14px;
}
.display {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  color: var(--ink);
  text-wrap: balance;
}
.display em { font-style: italic; color: var(--accent-ink); }
h1.display { font-size: clamp(34px, 4.6vw, 54px); }

.hero-subtitle {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 22px;
  max-width: 62ch;
  text-wrap: pretty;
}
.hero-subtitle b { color: var(--ink); font-weight: 600; }

.hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.chip {
  font-family: var(--font-sans);
  font-size: 11.5px; font-weight: 500;
  padding: 4px 10px;
  border: 1px solid var(--rule-strong);
  color: var(--ink-soft);
  background: var(--bg);
  letter-spacing: 0.01em;
}
.chip.on { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* inline quantum viz (paper-figure treatment) */
.hero-fig {
  margin-top: 32px;
  border: 1px solid var(--rule);
  background: var(--bg-soft);
}
.viz-canvas {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
}
.viz-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  padding: 2px 6px;
}
.viz-label.tl { top: 10px; left: 10px; }
.viz-label.tr { top: 10px; right: 10px; }
.viz-label.bl { bottom: 10px; left: 10px; }
.viz-label.br { bottom: 10px; right: 10px; }
.fig-caption {
  font-family: var(--font-sans);
  font-size: 12px; color: var(--ink-dim);
  padding: 10px 16px;
  border-top: 1px solid var(--rule);
  line-height: 1.5;
}
.fig-caption b { color: var(--ink); font-weight: 600; }

/* ---------- AI quick facts (machine-readable block, preserved) ---------- */
.ai-quick-facts {
  margin-top: 32px;
  border: 1px solid var(--rule);
  background: var(--bg-soft);
}
.ai-quick-facts::before {
  content: "Quick Facts";
  display: block;
  font-family: var(--font-sans);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-dim);
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.qf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-family: var(--font-sans);
  font-size: 13px;
}
.qf-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 16px;
  border-bottom: 1px dotted var(--rule);
}
.qf-row:nth-last-child(-n+2) { border-bottom: 0; }
.qf-key { color: var(--ink-dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.qf-val { color: var(--ink); text-align: right; }
.qf-val a { color: var(--accent-ink); text-decoration: none; }
.qf-val a:hover { text-decoration: underline; }

/* ---------- section scaffold ---------- */
section { padding: 56px 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: 0; }

.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: baseline;
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.section-head .eyebrow {
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.section-title em { font-style: italic; color: var(--accent-ink); }
.section-title br { display: none; }
.kicker {
  font-size: 16px; color: var(--ink-dim);
  margin: 14px 0 0; max-width: 62ch;
}
.section-head .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.lead {
  font-size: 20px; line-height: 1.55;
  color: var(--ink); margin: 0 0 18px;
  max-width: 62ch;
}

/* ---------- NEWS (first section) ---------- */
.news-list {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 900px;
}
.news-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px dotted var(--rule);
  align-items: baseline;
}
.news-item:last-child { border-bottom: 0; }
.news-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.news-body { font-size: 17px; line-height: 1.55; color: var(--ink-soft); }
.news-body b { color: var(--ink); }
.news-body a { color: var(--accent-ink); }
.news-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid var(--accent);
  color: var(--accent-ink);
  background: var(--accent-soft);
  margin-right: 10px;
  vertical-align: 2px;
}
.news-body > .news-badge + * { margin-left: 0; }
.news-body { word-spacing: normal; }
.news-badge.muted { border-color: var(--rule-strong); color: var(--ink-soft); background: var(--bg-soft); }

/* ---------- stats ---------- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stat {
  padding: 22px 20px;
  border-right: 1px solid var(--rule);
}
.stat:last-child { border-right: 0; }
.stat .num {
  font-family: var(--font-serif);
  font-size: 42px; font-weight: 400;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 6px;
}
.stat .num .suf { font-size: 16px; color: var(--ink-dim); margin-left: 4px; font-family: var(--font-sans); font-weight: 500; }
.stat .lab {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: 0.01em;
}

/* ---------- about: two-column ---------- */
.editors-split {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
}
.editors-split p { font-size: 18px; line-height: 1.6; margin: 0 0 16px; color: var(--ink-soft); max-width: 62ch; }
.editors-block {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  padding: 20px 22px;
}
.editors-block h3 {
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.editors-block ul { list-style: none; padding: 0; margin: 0; font-family: var(--font-sans); font-size: 13px; }
.editors-block li {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dotted var(--rule);
  color: var(--ink-soft);
}
.editors-block li:last-child { border-bottom: 0; }
.editors-block li b { color: var(--ink); font-weight: 500; }
.editors-block li .val { color: var(--ink-dim); text-align: right; font-size: 12.5px; }

/* ---------- credentials ---------- */
.credentials-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
}
.cred-card {
  padding: 18px 18px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 4px;
  background: var(--bg);
}
.cred-card:nth-child(4n) { border-right: 0; }
.cred-card:nth-last-child(-n+2) { border-bottom: 0; }
.cred-org {
  font-family: var(--font-sans);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-dim);
}
.cred-title {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--ink);
  line-height: 1.25;
}
.cred-detail {
  font-family: var(--font-sans);
  font-size: 12px; color: var(--ink-dim);
  line-height: 1.45;
  margin-top: 2px;
}
.cred-verify {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-ink);
  letter-spacing: 0.04em;
}

/* ---------- research grid ---------- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
}
.ra {
  position: relative;
  padding: 20px 22px 22px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  background: var(--bg);
  transition: background .15s;
  display: block;
}
.ra:nth-child(3n) { border-right: 0; }
.ra:nth-last-child(-n+3):nth-child(3n+1),
.ra:nth-last-child(-n+3):nth-child(3n+1) ~ .ra { /* no-op, keeps structure */ }
.ra:hover { background: var(--bg-soft); color: var(--ink); }
.ra-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
}
.ra-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  margin: 6px 0 8px;
  color: var(--ink);
  line-height: 1.25;
}
.ra:hover .ra-title { color: var(--accent-ink); }
.ra-desc {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.ra-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ra-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}
.ra-arrow {
  position: absolute; top: 20px; right: 22px;
  font-family: var(--font-sans);
  color: var(--ink-faint); font-size: 14px;
  transition: transform .2s, color .15s;
}
.ra:hover .ra-arrow { color: var(--accent-ink); transform: translate(3px,-3px); }

/* Fix last-row borders for 3-col (11 items → last row has 2) */
.research-grid .ra:nth-last-child(1),
.research-grid .ra:nth-last-child(2) { border-bottom: 0; }
.research-grid .ra:nth-last-child(3):nth-child(3n+1) { border-bottom: 0; }

/* ---------- publications ---------- */
.pub-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.pub-filters button {
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 5px 12px;
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  color: var(--ink-soft);
  cursor: pointer;
  letter-spacing: 0.01em;
}
.pub-filters button:hover { border-color: var(--ink); color: var(--ink); }
.pub-filters button.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.pub-list { display: grid; grid-template-columns: 1fr; }
.pub {
  display: grid;
  grid-template-columns: 110px 1fr 140px;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.pub:first-child { border-top: 1px solid var(--rule); }
.pub-year {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
  display: flex; flex-direction: column; gap: 4px;
}
.venue-tag {
  font-size: 10px; color: var(--ink-faint);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.pub-body h3 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.pub-venue {
  font-family: var(--font-sans);
  font-size: 12.5px; color: var(--ink-dim);
  margin-bottom: 10px;
}
.pub-venue .dot { margin: 0 6px; color: var(--ink-faint); }
.pub-abstract {
  font-size: 16px; line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 12px;
  max-width: 70ch;
}
.pub-abstract b { color: var(--ink); }
.pub-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--font-mono);
  font-size: 10.5px; color: var(--ink-dim);
  letter-spacing: 0.02em;
  padding: 2px 6px;
  border: 1px solid var(--rule);
  background: var(--bg-soft);
  white-space: nowrap;
}
.tag.highlight { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.pub-actions {
  display: flex; flex-direction: column; gap: 8px;
  align-items: flex-end;
  font-family: var(--font-sans);
  font-size: 13px;
}
.pub-link {
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1px;
}
.pub-link:hover { border-bottom-color: var(--accent); color: var(--accent-ink); }

/* ---------- media ---------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.media-card {
  padding: 20px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 12px;
}
.media-outlet {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-dim);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.media-outlet .mt-type { color: var(--accent-ink); font-weight: 500; letter-spacing: 0.08em; }
.media-title {
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 500;
  line-height: 1.3;
  margin: 0;
  color: var(--ink);
}
.media-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
}
.media-link {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--accent-ink);
  text-decoration: none;
  margin-top: auto;
}
.media-link:hover { text-decoration: underline; }

/* ---------- service columns ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
.service-col h3 {
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.service-col ul { list-style: none; padding: 0; margin: 0; }
.service-col li {
  padding: 8px 0;
  border-bottom: 1px dotted var(--rule);
  font-size: 15px; color: var(--ink);
  font-family: var(--font-serif);
}
.service-col li b { display: block; color: var(--ink); font-weight: 500; font-size: 16px; }
.sv-role {
  display: block;
  font-family: var(--font-sans);
  font-size: 12px; color: var(--ink-dim);
  margin-top: 2px;
}

/* ---------- speaking ---------- */
.speak-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
}
.speak-topic {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 16px;
  padding: 22px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.speak-topic:nth-child(2n) { border-right: 0; }
.speak-topic:nth-last-child(-n+2) { border-bottom: 0; }
.sp-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
}
.sp-body h4 {
  font-family: var(--font-serif);
  font-size: 19px; font-weight: 500;
  margin: 0 0 6px;
  color: var(--ink);
  line-height: 1.25;
}
.sp-body p {
  font-size: 15px; line-height: 1.55;
  color: var(--ink-soft); margin: 0;
}

/* ---------- education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
}
.edu-card {
  padding: 20px;
  border-right: 1px solid var(--rule);
  background: var(--bg);
}
.edu-card:last-child { border-right: 0; }
.edu-deg {
  font-family: var(--font-serif);
  font-size: 17px; font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.25;
}
.edu-inst {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--ink-dim);
  margin-bottom: 10px;
}
.edu-wes {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-ink);
  letter-spacing: 0.04em;
}

/* ---------- cite ---------- */
.cite-block {
  border: 1px solid var(--rule);
  background: var(--bg-soft);
}
.cite-tabs {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.cite-tabs button {
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 500;
  padding: 10px 18px;
  background: none;
  border: 0;
  border-right: 1px solid var(--rule);
  color: var(--ink-dim);
  cursor: pointer;
  letter-spacing: 0.01em;
}
.cite-tabs button:hover { color: var(--ink); }
.cite-tabs button.active { color: var(--accent-ink); border-bottom: 2px solid var(--accent); margin-bottom: -1px; background: var(--bg-soft); }
.cite-body {
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.cite-copy {
  margin: 0 22px 18px;
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 6px 14px;
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  color: var(--ink-soft);
  cursor: pointer;
}
.cite-copy:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-copy .display { font-size: clamp(32px, 4vw, 44px); }
.contact-lines {
  list-style: none; padding: 0; margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  border-top: 1px solid var(--rule);
}
.contact-lines li {
  display: flex; gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dotted var(--rule);
}
.contact-lines .lbl {
  color: var(--ink-faint);
  width: 80px;
  text-transform: lowercase;
}
.contact-lines a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.contact-lines a:hover { color: var(--accent-ink); border-bottom-color: var(--accent); }

/* ---------- footer ---------- */
footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--rule);
  background: var(--bg-soft);
  font-family: var(--font-sans);
  font-size: 12.5px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.foot-col h4 {
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { padding: 4px 0; }
.foot-col a { color: var(--ink-soft); text-decoration: none; }
.foot-col a:hover { color: var(--accent-ink); text-decoration: underline; }
.foot-bottom {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ---------- reveal animation (subtle) ---------- */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .nav-links { gap: 14px; font-size: 13px; }
  .brand-id { display: none; }
  .nav-links a .num { display: none; }
}
@media (max-width: 1000px) {
  .nav-links { display: none; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-left { position: static; max-width: 380px; }
  .research-grid { grid-template-columns: repeat(2, 1fr); }
  .research-grid .ra:nth-child(3n) { border-right: 1px solid var(--rule); }
  .research-grid .ra:nth-child(2n) { border-right: 0; }
  .credentials-wall { grid-template-columns: repeat(2, 1fr); }
  .cred-card:nth-child(4n) { border-right: 1px solid var(--rule); }
  .cred-card:nth-child(2n) { border-right: 0; }
  .media-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; gap: 24px; }
  .edu-grid { grid-template-columns: repeat(2, 1fr); }
  .edu-card:nth-child(2n) { border-right: 0; }
  .edu-card:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .speak-list { grid-template-columns: 1fr; }
  .speak-topic { border-right: 0; }
  .editors-split { grid-template-columns: 1fr; gap: 28px; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .contact-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .qf-grid { grid-template-columns: 1fr; }
  .qf-row { border-bottom: 1px dotted var(--rule); }
  .qf-row:last-child { border-bottom: 0; }
  .pub { grid-template-columns: 90px 1fr; }
  .pub-actions { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; gap: 16px; }
  .nav-links { display: none; }
  .section-head { grid-template-columns: 1fr; }
  .section-head .meta { justify-self: start; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .container { padding: 0 20px; }
  .hero { padding: 32px 0 24px; }
  section { padding: 40px 0; }
  .section-head { margin-bottom: 24px; }
  .nav-inner { padding: 12px 20px; gap: 12px; }
  .brand-id { display: none; }
  .research-grid, .credentials-wall, .edu-grid { grid-template-columns: 1fr; }
  .research-grid .ra, .credentials-wall .cred-card, .edu-grid .edu-card { border-right: 0; }
  .stats-strip { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--rule); }
  .stat:last-child { border-bottom: 0; }
  .news-item { grid-template-columns: 1fr; gap: 4px; }
  .news-date { font-size: 11px; }
  .foot-grid { grid-template-columns: 1fr; gap: 20px; }
  .pub { grid-template-columns: 1fr; gap: 8px; }
  .pub-year { flex-direction: row; gap: 12px; align-items: baseline; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { text-align: center; }
}

/* ---------- a11y: focus rings + reduced motion ---------- */
:where(button, a, [role="button"], input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--accent, oklch(0.55 0.18 30));
  outline-offset: 2px;
  border-radius: 2px;
}
.theme-toggle:focus-visible,
.icon-btn:focus-visible {
  outline: 2px solid var(--accent, oklch(0.55 0.18 30));
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* print */
@media print {
  .nav, .hero-fig, .noise-overlay, .pub-filters, .cite-copy, footer { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: none; }
}
