/* ============================================================
   main.css — components. Consumes tokens only; if you're about
   to type a hex code or px value here, it belongs in tokens.css.
   ============================================================ */

/* ---------- 1. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; color-scheme: light; }  /* dark scrollbars + form controls */

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

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

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

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

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 10;
  background: var(--band);
  color: var(--on-band);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-decoration: none;
}
.skip-link:focus { top: var(--s-4); }

/* ---------- 2. Typography ---------- */
h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-4);
}
h1 { font-size: clamp(var(--fs-4xl), 8vw, var(--fs-5xl)); }
h2 { font-size: var(--fs-3xl); }

h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-xl);
  line-height: 1.25;
  margin: 0 0 var(--s-3);
}

p { margin: 0 0 var(--s-4); }

.prose { max-width: var(--measure); }
.prose ul { margin: 0 0 var(--s-4); padding-left: var(--s-5); }
.prose li { margin-bottom: var(--s-1); }
.lede { font-size: var(--fs-lg); max-width: var(--measure); }

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin: 0 0 var(--s-3);
}

.muted { color: var(--ink-soft); }
.muted strong { font-weight: 600; color: var(--ink-strong); }

a { color: var(--accent-deep); text-underline-offset: 3px; transition: color var(--t-micro); }
a:hover { color: var(--ink); }

/* ---------- 3. Layout + signature line ---------- */
.wrap {
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--s-5);
}

.section { padding-block: var(--section-pad); }
.section + .section { padding-top: 0; } /* avoid double gaps between stacked sections */

/* five-line stave fragment, used as a section ornament */
.stave-rule {
  width: 96px;
  height: 25px;
  margin-bottom: var(--s-4);
  background: repeating-linear-gradient(
    to bottom,
    var(--line) 0 1px,
    transparent 1px 6px
  );
}

/* full-width hairline */
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* The signature: articulated fingers, a piano, and the mixed audio spectrum. */
.sig { position: relative; margin-top: var(--s-7); padding-top: 140px; }
.sig svg { width: 100%; height: auto; overflow: visible; }
.gesture-invitation {
  position: absolute;
  top: 0;
  left: var(--s-5);
  width: 270px;
  height: 158px;
  color: var(--accent-deep);
  pointer-events: none;
}
.gesture-invitation p {
  width: 190px;
  margin: 0;
  font: 500 29px/1 var(--font-note);
  text-align: center;
  transform: rotate(-7deg);
}
.gesture-invitation span { display: block; margin-top: var(--s-2); font-size: 20px; }
.gesture-invitation svg { position: absolute; inset: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gesture-invitation-margin { display: none; }
@media (min-width: 1500px) {
  .sig { padding-top: 0; }
  .gesture-invitation { top: 30px; left: -200px; }
  .gesture-invitation-margin { display: inline; }
  .gesture-invitation-above { display: none; }
}
.gesture-score { color: var(--accent-deep); user-select: none; }
.gesture-model { opacity: 0; pointer-events: none; }
.gesture-model-host, .gesture-model-canvas { display: block; width: 100%; height: 100%; }
.has-gesture-model .gesture-model { opacity: 1; pointer-events: auto; }
.gesture-score.is-finger-hovered { cursor: pointer; }
.gesture-finger .gesture-finger-hit { stroke: transparent; stroke-width: 18; pointer-events: stroke; }
.gesture-finger-control { cursor: pointer; outline: none; }
.gesture-finger-control rect { fill: transparent; stroke: none; }
.gesture-finger-control:hover .gesture-tip-label { fill: var(--accent-deep); }
.gesture-finger-control:focus-visible rect { stroke: var(--accent-deep); stroke-width: 1.5; }
.has-gesture-model .gesture-hand, .has-gesture-model .gesture-guides { visibility: hidden; }
.gesture-guides { stroke: var(--line); stroke-width: 0.7; fill: none; opacity: 0.65; }
.gesture-guides circle { stroke-dasharray: 2 8; }
.gesture-guides path { opacity: 0.4; }
.gesture-hand { stroke: var(--accent-deep); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.gesture-finger polyline { stroke-width: 3; }
.gesture-finger circle { fill: var(--paper); stroke-width: 1.5; }
.gesture-palm-core { fill: var(--accent-soft); stroke-width: 1; }
.gesture-palm-mark { stroke-width: 1.4; }
.gesture-tip-label { font: 500 20px var(--font-mono); text-anchor: middle; fill: var(--ink-soft); stroke: var(--paper); stroke-width: 5px; stroke-linejoin: round; paint-order: stroke fill; pointer-events: none; }
.gesture-tip-label.is-sounding { fill: var(--emphasis); font-weight: 700; }
.gesture-key { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.gesture-black-key { fill: var(--ink); }
.gesture-key.is-sounding { fill: var(--accent-deep); }
.gesture-black-key.is-sounding { fill: var(--emphasis); }
.gesture-spectrum-bar { fill: var(--accent-deep); }
.gesture-spectrum-baseline { fill: none; stroke: var(--line); stroke-width: .8; }
.gesture-spectrum-title { fill: var(--ink-soft); font: 500 15px var(--font-mono); }
.gesture-spectrum-ticks text { fill: var(--ink-soft); font: 13px var(--font-mono); }
.gesture-spectrum-ticks text:not(:first-child):not(:last-child) { text-anchor: middle; }
.gesture-player { display: flex; align-items: center; gap: var(--s-4); border-top: 1px solid var(--line); padding-top: var(--s-4); }
.gesture-track { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s-2); flex: 1; }
.gesture-track strong { color: var(--ink); }
.gesture-track span { font-size: var(--fs-xs); color: var(--ink-soft); }
.gesture-play { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: var(--fs-md); cursor: pointer; }
.gesture-play:hover { background: var(--accent-soft); }
.gesture-play:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 4px; }
.gesture-play:disabled { opacity: .55; cursor: wait; }
.gesture-audio-status { margin: 0; font-size: var(--fs-xs); color: var(--ink-soft); }
.gesture-audio-status:empty { display: none; }
@media (max-width: 600px) {
  .sig { margin-top: var(--s-5); }
  .gesture-track { display: grid; }
  .gesture-spectrum-ticks text[data-hz="10000"] { display: none; }
}

/* ---------- 4. SiteNav ---------- */
.site-nav {
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  padding-block: var(--s-4);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.home-icon { width: 1.1em; height: 1.1em; flex: 0 0 auto; }
.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links li { display: flex; align-items: center; }
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
/* three-line stave-segment underline */
.nav-links a::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: block;
  height: 7px;
  margin-top: var(--s-1);
  background: repeating-linear-gradient(
    to bottom,
    currentColor 0 1px,
    transparent 1px 3px
  );
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-micro);
}
.nav-links a:hover { color: var(--accent-deep); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a[aria-current] { color: var(--ink); }
.nav-links a[aria-current]::after { transform: scaleX(1); }
.back-home {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: var(--fs-md);
  font-weight: 600;
  text-decoration: none;
}
.back-home:hover { background: var(--accent-soft); border-color: var(--accent-deep); }

/* ---------- 5. Hero / Bio ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.2fr minmax(260px, 0.8fr);
  grid-template-areas:
    "head media"
    "body media"
    "actions media";
  column-gap: var(--s-8);
  row-gap: var(--s-4);
  align-items: start;
  padding-top: var(--s-8);
}
.hero-head    { grid-area: head; }
.hero-media   { grid-area: media; }
.hero-body    { grid-area: body; max-width: var(--measure); }
.hero-actions { grid-area: actions; display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }

.hero h1 { margin-bottom: 0; }
.hero .lede { margin-bottom: var(--s-3); }

.portrait {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-photo);
  padding: var(--s-2);
}
.portrait-crop {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-photo) - var(--s-1));
  aspect-ratio: 4 / 5;
  width: 100%;
}
.portrait-crop img {
  /* Show the photograph inside the original phone screenshot without altering its pixels.
     Source: 1179 x 1985; centered 4:5 photo crop: x=120, y=430.5, w=972, h=1215. */
  position: absolute;
  width: 121.2963%;
  max-width: none;
  height: auto;
  left: -12.3457%;
  top: -35.4321%;
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "media" "body" "actions";
  }
  .hero-media { max-width: 320px; }
}

