:root {
    --bg: oklch(1 0 0);
    --ink: oklch(0.16 0.01 260);
    --ink-soft: oklch(0.30 0.01 260);
    --rule: oklch(0.82 0.008 260);
    --accent: #1a1a1a;
    --link: oklch(0.44 0.20 258);
    --link-soft: color-mix(in oklch, var(--link) 45%, transparent);
    --serif: "IBM Plex Serif", "Georgia", serif;
    --sans: "IBM Plex Sans", "Helvetica Neue", "Arial", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
    --sans-active: var(--sans);
    --title: "Schibsted Grotesk", "Helvetica Neue", "Arial", sans-serif;
    --grid-pad: clamp(20px, 4vw, 56px);
    --edge: clamp(24px, 5vw, 84px);
  }

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

  body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans-active);
    font-size: 15px;
    line-height: 1.55;
    font-feature-settings: "ss01", "cv01";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    min-height: 100vh;
  }

  /* ─── Header ─────────────────────────────── */
  header.site {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 34px var(--edge);
    z-index: 50;
    mix-blend-mode: multiply;
    pointer-events: none;
    transition: transform 380ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }
  header.site.nav-hidden { transform: translateY(-115%); }
  header.site > * { pointer-events: auto; }

  .wordmark {
    font-family: var(--mono);
    font-size: 14px;
    letter-spacing: 0.16em;
    font-weight: 500;
    text-transform: uppercase;
    white-space: nowrap;
  }

  nav.primary {
    display: flex;
    gap: 36px;
    font-family: var(--mono);
    font-size: 14px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  nav.primary a {
    color: var(--ink);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
  }
  nav.primary a::after {
    content: "";
    position: absolute;
    left: 0; right: 100%;
    bottom: 0;
    height: 1px;
    background: var(--link);
    transition: right 280ms cubic-bezier(.2,.7,.2,1);
  }
  nav.primary a:hover { color: var(--link); }
  nav.primary a:hover::after { right: 0; }
  nav.primary a.active { opacity: 0.4; }

  /* ─── Stage layout ───────────────────────── */
  main.stage {
    display: block;
    padding: 148px 0 140px;
    max-width: none;
    margin: 0;
  }
  /* Wide: content centers naturally now the player card is gone */
  @media (min-width: 1100px) {
    main.stage { padding-bottom: 140px; }
  }

  /* ─── Left: generative visual + meta ─────── */
  aside.left {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    right: var(--grid-pad);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 200px;
  }

  .visual-frame {
    position: relative;
    aspect-ratio: 4 / 5;
    width: 100%;
    overflow: hidden;
    background: oklch(0.97 0.004 250);
    border: 1px solid var(--rule);
  }
  .visual-frame canvas {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    display: block;
  }
  .visual-frame canvas.hidden { display: none; }
  /* Full-bleed mode: shader becomes the page bg */
  #liquid-bg {
    position: fixed; inset: 0;
    z-index: -2;
    width: 100vw; height: 100vh;
    display: none;
    pointer-events: none;
  }
  body[data-coverage="full"] #liquid-bg { display: block; }
  body[data-coverage="full"] .visual-frame { display: none; }
  body[data-coverage="full"] { background: transparent; }
  body[data-coverage="full"]::before {
    content: "";
    position: fixed; inset: 0;
    background: color-mix(in oklch, var(--bg) var(--bg-wash, 67%), transparent);
    z-index: -1;
    pointer-events: none;
  }
  body[data-coverage="full"] header.site {
    background: transparent;
    backdrop-filter: none;
  }
  /* subtle vignette so the shader reads as a framed plate */
  .visual-frame::after {
    content: "";
    position: absolute; inset: 0;
    pointer-events: none;
    background:
      radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.06) 100%);
    mix-blend-mode: multiply;
  }
  .visual-caption {
    position: absolute;
    left: 12px; bottom: 12px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--ink-soft);
    text-transform: uppercase;
    padding: 4px 8px;
    background: color-mix(in oklch, var(--bg) 70%, transparent);
    backdrop-filter: blur(4px);
  }

  .meta-block {
    font-family: var(--mono);
    font-size: 10.5px;
    line-height: 1.7;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
    text-transform: uppercase;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 6px 12px;
  }
  .meta-block dt { font-weight: 500; color: var(--ink); }
  .meta-block dd { margin: 0; }

  /* ─── Bottom-locked media player ─────────── */
  /* ─── Media player ────────────────────────
     Two layouts driven by one DOM node:
       Wide  (≥ 1100px): fixed mid-right vertical card
       Narrow (< 1100px): full-width bottom bar
  */
  .player-bar {
    position: fixed;
    z-index: 50;
    font-family: var(--mono);
    color: var(--ink);
    background: transparent;
    transition: opacity 0.3s ease;
  }

  /* ═══ NARROW (default): bottom bar ═══════════ */
  .player-bar {
    left: 0; right: 0;
    bottom: 0;
    border-top: 1px solid var(--rule);
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* Progress (bottom-bar mode: thin line spanning top edge) */
  .pb-progress {
    position: relative;
    height: 1px;
    background: var(--rule);
    cursor: pointer;
  }
  .pb-progress::before {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: -8px; bottom: -8px;
  }
  .pb-progress-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0%;
    background: var(--ink);
    transition: width 0.15s linear;
  }
  .pb-progress-head {
    position: absolute;
    left: 0; top: 50%;
    transform: translate(-50%, -50%);
    width: 6px; height: 6px;
    background: var(--ink);
    border-radius: 50%;
    pointer-events: none;
    transition: left 0.15s linear;
    opacity: 0;
  }
  .player-bar:hover .pb-progress-head { opacity: 1; }

  .pb-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 6px clamp(20px, 4vw, 40px);
    min-height: 38px;
  }

  .pb-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-size: 11px;
    letter-spacing: 0.02em;
  }
  .pb-title {
    font-family: var(--serif);
    font-size: 14px;
    letter-spacing: -0.005em;
    color: var(--ink);
    flex-shrink: 0;
  }
  .pb-track {
    color: var(--ink-soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  .pb-sep-dot {
    color: var(--ink-soft);
    opacity: 0.4;
    flex-shrink: 0;
  }

  .pb-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: center;
  }
  .pb-btn {
    width: 24px; height: 24px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--bg);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: opacity 0.18s;
    padding: 0;
    border-radius: 0;
  }
  .pb-btn:hover { opacity: 0.78; }
  .pb-btn:disabled { opacity: 0.3; cursor: default; }
  .pb-btn svg { width: 9px; height: 9px; display: block; }
  .pb-btn-primary { width: 30px; height: 24px; }
  .pb-btn-primary svg { width: 10px; height: 10px; }

  .pb-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    justify-self: end;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
  }
  .pb-time { display: inline-flex; gap: 4px; }
  .pb-slash { opacity: 0.4; }
  .pb-index { letter-spacing: 0.14em; }
  .pb-link {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
    transition: color 0.2s;
  }
  .pb-link:hover { color: var(--accent); }

  /* Hidden interactive iframe */
  .sc-iframe {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0; pointer-events: none;
    left: -9999px;
  }

  /* Mobile bottom-bar tightening */
  @media (max-width: 1099px) {
    .player-bar {
      background: color-mix(in oklch, var(--bg) 90%, transparent);
      backdrop-filter: blur(14px) saturate(1.2);
      -webkit-backdrop-filter: blur(14px) saturate(1.2);
    }
  }
  @media (max-width: 640px) {
    .pb-inner {
      grid-template-columns: 1fr auto;
      grid-template-rows: auto auto;
      gap: 8px 12px;
      padding: 10px 16px 12px;
    }
    .pb-info { grid-column: 1 / 2; grid-row: 1; font-size: 10.5px; }
    .pb-info .pb-sep-dot { display: none; }
    .pb-title { display: none; }
    .pb-controls {
      grid-column: 2 / 3;
      grid-row: 1 / 3;
      justify-self: end;
      gap: 8px;
    }
    .pb-btn { width: 22px; height: 22px; }
    .pb-btn-primary { width: 28px; height: 22px; }
    .pb-meta { grid-column: 1 / 2; grid-row: 2; justify-self: start; gap: 12px; font-size: 9px; }
    .pb-index { display: none; }
  }

  /* ═══ WIDE (≥ 1100px): fixed mid-right card ═══════════ */
  @media (min-width: 1100px) {
    .player-bar {
      left: auto;
      bottom: auto;
      right: clamp(28px, 3.5vw, 56px);
      top: 50%;
      transform: translateY(-50%);
      border-top: 0;
      width: 220px;
      padding-bottom: 0;
    }

    /* Progress moves below the title; full-width hairline inside the card */
    .pb-progress { order: 2; margin-top: 4px; }

    /* Stack the layout vertically */
    .pb-inner {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 14px;
      padding: 0;
      min-height: 0;
    }

    /* Info: title large, track below */
    .pb-info {
      order: 1;
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
      font-size: 12px;
    }
    .pb-info .pb-sep-dot { display: none; }
    .pb-title {
      font-family: var(--serif);
      font-size: 24px;
      letter-spacing: -0.012em;
      line-height: 1;
    }
    .pb-track {
      width: 100%;
      font-size: 11px;
      letter-spacing: 0.03em;
      color: var(--ink-soft);
    }

    /* Controls + time on one row */
    .pb-controls {
      order: 3;
      justify-self: flex-start;
      justify-content: flex-start;
      gap: 8px;
    }

    .pb-meta {
      order: 4;
      justify-self: flex-start;
      justify-content: space-between;
      width: 100%;
      gap: 12px;
      font-size: 9.5px;
    }
    .pb-index { display: none; } /* hidden in card mode — keep it lean */

    /* Reorder the children explicitly so flex order works
       (the DOM is: progress, inner[info, controls, meta]) */
    .player-bar { display: flex; flex-direction: column; }
    .player-bar .pb-progress { order: 3; }
    .player-bar .pb-inner { order: 1; }
    .player-bar .pb-inner .pb-info { order: 1; }
    .player-bar .pb-inner .pb-controls { order: 3; }
    .player-bar .pb-inner .pb-meta { order: 4; }
  }

  /* ─── Right: content ─────────────────────── */
  section.content {
    max-width: none;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(60px, 7vw, 104px);
  }

  .lede {
    font-family: var(--sans-active);
    font-size: clamp(28px, 3.4vw, 44px);
    line-height: 1.18;
    letter-spacing: -0.022em;
    font-weight: 400;
    text-wrap: balance;
    margin: 0;
    color: var(--ink);
    max-width: 22ch;
  }
  .lede em {
    font-style: italic;
    font-family: var(--serif);
    font-weight: 400;
  }

  h2.section-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 500;
    margin: 0;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 12px;
  }
  h2.section-label::before { content: none; }

  .prose { padding: 0 var(--edge); }
  .prose p {
    margin: 0 0 1.1em 0;
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.62;
    max-width: 60ch;
    text-wrap: pretty;
    letter-spacing: 0;
  }
  .prose p:last-child { margin-bottom: 0; }
  .prose .term {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
  }

  /* ─── Works list ─────────────────────────── */
  .works {
    display: flex;
    flex-direction: column;
  }
  /* Section: editorial index — label in a left meta rail,
     all bodies (prose + works) share ONE content measure so
     every section aligns on the same left edge and width. */
  .section {
    display: block;
  }
  .section-head {
    margin: 0 0 20px 0;
    padding: 0 var(--edge);
  }
  .section-head h2.section-label {
    flex-direction: row;
    align-items: center;
  }
  .section-body { min-width: 0; }
  @media (max-width: 760px) {
    .section {
      grid-template-columns: 1fr;
      gap: 0;
    }
    .section-head {
      margin-bottom: 16px;
      position: static;
    }
  }

  /* ─── Opening: Profile reads as normal body prose ─ */
  #info .prose strong { font-weight: 500; }

  /* ─── Masthead: the role stated large — focal entry moment ─── */
  .masthead {
    padding: 0 var(--edge);
    margin: clamp(8px, 2vw, 28px) 0 clamp(64px, 8vw, 116px);
    max-width: 1100px;
  }
  .masthead-role {
    font-family: var(--sans-active);
    font-size: clamp(38px, 6.4vw, 82px);
    font-weight: 400;
    letter-spacing: -0.038em;
    line-height: 0.96;
    margin: 0;
    color: var(--ink);
  }
  .masthead-note {
    margin: clamp(22px, 3vw, 34px) 0 0;
    max-width: 52ch;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.04em;
    line-height: 1.75;
    text-transform: uppercase;
    color: var(--ink-soft);
  }
  @media (max-width: 600px) {
    .masthead { margin-bottom: clamp(48px, 12vw, 72px); }
    .masthead-role { font-size: clamp(33px, 11vw, 50px); letter-spacing: -0.03em; }
    .masthead-note { font-size: 11px; }
  }

  /* ─── Contact: lean index ──────────────────────────── */
  .contact { padding: 0 var(--edge); }
  .contact-email {
    display: inline-block;
    font-family: var(--sans-active);
    font-size: clamp(15px, 1.4vw, 17px);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--link-soft);
    padding-bottom: 2px;
    transition: color 180ms ease, border-color 180ms ease;
  }
  .contact-email:hover { color: var(--link); border-color: var(--link); }

  .contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    margin-top: clamp(8px, 1vw, 12px);
  }
  .contact-row a {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 160ms ease;
  }
  .contact-row a::after {
    content: "↗";
    margin-left: 5px;
    font-size: 10px;
    color: var(--link);
    opacity: 0.55;
    transition: opacity 160ms ease;
  }
  .contact-row a:hover { color: var(--link); }
  .contact-row a:hover::after { opacity: 1; }

  /* ─── Info top: text + performance photo, two columns ─── */
  .info-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 32%);
    gap: clamp(32px, 5vw, 72px);
    align-items: start;
    padding: 0 var(--edge);
  }
  .info-top-text {
    display: flex;
    flex-direction: column;
    gap: clamp(48px, 6vw, 80px);
  }
  .info-top-text .section-head,
  .info-top-text .prose { padding: 0; }
  .info-photo {
    margin: 0;
  }
  .info-side {
    display: flex;
    flex-direction: column;
    gap: clamp(28px, 3.4vw, 44px);
    position: sticky;
    top: 120px;
  }
  .info-contact .section-head,
  .info-contact .section-body,
  .info-contact .contact { padding: 0; }
  .info-photo img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(0.15) contrast(1.02);
  }
  .info-photo figcaption {
    margin-top: 12px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }
  @media (max-width: 760px) {
    .info-top {
      grid-template-columns: 1fr;
      gap: clamp(40px, 8vw, 56px);
    }
    .info-side { position: static; }
    .info-photo { order: -1; }
  }

  /* Work rows fill the shared content measure */
  .work {
    display: grid;
    grid-template-columns: 72px minmax(0, clamp(340px, 40vw, 470px)) auto 1fr;
    gap: 0 clamp(20px, 3vw, 40px);
    padding: 26px var(--edge);
    align-items: baseline;
    transition: background 200ms ease;
  }
  .work:hover { background: color-mix(in oklch, var(--accent) 4%, transparent); }

  .work .side {
    justify-content: flex-start;
    text-align: left;
  }
  .work .side span { color: color-mix(in oklch, var(--ink) 40%, transparent); }
  .work .side .listen { font-weight: 500; }

  .work .year {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    text-transform: uppercase;
    padding-top: 1px;
  }

  .work .body { display: flex; flex-direction: column; gap: 10px; }
  .work .title {
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.35;
  }
  .work .desc {
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.62;
    color: var(--ink);
    max-width: 60ch;
    margin: 0;
    text-wrap: pretty;
    letter-spacing: 0;
  }

  .work .side {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    text-align: left;
    gap: clamp(14px, 2vw, 28px);
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding-top: 1px;
  }
  .work .listen {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid var(--link-soft);
    padding-bottom: 1px;
    transition: padding 220ms ease, border-color 220ms ease;
  }
  .work .listen:hover { border-bottom-color: var(--link); }
  .work .listen::after {
    content: " ↗";
    display: inline-block;
    transition: transform 280ms cubic-bezier(.2,.7,.2,1);
  }
  .work .listen:hover::after { transform: translate(2px, -2px); }

  /* Denser rows for the long event list */
  #live .work {
    grid-template-columns: 52px minmax(0, clamp(300px, 44vw, 480px)) auto 1fr;
    gap: 0 clamp(18px, 2.4vw, 32px);
    padding: 18px var(--edge);
    align-items: baseline;
  }
  #live .work .title {
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.5;
    color: var(--ink);
  }
  #live .work .year {
    font-size: 11.5px;
    letter-spacing: 0.08em;
    padding-top: 0;
  }
  #live .work .side {
    justify-content: flex-start;
    text-align: left;
    gap: clamp(12px, 1.6vw, 22px);
    font-size: 11.5px;
    letter-spacing: 0.08em;
    padding-top: 0;
  }
  #live .work .side span:first-child { min-width: 52px; }
  #live .work .body { gap: 0; }
  #live .work .venue {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: color-mix(in oklch, var(--ink) 42%, transparent);
    margin-top: 5px;
  }
  #live .work .listen { font-size: 11.5px; letter-spacing: 0.08em; }
  .side .side-links { display: flex; gap: 14px; }

  /* ─── Marquee ────────────────────────────── */
  .marquee {
    position: fixed;
    bottom: 49px; left: 0; right: 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: color-mix(in oklch, var(--bg) 82%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    z-index: 45;
    height: 22px;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(to right, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
  }
  .marquee.hidden { display: none; }
  .marquee-track {
    display: flex;
    align-items: center;
    gap: 44px;
    white-space: nowrap;
    animation: marquee 90s linear infinite;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding-left: 56px;
    will-change: transform;
  }
  .marquee-track .item {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
  }
  .marquee-track .item .tag {
    font-size: 7.5px;
    letter-spacing: 0.22em;
    color: color-mix(in oklch, var(--ink-soft) 65%, transparent);
  }
  .marquee-track .item .name {
    color: var(--ink);
    font-weight: 500;
    letter-spacing: 0.1em;
    font-size: 9px;
  }
  .marquee-track .sep {
    width: 2px; height: 2px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.55;
    flex-shrink: 0;
    display: inline-block;
  }
  @keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
  }
  .marquee:hover .marquee-track { animation-play-state: paused; }

  /* On narrow screens, push marquee above the wrapped player bar */
  @media (max-width: 640px) {
    .marquee { bottom: 70px; }
  }

  /* ─── Status pill (top-right corner thing) ─ */
  .status {
    position: fixed;
    bottom: 56px; right: var(--grid-pad);
    z-index: 30;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .status .led {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: oklch(0.62 0.14 145);
    box-shadow: 0 0 0 0 oklch(0.62 0.14 145 / 0.6);
    animation: pulse 2s infinite;
  }
  @keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 oklch(0.62 0.14 145 / 0.5); }
    50%      { box-shadow: 0 0 0 6px oklch(0.62 0.14 145 / 0); }
  }

  /* ─── Type variants (set on body via JS) ── */
  body[data-type="serif"] {
    --sans-active: var(--serif);
  }
  body[data-type="inter"] {
    --sans-active: "Inter Tight", "Helvetica Neue", sans-serif;
  }

  /* ─── Responsive ─────────────────────────── */
  @media (max-width: 900px) {
    main.stage {
      padding: 100px 0 120px;
    }
    .work {
      grid-template-columns: 64px minmax(0, 1fr);
      gap: 4px 20px;
    }
    .work .side {
      grid-column: 2 / -1;
      justify-content: flex-start;
      align-items: baseline;
    }
    #live .work {
      grid-template-columns: 46px minmax(0, 1fr);
      gap: 4px 18px;
    }
    #live .work .side { grid-column: 2 / -1; }
    nav.primary { gap: 18px; }
  }

  /* ─── Status pill (legacy, inert) ─ */
  .status { display: none; }

  /* ─── Chapter rail (left margin) ─ */
  .rail {
    position: fixed;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 35;
    padding: 14px 10px;
    mix-blend-mode: multiply;
  }
  .rail-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--ink-soft);
    text-decoration: none;
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.55;
    transition: opacity 240ms ease, color 240ms ease;
    cursor: pointer;
  }
  .rail-item .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    border: 1px solid var(--ink-soft);
    background: transparent;
    transition: background 240ms ease, transform 240ms ease, border-color 240ms ease;
    flex-shrink: 0;
  }
  .rail-item .lbl {
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 240ms ease, transform 240ms ease;
    pointer-events: none;
    white-space: nowrap;
  }
  .rail:hover .rail-item .lbl,
  .rail-item.active .lbl {
    opacity: 1;
    transform: none;
  }
  .rail:hover .rail-item { opacity: 0.85; }
  .rail-item.active {
    color: var(--ink);
    opacity: 1;
  }
  .rail-item.active .dot {
    background: var(--ink);
    border-color: var(--ink);
    transform: scale(1.15);
  }
  .rail-item:hover { color: var(--ink); opacity: 1; }

  /* ─── Now playing widget (bottom-right) ─ */
  .now {
    position: fixed;
    bottom: 56px;
    right: var(--grid-pad);
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px 8px 12px;
    background: color-mix(in oklch, var(--bg) 78%, transparent);
    backdrop-filter: blur(10px);
    border: 1px solid var(--rule);
    font-family: var(--mono);
    color: var(--ink-soft);
  }
  .now-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
  }
  .now-bars i {
    display: block;
    width: 2px;
    background: var(--ink);
    transform-origin: bottom;
    animation: now-bar 1.1s ease-in-out infinite;
  }
  .now-bars i:nth-child(1) { height: 60%; animation-delay: -0.0s; }
  .now-bars i:nth-child(2) { height: 90%; animation-delay: -0.32s; }
  .now-bars i:nth-child(3) { height: 40%; animation-delay: -0.62s; }
  .now-bars i:nth-child(4) { height: 75%; animation-delay: -0.18s; }
  .now-bars i:nth-child(5) { height: 55%; animation-delay: -0.48s; }
  @keyframes now-bar {
    0%, 100% { transform: scaleY(0.35); }
    50%      { transform: scaleY(1); }
  }
  .now-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
  }
  .now-label {
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
  }
  .now-track {
    font-size: 10.5px;
    letter-spacing: 0.03em;
    color: var(--ink-soft);
    transition: opacity 280ms ease;
  }

  /* ─── Reveal on scroll ─ */
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1);
  }
  .reveal.in {
    opacity: 1;
    transform: none;
  }
  @media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
  }

  /* Work titles: mono index style is defined above; keep weight steady on hover */
  .work .title {
    font-variation-settings: normal;
  }

  /* Hide rail on narrow screens */
  @media (max-width: 760px) {
    .rail { display: none; }
    .now { bottom: 52px; right: 12px; }
  }

  /* ─── Mobile / phones (≤ 600px) ─────────── */
  @media (max-width: 600px) {
    :root { --edge: 18px; }

    header.site {
      padding: 14px var(--edge);
      padding-top: max(14px, env(safe-area-inset-top));
      align-items: center;
    }
    .wordmark { font-size: 11px; letter-spacing: 0.12em; }
    nav.primary { gap: 16px; font-size: 11px; letter-spacing: 0.1em; }
    nav.primary a { padding: 6px 0; }   /* taller tap target */

    main.stage {
      padding: 84px 0 96px;
      padding-bottom: max(96px, env(safe-area-inset-bottom));
    }

    section.content { gap: clamp(44px, 11vw, 64px); }

    h2.section-label { font-size: 10px; letter-spacing: 0.16em; }
    .prose p { font-size: 15.5px; line-height: 1.62; }

    .work .title { font-size: 13px; }
    #live .work .title { font-size: 11.5px; }
    .work .desc { font-size: 15.5px; line-height: 1.62; }
    .work .year { font-size: 10.5px; }
    .work .side { font-size: 10.5px; }

    .contact-email { font-size: 15px; }
    .contact-row { gap: 20px; }

    /* Tweaks panel: bottom-right (no player anymore) */
    .twk-fab { right: 14px !important; bottom: 14px !important; }
    .twk-panel { right: 12px !important; bottom: 64px !important; width: calc(100vw - 24px) !important; max-width: 340px; }
  }

  /* ─── Very small phones (≤ 380px) ───────── */
  @media (max-width: 380px) {
    nav.primary { gap: 12px; font-size: 10px; }
    .wordmark { font-size: 10px; letter-spacing: 0.1em; }
    .work .title { font-size: 12px; }
    #live .work .title { font-size: 11px; }
  }

  /* ─── Landscape phones — keep things compact vertically ── */
  @media (max-height: 480px) and (orientation: landscape) {
    main.stage { padding-top: 64px; padding-bottom: 64px; }
    header.site { padding-top: 10px; padding-bottom: 10px; }
  }
