/* ==========================================================================
   Shantanu Parmar — site styles
   Signal colors encode the kind of work everywhere on the site:
   gw = gravitational waves, radio = pulsars and radio, optical = optical,
   submm = submillimeter, hall = Hall thrusters, spray = electrospray,
   ground = imaging and ground-based work.
   ========================================================================== */
:root {
  --void: #060912;
  --deep: #0a0f1a;
  --panel: #0f1624;
  --line: #1c2536;
  --line-2: #2b3650;
  --text: #e8ecf4;
  --muted: #9aa5bb;
  --faint: #66728a;

  --gw: #8fb8ff;
  --radio: #c39bff;
  --optical: #ffd25a;
  --submm: #ff7a6b;
  --hall: #a59bff;
  --spray: #7fe3ff;
  --ground: #6fd6b4;

  --font: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --wide: 1180px;
  --read: 680px;
  --gutter: clamp(20px, 5vw, 56px);
  --header-h: 64px;
  color-scheme: dark;
}

:root[data-theme="day"] {
  --void: #f1f4f9;
  --deep: #e7ecf4;
  --panel: #ffffff;
  --line: #d5dce8;
  --line-2: #b9c3d4;
  --text: #121826;
  --muted: #4a5468;
  --faint: #6c768a;

  --gw: #2c5fb8;
  --radio: #7240d0;
  --optical: #9a6c00;
  --submm: #bf3a2a;
  --hall: #5145cf;
  --spray: #0a7fa3;
  --ground: #0f7f60;
  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--void); scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { background: var(--void) var(--stars, none) repeat; background-size: 420px 420px; }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, canvas { max-width: 100%; display: block; }
ul { list-style: none; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
::selection { background: var(--gw); color: var(--void); }
:focus-visible { outline: 2px solid var(--gw); outline-offset: 3px; }

h1, h2, h3 { font-weight: 500; line-height: 1.15; letter-spacing: -0.015em; }
h1 { font-size: clamp(40px, 6.2vw, 76px); letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.025em; }
h3 { font-size: 20px; line-height: 1.3; }
p { max-width: var(--read); }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); padding: 8px 12px; z-index: 200; }
.skip:focus { left: 8px; }

/* --------------------------------------------------------------------------
   Reticle brackets: the site's mark for "you are pointing at this".
   -------------------------------------------------------------------------- */
.reticle, .nav a[aria-current="page"], .nav a:hover {
  --rc: currentColor;
  --rl: 7px;
  background:
    linear-gradient(var(--rc), var(--rc)) top left / var(--rl) 1px,
    linear-gradient(var(--rc), var(--rc)) top left / 1px var(--rl),
    linear-gradient(var(--rc), var(--rc)) top right / var(--rl) 1px,
    linear-gradient(var(--rc), var(--rc)) top right / 1px var(--rl),
    linear-gradient(var(--rc), var(--rc)) bottom left / var(--rl) 1px,
    linear-gradient(var(--rc), var(--rc)) bottom left / 1px var(--rl),
    linear-gradient(var(--rc), var(--rc)) bottom right / var(--rl) 1px,
    linear-gradient(var(--rc), var(--rc)) bottom right / 1px var(--rl);
  background-repeat: no-repeat;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--void) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: var(--wide); height: 100%; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { font-weight: 500; font-size: 18px; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.nav ul { display: flex; gap: 4px; align-items: center; }
.nav a { display: block; padding: 7px 12px; text-decoration: none; color: var(--muted); font-size: 15px; transition: color .15s ease; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a:not([aria-current="page"]):hover { --rc: var(--line-2); }
.header-tools { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2);
  background: transparent; cursor: pointer; display: grid; place-items: center;
}
.theme-toggle span {
  width: 18px; height: 18px; border-radius: 50%; display: block;
  background: linear-gradient(90deg, #1c2a4a 50%, #8fd0ff 50%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
  transition: transform .5s ease;
}
:root[data-theme="day"] .theme-toggle span { transform: rotate(180deg); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); color: var(--text); padding: 6px 10px; font: inherit; font-size: 14px; cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--void); border-bottom: 1px solid var(--line); display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 16px; }
  .nav a { padding: 12px 10px; }
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.page-head { padding-top: clamp(26px, 4vw, 44px); padding-bottom: clamp(16px, 2.4vw, 26px); }
.page-head h1 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.025em; }
.page-head p { margin-top: 8px; font-size: 17px; color: var(--muted); }
.section-head { margin-bottom: 24px; }
.section-head h2, .section > .wrap > h2 { font-size: clamp(24px, 2.8vw, 32px); }
.section { padding: clamp(36px, 5vw, 64px) 0; border-top: 1px solid var(--line); }
.section > .wrap > h2 + p { margin-top: 12px; color: var(--muted); }

