/* ═══════════════════════════════════════════════════════════════════
   rakeshnaik — site stylesheet

   The palette comes from the physics on this site. A Raman map is read
   against a dark field, so the site is dark by default. Gold is the
   plasmonic metal that makes SERS work — it is the primary accent. The
   warm red and cool cyan are the Stokes and anti-Stokes directions a
   scattered photon can shift, and they are used only where something
   genuinely splits in two directions.
═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Field */
  --void:      #0f0a18;
  --void-2:    #171026;
  --void-3:    #211735;
  --hairline:  rgba(255, 255, 255, .10);
  --hairline-2:rgba(255, 255, 255, .18);

  /* Light band */
  --paper:     #f3f1f7;
  --paper-2:   #e9e6f1;
  --ink:       #150f20;

  /* Type on dark */
  --text:      #efeaf6;
  --text-2:    #b6acc8;
  --text-3:    #837a94;

  /* Metal + signal */
  --au:        #e0a82e;
  --au-soft:   rgba(224, 168, 46, .14);
  --au-line:   rgba(224, 168, 46, .38);
  --stokes:    #e2566e;
  --anti:      #45bfd6;

  /* Type roles */
  --display: 'Bricolage Grotesque', 'IBM Plex Sans', system-ui, sans-serif;
  --body:    'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  /* Rhythm */
  --gut:     clamp(20px, 5vw, 48px);
  --stack:   clamp(64px, 9vw, 128px);
  --measure: 68ch;
  --radius:  14px;
  --radius-s: 9px;
  --ease:    cubic-bezier(.22, .61, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--body);
  background: var(--void);
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: var(--au); color: var(--void); }

:focus-visible {
  outline: 2px solid var(--au);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--au); color: var(--void);
  padding: 12px 20px; font-weight: 700; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: calc(1240px + var(--gut) * 2);
  margin-inline: auto;
  padding-inline: var(--gut);
}
/* On its own, .narrow caps a nested block. Combined with .wrap it must also
   absorb the page gutter, or the block ends up two gutters too wide. */
.narrow { max-width: var(--measure); }
.wrap.narrow { max-width: calc(var(--measure) + var(--gut) * 2); }

/* ═══════════════════════════════════════════════════════════════════
   Type scale
═══════════════════════════════════════════════════════════════════ */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.6rem, 7.5vw, 5.2rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.15rem, 1.9vw, 1.45rem); letter-spacing: -0.015em; }
h4 { font-size: 1rem; letter-spacing: -0.01em; }

p + p { margin-top: 1.1em; }

.lede {
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.6;
  color: var(--text-2);
}

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--au);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--au-line), transparent);
}

.mono { font-family: var(--mono); }

/* ═══════════════════════════════════════════════════════════════════
   Navigation
═══════════════════════════════════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 10, 24, .78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--hairline); }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 68px;
}

.brand {
  font-family: var(--display);
  font-size: 1.2rem; font-weight: 800; letter-spacing: -0.03em;
  text-decoration: none; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap;
}
.brand-mark { width: 26px; height: 26px; flex-shrink: 0; }
.brand em { font-style: normal; color: var(--au); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative;
  font-size: .875rem; font-weight: 500;
  color: var(--text-2); text-decoration: none;
  padding: 8px 13px; border-radius: 7px;
  transition: color .18s var(--ease), background .18s var(--ease);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-links a.current { color: var(--au); }

.nav-cta {
  font-family: var(--mono);
  font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  color: var(--au) !important;
  border: 1px solid var(--au-line);
  background: var(--au-soft) !important;
  padding: 8px 14px !important;
  margin-left: 6px;
}
.nav-cta:hover { background: rgba(224,168,46,.22) !important; border-color: var(--au); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  background: transparent; border: 1px solid var(--hairline);
  border-radius: 9px; color: var(--text); cursor: pointer;
  align-items: center; justify-content: center;
}

@media (max-width: 1080px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--void-2);
    border-bottom: 1px solid var(--hairline);
    padding: 14px var(--gut) 24px;
    transform: translateY(-8px);
    opacity: 0; pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
  }
  .nav-links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 13px 12px; font-size: 1rem; }
  .nav-cta { margin-left: 0; text-align: center; }
}

/* Scroll progress — a thin gold line, nothing more */
.scroll-line {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--au); z-index: 200;
  transition: width .08s linear;
}