/* ---------- 6. Buttons, links, tags ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-md);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background var(--t-micro), border-color var(--t-micro), color var(--t-micro);
  cursor: pointer;
}
.btn--primary {
  background: var(--btn-fill);
  color: var(--btn-text);
}
.btn--primary:hover { background: var(--accent-deep); color: var(--btn-text); }
.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--secondary:hover { color: var(--accent-deep); border-color: var(--accent-deep); }
.btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding: 0;
  margin: var(--s-3) 0 0;
  list-style: none;
}
.tag {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 2px var(--s-3);
  white-space: nowrap;
}
.tag--venue {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  white-space: normal;
}
.tag--status { border-color: var(--emphasis); background: var(--emphasis-tint); color: var(--emphasis); }

/* ---------- 7. Pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-4);
}
.pillar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-photo);
  padding: var(--s-5);
}
.pillar .eyebrow { margin-bottom: var(--s-2); }
.pillar p { margin-bottom: var(--s-3); color: var(--ink-soft); }
.pillar a { font-family: var(--font-mono); font-size: var(--fs-xs); }

/* ---------- 8. Featured band (Ripple) + StatRow ---------- */
.feature {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--s-6);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-photo);
  padding: var(--s-5);
}
.feature-media img {
  border-radius: calc(var(--radius-photo) - var(--s-1));
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}
.feature-body h2 { font-size: var(--fs-3xl); margin-bottom: var(--s-2); }
.feature-body .btn { margin-top: var(--s-4); }
.feature-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }

@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
}

.stats {
  display: flex;
  flex-wrap: wrap;
  margin: var(--s-4) 0 0;
  padding: 0;
  list-style: none;
}
.stat {
  padding-inline: var(--s-5);
  border-left: 1px solid var(--line);
}
.stat:first-child { padding-left: 0; border-left: 0; }
.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-2xl);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-soft);
}

.stats--big .stat-num { font-size: var(--fs-3xl); }
.stats--big .stat { padding-block: var(--s-2); }

.case-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-7);
  padding: var(--s-4);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-photo);
}
.case-nav-label {
  margin-right: var(--s-1);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.case-nav a {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--accent-deep);
  border-radius: var(--radius-pill);
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: background var(--t-micro), color var(--t-micro), transform var(--t-micro);
}
.case-nav a:hover,
.case-nav a:focus-visible { background: var(--accent-deep); color: var(--surface); transform: translateY(-1px); }
.case-nav a span { font-size: 1.1em; }
@media (max-width: 560px) {
  .case-nav { align-items: stretch; }
  .case-nav-label { flex-basis: 100%; }
  .case-nav a { justify-content: space-between; flex: 1 1 42%; }
}
section[id] { scroll-margin-top: var(--s-5); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-5);
  max-width: 920px;
}
.why-grid article {
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent-deep);
  border-radius: var(--radius-photo);
}
.why-grid h3 { font-size: var(--fs-lg); }
.why-grid article > p:last-child { color: var(--ink-soft); margin: 0; }
.section-details {
  max-width: var(--measure);
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
}
.section-details summary {
  width: max-content;
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  cursor: pointer;
}
.section-details[open] summary { margin-bottom: var(--s-3); }
.section-details .prose,
.section-details > p { color: var(--ink-soft); font-size: 0.9375rem; }
@media (max-width: 640px) { .why-grid { grid-template-columns: 1fr; } }