.group-title { font-size: 15px; font-weight: 500; color: var(--muted); margin: 48px 0 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.group-title:first-child { margin-top: 0; }

/* Signal dot and tags */
.sig { --s: var(--gw); }
.sig[data-signal="gw"] { --s: var(--gw); }
.sig[data-signal="radio"] { --s: var(--radio); }
.sig[data-signal="optical"] { --s: var(--optical); }
.sig[data-signal="submm"] { --s: var(--submm); }
.sig[data-signal="hall"] { --s: var(--hall); }
.sig[data-signal="spray"] { --s: var(--spray); }
.sig[data-signal="ground"] { --s: var(--ground); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--s); flex-shrink: 0; display: inline-block; }
.tags { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 10px; }
.tag { font-size: 14px; color: var(--s); display: inline-flex; align-items: center; gap: 7px; }
.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.is-talk { color: var(--text); }

/* Buttons and link rows */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px;
  border: 1px solid var(--line-2); color: var(--text); text-decoration: none; font-size: 15px;
  transition: border-color .15s ease, background .15s ease;
  background: transparent; font: inherit; font-size: 15px; cursor: pointer;
}
.btn:hover { border-color: var(--text); }
.btn.primary { background: var(--text); color: var(--void); border-color: var(--text); }
.btn.primary:hover { background: transparent; color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 15px; }
.links a { color: var(--text); }

/* --------------------------------------------------------------------------
   Research entries
   -------------------------------------------------------------------------- */