/* ═══════════════════════════════════════════════════════════════════
   Hero — the signature. An SVG spectrum draws itself behind the name,
   and each labelled band explains what it is when you hover or tap it.
═══════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex; align-items: center;
  padding: clamp(56px, 10vh, 110px) 0 clamp(40px, 7vh, 80px);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(58% 50% at 22% 32%, rgba(224,168,46,.13), transparent 68%),
    radial-gradient(48% 44% at 82% 68%, rgba(69,191,214,.08), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-status {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-2);
  border: 1px solid var(--hairline);
  border-radius: 100px; padding: 7px 15px 7px 11px;
  margin-bottom: 26px;
}
.hero-status .pip {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--au);
  box-shadow: 0 0 0 0 rgba(224,168,46,.6);
  animation: pip 2.6s var(--ease) infinite;
}
@keyframes pip {
  0%   { box-shadow: 0 0 0 0 rgba(224,168,46,.55); }
  70%  { box-shadow: 0 0 0 9px rgba(224,168,46,0); }
  100% { box-shadow: 0 0 0 0 rgba(224,168,46,0); }
}

.hero h1 { margin-bottom: 22px; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero h1 .line > span {
  display: block;
  transform: translateY(105%);
  animation: riseIn .95s var(--ease) forwards;
}
.hero h1 .line:nth-child(2) > span { animation-delay: .09s; }
.hero h1 em { font-style: normal; color: var(--au); }

@keyframes riseIn { to { transform: none; } }

.hero-lede {
  max-width: 54ch;
  margin-bottom: 34px;
  opacity: 0;
  animation: fadeUp .8s var(--ease) .34s forwards;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  opacity: 0; animation: fadeUp .8s var(--ease) .46s forwards;
}

.hero-affil {
  margin-top: 36px; padding-top: 22px;
  border-top: 1px solid var(--hairline);
  font-size: .875rem; color: var(--text-3);
  max-width: 46ch;
  opacity: 0; animation: fadeUp .8s var(--ease) .58s forwards;
}
.hero-affil strong { color: var(--text-2); font-weight: 600; }

/* The spectrum figure */
.spectrum-fig {
  position: relative;
  opacity: 0;
  animation: fadeUp 1s var(--ease) .2s forwards;
}
.spectrum-fig > svg { width: 100%; height: auto; overflow: visible; }

