/* ─────────────────────────────────────────────────────────────────────
   Saud Khan — personal site
   Editorial-academic system; theme variables driven by Tweaks.
   ───────────────────────────────────────────────────────────────────── */

:root {
  --bg: #EDE6D8;
  --ink: #1A1714;
  --ink-90: rgba(26, 23, 20, .9);
  --ink-70: rgba(26, 23, 20, .7);
  --ink-55: rgba(26, 23, 20, .55);
  --ink-35: rgba(26, 23, 20, .35);
  --ink-12: rgba(26, 23, 20, .12);
  --ink-06: rgba(26, 23, 20, .06);
  --accent: #B0411F;
  --paper: #F4EFE3;
  --rule: rgba(26, 23, 20, .15);

  --serif: "Newsreader", "Source Serif 4", Georgia, serif;
  --sans:  "Geist", "IBM Plex Sans", -apple-system, system-ui, sans-serif;
  --mono:  "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  --max: 1280px;
  --gutter: 48px;
  --section: 120px;
}







[data-theme="lab"] {
  --bg: #131217;
  --ink: #ECE7DC;
  --ink-90: rgba(236, 231, 220, .92);
  --ink-70: rgba(236, 231, 220, .7);
  --ink-55: rgba(236, 231, 220, .55);
  --ink-35: rgba(236, 231, 220, .32);
  --ink-12: rgba(236, 231, 220, .14);
  --ink-06: rgba(236, 231, 220, .07);
  --accent: #E6A23C;
  --accent-2: #5BA398;
  --paper: #1A1920;
  --rule: rgba(236, 231, 220, .14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .35s ease, color .35s ease;
}

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

a {
  color: inherit;
  text-decoration: none;
}
a.link {
  border-bottom: 1px solid var(--ink-35);
  transition: border-color .2s ease, color .2s ease;
}
a.link:hover { border-bottom-color: var(--accent); color: var(--accent); }

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

/* ── Top nav ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.nav.scrolled { border-bottom-color: var(--ink-12); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.nav-brand .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  transform: translateY(-3px);
}
.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-70);
}
.nav-links a {
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transition: right .25s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.theme-toggle {
  background: none;
  border: 1px solid var(--rule);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-70);
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: color .2s ease, border-color .2s ease, transform .35s cubic-bezier(.2,.7,.2,1);
}
.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--ink-35);
}
.theme-toggle svg {
  width: 15px;
  height: 15px;
  transition: transform .45s cubic-bezier(.4,1.4,.4,1), opacity .25s ease;
}
.theme-toggle:active svg { transform: rotate(180deg) scale(.9); }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 90px 0 130px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: start;
  position: relative;
  z-index: 1;
}
.hero-portrait {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-portrait .portrait {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--rule);
  background: var(--paper);
}
.hero-portrait .portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-portrait .pcap {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-55);
}
.hero-portrait .pcap b { color: var(--ink); font-weight: 500; }
.hero-tag {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-55);
  margin: 0 0 36px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-tag::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--ink-35);
}

/* Framing switch — visitor-facing lens picker */
.frame-switch {
  display: inline-flex;
  align-items: stretch;
  margin: 0 0 40px;
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  user-select: none;
}
.frame-switch-label {
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--ink-55);
  border-right: 1px solid var(--rule);
  white-space: nowrap;
  font-size: 10.5px;
}
.frame-switch-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 10px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.frame-chip {
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 18px;
  font: inherit;
  color: var(--ink-55);
  letter-spacing: inherit;
  text-transform: inherit;
  border-right: 1px solid var(--rule);
  transition: color .2s ease, background .2s ease;
}
.frame-chip:last-child { border-right: none; }
.frame-chip:hover { color: var(--ink); background: var(--ink-06); }
.frame-chip.active {
  background: var(--ink);
  color: var(--bg);
}
.frame-locale {
  margin: 0 0 36px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-55);
  display: flex;
  align-items: center;
  gap: 12px;
}
.frame-locale::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--ink-35);
}

/* Hero swap animation when framing changes */
@keyframes hero-swap { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero-swap-anim { animation: hero-swap .55s cubic-bezier(.2,.7,.2,1) both; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 7.2vw, 104px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}
.hero-lede {
  margin: 56px 0 0;
  max-width: 720px;
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 350;
  line-height: 1.42;
  color: var(--ink-90);
  text-wrap: pretty;
}
.hero-meta {
  margin-top: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-55);
}
.hero-meta dt { color: var(--ink-35); margin-bottom: 6px; font-size: 10.5px; }
.hero-meta dd { margin: 0; color: var(--ink); font-size: 13px; }
.hero-meta dd a:hover { color: var(--accent); }

/* Orbits motif */
.orbit {
  position: absolute;
  right: -320px;
  top: -180px;
  width: 920px;
  height: 920px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease 0.2s;
  z-index: 0;
}