/* ---------- 9. Project cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-4);
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-photo);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: box-shadow var(--t-micro);
}
a.card:hover, a.card:focus-visible { box-shadow: var(--shadow-1); }
.card-media { aspect-ratio: 3 / 2; overflow: hidden; }
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-micro);
}
a.card:hover .card-media img { transform: scale(1.02); }
.card-media .highlight-pipetting { object-position: center 15%; }
/* Keep the podcast title and bulb visible while cropping out the white bottom margin. */
.card-media .highlight-podcast-logo { object-position: center 72%; }
.card-body { padding: var(--s-4) var(--s-5) var(--s-5); }
.card-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-lg);
  margin: 0 0 var(--s-1);
  transition: color var(--t-micro);
}
a.card:hover .card-title { color: var(--accent-deep); }
.card-impact { color: var(--ink-soft); margin: 0; }
.card .eyebrow { margin-bottom: var(--s-1); }

.grid-cta { margin-top: var(--s-5); }

.highlights-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 480px) {
  .highlights-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Music has a local palette; the rest of the page keeps its linen theme. */
.music-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--section-pad);
  background: var(--paper);
  color: var(--ink);
}
.music-lights {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--music-paper);
  /* Fade the entire colored layer, including its moving lights, into linen. */
  -webkit-mask-image: linear-gradient(to bottom, transparent, black var(--music-blend-height));
  mask-image: linear-gradient(to bottom, transparent, black var(--music-blend-height));
  clip-path: ellipse(150% 150% at 20% 0%);
  transition: clip-path var(--music-reveal-time) ease-in-out;
}
.music-lights::before,
.music-lights::after {
  content: "";
  position: absolute;
  inset: -25%;
  background: radial-gradient(ellipse at 20% 35%, var(--music-glow-rose), transparent 55%),
              radial-gradient(ellipse at 80% 70%, var(--music-glow-violet), transparent 55%);
  animation: music-lights-drift var(--music-drift-time) ease-in-out infinite alternate;
  animation-play-state: paused;
}
.music-lights::after {
  background: radial-gradient(ellipse at 70% 15%, var(--music-glow-gold), transparent 50%);
  animation-direction: alternate-reverse;
}
.music-section.is-playing .music-lights::before,
.music-section.is-playing .music-lights::after { animation-play-state: running; }
.music-motion:not(.is-revealed) .music-lights { clip-path: ellipse(0% 0% at 20% 0%); }
.music-content { position: relative; }
.music-section h2 { font-size: clamp(var(--fs-4xl), 7vw, var(--fs-5xl)); }
.music-section .lede { margin-bottom: var(--s-2); }
.music-section .prose { color: var(--ink-soft); }
.media-strip.music-gallery { --strip-h: 320px; margin-top: var(--s-7); }
.music-gallery .strip-track {
  scrollbar-color: var(--accent-deep) var(--accent-soft);
  scrollbar-width: auto;
  padding-bottom: var(--s-5);
}
.music-gallery .strip-track::-webkit-scrollbar { height: var(--s-2); }
.music-gallery .strip-track::-webkit-scrollbar-track { background: var(--accent-soft); border-radius: var(--radius-pill); }
.music-gallery .strip-track::-webkit-scrollbar-thumb { background: var(--accent-deep); border-radius: var(--radius-pill); }
.music-gallery .strip-media { object-fit: contain; }
.music-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  width: min(480px, 76vw);
  height: var(--strip-h);
  border-radius: calc(var(--radius-photo) - var(--s-1));
  background: var(--music-placeholder);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}
.music-placeholder--recital,
.music-placeholder--backstage { background: var(--music-placeholder-alt); }
.music-placeholder--theater { width: min(320px, 76vw); }
.music-placeholder small { color: var(--ink-soft); font-size: inherit; }
.music-note { font-family: var(--font-display); font-size: var(--fs-5xl); line-height: 1.5; }
.music-links {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  align-items: baseline;
  margin-top: var(--s-5);
}
.music-links p { color: var(--ink-soft); margin: 0; }
@keyframes music-lights-drift {
  from { transform: translate(-3%, -2%) rotate(-6deg) scale(1); }
  to { transform: translate(4%, 3%) rotate(6deg) scale(1.08); }
}
@media (max-width: 720px) {
  .media-strip.music-gallery { --strip-h: 260px; }
}

/* projects index grouping */
.project-group { margin-top: var(--s-7); }
.project-group:first-of-type { margin-top: 0; }
.project-group h3 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: var(--s-4);
}

/* a small section heading inside a section — sits above a sub-list */
.sub-head {
  font-size: var(--fs-xl);
  margin: var(--s-7) 0 var(--s-4);
}

/* ---------- 10. PubEntry ---------- */
.pubs { list-style: none; margin: 0; padding: 0; }
.pub {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-2) var(--s-4);
  align-items: baseline;
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--line);
}
.pub:first-child { border-top: 1px solid var(--line); }
.pub-title { font-weight: 500; margin: 0; }
.pub-authors { grid-column: 2; margin: 0; color: var(--ink-soft); font-size: var(--fs-xs); font-family: var(--font-mono); }
.pub-authors .me { color: var(--ink); }
.pub-links { grid-column: 2; margin: 0; font-family: var(--font-mono); font-size: var(--fs-xs); }
.pub-links a { margin-right: var(--s-4); }

.pub--stacked { display: block; padding-block: var(--s-5); }
.pub--stacked .pub-venue {
  margin: 0 0 var(--s-1);
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
}
.pub--stacked .pub-workshop {
  max-width: 70ch;
  margin: 0 0 var(--s-4);
  color: var(--ink-soft);
}
.pub--stacked .pub-title {
  max-width: 52ch;
  margin-bottom: var(--s-2);
  font-size: var(--fs-lg);
}
.pub--stacked .pub-authors { margin-bottom: var(--s-3); }

@media (max-width: 600px) {
  .pub { grid-template-columns: 1fr; }
  .pub-authors, .pub-links { grid-column: 1; }
}

