/*
  Henry D. Warren's portfolio.
  Set in Atkinson Hyperlegible Next and Atkinson Hyperlegible Mono
  (created by the Braille Institute for low-vision legibility).

  The rules this page follows:
  1. Colour. Green is Henry: the opening, the background and the contact. The work sits on lighter
     grounds, and each flagship project has its own (paper, goose, sky).
  2. Type. One family. Heavy (800) for names and quotes, regular for reading. The largest type on the
     page is always the name of a piece of work.
  3. Mono is for metadata: labels, numbers and dates. Labels are one size, sentence case, dimmed.
  4. Shape. One corner radius. A 1.5px rule opens a block of data; hairlines separate its rows.
  5. Space. Three steps (--s1, --s2, --s3) and one page margin (--pad), nothing in between.
  6. Hover takes the accent of the room the link is in (--pick).
*/
:root {
  --paper: #fffaf0;
  --paper-2: #f6efdf;
  --ink: #1c1a15;
  --green: #173a2c;
  --cream: #fff3d6;
  --butter: #ffd766;
  --goose: #f9e189;
  --sky: #cfe8f5;
  --leaf: #1a6b45;
  --red: #d3242b;

  /* Each room sets these for itself. */
  --bg: var(--paper);
  --fg: var(--ink);
  --dim: #5f594d;
  --rule: #e2d9c6;
  --pick: var(--leaf);
  --focus: var(--red);

  --text: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type sizes. */
  --t-label: 0.8125rem;
  --t-small: 0.9375rem;
  --t-body: 1.0625rem;
  --t-lead: clamp(1.2rem, 1.75vw, 1.45rem);
  --t-title: clamp(2.5rem, 6.2vw, 5.4rem);

  /* Space. The page margin grows on very wide screens so the content never passes 90rem. */
  --pad: max(clamp(1.25rem, 4.5vw, 4.5rem), calc((100vw - 90rem) / 2));
  --col: calc(100% - 2 * var(--pad));
  --gap: clamp(1.75rem, 5vw, 5rem);
  --s1: clamp(2rem, 4.5vw, 3.25rem);
  --s2: clamp(2.5rem, 6vw, 5rem);
  --s3: clamp(3.5rem, 9vw, 7rem);

  --bar-h: 3.5rem;
  --r: 5px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--green); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-padding-top: var(--bar-h); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body { margin: 0; background: var(--paper); font: 400 var(--t-body)/1.62 var(--text); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--pick); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--butter); color: var(--ink); }