/* Wave-field motif (signal-propagation alternative) */
.waves {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  transition: opacity 1.2s ease .2s;
}
.waves.visible { opacity: .8; }
.waves svg {
  position: absolute;
  top: 50%;
  left: 0;
  height: 540px;
  width: 300%;
  transform: translateY(-50%);
}
.waves .wpath { fill: none; }
.waves .wpath.a { stroke: var(--accent); stroke-width: 1.2; opacity: .9; }
.waves .wpath.b { stroke: var(--ink); stroke-width: 0.9; opacity: .35; }
.waves .wpath.c { stroke: var(--accent); stroke-width: 0.8; opacity: .55; }
@keyframes drift-l { from { transform: translateX(0); } to { transform: translateX(-33.333%); } }
.waves .w1 { animation: drift-l 26s linear infinite; }
.waves .w2 { animation: drift-l 40s linear infinite; }
.waves .w3 { animation: drift-l 18s linear infinite; }
.orbit.visible { opacity: 1; }
.orbit svg { width: 100%; height: 100%; overflow: visible; }
.orbit .ring { fill: none; stroke: var(--ink); stroke-width: 0.5; opacity: 0.18; }
.orbit .sat { fill: var(--accent); }
.orbit .sat-ring { fill: none; stroke: var(--accent); stroke-width: 0.8; opacity: 0.6; }
.orbit .core { fill: var(--ink); }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.orbit .spin-1 { transform-origin: center; animation: orbit-spin 60s linear infinite; }
.orbit .spin-2 { transform-origin: center; animation: orbit-spin 90s linear infinite reverse; }
.orbit .spin-3 { transform-origin: center; animation: orbit-spin 120s linear infinite; }

/* ── Stats strip ─────────────────────────────────────────── */
.stats {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 36px 28px 32px;
  border-right: 1px solid var(--rule);
  position: relative;
}
.stat:last-child { border-right: none; }
.stat-num {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}
.stat-num .unit {
  font-family: var(--mono);
  font-size: 18px;
  vertical-align: super;
  margin-left: 4px;
  color: var(--ink-55);
}
.stat-lbl {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-55);
}

/* ── Section scaffold ─────────────────────────────────────── */
.section {
  padding: var(--section) 0;
  position: relative;
}
.section + .section { padding-top: calc(var(--section) - 24px); }

.section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  margin-bottom: 72px;
  align-items: start;
}
.section-num {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-55);
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
}
.section-num::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--ink-55);
}
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 760px;
  text-wrap: balance;
}
.section-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 300;
}

/* ── Research focus ──────────────────────────────────────── */
.focus {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.focus-card {
  background: var(--bg);
  padding: 44px 36px 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 380px;
  position: relative;
  transition: background .25s ease;
}
.focus-card:hover { background: var(--paper); }
.focus-no {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-35);
  letter-spacing: 0.1em;
}
.focus-glyph {
  width: 56px;
  height: 56px;
  margin-bottom: 6px;
}
.focus-glyph svg { width: 100%; height: 100%; overflow: visible; }
.focus-glyph .gline { fill: none; stroke: var(--ink); stroke-width: 1; }
.focus-glyph .gacc { fill: none; stroke: var(--accent); stroke-width: 1.4; }
.focus-glyph .gfill { fill: var(--accent); }
.focus-glyph .gdot { fill: var(--ink); }
.focus-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
}
.focus-desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-70);
  text-wrap: pretty;
}
.focus-tags {
  margin: auto 0 0;
  padding: 18px 0 0;
  border-top: 1px dashed var(--ink-12);
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-55);
}
.focus-tags li::before {
  content: "·";
  margin-right: 10px;
  color: var(--ink-35);
}
.focus-tags li:first-child::before { content: none; }

/* ── Publications ────────────────────────────────────────── */
.pubs { display: flex; flex-direction: column; }
.pub {
  display: grid;
  grid-template-columns: 70px 1fr 220px 80px;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  cursor: pointer;
  align-items: baseline;
  transition: background .2s ease;
  position: relative;
}
.pub:last-child { border-bottom: 1px solid var(--rule); }
.pub:hover { background: var(--ink-06); }
.pub-year {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-55);
  letter-spacing: 0.04em;
}
.pub-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
  transition: color .2s ease;
}
.pub:hover .pub-title { color: var(--accent); }
.pub-venue {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-55);
  text-wrap: balance;
}
.pub-if {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-55);
  text-align: right;
  letter-spacing: 0.04em;
}
.pub-if b { color: var(--ink); font-weight: 600; }

.pub-foot {
  margin-top: 36px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all .25s ease;
}
.btn:hover {
  background: var(--ink);
  color: var(--bg);
}
.btn.accent { border-color: var(--accent); color: var(--accent); }
.btn.accent:hover { background: var(--accent); color: var(--bg); }
.btn .arr { transition: transform .25s ease; }
.btn:hover .arr { transform: translateX(4px); }