/* ---------- 11. Case study ---------- */
.title-block { padding-top: var(--s-8); }
.title-block .lede { margin-top: var(--s-2); }
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  margin-bottom: var(--s-3);
}

/* photo mat */
.fig {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-photo);
  padding: var(--s-2);
  margin: 0;
}
.fig img { border-radius: calc(var(--radius-photo) - var(--s-1)); width: 100%; object-fit: cover; }
.fig--wide img { aspect-ratio: 3 / 2; }
.fig--std img { aspect-ratio: 3 / 2; }
.fig--tall img { aspect-ratio: 3 / 4; }
.fig-cap {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  padding: var(--s-2) var(--s-1) var(--s-1);
}
.case-hero-gallery {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: var(--s-4);
  min-height: 560px;
}
.case-hero-gallery .fig { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; }
.case-hero-gallery .fig img { height: 100%; min-height: 0; object-fit: cover; }
.case-hero-main img { object-position: center; }
.case-hero-supporting {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
  min-height: 0;
}
@media (max-width: 860px) {
  .case-hero-gallery { grid-template-columns: 1fr; min-height: 0; }
  .case-hero-main img { aspect-ratio: 4 / 3; }
  .case-hero-supporting { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 1fr; }
  .case-hero-supporting .fig img { aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  .case-hero-supporting {
    display: flex;
    gap: var(--s-3);
    overflow-x: auto;
    padding-bottom: var(--s-2);
    scroll-snap-type: x mandatory;
  }
  .case-hero-supporting .fig { flex: 0 0 82%; scroll-snap-align: start; }
}
.fig-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-4);
  margin-block: var(--s-5);
}
/* three-up row — keeps a set of related shots on one uniform line */
.fig-trio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-4);
  margin-block: var(--s-5);
  align-items: start;
}
/* captions sit on a shared baseline so a row of figures reads as one block */
.fig-pair .fig, .fig-trio .fig {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.fig-pair .fig-cap, .fig-trio .fig-cap { margin-top: auto; }

/* testimonial quotes — hairline spine, mono attribution */
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: var(--s-6);
  margin-top: var(--s-6);
}
.quote {
  margin: 0;
  padding-left: var(--s-5);
  border-left: 2px solid var(--accent);
}
.quote blockquote { margin: 0; }
.quote p {
  font-size: var(--fs-lg);
  line-height: var(--lh-body);
  color: var(--ink);
  margin-bottom: var(--s-3);
}
.quote strong { font-weight: 600; color: var(--ink-strong); }
.quote figcaption {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  line-height: 1.5;
}
.quote details { margin-top: var(--s-3); color: var(--ink-soft); }
.quote summary {
  width: max-content;
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  cursor: pointer;
}
.quote details p { margin: var(--s-3) 0 0; font-size: 0.9375rem; color: var(--ink-soft); }

/* Ripple development story: four fast takeaways, technical depth on demand. */
.development-story > .lede { color: var(--ink-soft); }
.development-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: var(--s-6);
  align-items: stretch;
  margin-top: var(--s-7);
}
.development-map {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--s-2);
  min-height: 100%;
}
.development-map svg { width: 72px; height: 100%; overflow: visible; }
.development-track,
.development-signal { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.development-track { stroke: var(--line); stroke-width: 2; }
.development-signal {
  stroke: var(--accent-deep);
  stroke-width: 2;
  stroke-dasharray: 2 12;
  animation: development-flow 1.8s linear infinite;
  animation-play-state: paused;
}
.development-story.is-visible .development-signal { animation-play-state: running; }
.development-pulse {
  fill: var(--accent-deep);
  opacity: 0;
  offset-path: path("M45 30 C10 160 80 260 45 350 S10 535 45 625 S80 820 45 1050");
  animation: development-pulse 6s linear infinite;
  animation-play-state: paused;
}
.development-pulse--two { animation-delay: -3s; }
.development-story.is-visible .development-pulse { animation-play-state: running; }
.development-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-block: var(--s-2);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}
.development-labels span { display: grid; gap: var(--s-1); }
.development-labels b {
  color: var(--accent-deep);
  font-size: 0.6875rem;
  font-weight: 500;
}