.spectrum-trace {
  fill: none;
  stroke: var(--au);
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: draw 2.6s var(--ease) .35s forwards;
  filter: drop-shadow(0 0 14px rgba(224,168,46,.35));
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.spectrum-fill {
  fill: url(#specGrad);
  opacity: 0;
  animation: fadeIn 1.4s var(--ease) 2.2s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

.spectrum-axis { stroke: var(--hairline); stroke-width: 1; }
.spectrum-tick  { fill: var(--text-3); font-family: var(--mono); font-size: 9.5px; }
.spectrum-label { fill: var(--text-3); font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; }

.band { cursor: help; }
.band-hit { fill: transparent; }
.band-stem {
  stroke: var(--hairline-2); stroke-width: 1; stroke-dasharray: 3 3;
  opacity: 0; transition: opacity .2s var(--ease);
}
.band-dot {
  fill: var(--void); stroke: var(--au); stroke-width: 1.8; r: 3.4;
  opacity: 0;
  animation: fadeIn .5s var(--ease) 2.5s forwards;
  transition: r .2s var(--ease), fill .2s var(--ease);
}
.band-note {
  opacity: 0; transition: opacity .2s var(--ease);
  pointer-events: none;
}
.band-note rect { fill: var(--void-3); stroke: var(--au-line); rx: 5; }
.band-note text { fill: var(--text); font-family: var(--mono); font-size: 9.5px; }
.band-note text.sub { fill: var(--text-3); font-size: 8.5px; }

.band:hover .band-stem,
.band:focus-visible .band-stem,
.band.is-open .band-stem { opacity: 1; }
.band:hover .band-note,
.band:focus-visible .band-note,
.band.is-open .band-note { opacity: 1; }
.band:hover .band-dot,
.band:focus-visible .band-dot,
.band.is-open .band-dot { fill: var(--au); r: 4.4; }

.spectrum-caption svg { width: 13px; height: 13px; flex-shrink: 0; }
.spectrum-caption {
  margin-top: 14px;
  font-family: var(--mono); font-size: .72rem;
  color: var(--text-3); letter-spacing: .04em;
  display: flex; align-items: center; gap: 8px;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .spectrum-fig { order: -1; }
  .hero { min-height: 0; }
}

/* ═══════════════════════════════════════════════════════════════════
   Buttons
═══════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--body); font-size: .92rem; font-weight: 600;
  padding: 13px 22px; border-radius: 10px;
  text-decoration: none; border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s var(--ease), background .18s var(--ease),
              border-color .18s var(--ease), color .18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }

.btn-gold { background: var(--au); color: var(--void); }
.btn-gold:hover { background: #f0bb44; }

.btn-ghost { border-color: var(--hairline-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--au); color: var(--au); background: var(--au-soft); }

.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #2a2038; }

.btn svg { flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════
   Sections
═══════════════════════════════════════════════════════════════════ */
.band-section { padding: var(--stack) 0; position: relative; }
.band-section.on-paper { background: var(--paper); color: var(--ink); }
.band-section.on-paper .lede { color: #5a5170; }
.band-section.on-paper .eyebrow { color: #7c4d0a; }
.band-section.on-paper .eyebrow::after { background: linear-gradient(90deg, rgba(124,77,10,.35), transparent); }
.band-section.on-raised { background: var(--void-2); }

.section-head { margin-bottom: clamp(36px, 5vw, 60px); max-width: 62ch; }
.section-head p { margin-top: 16px; }

/* ═══════════════════════════════════════════════════════════════════
   About — portrait and biography
═══════════════════════════════════════════════════════════════════ */
.about-block {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  margin-bottom: clamp(40px, 5vw, 64px);
}
@media (max-width: 820px) {
  .about-block { grid-template-columns: 1fr; gap: 34px; }
  .portrait { max-width: 320px; }
}

.portrait { position: relative; }

/* A gold frame sits behind the photograph, offset — the only decorative
   flourish in this section, and it echoes the hero's accent. */
.portrait::before {
  content: '';
  position: absolute; inset: 16px -16px -16px 16px;
  border: 1px solid var(--au-line);
  border-radius: var(--radius);
  pointer-events: none;
}
.portrait figure { position: relative; margin: 0; }

.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: var(--void-3);
  display: block;
}

/* Shown only if the photograph is missing, so a fresh clone never
   renders a broken-image icon. */
.portrait .monogram {
  display: none;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  border: 1px dashed var(--hairline-2);
  background: var(--void-3);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 10px;
  font-family: var(--display); font-size: 3rem; font-weight: 800;
  color: var(--au); letter-spacing: -0.04em;
}
.portrait .monogram small {
  font-family: var(--mono); font-size: .68rem; font-weight: 400;
  letter-spacing: .1em; color: var(--text-3); text-transform: uppercase;
}
.portrait.is-missing img { display: none; }
.portrait.is-missing .monogram { display: flex; }

.portrait figcaption {
  margin-top: 22px;
  font-family: var(--mono); font-size: .72rem; line-height: 1.6;
  color: var(--text-3); letter-spacing: .03em;
}

.about-body > p + p { margin-top: 1.15em; }
.about-body p { color: var(--text-2); }
.about-body strong { color: var(--text); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════
   Research cards
═══════════════════════════════════════════════════════════════════ */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}

.research-card {
  position: relative;
  padding: 30px 28px 32px;
  background: var(--void-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.on-paper .research-card {
  background: #fff;
  border-color: #ded9ea;
}
.research-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent-strip, var(--au));
  transform: scaleY(0); transform-origin: top;
  transition: transform .35s var(--ease);
}
.research-card:hover { transform: translateY(-4px); border-color: var(--au-line); }
.research-card:hover::before { transform: scaleY(1); }

.research-card .kicker {
  font-family: var(--mono); font-size: .7rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--au); margin-bottom: 14px; display: block;
}
.on-paper .research-card .kicker { color: #7c4d0a; }
.research-card h3 { margin-bottom: 12px; }
.research-card p { font-size: .94rem; line-height: 1.6; color: var(--text-2); }
.on-paper .research-card p { color: #5a5170; }

.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.tag {
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .05em;
  padding: 4px 10px; border-radius: 100px;
  border: 1px solid var(--hairline);
  color: var(--text-3);
}
.on-paper .tag { border-color: #d8d2e6; color: #6a6180; }

/* ═══════════════════════════════════════════════════════════════════
   Numbers strip — used only where the figures are real
═══════════════════════════════════════════════════════════════════ */
.fact-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
.fact {
  background: var(--void);
  padding: 26px 24px;
}
.on-paper .fact { background: var(--paper); }
.on-raised .fact { background: var(--void-2); }
.fact dt {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 8px;
}
.on-paper .fact dt { color: #7a7190; }
.fact dd {
  font-family: var(--display); font-size: 1.05rem; font-weight: 700;
  letter-spacing: -0.015em; line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════════
   Timeline — a real chronology, so it is numbered by year
═══════════════════════════════════════════════════════════════════ */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 1px; background: linear-gradient(var(--au-line), transparent);
}
.tl-item { position: relative; padding-bottom: 38px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -29px; top: 8px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--void); border: 2px solid var(--au);
}
.on-paper .tl-item::before { background: var(--paper); }
.tl-year {
  font-family: var(--mono); font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; color: var(--au); margin-bottom: 6px; display: block;
}
.on-paper .tl-year { color: #7c4d0a; }
.tl-item h3 { margin-bottom: 8px; }
.tl-item p { font-size: .94rem; color: var(--text-2); max-width: 62ch; }
.on-paper .tl-item p { color: #5a5170; }

/* ═══════════════════════════════════════════════════════════════════
   Publications
═══════════════════════════════════════════════════════════════════ */
.pub-list { border-top: 1px solid var(--hairline); }
.on-paper .pub-list { border-color: #ddd8e9; }

.pub {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 26px; align-items: start;
  padding: 26px 0;
  border-bottom: 1px solid var(--hairline);
}
.on-paper .pub { border-color: #ddd8e9; }

.pub-meta {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .06em;
  color: var(--text-3); padding-top: 4px;
}
.on-paper .pub-meta { color: #7a7190; }
.pub-type {
  display: inline-block; margin-top: 8px; padding: 3px 9px;
  border: 1px solid var(--hairline); border-radius: 100px;
  font-size: .65rem; letter-spacing: .1em; text-transform: uppercase;
}
.on-paper .pub-type { border-color: #d8d2e6; }
.pub-type.is-software { color: var(--au); border-color: var(--au-line); }
.pub-type.is-talk { color: var(--anti); border-color: rgba(69,191,214,.4); }

.pub h3 { font-size: 1.08rem; margin-bottom: 8px; line-height: 1.35; }
.pub .authors { font-size: .9rem; color: var(--text-2); }
.on-paper .pub .authors { color: #5a5170; }
.pub .authors b { color: var(--text); font-weight: 600; }
.on-paper .pub .authors b { color: var(--ink); }
.pub .venue { font-size: .88rem; color: var(--text-3); margin-top: 5px; font-style: italic; }
.on-paper .pub .venue { color: #7a7190; }

.pub-links { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 3px; }
.pub-link {
  font-family: var(--mono); font-size: .72rem; font-weight: 500;
  text-decoration: none; padding: 6px 11px; border-radius: 7px;
  border: 1px solid var(--hairline); color: var(--text-2);
  transition: all .18s var(--ease); white-space: nowrap;
}
.pub-link:hover { border-color: var(--au); color: var(--au); background: var(--au-soft); }
.on-paper .pub-link { border-color: #d8d2e6; color: #5a5170; }

.pub-draft { opacity: .72; }
.pub-draft .pub-type { color: var(--text-3); }

@media (max-width: 780px) {
  .pub { grid-template-columns: 1fr; gap: 12px; }
  .pub-meta { display: flex; align-items: center; gap: 12px; padding-top: 0; }
  .pub-type { margin-top: 0; }
}

/* ═══════════════════════════════════════════════════════════════════
   Software feature block
═══════════════════════════════════════════════════════════════════ */
.software-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 900px) { .software-block { grid-template-columns: 1fr; } }

.app-frame {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--void-2);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0,0,0,.45);
}
.app-frame-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; border-bottom: 1px solid var(--hairline);
  background: var(--void-3);
}
.app-frame-bar i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--hairline-2); display: block;
}
.app-frame-bar span {
  font-family: var(--mono); font-size: .68rem; color: var(--text-3);
  margin-left: 8px;
}
.app-frame-body { padding: 22px; }
.live-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-family: var(--mono); font-size: .66rem; color: var(--text-2, #cfc8de); padding: 3px 9px; border: 1px solid var(--hairline); border-radius: 99px; }
.live-pill b { color: #8fe0b0; font-weight: 600; }
.live-pill .live-dot { animation: rnlive 2s ease-in-out infinite; }
@keyframes rnlive { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live-pill .live-dot { animation: none; } }
.frame-stack { display: grid; gap: 22px; min-width: 0; }
.frame-note { margin-top: 10px; font-family: var(--mono); font-size: .66rem; line-height: 1.5; color: var(--text-3); }
.frame-video video { display: block; width: 100%; height: auto; border-radius: 8px; background: #111; }
@media (prefers-reduced-motion: reduce) { .frame-video video { animation: none; } }

.feature-list { list-style: none; margin-top: 24px; }
.feature-list li {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 11px 0; border-bottom: 1px dashed var(--hairline);
  font-size: .95rem; color: var(--text-2);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li b { color: var(--text); font-weight: 600; }
/* on light (paper) sections the default text colour is too pale */
.band-section.on-paper .feature-list li b { color: var(--ink); }
.feature-list .mark {
  flex-shrink: 0; margin-top: 4px;
  width: 15px; height: 15px; color: var(--au);
}

/* ═══════════════════════════════════════════════════════════════════
   Media / outreach cards
═══════════════════════════════════════════════════════════════════ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.soft-card {
  padding: 28px 26px;
  background: var(--void-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.on-paper .soft-card { background: #fff; border-color: #ded9ea; }
.soft-card:hover { transform: translateY(-4px); border-color: var(--au-line); }
.soft-card h3 { margin-bottom: 10px; }
.soft-card p { font-size: .93rem; color: var(--text-2); flex: 1; }
.on-paper .soft-card p { color: #5a5170; }
.soft-card .go {
  margin-top: 18px; font-family: var(--mono); font-size: .75rem;
  color: var(--au); display: inline-flex; align-items: center; gap: 7px;
}
.soft-card:hover .go svg { transform: translateX(4px); }
.soft-card .go svg { transition: transform .2s var(--ease); }

/* ═══════════════════════════════════════════════════════════════════
   Gallery
═══════════════════════════════════════════════════════════════════ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.shot {
  position: relative;
  border-radius: var(--radius-s);
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--void-2);
  cursor: zoom-in;
}
.shot img {
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform .5s var(--ease), filter .35s var(--ease);
  filter: saturate(.92);
}
.shot:hover img { transform: scale(1.05); filter: saturate(1.05); }
.shot figcaption {
  padding: 13px 15px;
  font-size: .84rem; line-height: 1.45; color: var(--text-2);
  border-top: 1px solid var(--hairline);
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: none; align-items: center; justify-content: center;
  background: rgba(8, 5, 13, .93);
  padding: clamp(16px, 4vw, 48px);
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 82vh;
  border-radius: var(--radius-s);
  box-shadow: 0 30px 90px rgba(0,0,0,.7);
}
.lightbox-cap {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: .8rem; color: var(--text-2);
  text-align: center; max-width: 70ch; padding: 0 20px;
}
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.07); border: 1px solid var(--hairline);
  color: var(--text); cursor: pointer; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.lb-btn:hover { background: rgba(255,255,255,.16); }
.lb-prev { left: clamp(10px, 3vw, 34px); }
.lb-next { right: clamp(10px, 3vw, 34px); }
.lb-close { top: clamp(14px, 3vw, 28px); right: clamp(14px, 3vw, 28px); transform: none; }

/* ═══════════════════════════════════════════════════════════════════
   Blog
═══════════════════════════════════════════════════════════════════ */
.post {
  padding: 32px 0;
  border-bottom: 1px solid var(--hairline);
  max-width: var(--measure);
}
.post-meta {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em;
  color: var(--text-3); margin-bottom: 14px;
}
.post-tag {
  padding: 4px 10px; border-radius: 100px;
  border: 1px solid var(--au-line); color: var(--au);
  text-transform: uppercase; font-size: .65rem;
}
.post h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin-bottom: 14px; }
.post-body { color: var(--text-2); }
.post-more {
  display: none;
}
.post.is-open .post-more { display: block; }
.post-toggle {
  margin-top: 18px;
  background: none; border: 1px solid var(--hairline);
  color: var(--text); font-family: var(--mono); font-size: .76rem;
  padding: 9px 16px; border-radius: 8px; cursor: pointer;
  transition: all .18s var(--ease);
}
.post-toggle:hover { border-color: var(--au); color: var(--au); }

/* Blog index: the reading path of the tutorial series */
.reading-path { border: 1px solid var(--au-line); border-radius: var(--radius); background: var(--void-2); padding: clamp(20px, 3vw, 32px); margin-bottom: 32px; }
.reading-path .rp-eyebrow { font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--au); margin-bottom: 8px; }
.reading-path h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-bottom: 8px; }
.reading-path .rp-note { color: var(--text-2); font-size: .92rem; margin-bottom: 16px; }
.reading-path ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.reading-path li a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: var(--radius-s); text-decoration: none; color: var(--text); transition: border-color .18s, background .18s; height: 100%; }
.reading-path li a:hover { border-color: var(--au); background: var(--au-soft); }
.reading-path .rp-num { grid-row: 1 / span 2; font-family: var(--mono); font-size: 1.1rem; color: var(--au); align-self: center; }
.reading-path .rp-title { font-weight: 600; font-size: .93rem; line-height: 1.3; }
.reading-path .rp-date { font-family: var(--mono); font-size: .68rem; color: var(--text-3); margin-top: 3px; }
@media (min-width: 1000px) { .post-grid .reading-path { grid-column: 1 / -1; margin-bottom: 0; } }

/* Blog index: on wide screens the posts become a grid of cards */
@media (min-width: 1000px) {
  .post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 24px; align-items: start; }
  .post-grid .post { max-width: none; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--void-2); padding: 28px 30px; height: 100%; display: flex; flex-direction: column; }
  .post-grid .post .post-card-link, .post-grid .post .post-toggle { align-self: flex-start; margin-top: auto; }
  .post-grid .post .post-body { margin-bottom: 18px; }
  .post-grid .post.is-open { grid-column: 1 / -1; }
}

.soon {
  display: inline-block; margin-top: 14px;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3);
  border: 1px dashed var(--hairline-2); border-radius: 100px; padding: 5px 13px;
}

/* ═══════════════════════════════════════════════════════════════════
   Contact
═══════════════════════════════════════════════════════════════════ */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin-top: 34px;
}
.contact-card {
  padding: 24px;
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--void-2);
  text-decoration: none; color: inherit;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.contact-card:hover { border-color: var(--au-line); transform: translateY(-3px); }
.contact-card .ct-k {
  display: block;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 9px;
}
.contact-card .ct-v { display: block; font-size: .96rem; font-weight: 500; word-break: break-word; }

/* ═══════════════════════════════════════════════════════════════════
   Footer
═══════════════════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--hairline);
  padding: clamp(48px, 6vw, 76px) 0 40px;
  background: var(--void);
}
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 40px; margin-bottom: 46px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.footer h4 {
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-3);
  margin-bottom: 16px;
}
.footer-links { list-style: none; display: grid; gap: 9px; }
.footer-links a {
  font-size: .92rem; color: var(--text-2); text-decoration: none;
  transition: color .16s var(--ease);
}
.footer-links a:hover { color: var(--au); }
.footer-note {
  font-size: .88rem; color: var(--text-3); max-width: 46ch;
}
.footer-base {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  padding-top: 26px; border-top: 1px solid var(--hairline);
  font-family: var(--mono); font-size: .75rem; color: var(--text-3);
}

/* ═══════════════════════════════════════════════════════════════════
   Scroll reveal
═══════════════════════════════════════════════════════════════════ */
.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .08s; }
.js .reveal[data-delay="2"] { transition-delay: .16s; }
.js .reveal[data-delay="3"] { transition-delay: .24s; }

/* ═══════════════════════════════════════════════════════════════════
   Page header (for subpages)
═══════════════════════════════════════════════════════════════════ */
.page-head {
  padding: clamp(56px, 8vw, 96px) 0 clamp(34px, 5vw, 56px);
  border-bottom: 1px solid var(--hairline);
  position: relative;
}
.page-head::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(52% 60% at 18% 30%, rgba(224,168,46,.10), transparent 70%);
  pointer-events: none;
}
.page-head .wrap { position: relative; }
.page-head h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); margin-bottom: 18px; }
.page-head .lede { max-width: 60ch; }

/* ═══════════════════════════════════════════════════════════════════
   Embeds
═══════════════════════════════════════════════════════════════════ */
.embed-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--void-2);
  overflow: hidden;
}
.embed-card iframe { width: 100%; border: 0; display: block; }
.embed-body { padding: 24px 26px 28px; }
.embed-body h3 { margin-bottom: 10px; }
.embed-body p { font-size: .94rem; color: var(--text-2); }