/* ── Appointments ─────────────────────────────────────────── */
.appts { display: flex; flex-direction: column; }
.appt {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  padding: 40px 0;
  border-top: 1px solid var(--rule);
  position: relative;
}
.appt:last-child { border-bottom: 1px solid var(--rule); }
.appt-date {
  font-family: var(--mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-55);
  padding-top: 6px;
}
.appt-date .status {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.appt-date .status.past {
  background: transparent;
  border: 1px solid var(--ink-35);
  box-shadow: none;
}
.appt-role {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 6px;
}
.appt-org {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-55);
  margin: 0 0 18px;
  letter-spacing: 0.01em;
}
.appt-org b { color: var(--ink); font-weight: 500; }
.appt-desc {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-90);
  max-width: 680px;
  text-wrap: pretty;
}

/* ── Grants + awards grid ────────────────────────────────── */
.gridded {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.gcard {
  background: var(--bg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background .2s ease;
}
.gcard:hover { background: var(--paper); }
.gcard-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.gcard-kind {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-55);
}
.gcard-amount {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.03em;
  font-weight: 500;
}
.gcard-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.25;
  margin: 4px 0 0;
  text-wrap: balance;
}
.gcard-meta {
  margin: auto 0 0;
  padding-top: 18px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

/* ── Collaborators ────────────────────────────────────────── */
.collab {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.collab-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 24px;
  padding: 22px 28px 22px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.collab-row:nth-child(odd) { padding-right: 32px; border-right: 1px solid var(--rule); padding-left: 0;}
.collab-row:nth-child(even) { padding-left: 32px; }

.collab-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.collab-aff {
  font-size: 13px;
  color: var(--ink-55);
  margin: 0;
}
.collab-out {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-70);
  text-align: right;
  letter-spacing: 0.04em;
}
.collab-out .dim { color: var(--ink-35); }

/* ── Contact / footer ─────────────────────────────────────── */
.contact {
  padding: 140px 0 80px;
  position: relative;
}
.contact h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin: 0 0 56px;
  max-width: 1000px;
  text-wrap: balance;
}
.contact h2 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 300;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  border-top: 1px solid var(--rule);
  padding-top: 36px;
}
.contact-cell dt {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-55);
  margin-bottom: 12px;
}
.contact-cell dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.012em;
}

.footer {
  margin-top: 80px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-55);
}

/* ── Education ────────────────────────────────────────────── */
.edu-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule);
}
.edu-col {
  padding: 40px 48px 8px;
}
.edu-col:first-child {
  padding-left: 0;
  border-right: 1px solid var(--rule);
}
.edu-col:last-child {
  padding-right: 0;
}
.edu-col-head {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.edu-col-head .count {
  font-size: 10.5px;
  color: var(--ink-35);
  letter-spacing: 0.08em;
}
.edu-col-sub {
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  color: var(--ink-55);
  margin: 0 0 32px;
  line-height: 1.4;
  text-wrap: pretty;
}
.edu-item {
  padding: 24px 0;
  border-top: 1px solid var(--ink-06);
}
.edu-item:first-of-type { border-top: 1px solid var(--rule); }
.edu-item-year {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.edu-item-degree {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.2;
  margin: 0 0 8px;
}
.edu-item-thesis {
  font-size: 14px;
  color: var(--ink-70);
  font-style: italic;
  line-height: 1.5;
  margin: 0 0 12px;
  text-wrap: pretty;
}
.edu-item-org {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-55);
}

/* ── Service + certifications ─────────────────────────────── */
.service {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
}
.svc-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  font-weight: 500;
}
.svc-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.svc-col li {
  padding: 14px 0;
  border-bottom: 1px solid var(--ink-06);
}
.svc-col .si {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.svc-col .sn {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-55);
  margin-top: 6px;
}

.certs {
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px solid var(--rule);
}
.certs-h {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-55);
  margin: 0 0 20px;
}
.cert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.ctag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 9px 14px;
  transition: border-color .2s ease, color .2s ease;
}
.ctag:hover { border-color: var(--accent); color: var(--accent); }

/* ── Subtle reveal ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Density ─────────────────────────────────────────────── */
[data-density="compact"] {
  --section: 84px;
}
[data-density="compact"] .pub { padding: 20px 0; }
[data-density="compact"] .appt { padding: 28px 0; }

@media (max-width: 960px) {
  :root { --gutter: 28px; --section: 80px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-portrait { position: static; max-width: 260px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .focus { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; gap: 16px; }
  .appt { grid-template-columns: 1fr; gap: 12px; }
  .pub { grid-template-columns: 1fr; gap: 6px; }
  .pub-venue, .pub-if { text-align: left; }
  .collab { grid-template-columns: 1fr; }
  .collab-row { padding: 18px 0 !important; border-right: none !important; }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .gridded { grid-template-columns: 1fr; }
  .edu-split { grid-template-columns: 1fr; }
  .edu-col { padding: 32px 0 8px; }
  .edu-col:first-child { border-right: none; border-bottom: 1px solid var(--rule); padding-bottom: 32px; }
  .edu-col:last-child { padding-top: 32px; }
  .service { grid-template-columns: 1fr; gap: 40px; }
}


/* ── Custom Theme Toggle Icon Visibility ── */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}
[data-theme="paper"] .theme-toggle .icon-moon {
  display: block;
}
[data-theme="lab"] .theme-toggle .icon-sun {
  display: block;
}