.development-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-5);
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: development;
}
.development-card {
  counter-increment: development;
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.2fr);
  min-height: 300px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-photo);
  transition: border-color var(--t-micro), box-shadow var(--t-micro), transform 500ms ease, opacity 500ms ease;
}
.development-card::before {
  content: "STEP 0" counter(development);
  position: absolute;
  top: var(--s-3);
  left: var(--s-3);
  z-index: 2;
  padding: var(--s-1) var(--s-3);
  background: var(--accent-deep);
  border: 2px solid var(--surface);
  border-radius: var(--radius-pill);
  color: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-1);
}
.development-card:hover { border-color: var(--accent); box-shadow: var(--shadow-1); }
.development-visual { min-height: 100%; margin: 0; overflow: hidden; background: var(--accent-soft); }
.development-visual img { width: 100%; height: 100%; object-fit: cover; }
.development-software-image { object-position: 42% top; }
.development-visual--origin { display: grid; place-items: center; padding: var(--s-4); }
.development-visual--origin svg { width: 100%; }
.origin-hand,
.origin-wave,
.origin-note { fill: none; stroke: var(--accent-deep); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.origin-hand circle,
.origin-note ellipse { fill: var(--surface); }
.origin-wave { stroke-dasharray: 5 6; animation: development-flow 2.4s linear infinite; animation-play-state: paused; }
.development-story.is-visible .origin-wave { animation-play-state: running; }
.development-copy { position: relative; padding: var(--s-5); }
.development-copy .eyebrow { margin-bottom: var(--s-2); }
.development-copy h3 { position: relative; font-size: var(--fs-lg); }
.development-copy > p:not(.eyebrow) { position: relative; color: var(--ink-soft); margin-bottom: var(--s-4); }
.development-copy details { border-top: 1px solid var(--line); padding-top: var(--s-3); }
.development-copy summary {
  width: max-content;
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  cursor: pointer;
}
.development-copy summary::marker { color: var(--accent-deep); }
.development-copy details p { margin: var(--s-3) 0 0; color: var(--ink-soft); font-size: 0.9375rem; }
.development-copy details p + p { margin-top: var(--s-3); }
.development-copy details strong { color: var(--ink); font-weight: 600; }

.development-motion .development-card { opacity: 0; transform: translateY(var(--s-5)); }
.development-motion.is-visible .development-card { opacity: 1; transform: none; }
.development-motion.is-visible .development-card:nth-child(2) { transition-delay: 90ms; }
.development-motion.is-visible .development-card:nth-child(3) { transition-delay: 180ms; }
.development-motion.is-visible .development-card:nth-child(4) { transition-delay: 270ms; }

@keyframes development-flow { to { stroke-dashoffset: -28; } }
@keyframes development-pulse {
  0% { offset-distance: 0%; opacity: 0; }
  8%, 92% { opacity: 0.85; }
  100% { offset-distance: 100%; opacity: 0; }
}

@media (max-width: 860px) {
  .development-layout { grid-template-columns: 120px minmax(0, 1fr); gap: var(--s-4); }
  .development-map { grid-template-columns: 56px minmax(0, 1fr); }
  .development-map svg { width: 56px; }
  .development-card { grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1.3fr); }
}
@media (max-width: 560px) {
  .development-layout { grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-2); margin-top: var(--s-6); }
  .development-map { display: block; }
  .development-map svg { width: 40px; height: 100%; }
  .development-labels { display: none; }
  .development-card { grid-template-columns: 1fr; }
  .development-visual { min-height: 210px; max-height: 260px; }
  .development-visual--origin { min-height: 180px; }
}

.next-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
}
.next-grid article {
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-photo);
}
.next-grid article > span { color: var(--accent-deep); font-family: var(--font-mono); font-size: var(--fs-xs); }
.next-grid h3 { margin-top: var(--s-3); font-size: var(--fs-lg); }
.next-grid p { color: var(--ink-soft); margin: 0; }

@media (max-width: 760px) {
  .next-grid { grid-template-columns: 1fr; }
}

/* gallery + lightbox */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s-4);
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
}
.gallery-group + .gallery-group { margin-top: var(--s-6); }
.gallery-group .eyebrow { margin-bottom: var(--s-3); }
.gallery-group .gallery { margin-top: 0; }
.gallery a { display: block; border-radius: var(--radius-photo); overflow: hidden; }
.gallery img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; transition: transform var(--t-micro); }
.gallery a:hover img { transform: scale(1.02); }

/* ---- media strip: horizontal, arrow-navigable media row ----
   Mixed orientations coexist: every item is given a common HEIGHT and sizes
   its own width, so a portrait photo and a landscape video sit side by side
   without cropping either. With JS off it is a plain horizontal scroller;
   main.js adds .is-enhanced and only then do the arrows appear, so there are
   never dead controls. */
.media-strip { position: relative; margin-top: var(--s-5); --strip-h: 380px; }

.strip-track {
  display: flex;
  gap: var(--s-4);
  list-style: none;
  margin: 0;
  padding: 0 0 var(--s-3);
  overflow-x: auto;
  /* No scroll-snap here on purpose. Items have different widths, so their snap
     points do not line up with reachable scroll offsets — the last item's snap
     point sits past the maximum scroll, and Chrome re-snaps after every
     programmatic scroll, which silently undoes the arrow buttons. The arrows
     already land each item exactly where it should go. */
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
}
.strip-track > li { flex: 0 0 auto; }
.strip-track .fig { margin: 0; width: max-content; max-width: min(576px, 86vw); }
/* two classes, so this beats `.fig img { width: 100% }` above */
.strip-track .strip-media {
  height: var(--strip-h);
  width: auto;
  max-width: min(560px, 82vw);
  display: block;
  border-radius: calc(var(--radius-photo) - var(--s-1));
  object-fit: cover;
  background: var(--accent-soft);
}
/* contribute 0 to the figure's intrinsic width, then fill it — so the caption
   wraps to the media's width instead of stretching the card out to one long line */
.strip-track .fig-cap { width: 0; min-width: 100%; white-space: normal; }

/* A large photo and a compact overview of the full robotics collection. */
.robotics-gallery { margin-top: var(--s-6); }
.robotics-gallery.is-enhanced .robotics-gallery-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--s-5);
  align-items: start;
}
.robotics-viewer { margin: 0; min-width: 0; }
.robotics-featured {
  position: relative;
  display: block;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  border-radius: var(--radius-photo);
  background: var(--accent-soft);
}
.robotics-featured img { width: 100%; height: 100%; object-fit: contain; }
.robotics-enlarge {
  position: absolute;
  right: var(--s-3);
  bottom: var(--s-3);
  padding: var(--s-1) var(--s-2);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-xs);
  box-shadow: var(--shadow-1);
}
.robotics-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  padding-top: var(--s-3);
  color: var(--ink-soft);
  font-size: var(--fs-xs);
}
.robotics-controls { display: flex; gap: var(--s-2); align-items: center; margin-left: auto; }
.robotics-controls .lb-btn,
.photo-lightbox .lb-btn { min-width: calc(var(--s-6) + var(--s-3)); min-height: calc(var(--s-6) + var(--s-3)); }
.robotics-position { font-family: var(--font-mono); white-space: nowrap; }
.robotics-thumbnails {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: var(--s-2);
  list-style: none;
  padding: 0;
  margin: 0;
}
.robotics-gallery.is-enhanced .robotics-thumbnails { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.robotics-thumbnails a {
  display: block;
  aspect-ratio: 1;
  padding: var(--s-1);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.robotics-thumbnails a:hover { box-shadow: inset 0 0 0 1px var(--accent-deep); }
.robotics-thumbnails a[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--accent-deep); background: var(--accent-soft); }
.robotics-thumbnails img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 720px) {
  .robotics-gallery.is-enhanced .robotics-gallery-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .robotics-featured { aspect-ratio: 4 / 3; }
  .robotics-thumbnails { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .robotics-gallery.is-enhanced .robotics-thumbnails {
    grid-template-columns: none;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: var(--s-8);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: var(--s-1) var(--s-1) var(--s-2);
  }
  .robotics-gallery.is-enhanced .robotics-thumbnails a { aspect-ratio: 4 / 3; }
}

.strip-nav {
  position: absolute;
  top: calc(var(--strip-h) / 2 + var(--s-2));
  transform: translateY(-50%);
  z-index: 2;
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: background var(--t-micro), color var(--t-micro), opacity var(--t-micro);
}
.media-strip.is-enhanced .strip-nav { display: block; }
.strip-nav:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent-deep); }
.strip-nav:disabled { opacity: 0; pointer-events: none; }
.strip-prev { left: var(--s-3); }
.strip-next { right: var(--s-3); }