h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
p { text-wrap: pretty; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- Rooms and their colours ---- */

.green, .audio-card, .pdf-modal {
  --bg: var(--green); --fg: var(--cream); --dim: #b7c7b8; --rule: #33594a; --pick: var(--butter); --focus: var(--butter);
  background: var(--bg); color: var(--fg);
}
.room { background: var(--bg); color: var(--fg); padding: var(--s3) 0; }
.room.cream { --bg: var(--goose); --fg: #1c1810; --dim: #5a4a10; --rule: #dcc362; --pick: #5e4600; }
.room.sky { --bg: var(--sky); --dim: #3f5866; --rule: #a9cfe2; --pick: #135a86; }

/* ---- Mono: labels, numbers, dates ---- */

.bar-where, .row.title .a, .figures dd, .kicker, .press .src, .press .when, .facts dt,
.meta, .email, .phones b, .plain > h2:not(.row), .about-honors h3, .audio-times, .track-note, .track-len,
.btn .num, .pdf-modal-actions a {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
}

/* One label: small, sentence case, dimmed. */
.bar-where, .kicker, .facts dt, .meta, .plain > h2:not(.row), .about-honors h3, .audio-times, .track-note, .track-len {
  font-weight: 400; font-size: var(--t-label); line-height: 1.4; letter-spacing: 0.01em; color: var(--dim);
}

/* One frame for pictures. */
.sk-anim-wrap video, .wearer-strip img, .sk-gen1 img, .wide > a img,
.tile-art, .projects-wizard img, .music-photo img, .about-photo img, .qc-pair img, .sk-features img {
  border: 1px solid var(--rule); border-radius: var(--r);
}

/* ---- Top bar ---- */

.bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  min-height: var(--bar-h); padding: 0.5rem var(--pad);
  background: var(--green); color: var(--cream); font-size: 1rem;
  --dim: #b7c7b8; --pick: var(--butter); --focus: var(--butter);
}
.bar a { text-decoration: none; }
.bar-name { font-weight: 800; font-size: 1.0625rem; letter-spacing: -0.015em; white-space: nowrap; margin-right: 0.9rem; }
.bar-where { margin-right: auto; white-space: nowrap; }
.bar-nav { display: flex; align-items: center; gap: clamp(0.85rem, 1.8vw, 1.65rem); }
.bar-nav a, .links a, .hero-nav-row > a:not(.btn) { display: inline-block; padding: 0.3rem 0; }

/* ---- Buttons: outline, or solid for the one main action in a block ---- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 2.75rem; padding: 0 1.15rem;
  border: 1.5px solid currentColor; border-radius: var(--r);
  background: transparent; color: inherit; text-decoration: none;
  font: 700 var(--t-small)/1 var(--text); cursor: pointer;
}
.btn:hover, .btn[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.light { border-color: rgba(255, 255, 255, 0.8); color: #fff; }
.btn.light:hover, .btn.light[aria-pressed="true"] { background: #fff; border-color: #fff; color: #000; }
.btn.solid { background: var(--butter); border-color: var(--butter); color: var(--ink); }
.btn.solid:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn .num { font-weight: 400; opacity: 0.75; }
.btn:disabled { opacity: 0.55; cursor: default; }
.vid-tri {
  width: 0; height: 0;
  border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 10px solid currentColor;
}

/* ---- Opening: the greeting above, Henry looking straight up at it ---- */

.hero-personal {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(2.25rem, 6vh, 4rem) var(--pad) 0;
}
.hero-intro { max-width: 41rem; }
.hero-intro h1 { font-weight: 700; font-size: clamp(2.3rem, 4.5vw, 3.5rem); line-height: 1.04; letter-spacing: -0.025em; }
.hero-intro p { margin-top: 1.1rem; font-size: clamp(1.0625rem, 1.35vw, 1.2rem); line-height: 1.5; text-wrap: balance; }
.hero-nav-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.35rem 1.4rem; margin-top: 1.4rem; font-weight: 700; font-size: 1rem;
}
.hero-nav-row .btn { margin-left: 0.3rem; }
/* The photo stands on the bottom edge of the green. */
.hero-portrait { width: min(100%, 36rem); margin-top: clamp(1.75rem, 4.5vh, 2.75rem); }
.hero-portrait img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r) var(--r) 0 0; }

/* ---- Section heads ---- */

.room-head { padding: 0 var(--pad); }
.row.title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.35rem 1.5rem; }
.row.title .t { font-weight: 700; font-size: var(--t-title); line-height: 0.98; letter-spacing: -0.03em; }
.row.title .a { color: var(--dim); font-size: var(--t-small); white-space: nowrap; }
.line { max-width: 34em; margin-top: clamp(1rem, 2.5vw, 1.75rem); font-size: var(--t-lead); line-height: 1.36; }
.kicker { margin-bottom: 0.9rem; }

/* ---- Text blocks ---- */

.room-body {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--gap); align-items: start;
  padding: 0 var(--pad); margin-top: var(--s2);
}
.room-body.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

figcaption { margin-top: 0.6rem; color: var(--dim); font-size: var(--t-small); }
.tell > p { margin-bottom: 1em; max-width: 34em; }
.tell > p:last-child { margin-bottom: 0; }
.big { font-size: var(--t-lead); line-height: 1.36; }

.facts { margin-top: 1.75rem; border-top: 1.5px solid var(--fg); }
.tell > .facts:first-child { margin-top: 0; }
.facts > div {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; align-items: baseline;
  padding: 0.65rem 0; border-bottom: 1px solid var(--rule);
}
.facts dd { margin: 0; }
.facts dd a { font-weight: 700; white-space: nowrap; }
.links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; margin-top: 1.25rem; font-weight: 700; }

/* ---- Sidekick: film (live preview on scroll, full film with sound in place) ---- */