.entry {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px;
  padding: 32px 0; border-bottom: 1px solid var(--line);
  transition: outline-color .6s ease;
  outline: 1px solid transparent; outline-offset: 14px;
}
.entry:last-child { border-bottom: 0; }
.entry .media { aspect-ratio: 16 / 10; overflow: hidden; background: #000; border: 1px solid var(--line); }
.entry .media img, .entry .media video { width: 100%; height: 100%; object-fit: cover; }
.entry h3 { margin-bottom: 6px; }
.entry .meta { font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.entry .abstract { font-size: 16px; color: var(--muted); }
.entry .note { font-size: 13px; color: var(--faint); margin-top: 8px; }
.entry.is-lit { --rc: var(--s, var(--gw)); --rl: 14px; outline-color: transparent; }
.entry.is-lit { animation: lit 2.6s ease forwards; }
@keyframes lit { 0%, 70% { box-shadow: 0 0 0 1px var(--s, var(--gw)); } 100% { box-shadow: 0 0 0 1px transparent; } }
@media (max-width: 760px) { .entry { grid-template-columns: 1fr; gap: 18px; } }

/* --------------------------------------------------------------------------
   Home journey (scroll-driven)
   -------------------------------------------------------------------------- */
.journey { position: relative; height: 420vh; background: #02040a; }
.journey__stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.journey canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.journey__panel {
  position: absolute; color: #eef1f7; max-width: 420px; opacity: 0;
  transition: opacity .3s linear; pointer-events: none;
}
.journey__panel.is-on { pointer-events: auto; }
.journey__panel p { color: #b4bdd0; margin-top: 12px; }
.journey__panel h2 { font-size: clamp(26px, 3.2vw, 38px); }
.journey__panel .kind { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: #b4bdd0; margin-bottom: 10px; }
.journey__hero { left: 0; right: 0; top: 18vh; margin: 0 auto; max-width: none; text-align: center; padding: 0 var(--gutter); }
.journey__hero h1 { font-size: clamp(44px, 8vw, 104px); }
.journey__hero p { margin: 16px auto 0; font-size: clamp(17px, 1.6vw, 20px); color: #c3cad8; }
.journey__hero .actions { justify-content: center; }
.journey__hero .btn { color: #eef1f7; border-color: rgba(238,241,247,.35); }
.journey__hero .btn.primary { background: #eef1f7; color: #060912; }
.journey__hero .btn.primary:hover { background: transparent; color: #eef1f7; }
.journey__hint { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; font-size: 14px; color: #8a94ab; }
.journey__skip { color: #c3cad8; }
.p-right { right: var(--gutter); top: 30vh; }
.p-left { left: var(--gutter); top: 18vh; }
@media (max-width: 760px) {
  .journey { height: 360vh; }
  .p-right, .p-left { left: var(--gutter); right: var(--gutter); top: auto; bottom: 10vh; max-width: none; background: rgba(2,4,10,.72); padding: 16px; }
}

/* --------------------------------------------------------------------------
   Projects
   -------------------------------------------------------------------------- */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.project { background: var(--void); display: flex; flex-direction: column; }
.project canvas { width: 100%; aspect-ratio: 16 / 10; height: auto; background: #03060c; }
.project__body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.project h3 { font-size: 18px; }
.project p { font-size: 15px; color: var(--muted); margin-top: 6px; }
.project .links { margin-top: auto; padding-top: 14px; }
.project:hover h3 { color: var(--s); }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.bio { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; }
.bio img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--line); filter: saturate(.9); }
.bio p + p { margin-top: 16px; }
@media (max-width: 760px) { .bio { grid-template-columns: 1fr; } .bio img { max-width: 220px; } }

.path { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.path__globe { position: relative; aspect-ratio: 1; max-width: 560px; width: 100%; margin: 0 auto; }
.path__globe canvas { width: 100%; height: 100%; }
.stops li { border-bottom: 1px solid var(--line); }
.stops button {
  width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer;
  display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 12px 8px;
}
.stops button[aria-pressed="true"] { --rc: var(--s); }
.stops .dot { transform: translateY(-1px); }
.stops strong { font-weight: 500; display: block; }
.stops span.sub { font-size: 14px; color: var(--muted); }
.stops span.yrs { font-size: 14px; color: var(--muted); white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); margin-top: 16px; }
.legend i { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--s); margin-right: 6px; vertical-align: middle; }
.legend i.dashed { border-top-style: dashed; }
@media (max-width: 860px) { .path { grid-template-columns: 1fr; } }

details.edu { border-bottom: 1px solid var(--line); }
details.edu summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; gap: 16px; align-items: baseline; padding: 18px 4px;
}
details.edu summary::-webkit-details-marker { display: none; }
details.edu summary h3 { font-size: 19px; }
details.edu summary .yrs { color: var(--muted); font-size: 15px; white-space: nowrap; }
details.edu summary .chev { color: var(--muted); transition: transform .2s ease; text-align: center; }
details.edu[open] summary .chev { transform: rotate(45deg); }
details.edu .body { padding: 0 4px 22px; color: var(--muted); font-size: 15px; }
details.edu .body li { padding: 5px 0; }
details.edu .body b { color: var(--text); font-weight: 500; }

.assoc { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.assoc a { background: var(--void); padding: 20px; text-decoration: none; display: flex; gap: 14px; align-items: center; }
.assoc img { width: 44px; height: 44px; object-fit: contain; background: #fff; padding: 4px; }
.assoc span { font-size: 15px; color: var(--muted); }
.assoc b { display: block; color: var(--text); font-weight: 500; }

/* --------------------------------------------------------------------------
   Outreach
   -------------------------------------------------------------------------- */
.trace { position: relative; border: 1px solid var(--line); background: #03060c; }
.trace canvas { width: 100%; height: 220px; }
.trace__tip { position: absolute; pointer-events: none; background: rgba(3,6,12,.92); color: #e8ecf4; font-size: 14px; padding: 8px 10px; max-width: 280px; border: 1px solid #2b3650; opacity: 0; transition: opacity .15s; }
.trace__tip.is-on { opacity: 1; }
.talks li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.talks li:last-child { border-bottom: 0; }
.talks a { white-space: nowrap; font-size: 15px; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.message { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center; }
.message canvas { width: 230px; height: auto; image-rendering: pixelated; cursor: crosshair; }
.decoded li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.decoded li span { color: var(--muted); font-size: 15px; }
.decoded address { font-style: normal; color: var(--muted); line-height: 1.5; }
@media (max-width: 760px) { .message { grid-template-columns: 1fr; } .message canvas { width: 180px; } }

.plates { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 18px; scroll-snap-type: x proximity; }
.plate { flex: 0 0 auto; scroll-snap-align: start; background: #0c0f14; padding: 10px 10px 30px; border: 1px solid #262c38; position: relative; }
.plate img { width: 170px; height: 220px; object-fit: cover; filter: contrast(1.05) saturate(.85); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.plate figcaption { position: absolute; left: 10px; bottom: 8px; font-size: 13px; color: #8a94ab; }

/* --------------------------------------------------------------------------
   CV
   -------------------------------------------------------------------------- */
.cv h2 { font-size: 24px; margin: 48px 0 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.cv .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 12px 0; }
.cv .row + .row { border-top: 1px solid var(--line); }
.cv .row b { font-weight: 500; }
.cv .row .when { color: var(--muted); font-size: 15px; white-space: nowrap; }
.cv .row p, .cv .row li { color: var(--muted); font-size: 15px; }
.cv .row ul { margin-top: 4px; }
.cv .row li { padding-left: 14px; position: relative; }
.cv .row li::before { content: ''; position: absolute; left: 0; top: .7em; width: 5px; height: 1px; background: var(--faint); }
.cv .pub { padding: 10px 0; color: var(--muted); }
.cv .pub b { color: var(--text); font-weight: 500; }
.lightcurve { position: relative; border: 1px solid var(--line); background: #03060c; margin-top: 8px; }
.lightcurve canvas { width: 100%; height: 200px; }
.cv-contact { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); margin-top: 14px; }

@media print {
  :root, :root[data-theme="day"] { --void: #fff; --text: #000; --muted: #333; --faint: #555; --line: #ccc; color-scheme: light; }
  .site-header, .site-footer, .lightcurve, .no-print { display: none !important; }
  body { font-size: 11pt; }
  .page-head { padding: 0 0 12px; }
  .cv h2 { margin-top: 18px; font-size: 14pt; }
  a { text-decoration: none; }
}

/* --------------------------------------------------------------------------
   Footer: live sky
   -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 0; }
.sky { position: relative; background: #02040a; }
.sky canvas { width: 100%; height: 170px; }
.sky__label { position: absolute; left: var(--gutter); top: 14px; font-size: 14px; color: #a7b0c4; }
.footer-inner { max-width: var(--wide); margin: 0 auto; padding: 22px var(--gutter) 34px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 15px; color: var(--muted); }
.footer-inner ul { display: flex; gap: 18px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Research banner (js/space-banner.js)
   -------------------------------------------------------------------------- */
.space-banner { margin-top: 8px; }
.space-banner__stage { position: relative; background: #02040a; border: 1px solid var(--line); overflow: hidden; }
.space-banner canvas { display: block; width: 100%; height: 340px; }
.space-banner__hit { position: absolute; background: transparent; border: 0; padding: 0; pointer-events: none; }
.space-banner__hit:focus-visible { outline: 2px dashed #9fc3ff; outline-offset: 2px; }
.space-banner__caption { position: absolute; top: 12px; left: 12px; margin: 0; padding: 6px 10px; font-size: 14px; color: #e8ecf4; background: rgba(2,4,10,.72); pointer-events: none; opacity: 0; transition: opacity .2s ease; }
.space-banner__caption.is-on { opacity: 1; }
.space-banner__hint { font-size: 14px; color: var(--muted); margin-top: 10px; }
.research-card.is-lit, .entry.is-lit { animation: lit 2.6s ease forwards; }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.lost { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; text-align: center; padding: 40px var(--gutter); }
.lost canvas { width: min(640px, 100%); height: 120px; margin: 0 auto 28px; }
.lost p { margin: 14px auto 0; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* --------------------------------------------------------------------------
   Research: publications links at the top right
   -------------------------------------------------------------------------- */
.research-top { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px 16px; padding: 18px 0 14px; font-size: 15px; color: var(--muted); }
.research-top a { color: var(--text); }

/* --------------------------------------------------------------------------
   CV rendered from the PDF
   -------------------------------------------------------------------------- */
.cv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: clamp(24px, 3.5vw, 40px) 0 18px; border-bottom: 1px dashed var(--line-2); }
.cv-head h1 { font-size: clamp(26px, 4.2vw, 44px); white-space: nowrap; letter-spacing: -0.02em; }
.cv-contact { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; font-size: 15px; color: var(--muted); }
.cv-contact a { text-decoration: none; color: var(--muted); }
.cv-contact a:hover { color: var(--text); }
.cv-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cv-actions .btn { padding: 8px 14px; font-size: 14px; }
#cv .lightcurve { margin-top: 22px; }
.cv-sec h2 { font-size: 21px; text-align: center; margin: 34px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.cv-entry { padding: 6px 0 8px; }
.cv-row { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 18px; padding: 1px 0; font-size: 15.5px; line-height: 1.5; }
.cv-row .l { padding-left: min(calc(var(--in, 0) * .55em), 2.4em); color: var(--muted); }
.cv-row .r { color: var(--muted); font-size: 14.5px; }
.cv-row strong { color: var(--text); font-weight: 600; }
.cv-row.k-head .l { color: var(--text); }
.cv-row.k-bullet .l { position: relative; padding-left: 1.3em; }
.cv-row.k-bullet .l::before { content: '–'; position: absolute; left: .2em; color: var(--faint); }
.cv-row .u { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.cv-row a { color: var(--text); }
.cv-row sup { font-size: .7em; }
.cv-source { font-size: 13px; margin-top: 28px; }
@media (max-width: 700px) {
  .cv-head { flex-direction: column; }
  .cv-head h1 { white-space: normal; }
  .cv-row { grid-template-columns: 1fr; gap: 0; }
  .cv-row .r:empty { display: none; }
  .cv-row .r { padding-left: 1.3em; font-size: 14px; }
}
@media print {
  .cv-head { border-bottom: 1px dashed #999; padding-top: 0; }
  .cv-sec { break-inside: auto; }
  .cv-entry { break-inside: avoid; }
  .cv-row { font-size: 10.5pt; grid-template-columns: 1fr 1.7in; }
  .cv-row .r { font-size: 10pt; }
  .cv-sec h2 { font-size: 13pt; margin: 12px 0 4px; }
  .cv-source { display: none; }
  body { background: #fff !important; }
}

/* --------------------------------------------------------------------------
   Outreach video previews
   -------------------------------------------------------------------------- */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px 22px; margin-bottom: 12px; }
.video { display: flex; flex-direction: column; gap: 10px; outline-offset: 8px; }
.video__frame, .video__player { aspect-ratio: 16 / 9; width: 100%; border: 1px solid var(--line); background: #03060c; display: block; }
.video__frame { position: relative; padding: 0; cursor: pointer; overflow: hidden; }
.video__frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.7) brightness(.82); transition: filter .25s ease, transform .4s ease; }
.video__frame:hover img, .video__frame:focus-visible img { filter: none; transform: scale(1.025); }
.video__frame::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--s); opacity: .8; }
.video__play { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #eef1f7; background: rgba(3,6,12,.72); padding: 5px 10px 5px 8px; }
.video__play::before { content: ''; width: 0; height: 0; border-left: 7px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.video h3 { font-size: 16px; font-weight: 500; line-height: 1.4; }
.video .links { margin-top: 0; font-size: 14px; }
.video.reticle { --rc: var(--s); --rl: 14px; }

/* --------------------------------------------------------------------------
   Contact: drifting photo collage and lightbox
   -------------------------------------------------------------------------- */
.drift { position: relative; height: clamp(320px, 42vw, 470px); overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.drift.is-dragging { cursor: grabbing; }
.drift__track { position: absolute; inset: 0; will-change: transform; }
.drift__item { position: absolute; padding: 0; border: 0; background: #0c1018; cursor: zoom-in; transform: rotate(var(--r)); transition: transform .35s ease, box-shadow .35s ease; box-shadow: 0 10px 30px rgba(0,0,0,.45); border-radius: 2px; overflow: hidden; }
.drift__item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.drift__item:hover, .drift__item:focus-visible { transform: rotate(0deg) scale(1.07); z-index: 50 !important; box-shadow: 0 18px 50px rgba(0,0,0,.6); }
.drift-hint { font-size: 14px; color: var(--muted); margin-top: 10px; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(2,4,10,.92); }
.lightbox__inner { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; box-shadow: 0 20px 80px rgba(0,0,0,.6); }
.lightbox button { position: absolute; background: rgba(15,22,36,.8); color: #eef1f7; border: 1px solid #2b3650; font: inherit; font-size: 14px; padding: 9px 14px; cursor: pointer; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__close { right: 16px; top: 16px; }
.lightbox__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #a7b0c4; font-size: 14px; }

/* --------------------------------------------------------------------------
   Education images inside the dropdowns
   -------------------------------------------------------------------------- */
details.edu .edu-img { display: block; max-height: 150px; max-width: 100%; width: auto; margin: 2px 0 14px; border: 1px solid var(--line); background: #fff; }

/* --------------------------------------------------------------------------
   Footer: memberships and affiliations
   -------------------------------------------------------------------------- */
.affil { border-top: 1px solid var(--line); padding: 22px var(--gutter) 6px; text-align: center; }
.affil p { font-size: 13px; color: var(--muted); margin: 0 auto 12px; }
.affil ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 18px; }
.affil a { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 13.5px; color: var(--muted); text-align: left; }
.affil a:hover { color: var(--text); }
.affil img { width: 34px; height: 34px; object-fit: contain; background: #fff; padding: 3px; border-radius: 2px; }
.affil b { display: block; font-weight: 500; color: var(--text); font-size: 13.5px; }
.footer-inner { justify-content: center; text-align: center; }

/* Path timeline: virtual tag, live leg, dotted legend line */
.stops .mode { font-size: 12px; font-weight: 400; color: var(--muted); border: 1px solid var(--line-2); padding: 0 6px; margin-left: 6px; vertical-align: 2px; }
.stops button.is-live .dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--s) 30%, transparent); }
.stops button.is-live strong { color: var(--s); }
.legend i.dotted { border-top-style: dotted; border-top-width: 3px; }
.path { align-items: start; }
.path__globe { position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 860px) { .path__globe { position: relative; top: 0; } }

/* ==========================================================================
   The Logbook (blog): a parchment scroll in a cartographer's hand
   ========================================================================== */
.scroll-wrap { max-width: 900px; margin: clamp(22px, 4vw, 44px) auto clamp(48px, 7vw, 90px); padding: 0 clamp(10px, 3vw, 28px); position: relative; }
.roller {
  height: 30px; margin: 0 -18px; border-radius: 15px; position: relative; z-index: 2;
  background: linear-gradient(180deg, #3e2612 0%, #8a5a2b 28%, #c48f52 45%, #8a5a2b 70%, #3a2310 100%);
  box-shadow: 0 6px 14px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,220,170,.25);
}
.roller::before, .roller::after {
  content: ''; position: absolute; top: 50%; width: 30px; height: 40px; transform: translateY(-50%); border-radius: 8px;
  background: radial-gradient(ellipse at 35% 35%, #d9a868, #7a4c22 55%, #3a2310);
  box-shadow: 0 4px 10px rgba(0,0,0,.4);
}
.roller::before { left: -16px; } .roller::after { right: -16px; }
.roller--top { margin-bottom: -10px; } .roller--bottom { margin-top: -10px; }

.parchment {
  position: relative; overflow: hidden; color: #33231a;
  background-color: #eadcbc; background-image: var(--parchment); background-size: 480px 480px;
  box-shadow: inset 0 0 90px rgba(110, 70, 25, .45), inset 0 0 18px rgba(90, 55, 20, .5);
  padding: clamp(36px, 6vw, 72px) clamp(22px, 7vw, 86px) clamp(30px, 5vw, 56px);
  font-family: 'IM Fell English', 'Iowan Old Style', Georgia, serif; font-size: 19px; line-height: 1.68;
}
.parchment ::selection { background: #7a2e14; color: #f3e7cc; }
.rhumbs { position: absolute; top: 0; right: 0; width: 100%; height: 900px; pointer-events: none; opacity: .5; }
.lb-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; margin-bottom: 26px; }
.lb-head h1 { font-family: 'IM Fell English SC', 'IM Fell English', Georgia, serif; font-weight: 400; font-size: clamp(38px, 6vw, 60px); letter-spacing: .01em; color: #2a1a0e; line-height: 1.05; }
.lb-sub { font-style: italic; color: #5b4330; margin-top: 8px; max-width: 34ch; }
.rose { width: clamp(96px, 14vw, 140px); height: auto; }
.lb-index { grid-column: 1 / -1; margin-top: 10px; }
.lb-index h2 { font-family: 'IM Fell English SC', Georgia, serif; font-weight: 400; font-size: 21px; color: #7a2e14; letter-spacing: .04em; margin-bottom: 6px; }
.lb-index ol { list-style: none; }
.lb-index a { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: #33231a; padding: 2px 0; }
.lb-index a:hover .t { color: #7a2e14; }
.lb-index .t { flex-shrink: 1; min-width: 0; }
.lb-index .leader { flex: 1; border-bottom: 2px dotted rgba(80, 50, 25, .45); transform: translateY(-5px); min-width: 20px; }
.lb-index .d { font-style: italic; color: #5b4330; white-space: nowrap; font-size: 17px; }

.entry-scroll { padding-top: 12px; scroll-margin-top: calc(var(--header-h) + 20px); }
.lb-entry-head { text-align: center; margin-bottom: 18px; }
.lb-period { font-family: 'IM Fell English SC', Georgia, serif; color: #7a2e14; letter-spacing: .12em; font-size: 15px; margin: 0 auto; max-width: none; }
.lb-entry-head h2 { font-family: 'IM Fell English SC', Georgia, serif; font-weight: 400; font-size: clamp(28px, 4vw, 38px); color: #2a1a0e; letter-spacing: .01em; margin: 2px 0 4px; }
.lb-date { font-style: italic; color: #5b4330; margin: 0 auto; max-width: none; font-size: 17px; }
.lb-place { display: block; font-size: 15.5px; opacity: .85; }
.lb-body { max-width: 62ch; margin: 0 auto; }
.lb-body p { margin: 0 0 14px; max-width: none; }
.lb-body > p:first-child::first-letter {
  font-family: 'IM Fell English SC', Georgia, serif; float: left; font-size: 3.4em; line-height: .8; padding: 6px 8px 0 0; color: #7a2e14;
}
.lb-body h3, .lb-body h4 { font-family: 'IM Fell English SC', Georgia, serif; font-weight: 400; color: #2a1a0e; font-size: 24px; margin: 22px 0 8px; }
.lb-body a { color: #7a2e14; text-decoration: underline dotted; text-underline-offset: 3px; }
.lb-body strong { color: #22150b; }
.lb-body ul, .lb-body ol { margin: 0 0 14px 1.4em; }
.lb-body ul { list-style: none; } .lb-body ul li::before { content: '❧'; color: #7a2e14; margin-left: -1.3em; width: 1.3em; display: inline-block; }
.lb-body ol { list-style: lower-roman; }
.lb-body blockquote { margin: 18px 0; padding: 4px 0 4px 18px; border-left: 2px solid rgba(122, 46, 20, .55); font-style: italic; color: #4a3424; }
.lb-body code { font-family: inherit; font-style: italic; background: rgba(120, 80, 30, .1); padding: 0 4px; }
.lb-body hr { border: 0; text-align: center; margin: 18px 0; } .lb-body hr::after { content: '⁂'; color: #7a2e14; }
.lb-body img { max-width: 100%; border: 6px solid #f4ecd8; box-shadow: 0 6px 16px rgba(60, 35, 10, .35); margin: 8px auto; }
.lb-rule { display: flex; align-items: center; gap: 12px; margin: 34px 0 26px; }
.lb-rule span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(90, 55, 25, .55), transparent); }
.lb-entries > .lb-rule:last-child { display: none; }
.lb-more { display: block; margin: 0 auto 8px; font: inherit; font-style: italic; color: #33231a; background: transparent; border: 1px solid rgba(80, 50, 25, .5); padding: 8px 18px; cursor: pointer; }
.lb-more:hover { background: rgba(122, 46, 20, .08); }
.lb-end, .lb-empty { text-align: center; font-style: italic; color: #5b4330; margin: 10px auto 0; }

/* photo reels: aged prints that pan across the page */
.reel { overflow-x: auto; overflow-y: hidden; margin: 6px -6px 22px; padding: 12px 6px 16px; scrollbar-width: thin; scrollbar-color: rgba(90, 55, 25, .5) transparent; outline-offset: 4px; }
.reel:focus-visible { outline: 1px dashed #7a2e14; }
.reel__track { display: flex; gap: 20px; width: max-content; align-items: flex-start; }
.print { flex: 0 0 auto; transform: rotate(var(--r)); transition: transform .3s ease; }
.print:hover { transform: rotate(0deg) translateY(-4px); }
.print button { display: block; padding: 0; border: 7px solid #f4ecd8; border-bottom-width: 9px; background: #f4ecd8; cursor: zoom-in; box-shadow: 0 6px 14px rgba(60, 35, 10, .35); }
.print img { height: clamp(120px, 18vw, 160px); width: auto; display: block; filter: sepia(.18) saturate(.9) contrast(1.02); }
.print figcaption { font-style: italic; font-size: 14.5px; color: #5b4330; text-align: center; margin-top: 6px; max-width: 220px; margin-left: auto; margin-right: auto; }
@media (max-width: 640px) {
  .parchment { font-size: 17.5px; }
  .lb-head { grid-template-columns: 1fr; }
  .rose { position: absolute; right: -6px; top: -18px; width: 82px; opacity: .8; }
  .roller { margin: 0 -6px; }
}
@media print { .roller, .rhumbs, .reel { display: none; } .parchment { box-shadow: none; background: #fff; clip-path: none !important; } }
.lb-more[hidden] { display: none; }

/* inline formula: escape velocity in the home intro */
.esc { white-space: nowrap; font-style: normal; cursor: help; }
.esc .vinc { border-top: 1.5px solid currentColor; padding: 0 .12em 0 .08em; margin-left: .02em; }
.esc i { font-style: italic; font-family: 'Times New Roman', Georgia, serif; font-size: 1.05em; }

/* Logbook: folded previews */
.lb-body { transition: max-height .6s ease; }
.lb-body.is-folded { overflow: hidden; cursor: pointer;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent); mask-image: linear-gradient(180deg, #000 45%, transparent); }
.lb-read { display: block; margin: 6px auto 0; font: inherit; font-style: italic; font-size: 17px; color: #7a2e14; background: none; border: 0; border-bottom: 1px dotted rgba(122, 46, 20, .6); padding: 2px 4px; cursor: pointer; }
.lb-read::before { content: '❧ '; }
.lb-read:hover { color: #4a1a0a; }
.lb-read[hidden] { display: none; }
@media print { .lb-body.is-folded { max-height: none !important; -webkit-mask-image: none; mask-image: none; } .lb-read { display: none; } }