.strip-count {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  margin: var(--s-2) 0 0;
}
.media-strip:not(.is-enhanced) .strip-count,
.media-strip.is-static .strip-count { display: none; }

@media (max-width: 720px) {
  .media-strip { --strip-h: 260px; }
  .strip-prev { left: var(--s-1); }
  .strip-next { right: var(--s-1); }
}
@media (prefers-reduced-motion: reduce) {
  .strip-track { scroll-behavior: auto; }
}

.lightbox {
  border: 0;
  border-radius: var(--radius-photo);
  padding: var(--s-2);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  max-width: min(90vw, 960px);
}
.lightbox::backdrop { background: rgba(22, 35, 63, 0.7); }
.lightbox figure { margin: 0; }
.lightbox img { border-radius: calc(var(--radius-photo) - var(--s-1)); max-height: 75vh; width: auto; margin-inline: auto; }
.lb-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-1) var(--s-1);
}
.lb-bar .fig-cap { padding: 0; }
.lb-btn {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  padding: var(--s-1) var(--s-3);
  cursor: pointer;
  transition: border-color var(--t-micro), color var(--t-micro);
}
.lb-btn:hover { border-color: var(--accent-deep); color: var(--accent-deep); }

.photo-lightbox .lb-bar { flex-wrap: wrap; }
.photo-lightbox .lb-controls { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-left: auto; }
.photo-lightbox img { object-fit: contain; }
.photo-lightbox .lb-original { display: inline-flex; align-items: center; text-decoration: none; }
.spavle-gallery [data-lightbox],
.activity-gallery [data-lightbox],
.shared-harmonies-gallery [data-lightbox] { display: block; }
.spavle-gallery .strip-track > li,
.spavle-gallery .fig,
.activity-gallery .strip-track > li,
.activity-gallery .fig,
.shared-harmonies-gallery .strip-track > li,
.shared-harmonies-gallery .fig { max-width: 100%; }
.spavle-gallery .strip-media,
.activity-gallery .strip-media,
.shared-harmonies-gallery .strip-media { max-width: min(560px, 100%); object-fit: contain; }
.spavle-poster-link { margin-top: var(--s-3); font-size: var(--fs-xs); }

/* ---------- 12. Media embeds ---------- */
.piano-performances { margin-top: var(--s-7); }
.performance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.performance-video { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-photo); background: var(--surface); }
.performance-video iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.performance-video figcaption { display: grid; gap: var(--s-2); padding: var(--s-4); }
.performance-video figcaption span { color: var(--ink-soft); }
.performance-video figcaption a { justify-self: start; font-size: var(--fs-xs); }
@media (max-width: 720px) {
  .performance-grid { grid-template-columns: minmax(0, 1fr); }
}
.embed-slot {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-photo);
  padding: var(--s-5);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-soft);
}