.cinema { padding: 0 var(--pad); margin-top: var(--s1); }
.cinema-stage {
  position: relative; width: 100%; background: #000; border-radius: var(--r); overflow: hidden;
  aspect-ratio: 1920 / 1012; max-height: 82svh;
}
.cinema-stage video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.cinema-stage.playing-full video { object-fit: contain; }
/* Two small controls on the picture; the caption goes under it, so the film stays visible. */
.cinema-over { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(0.6rem, 1.2vw, 0.9rem); color: #fff; pointer-events: none; }
.cinema-stage.playing-full .cinema-over { display: none; }
.cinema-tools { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.cinema-tools .btn { pointer-events: auto; min-height: 2rem; padding: 0 0.7rem; gap: 0.45rem; font-size: 0.8125rem; white-space: nowrap; }
.cinema-tools .btn, .cinema-tools .btn.icon {
  border: 0; background: rgba(0, 0, 0, 0.55); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.cinema-tools .btn:hover, .cinema-tools .btn.icon:hover { background: rgba(0, 0, 0, 0.8); color: #fff; }
.cinema-tools .vid-tri { border-top-width: 5px; border-bottom-width: 5px; border-left-width: 8px; }
.cinema-tools .btn.icon { width: 2rem; padding: 0; }
.pp { width: 9px; height: 10px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.is-paused .pp { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid currentColor; border-right: 0; margin-left: 2px; }
@media (pointer: coarse) {
  .cinema-tools .btn { min-height: 2.25rem; }
  .cinema-tools .btn.icon { width: 2.25rem; }
}
.cinema figcaption strong { color: var(--fg); font-weight: 700; }

/* Key figures */
.figures {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap);
  padding: 0 var(--pad); margin-top: var(--s2);
}
.figures > div { border-top: 1.5px solid var(--fg); padding-top: 0.9rem; }
.figures dd { margin: 0; font-weight: 700; font-size: clamp(1.9rem, 3.8vw, 3.25rem); line-height: 1; letter-spacing: -0.035em; white-space: nowrap; }
.figures dt { margin-top: 0.5rem; color: var(--dim); font-size: 1rem; line-height: 1.45; }

/* 3D animation beside the story */
.sk-showcase {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap); align-items: center;
  padding: 0 var(--pad); margin-top: var(--s2);
}
.sk-anim-wrap video { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #fff; }

/* Eight wearers */
.wearers { padding: 0 var(--pad); margin-top: var(--s1); }
.wearer-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: clamp(0.45rem, 1vw, 0.85rem); }
.wearer-strip img { width: 100%; aspect-ratio: 176 / 214; object-fit: cover; }

/* ---- Sidekick: the build story. Each chapter is a row: the telling on the left, that year's picture or film on the right. ---- */

.sk-story { margin: var(--s2) var(--pad) 0; border-top: 1.5px solid var(--fg); }
.sk-chapter {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 1.5rem var(--gap); align-items: start;
  padding: clamp(1.4rem, 3vw, 2.25rem) 0;
}
.sk-chapter + .sk-chapter { border-top: 1px solid var(--rule); }
.sk-chapter:last-child { padding-bottom: 0; }
.sk-chapter .kicker { margin-bottom: 0.45rem; }
.sk-chapter h3 {
  margin: 0 0 0.85rem;
  font-weight: 700; font-size: clamp(1.3rem, 2vw, 1.65rem); line-height: 1.18; letter-spacing: -0.02em; text-wrap: balance;
}
.sk-chapter-tell > p { max-width: 36em; }
.sk-chapter-tell > p + p { margin-top: 0.95em; }
.sk-gen1 { margin: 0; }
.sk-gen1 img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #fff; }

/* Roy's vertical film sits with the clip-on year, at phone size rather than column size. */
.cinema-vertical { padding: 0; margin-top: 0; width: min(100%, 17rem); }
.cinema-vertical .cinema-stage { aspect-ratio: 9 / 16; max-height: 82svh; border: 1px solid var(--rule); }

/* What the clip-on does: SIER's own six-panel picture, one column of panels on a phone. */
.sk-features { padding: 0 var(--pad); margin-top: var(--s2); }
.sk-features img { width: 100%; height: auto; background: #fff; }

/* Industrial pilots & haptics */
.sk-pilots {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0.9rem var(--gap); align-items: baseline;
  margin: var(--s2) var(--pad) 0; padding-top: clamp(1.25rem, 2.8vw, 2rem);
  border-top: 1.5px solid var(--fg);
}
.sk-pilots-title .kicker { margin-bottom: 0.4rem; }
.sk-pilots-title h3 {
  margin: 0;
  font-weight: 700; font-size: clamp(1.25rem, 1.9vw, 1.55rem); line-height: 1.2; letter-spacing: -0.02em;
}
.sk-pilots-body { max-width: 38em; }

/* ---- Press and pull quotes ---- */

.press { margin: var(--s2) var(--pad) 0; border-top: 1.5px solid var(--fg); }
.press li {
  display: grid; grid-template-columns: minmax(0, 1fr) 11rem 5.5rem; align-items: baseline; gap: 0.25rem 2rem;
  padding: clamp(0.75rem, 1.6vw, 1.15rem) 0; border-bottom: 1px solid var(--rule);
}
.press a { font-weight: 600; font-size: clamp(1.08rem, 1.65vw, 1.42rem); line-height: 1.24; letter-spacing: -0.015em; text-decoration: none; text-wrap: balance; }
.press a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.press .src, .press .when { color: var(--dim); font-size: var(--t-label); white-space: nowrap; }
.press .when { text-align: right; }

.quote { margin-top: var(--s3); padding: 0 var(--pad); text-align: center; }
.quote p { max-width: 17em; margin: 0 auto; font-weight: 700; font-size: clamp(1.85rem, 4.2vw, 3.5rem); line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
.quote cite { display: block; margin-top: 1rem; color: var(--dim); font-style: normal; font-size: var(--t-small); }

/* ---- WiseGoose: iPhone screens and maps ---- */

.sub-block { margin-top: var(--s2); }
.sub-block .kicker { width: min(var(--col), 63rem); margin: 0 auto 0.9rem; }

.phones {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2.6vw, 2.5rem);
  width: var(--col); margin: var(--s2) auto 0;
}
.phones img, .pair img {
  width: 100%; aspect-ratio: 720 / 900; object-fit: cover; object-position: top; background: #fff;
  border: 1.5px solid var(--fg); border-bottom: 0; border-radius: clamp(16px, 2.4vw, 34px) clamp(16px, 2.4vw, 34px) 0 0;
}
.phones p {
  display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); font-size: 1rem; line-height: 1.4;
  border-top: 1.5px solid var(--fg); padding-top: 0.9rem;
}
.phones b { font-weight: 700; font-size: 1rem; line-height: 1.4; }
.phones.maps { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(var(--col), 63rem); margin-top: 0; }
/* The crop starts below the line of member and people counts at the top of each map. */
.phones.maps img { aspect-ratio: 720 / 1000; object-position: 50% 92%; border-bottom: 1.5px solid var(--fg); border-radius: var(--r); }
.phones.maps p { border-top: 0; }
.pair {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(1rem, 2.6vw, 2.5rem);
  width: min(var(--col), 37rem); margin: var(--s2) auto 0;
}
.pair figcaption { grid-column: 1 / -1; margin: 0; padding-top: 0.9rem; border-top: 1.5px solid var(--fg); color: var(--fg); font-size: 1rem; }

/* WiseGoose is the smaller project: what it does in words, then one row that walks through an introduction. */
.phones.wg-flow { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: clamp(0.75rem, 1.6vw, 1.5rem); margin-top: var(--s1); }
.wg-flow img { border-radius: 14px 14px 0 0; }
.wg-flow p { padding-top: 0.7rem; font-size: var(--t-small); }
/* The map's crop starts below the line of member and people counts at its top. */
.wg-flow .map img { object-position: 50% 88%; }
.wg-flow .map p { display: block; }
#wisegoose .tell .facts { margin-top: 1.5rem; }

/* Two pictures set edge to edge at one height: the columns are the pictures' own widths (949 and 1719 at 1200 tall). */
.qc-pair {
  display: grid; grid-template-columns: 949fr 1719fr; gap: 0 6px;
  width: var(--col); margin: var(--s1) auto 0;
}
.qc-pair img { width: 100%; height: 100%; object-fit: cover; }
.qc-pair figcaption { grid-column: 1 / -1; }

/* A wide picture inside a room */
.wide { padding: 0 var(--pad); margin-top: var(--s2); }
.wide > a { display: block; max-width: 72rem; margin: 0 auto; }
.wide > a img { width: 100%; }

/* A picture that is a link gives a little under the pointer, and a little more when pressed. */
a.tile-art, .wide > a { transition: transform 180ms cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (hover: hover) {
  a.tile-art:hover { transform: scale(0.965); }
  .wide > a:hover { transform: scale(0.98); }
}
a.tile-art:active { transform: scale(0.94); }
.wide > a:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) {
  a.tile-art, .wide > a { transition: none; }
  a.tile-art:hover, a.tile-art:active, .wide > a:hover, .wide > a:active { transform: none; outline: 2px solid var(--pick); outline-offset: 2px; }
}

/* ---- Projects, Music, Background, Contact ---- */

.plain { padding: var(--s3) var(--pad); }
.plain > h2:not(.row) { margin-bottom: clamp(1.25rem, 3vw, 2rem); }
#about { padding-bottom: 0; }
#contact { padding-top: var(--s2); }

.projects-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem var(--gap);
}
.projects-head .row.title { justify-content: flex-start; gap: 0.35rem 1.25rem; }
.projects-wizard { flex-shrink: 0; width: clamp(9.5rem, 14vw, 13rem); }
.projects-wizard img { width: 100%; aspect-ratio: 768 / 1022; object-fit: cover; }
/* On wide screens the photo stands on the heading's baseline and rises through the top of the
   section, so the hat ends in the sky-blue room above. It takes no height of its own. */
@media (min-width: 901px) {
  .projects-head { position: relative; padding-right: 15rem; }
  .projects-wizard {
    position: absolute; right: 0; bottom: 0; z-index: 1;
    /* tall enough to pass the top of the section by about 0.7 of its padding; 0.7515 is the photo's width over its height */
    width: calc((0.98 * var(--t-title) + 1.7 * var(--s3) - 1.75rem) * 0.7515);
  }
}
.projects-wizard figcaption {
  margin-top: 0.45rem;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: var(--t-label); color: var(--dim);
}

.cabinet {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(2rem, 3.4vw, 3rem) clamp(1.25rem, 2.4vw, 2.25rem);
  margin-top: var(--s1);
}
.tile.tile-wide { grid-column: span 2; }
.tile-art {
  display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden;
  position: relative; background: var(--paper-2);
}
.tile.tile-wide .tile-art { aspect-ratio: 800 / 284; }
.tile-art img, .tile-art video, .tile-art svg { width: 100%; height: 100%; object-fit: cover; }
.tile-art.fit img { position: absolute; inset: 12%; width: 76%; height: 76%; object-fit: contain; }
.tile-art.t-green { background: var(--green); color: var(--butter); }
.tile-art.t-ink { background: var(--ink); color: var(--cream); }
/* Kind at the left, year at the right, straight under the picture. */
.tile .meta { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.7rem; font-size: var(--t-label); }
.tile h3 { margin: 0.35rem 0 0.4rem; font: 700 1.18rem/1.22 var(--text); letter-spacing: -0.015em; }
.tile h3 a { text-decoration: none; }
.tile h3 a:hover { text-decoration: underline; }
.tile p { max-width: 34em; font-size: 1rem; line-height: 1.48; }
.tile .meta { max-width: none; }
.tile-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; margin-top: 0.6rem; font-weight: 700; }
.tile .tile-links { font-size: var(--t-small); max-width: none; }

/* ---- Music & Sound ---- */

.music-band { --bg: var(--paper-2); background: var(--bg); border-top: 1px solid var(--rule); }
.music-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap); align-items: center;
  margin-top: var(--s1);
}
.music-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.music-side { display: flex; flex-direction: column; gap: 1.5rem; }
.audio-card { padding: clamp(1.25rem, 2.4vw, 1.85rem); border-radius: var(--r); }
/* The songs: one row each, hairlines between, the row being played takes the accent. */
.tracks li + li { border-top: 1px solid var(--rule); }
.track {
  display: flex; align-items: center; gap: 0.9rem; width: 100%;
  padding: 0.85rem 0; border: 0; background: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
}
.tracks li:first-child .track { padding-top: 0.15rem; }
.track:hover, .track.is-current { color: var(--pick); }
.track-icon {
  flex-shrink: 0; box-sizing: border-box; width: 12px; height: 14px;
  border-style: solid; border-color: transparent transparent transparent currentColor; border-width: 7px 0 7px 12px;
}
.track[aria-pressed="true"] .track-icon { border-style: double; border-color: currentColor; border-width: 0 0 0 12px; }
.track-name { flex: 1; min-width: 0; font-weight: 700; font-size: 1.18rem; line-height: 1.22; letter-spacing: -0.015em; }
.track-note { margin-left: 0.35rem; }
.track-plain { margin-top: 0.75rem; }
.track-plain audio { display: block; width: 100%; margin-top: 0.35rem; }
.audio-bar-wrap { margin-top: 1rem; }
.audio-seek { width: 100%; accent-color: var(--butter); cursor: pointer; height: 0.4rem; margin: 0; }
.audio-times { display: flex; justify-content: space-between; margin-top: 0.35rem; }