/* ═══════════════════════════════════════════════════════════════════
   Reduced motion
═══════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero h1 .line > span { transform: none; }
  .hero-lede, .hero-actions, .hero-affil, .spectrum-fig { opacity: 1; }
  .spectrum-trace { stroke-dashoffset: 0; }
  .spectrum-fill, .band-dot { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   Light theme — opt-in via the sun/moon button in the navigation.
   The site stays dark by default; the choice is remembered per browser.
═══════════════════════════════════════════════════════════════════ */
.theme-toggle {
  order: 3; flex-shrink: 0;
  width: 38px; height: 38px; margin-left: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-2);
  border: 1px solid var(--hairline); border-radius: 9px; cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.theme-toggle:hover { color: var(--au); border-color: var(--au-line); background: var(--au-soft); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
.nav-links { order: 2; }
.nav-toggle { order: 4; }
@media (max-width: 1080px) { .theme-toggle { margin-left: auto; } }

:root[data-theme="light"] {
  color-scheme: light;
  --void:      #faf8fc;
  --void-2:    #ffffff;
  --void-3:    #f0ecf6;
  --hairline:  rgba(21, 15, 32, .10);
  --hairline-2:rgba(21, 15, 32, .20);
  --paper:     #f0ecf6;
  --paper-2:   #e6e1ef;
  --text:      #1b1428;
  --text-2:    #4c4360;
  --text-3:    #6c6380;
  --au:        #a36800;
  --au-soft:   rgba(163, 104, 0, .10);
  --au-line:   rgba(163, 104, 0, .38);
  --stokes:    #c2334f;
  --anti:      #0f7c95;
}
:root[data-theme="light"] .nav { background: rgba(250, 248, 252, .85); }
:root[data-theme="light"] .nav-links a:hover { background: rgba(21, 15, 32, .05); }
:root[data-theme="light"] .nav-cta:hover { background: rgba(163, 104, 0, .18) !important; }
:root[data-theme="light"] .btn-gold { color: #fff; }
:root[data-theme="light"] .btn-gold:hover { background: #8a5800; }
:root[data-theme="light"] ::selection { color: #fff; }

/* ═══════════════════════════════════════════════════════════════════
   Print — so a PDF of this page reads like a CV
═══════════════════════════════════════════════════════════════════ */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .nav, .scroll-line, .hero-actions, .footer-grid, .lightbox, .nav-toggle { display: none !important; }
  .band-section, .hero { padding: 18pt 0; }
  .band-section.on-paper { background: #fff; }
  a { text-decoration: underline; }
  .reveal { opacity: 1; transform: none; }
}