/* Keep the story and Spotify episode browser balanced. */
.innovators-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "copy spotify"; gap: var(--s-5) var(--s-7); align-items: center; }
.innovators-copy { grid-area: copy; min-width: 0; }
.social-windows { min-width: 0; perspective: 1200px; }
.social-window { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 30px -18px rgba(22,35,63,.35); }
.innovators-layout > .social-window--spotify { grid-area: spotify; align-self: stretch; display: flex; flex-direction: column; contain: size; min-height: 540px; }
.innovators-layout > .social-window--spotify .social-window-content { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.innovators-layout > .social-window--spotify .episode-list { flex: 1; height: 0; min-height: 248px; max-height: none; }
.social-window-bar, .social-spotify-player, .episode-list-heading, .social-window-foot { flex-shrink: 0; }
.social-window-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 46px; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); background: var(--paper); }
.window-dots { display: flex; gap: 5px; }
.window-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.window-dots i:last-child { background: var(--accent); }
.social-window-name { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); font-weight: 600; }
.social-window-name .pod-brand { width: 17px; height: 17px; }
.window-expand { display: grid; place-items: center; width: 30px; height: 30px; padding: 5px; border: 0; border-radius: var(--radius); color: var(--ink); background: transparent; cursor: pointer; }
.window-expand[hidden] { display: none; }
.window-expand:hover { background: var(--accent-soft); }
.window-expand svg { width: 20px; height: 20px; }
.social-window-content { min-width: 0; }
.social-spotify-player { display: block; width: 100%; height: 152px; border: 0; background: var(--accent-soft); }
.episode-list-heading { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); font-size: var(--fs-xs); border-bottom: 1px solid var(--line); }
.episode-list-heading > span { color: var(--ink-soft); white-space: nowrap; }
.episode-list { max-height: 248px; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 0; list-style: none; scrollbar-color: var(--accent) var(--paper); scrollbar-width: thin; }
.episode-list li + li { border-top: 1px solid var(--line); }
.episode-list a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-4); color: var(--ink); text-decoration: none; transition: background var(--t-micro); }
.episode-list a:hover, .episode-list a:focus-visible { background: var(--paper); }
.episode-list a[aria-current="true"] { background: var(--accent-soft); }
.episode-play { font-size: 22px; line-height: 1; }
.episode-title { font-size: var(--fs-xs); line-height: 1.45; }
.episode-duration { color: var(--ink-soft); font-size: 11px; white-space: nowrap; }
.episode-announcement { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.social-window--spotify {
  --surface: #121212;
  --paper: #1f1f1f;
  --ink: #ffffff;
  --ink-soft: #b3b3b3;
  --line: #2a2a2a;
  --accent: #1ed760;
  --accent-deep: #1ed760;
  --accent-soft: #262626;
  color: var(--ink);
  color-scheme: dark;
}
.social-window--spotify .social-window-bar { background: #181818; }
.social-window--spotify .social-window-name { color: #1ed760; font-size: 15px; font-weight: 600; }
.social-window--spotify .social-spotify-player { background: #282828; border-radius: 12px; }
.social-window--spotify .episode-list { scrollbar-color: #727272 #121212; }
.social-window--spotify .episode-list a { gap: var(--s-3); }
.social-window--spotify .episode-list a[aria-current="true"] { box-shadow: inset 3px 0 #1ed760; }
.social-window--spotify .episode-list a[aria-current="true"] .episode-title { color: #1ed760; }
.social-window--spotify .episode-play { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #333333; color: #ffffff; font-size: 12px; }
.social-window--spotify .episode-list a:hover .episode-play,
.social-window--spotify .episode-list a[aria-current="true"] .episode-play { background: #1ed760; color: #000000; }
.social-window--spotify a:focus-visible, .social-window--spotify button:focus-visible { outline-color: #1ed760; }
.social-window-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2); padding: 10px var(--s-3); color: var(--ink-soft); font-size: 11px; border-top: 1px solid var(--line); }
.social-window-foot a { white-space: nowrap; }
.social-windows.is-arriving .social-window { animation: window-unfold 850ms cubic-bezier(.2,.7,.2,1) both; transform-origin: center top; }
@keyframes window-unfold { from { opacity: 0; transform: translateY(28px) rotateX(-10deg) scale(.97); } to { opacity: 1; transform: none; } }
.social-window-dialog { width: min(680px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 0; background: transparent; color: var(--ink); overflow: auto; }
.social-window-dialog::backdrop { background: rgba(22,35,63,.7); }
.social-window-dialog .social-window { margin: 0; }
.social-window-dialog[open] { animation: window-unfold 240ms ease-out; }
.window-dialog-close { display: block; margin: 0 0 var(--s-3) auto; padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-xs); cursor: pointer; }
@media (max-width: 1000px) {
  .innovators-layout { gap: var(--s-5); }
}
@media (max-width: 780px) {
  .innovators-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "spotify"; gap: var(--s-5); max-width: 560px; margin-inline: auto; }
  .innovators-layout > .social-window--spotify { contain: none; min-height: 0; }
  .innovators-layout > .social-window--spotify .episode-list { flex: none; height: 248px; }
}
@media (max-width: 359px) {
  .innovators-layout > .social-window--spotify { width: calc(100% + 48px); margin-inline: -24px; }
  .social-window-dialog { width: 100%; }
  .social-window-foot { padding-inline: var(--s-2); }
}
@media (prefers-reduced-motion: reduce) {
  .social-windows.is-arriving .social-window, .social-window-dialog[open] { animation: none; }
}

/* ---- podcast triggers (community.html, #innovators-path) ---- */
.pod-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin: var(--s-5) 0 0;
  padding: 0;
  list-style: none;
}
.pod-links .btn { display: inline-flex; align-items: center; gap: var(--s-2); }
.pod-links .btn--instagram {
  background: linear-gradient(115deg, #6f28bc 0%, #ae2378 45%, #c53354 72%, #b84e1b 100%);
  color: #ffffff;
  border-color: transparent;
}
.pod-links .btn--instagram:hover { background: linear-gradient(115deg, #592098 0%, #921d65 45%, #a72b47 72%, #993f16 100%); color: #ffffff; }
.pod-brand { width: 1.25em; height: 1.25em; flex: 0 0 auto; }

/* ---- podcast popup: a <dialog> built on demand by main.js §6 ----
   The dialog is an unpadded, transparent shell so that a backdrop click is
   exactly `e.target === dialog`; .pod-panel carries the surface, padding and
   scrolling. --pod-pad is the panel inset the stave bleeds through. */
.pod-dialog {
  width: min(600px, calc(100% - 2 * var(--s-4)));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
/* same wash as .lightbox; the fallback covers engines where ::backdrop
   does not inherit custom properties (Safari < 17.4) */
.pod-dialog::backdrop { background: var(--band, #16233F); opacity: 0.7; }
.pod-panel {
  --pod-pad: var(--s-5);
  max-height: calc(100vh - 2 * var(--s-4));
  max-height: calc(100dvh - 2 * var(--s-4));
  overflow: auto;
  overscroll-behavior: contain;
  padding: var(--s-3) var(--pod-pad) var(--pod-pad);
  background: var(--surface);
  border-radius: var(--radius-photo);
  box-shadow: var(--shadow-2);  /* reserved for dialogs */
}

/* The signature line across the top: a sensor blip that settles into the
   five-line stave. Same 25px / 6px pitch as .stave-rule. Rendered 1:1
   (xMinYMid slice) so the hairlines stay one device pixel; anything past the
   panel edge is clipped. */
.pod-stave {
  display: block;
  width: calc(100% + 2 * var(--pod-pad));
  max-width: none;
  height: 25px;
  margin: 0 calc(-1 * var(--pod-pad)) var(--s-4);
  overflow: hidden;
  fill: none;
  stroke-width: 1;
}
.pod-stave-line { stroke: var(--line); }
.pod-stave-signal { stroke: var(--accent-deep); stroke-dasharray: 1; stroke-dashoffset: 0; }
/* [open] restarts these every time the dialog is shown */
.pod-dialog[open] .pod-stave-signal { animation: pod-draw var(--t-draw) ease-out; }
.pod-dialog[open] .pod-stave-line {
  animation: pod-fade var(--t-micro);
  animation-delay: calc(var(--t-draw) / 2);
  animation-fill-mode: backwards;
}

/* shell motion: rise in, sink out (.is-closing is added by main.js) */
.pod-dialog[open] { animation: pod-rise var(--t-micro); }
.pod-dialog[open]::backdrop { animation: pod-fade var(--t-micro); }
.pod-dialog.is-closing { animation: pod-sink var(--t-micro) forwards; }
.pod-dialog.is-closing::backdrop { animation: pod-fade-out var(--t-micro) forwards; }
@keyframes pod-draw { from { stroke-dashoffset: 1; } }
@keyframes pod-fade { from { opacity: 0; } }
@keyframes pod-fade-out { to { opacity: 0; } }
@keyframes pod-rise { from { opacity: 0; transform: translateY(var(--s-2)); } }
@keyframes pod-sink { to { opacity: 0; transform: translateY(var(--s-2)); } }

.pod-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
}
.pod-eyebrow { margin-bottom: var(--s-1); }
.pod-title { font-size: var(--fs-2xl); margin: 0; }
.pod-close { flex: 0 0 auto; padding: var(--s-2) var(--s-3); }

/* the player mat (design system §5.6) */
.pod-mat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-photo);
  padding: var(--s-2);
}
.pod-player {
  display: block;
  width: 100%;
  height: 352px;  /* Spotify's list player; the compact one below */
  border: 0;
  border-radius: calc(var(--radius-photo) - var(--s-1));
}
.pod-status {
  margin: var(--s-2) var(--s-2) var(--s-1);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-soft);
}
.pod-mat.is-loaded .pod-status { display: none; }
/* the show's facts in the mono data layer */
.pod-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-1) var(--s-4);
  margin: var(--s-4) 0 0;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}
.pod-facts dt { color: var(--ink-soft); }
.pod-facts dd { margin: 0; }
.pod-note {
  margin: var(--s-3) 0 0;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-soft);
}

/* Instagram cannot be framed: a readout card in the mono data layer */
.pod-mat--card { padding: var(--s-5); }
.pod-handle {
  margin: 0 0 var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.pod-blurb { margin: 0; max-width: var(--measure); }
.pod-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--s-4);
  margin-top: var(--s-5);
}
.pod-stats .stat { padding-inline: 0; border-left: 0; }
.pod-stats .stat + .stat { padding-left: var(--s-4); border-left: 1px solid var(--line); }
.pod-mat--card .tag-row { margin-top: var(--s-4); }
.pod-cta { margin: var(--s-5) 0 0; }

.pod-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
  margin: var(--s-4) 0 0;
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

/* page scroll lock while the popup is open (native <dialog> does not do this) */
html.is-modal { overflow: hidden; scrollbar-gutter: stable; }

@media (max-width: 480px) {
  /* Spotify's player scrolls sideways below ~300px, so trim the insets */
  .pod-dialog { width: calc(100% - 2 * var(--s-3)); }
  .pod-panel { --pod-pad: var(--s-3); }
  .pod-mat { padding: var(--s-1); }
  .pod-mat--card { padding: var(--s-4); }
}
@media (max-width: 359px) {
  /* 320-wide phones: only an edge-to-edge player clears that 300px floor */
  .pod-dialog { width: calc(100% - 2 * var(--s-2)); }
  .pod-mat--player {
    margin-inline: calc(-1 * var(--pod-pad));
    padding: 0;
    border-inline: 0;
    border-radius: 0;
  }
  .pod-mat--player .pod-player { border-radius: 0; }
}
@media (max-width: 480px), (max-height: 640px) {
  .pod-player { height: 152px; }  /* Spotify's compact single-row player */
}
@media (prefers-reduced-motion: reduce) {
  /* no rise, sink or draw: the stave is simply there (the fade is kept in §14) */
  .pod-stave-signal { stroke-dashoffset: 0; }
  .pod-stave-line { opacity: 1; }
}

/* ---------- 13. Footer ---------- */
.site-footer {
  background: var(--band);
  color: var(--on-band-soft);
}
.site-footer a { color: var(--on-band); }
.site-footer a:hover { color: var(--accent); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3) var(--s-5);
  padding-block: var(--s-6);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}
.foot-links { display: flex; flex-wrap: wrap; gap: var(--s-4); list-style: none; margin: 0; padding: 0; }
.foot-stamp { color: var(--on-band-soft); }

/* ---------- 14. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover .card-media img,
  .gallery a:hover img { transform: none; }
  /* the podcast popup keeps its opacity fade — no movement */
  .pod-dialog[open],
  .pod-dialog[open]::backdrop { animation: pod-fade var(--t-micro) !important; }
}

/* resume quick-access chip in the nav */
.nav-resume {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 2px var(--s-3);
  transition: border-color var(--t-micro), color var(--t-micro);
}
/* the stave underline belongs to plain nav links, not the chip.
   NB: must outweigh `.nav-links a::after`, or the chip inherits a 7px
   underline and the pill radius swells into an oval around it. */
.nav-links a.nav-resume::after { display: none; }

/* download affordance: the arrow nudges down on hover */
.dl-arrow {
  font-size: 0.9em;
  line-height: 1;
  transition: transform var(--t-micro);
}
.nav-links a.nav-resume:hover { border-color: var(--accent-deep); }
.nav-links a.nav-resume:hover .dl-arrow { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) {
  .dl-arrow,
  .nav-links a.nav-resume:hover .dl-arrow { transition: none; transform: none; }
}