/* ---- Background and Contact ---- */

.about-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: start; }
.about-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.about-lead p { max-width: 32em; margin-bottom: 0.9em; font-size: var(--t-lead); line-height: 1.36; }
.about-cta { margin-top: 1.1rem; margin-bottom: 0 !important; }
.about-honors { margin-top: 2rem; }
.about-honors h3 { padding-bottom: 0.6rem; border-bottom: 1.5px solid var(--fg); }
.about-honors ul { font-size: 1rem; line-height: 1.45; }
.about-honors li { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }

.email {
  display: inline-block; max-width: 100%; color: var(--butter);
  font-weight: 700; font-size: clamp(1.1rem, 4.4vw, 3.6rem); line-height: 1.1; letter-spacing: -0.04em;
  overflow-wrap: anywhere; text-decoration-thickness: 0.06em; text-underline-offset: 0.14em;
}
.email:hover, .pdf-modal-actions a:hover { color: var(--cream); }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem;
  padding: 1.5rem var(--pad) 3rem; border-top: 1px solid var(--rule); color: var(--dim); font-size: var(--t-small);
}

/* ---- PDF preview (KeyRing) ---- */

.pdf-modal {
  width: min(94vw, 70rem); height: min(90vh, 56rem);
  padding: 0; border: 1.5px solid var(--rule); border-radius: var(--r); overflow: hidden;
}
.pdf-modal::backdrop { background: rgba(12, 24, 18, 0.78); backdrop-filter: blur(4px); }
.pdf-modal[open] { display: flex; flex-direction: column; }
.pdf-modal-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 1.25rem; border-bottom: 1px solid var(--rule);
}
.pdf-modal-actions { display: flex; align-items: center; gap: 1.1rem; }
.pdf-modal-actions a { font-size: var(--t-label); color: var(--butter); }
.pdf-modal-bar .btn { min-height: 2.25rem; padding: 0 0.85rem; }
.pdf-frame { flex: 1; width: 100%; border: 0; background: var(--ink); }

/* ---- Skip link ---- */
.skip { position: fixed; left: 0.75rem; top: 0.75rem; z-index: 200; padding: 0.6rem 0.9rem; background: var(--butter); color: var(--ink); font-weight: 700; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* ---- Narrower screens ---- */

@media (min-width: 901px) and (max-width: 1180px) {
  .cabinet { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Three across: the wide tile takes a row of its own and the next tile moves up beside the first two, so no row has a gap. */
  .cabinet { grid-auto-flow: dense; }
  .tile.tile-wide { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .sk-showcase, .sk-chapter, .sk-pilots, .room-body, .room-body.even, .about-body, .music-grid { grid-template-columns: 1fr; }
  .wearer-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cabinet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures { grid-template-columns: 1fr; gap: 1.5rem; }
  .press li { grid-template-columns: minmax(0, 1fr) auto; }
  .press a { grid-column: 1 / -1; }
  .phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
  .phones.maps { grid-template-columns: 1fr; width: min(var(--col), 23rem); }
  /* Four steps two by two, then the map across the full width. */
  .phones.wg-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wg-flow .map { grid-column: 1 / -1; }
  .wg-flow .map img { aspect-ratio: 6 / 5; object-position: 50% 65%; }
  .bar-where { display: none; }
  .bar-name { margin-right: auto; }
}

@media (max-width: 560px) {
  .projects-wizard { width: 7.25rem; }
  .cabinet { grid-template-columns: 1fr; }
  .tile.tile-wide { grid-column: span 1; }
  .bar-nav { gap: 0.7rem; font-size: 0.9rem; }
  .bar-nav a[href="#music"] { display: none; }
  .facts > div { grid-template-columns: 6rem minmax(0, 1fr); }
  .cinema-tools .num { display: none; }
}
