/* Concept A: one desktop stage, a readable index and a phone feed. */
.reel-layout { display:grid; gap:var(--space-6); }
.reel-layout:has(.reel-desktop[hidden]) { grid-template-columns:minmax(0,1fr); }
.reel-list { min-width:0; }
.showreel { --reel-surface:var(--page); }
.reel-card { --lead:var(--axis-m); position:relative; border-bottom:var(--hairline) solid var(--line); padding:0 0 var(--space-5); margin-bottom:var(--space-5); min-width:0; }
.reel-select, .reel-preview { display:block; text-decoration:none; color:var(--text); }
.reel-preview { position:relative; }
.reel-preview-button { display:none; }
.reel-frame { display:block; position:relative; width:100%; aspect-ratio:4 / 3; overflow:hidden; background:var(--reel-surface); isolation:isolate; }
.reel-frame img, .reel-frame video, .reel-canvas { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.reel-canvas { touch-action:pan-y; }
.reel-plate { display:flex; flex-direction:column; justify-content:center; height:100%; padding:var(--space-5); gap:var(--space-4); color:var(--text); font-size:var(--text-sm); }
.reel-plate strong { font-size:var(--text-lg); }
.reel-incoming { animation:reel-settle var(--dur-reel) var(--ease-reel) both; }
@keyframes reel-settle { from {opacity:0;transform:scale(1.02);} to {opacity:1;transform:scale(1);} }
.reel-frame .reel-outgoing { z-index:3; opacity:0; transition:opacity var(--dur-reel) var(--ease-reel); pointer-events:none; }
.reel-caption-area { min-height:calc(var(--target-size) + var(--space-2)); padding-top:var(--space-2); font-size:var(--text-sm); line-height:1.35; color:var(--muted); }
.reel-caption { display:block; }
.showreel .reel-kind { display:none; }
.reel-kind { background:var(--page); color:var(--text); }
.reel-copy { display:block; padding-top:var(--space-3); }
.reel-copy h3 { font-size:var(--text-lg); margin-bottom:var(--space-2); }
.reel-copy .disciplines { display:inline-flex; margin:0 0 var(--space-2); }
.reel-summary { display:block; font-size:var(--text-sm); color:var(--muted); line-height:1.35; }
.reel-card-controls { margin-top:var(--space-2); }
.reel-controls { display:flex; flex-wrap:wrap; align-items:flex-start; gap:var(--space-2); min-height:var(--target-size); }
.reel-segments { display:flex; flex-wrap:wrap; gap:var(--space-2); flex:1 1 18em; min-width:0; }
.reel-segment, .reel-pause, .reel-orbit button { position:relative; min-width:var(--target-size); min-height:var(--target-size); padding:var(--space-2); background:var(--clear); color:var(--muted); font:inherit; font-size:var(--text-sm); border:var(--hairline) solid var(--line); cursor:pointer; }
.reel-segment { border-width:var(--rule-bold) 0 0; text-align:left; flex:1 1 9em; line-height:1.2; }
.reel-segment[aria-pressed=true] { color:var(--text); border-color:var(--text); }
.reel-progress { position:absolute; top:calc(-1 * var(--rule-bold)); left:0; width:100%; height:var(--rule-bold); background:var(--accent); transform:scaleX(var(--progress,0)); transform-origin:left; }
.reel-pause { min-width:4.5em; color:var(--text); flex:0 0 auto; }
.reel-segment:hover, .reel-pause:hover, .reel-orbit button:hover { color:var(--text); border-color:var(--accent); }
.reel-orbit { display:flex; gap:var(--space-2); flex:0 0 auto; }
/* Desktop: the rotate buttons sit on the stage's lower right corner during a 3D slide, so the
   row under the stage is only Pause and the view chips (REVIEW_V10 #2a, #2e). */
.reel-desktop { container-type:inline-size; }
.reel-desktop .reel-orbit { position:absolute; z-index:4; right:var(--space-2); top:calc(62.5cqi - var(--target-size) - var(--space-2)); }
.reel-desktop .reel-orbit button { background:var(--page); color:var(--text); }
.reel-orbit[hidden] { display:none !important; }
.reel-controls[data-has-model=true] .reel-orbit[hidden] { display:flex !important; visibility:hidden; }
.reel-row-progress { position:absolute; bottom:0; left:0; width:100%; height:var(--rule-bold); background:var(--lead); transform:scaleX(var(--item-progress,0)); transform-origin:left; }
.reel-card:not(.is-active) .reel-row-progress { visibility:hidden; }
.reel-card-links.text-links { margin-top:0; }
.reel-stage-details { display:flex; justify-content:space-between; align-items:baseline; gap:var(--space-3); margin-top:var(--space-2); }
.reel-stage-details h3 { font-size:var(--text-lg); margin:0; line-height:1.2; }
.reel-stage-details .text-links { margin-top:0; flex-shrink:0; }
.reel-stage-controls { min-height:calc(var(--target-size) + var(--space-2)); margin-top:var(--space-2); }
.reel-stage { text-decoration:none; aspect-ratio:8 / 5; }
.reel-wipe { clip-path:inset(0 50% 0 0); }
.hero-build-photo { flex:0 0 var(--reel-thumb-width); }
.hero-build-photo img { width:var(--reel-thumb-width); height:var(--reel-thumb-height); object-fit:contain; }
.hero-sim .sim-caption { flex-wrap:nowrap; }
@media (max-width:959px) {
  .reel-frame video { object-fit:cover; }
  /* T-130 review item 6: phone cards are static previews (photo, title, tags, one summary
     line, links). No Play button, view chips or per-slide caption, so no reserved gap and
     every card has the same lines. Heavy reel media never loads on phones. */
  .reel-card-controls, .reel-card-caption, .reel-card .reel-caption-area { display:none !important; }
  .reel-card .reel-card-links.text-links { margin-top:var(--space-2); }
  .reel-card .reel-summary { margin-top:var(--space-1); }
  /* Without controls a tap must not unlock autoplay: the image and title open the project. */
  .reel-card { position:relative; }
  .reel-card .reel-preview-button { display:none; }
  .reel-card .reel-select::after { content:''; position:absolute; inset:0; }
  .reel-card .reel-card-links { position:relative; z-index:1; }
}
@media (min-width:960px) {
  .reel-layout { grid-template-columns:minmax(0,800fr) minmax(0,408fr); gap:var(--space-6); align-items:start; }
  .reel-desktop { position:sticky; top:var(--space-4); }
  .reel-card { display:grid; grid-template-columns:var(--reel-thumb-width) minmax(0,1fr); column-gap:var(--space-3); align-items:center; min-height:calc(2 * var(--target-size)); padding:var(--space-3) var(--space-2); margin:0; border-left:var(--focus-width) solid var(--clear); }
  .reel-card.is-active { border-left-color:var(--lead); background:var(--surface); }
  .reel-copy { display:block; padding:0; min-width:0; }
  .reel-copy h3 { display:inline; font-size:var(--text-md); line-height:1.2; margin:0 var(--space-2) 0 0; }
  .reel-copy .disciplines { margin:0; gap:var(--space-1); }
  .reel-copy .disciplines > span { font-size:var(--text-sm); }
  .reel-summary { margin-top:var(--space-1); white-space:normal; }
  .reel-card .reel-frame { width:var(--reel-thumb-width); height:var(--reel-thumb-height); }
  .reel-preview-button { display:block; position:absolute; inset:0; width:100%; height:100%; border:0; padding:0; background:var(--clear); cursor:pointer; font:inherit; }
  .reel-card-controls, .reel-card-caption, .reel-card-links.text-links { display:none; }
}
@media (prefers-reduced-motion:reduce) {
  .reel-frame .reel-outgoing { transition:none; }
  .reel-incoming { animation:none; }
}

/* Shared by the page shell, case studies and site-owned controls. */
:root {
  color-scheme: dark;
  --page: #151b22;
  --surface: #202a35;
  --surface-2: #2a3644;
  --text: #edf1f4;
  --muted: #aab7c4;
  --line: #435260;
  --line-soft: #edf1f41a;
  --accent: #ed8c7c;
  --on-accent: #151b22;
  --axis-m: #e57e70;
  --axis-e: #6cbe91;
  --axis-s: #80b4ee;
  --on-axis: #151b22;
  --clear: transparent;
  --backdrop: #0b1015e6;
  --swerve-poster-background: linear-gradient(#090c12, #0b0f15 40%, #0b0f15 55%, #080b12);
  --reel-caption-bg: #151b22ed;
  --sim-shadow: #0b101526;
  --sim-sky: #253744;
  --sim-ground: #394b58;
  --pedal-silver: #c9c6bc;

  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-text: 'Barlow', 'Helvetica Neue', sans-serif;
  --text-sm: 16px;
  --text-md: 18px;
  --text-lg: 22px;
  --text-xl: 28px;
  --text-2xl: clamp(40px, 4.4vw, 64px);
  --text-3xl: clamp(80px, 12.5vw, 180px);
  /* "VRAJ PATEL" is about 3.9 em wide: this caps the phone name under 360 px so it never overflows. */
  --text-3xl-phone-fit: calc((100vw - 2 * var(--gutter-phone)) / 4);
  --text-print: 11pt;
  --label-tracking: .06em;
  --measure: 65ch;
  --placeholder-title: clamp(56px, 7vw, 96px);
  --summary-measure: 60ch;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --site-width: 1240px;
  --case-width: 1040px;
  --gutter-phone: 20px;
  --hero-copy-min: 300px;
  --hero-copy-max: 380px;
  --resume-label-width: 10em;
  --menu-width: 260px;
  --dialog-width: 1120px;
  --dialog-media-height: 760px;
  --diagram-width: 480px;
  --step-image-height: 480px;
  --hero-max-height: 640px;
  /* Stage dimensions are shared with the embedded controls and camera framing. */
  --flight-home-height: 420px;
  --flight-project-height: 560px;
  --flight-home-phone: 300px;
  --flight-project-phone: 360px;
  --flight-active-phone: 520px;
  --flight-controls-phone: 160px;
  --rover-map-height: 260px;
  --exploded-height: 400px;
  --exploded-height-phone: 340px;
  --reel-thumb-width: 80px;
  --team-mark-size: 56px;
  --reel-thumb-height: calc(var(--reel-thumb-width) * 3 / 4);
  --target-size: 44px;
  --spec-label-width: 140px;
  --spec-label-compact: 110px;
  --radius-1: 3px;
  --radius-2: 4px;
  --hairline: 1px;
  --rule-bold: 2px;
  --focus-width: 3px;
  --shadow-hover: inset 0 1px 0 0 #aab7c41a;
  --shadow-flight: 0 var(--space-3) var(--space-5) var(--sim-shadow);

  --dur-1: 150ms;
  --dur-2: 280ms;
  --dur-reel: 360ms;
  --ease-std: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.2, .7, .1, 1);
  --ease-draw: cubic-bezier(.65, 0, .35, 1);
  --ease-reel: cubic-bezier(.22, 1, .36, 1);
  --control-transition: background-color var(--dur-1) var(--ease-std),
    border-color var(--dur-1) var(--ease-std), color var(--dur-1) var(--ease-std);
}

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/barlow-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/barlow-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/barlow-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/barlow-condensed-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/barlow-condensed-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* { box-sizing: border-box; }
html { scroll-padding-top: var(--space-5); scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--page); font-family: var(--font-text); font-size: var(--text-md); line-height: 1.5; -webkit-font-smoothing: antialiased; }
.wrap { width: min(var(--site-width), calc(100% - var(--space-9))); margin-inline: auto; }
a { color: inherit; text-decoration-thickness: var(--hairline); text-underline-offset: .22em; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--space-1); }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--on-accent); }
h1, h2, h3, p, ul, figure, dl { margin: 0; }
h1, h2, h3 { font-family: inherit; font-weight: 600; line-height: 1.1; }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-xl); }
p + p { margin-top: var(--space-4); }
img { display: block; max-width: 100%; height: auto; }
figcaption { color: var(--muted); font-size: var(--text-sm); line-height: 1.35; margin-top: var(--space-2); }
.photo-link { display: block; }
.skip-link { position: absolute; top: 0; transform: translateY(-110%); left: var(--space-4); padding: var(--space-3) var(--space-4); background: var(--page); z-index: 20; }
.skip-link:focus { top: var(--space-3); transform: none; }
.wordmark { font-weight: 600; font-size: var(--text-lg); text-decoration: none; white-space: nowrap; display: inline-flex; min-height: var(--target-size); align-items: center; }
.site-header nav, .site-footer nav { display: flex; gap: var(--space-6); }
.site-header nav a { display: inline-flex; align-items: center; min-height: var(--target-size); font-size: var(--text-sm); text-decoration: none; }
.site-header nav a[aria-current], .site-header nav a:hover { text-decoration: underline; }
.text-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0 var(--space-5); margin-top: var(--space-4); }
.text-links a { display: inline-flex; align-items: center; min-height: var(--target-size); font-size: var(--text-sm); }
.sim-recording { margin-block:var(--space-7); }
.sim-recording h2 { margin-bottom:var(--space-4); }
.sim-recording p { margin-bottom:var(--space-4); }
.sim-recording video { display:block; width:100%; height:auto; aspect-ratio:16 / 10; background:var(--surface); }
.site-header nav a, .text-links a { min-width: var(--target-size); }
.hero { display: grid; position: relative; }
.hero-name, .section-title { font-family: var(--font-display); text-transform: uppercase; }
.hero-name { font-weight: 700; font-size: var(--text-3xl); line-height: .95; letter-spacing: -.025em; white-space: nowrap; grid-column: 1 / -1; grid-row: 1; }
.hero-intro { grid-column: 1; grid-row: 2; font-size: var(--text-lg); line-height: 1.4; margin-top: var(--space-3); max-width: 32ch; }
.discipline-legend { grid-column: 1; grid-row: 3; font-size: var(--text-sm); white-space: nowrap; margin-top: 0; }
.axis-m { background: var(--axis-m); color: var(--on-axis); }
.axis-e { background: var(--axis-e); color: var(--on-axis); }
.axis-s { background: var(--axis-s); color: var(--on-axis); }
.discipline-legend span, .disciplines > span { font-weight: 600; display: inline-flex; align-items: center; justify-content: center; min-width: var(--space-5); min-height: var(--space-5); padding: var(--space-1) var(--space-2); border-radius: var(--radius-1); }
.disciplines { display: inline-flex; gap: var(--space-2); font-size: var(--text-sm); line-height: 1; vertical-align: middle; white-space: nowrap; margin-left: var(--space-2); }
.hero-sim { grid-column: 2; grid-row: 2 / 5; align-self: start; }
#flight { height: var(--flight-home-height); box-shadow: var(--shadow-flight); --sim-font: var(--font-text); --sim-accent: var(--accent); --sim-accent-text: var(--on-accent); --sim-text: var(--text); --sim-muted: var(--muted); --sim-focus: var(--accent); --sim-stage: var(--surface); --sim-panel: var(--surface); --sim-border: var(--line); --sim-hover: var(--page); --sim-strong-border: var(--muted); --sim-horizon-sky: var(--sim-sky); --sim-horizon-ground: var(--sim-ground); --sim-horizon-line: var(--muted); --sim-meter: var(--muted); --sim-stick: var(--surface); --sim-thumb: var(--line); --sim-crosshair: var(--muted); }
.sim-caption { padding-top: var(--space-2); display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-3); }
.sim-caption p { font-size: var(--text-sm); line-height: 1.4; }
.sim-caption a { display: inline-flex; align-items: center; min-height: var(--target-size); font-size: var(--text-sm); }
.hero-links { grid-column: 1; grid-row: 4; align-content: start; gap: 0 var(--space-5); margin-top: 0; }
.hero-links a:first-child { flex-basis: 100%; }
#flight .sim-hud { font-size: var(--text-sm); }
#flight .sim-crash { font-size: var(--text-sm); }
#flight .sim-poster { object-fit: cover; }
#flight .sim-canvas { width: 100%; height: 100%; max-width: none; }
#flight [data-action="fly"], #flight .sim-load,
#flight [data-action="fly"]:hover, #flight .sim-load:hover {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}
#flight .sim-horizon-plane { background: var(--sim-sky); }
#flight .sim-horizon-plane::after { content: ''; position: absolute; inset: 50% 0 0; background: var(--sim-ground); border-top: var(--hairline) solid var(--muted); }
.home-section { padding-top: var(--space-7); }
.section-title { font-size: var(--text-2xl); font-weight: 600; line-height: 1; margin-bottom: var(--space-6); }
.build-date { color: var(--muted); font-size: var(--text-sm); margin: var(--space-2) 0 var(--space-4); }
.build-copy p { max-width: 54ch; }
.build-copy .text-links { margin-top: var(--space-3); }
.contact-email { font-size: var(--text-lg); min-height: var(--target-size); display: inline-flex; align-items: center; }
/* Project pages share the homepage's type and open spacing. */
.section-rule { border-top: var(--hairline) solid var(--line); }
.site-footer { border-top: var(--hairline) solid var(--line); color: var(--muted); display: flex; justify-content: space-between; gap: var(--space-5); margin-top: var(--space-8); padding-block: var(--space-5) var(--space-6); }
.site-footer a { display: inline-flex; align-items: center; min-height: var(--target-size); min-width: var(--target-size); }
.breadcrumb { padding-block: var(--space-5); }
.project-intro { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); align-items: start; gap: var(--space-7); }
.lead { font-size: var(--text-lg); line-height: 1.5; margin-top: var(--space-5); max-width: var(--summary-measure); }
.tool-list { color: var(--muted); display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); list-style: none; margin-top: var(--space-5); padding: 0; font-size: var(--text-sm); }
.project-figure img { width: 100%; }
.prose { max-width: var(--measure); }
.gallery-section { margin-top: var(--space-7); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); align-items: start; }
.page-heading { padding-top: var(--space-8); }
.page-heading .lead { max-width: 56ch; }
.resume-heading { display: flex; justify-content: space-between; gap: var(--space-6); align-items: center; }
.resume-contact { margin: var(--space-5) 0 var(--space-6); }
.resume-section { display: grid; grid-template-columns: var(--resume-label-width) minmax(0, 1fr); gap: var(--space-6); margin-top: var(--space-6); padding-top: var(--space-6); }
.resume-section > h2 { font-size: var(--text-xl); }
.resume-section h3 { font-size: var(--text-md); line-height: 1.4; }
.resume-section p, .resume-section li { font-size: var(--text-sm); }
.resume-section ul { padding-left: var(--space-4); }
.resume-section li { margin-top: var(--space-2); padding-left: var(--space-1); }
.entry-heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3) var(--space-5); flex-wrap: wrap; margin-bottom: var(--space-1); }
.entry-heading p { color: var(--muted); font-size: var(--text-sm); white-space: nowrap; }
.organization { color: var(--muted); margin-bottom: var(--space-3); }
.resume-entry + .resume-entry { margin-top: var(--space-6); }
.skills-list { list-style: none; padding: 0 !important; }
.skills-list li { margin: 0 0 var(--space-2); padding: 0; }
.inner-page h1.section-title { font-size: var(--text-2xl); line-height: .98; margin-bottom: 0; max-width: 22ch; }
.inner-page h2.section-title { font-size: var(--text-xl); line-height: 1.05; margin: 0 0 var(--space-5); }
.inner-page .site-footer nav { flex-wrap: wrap; gap: var(--space-1) var(--space-5); }
.breadcrumb { padding-block: var(--space-5) var(--space-3); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: var(--target-size); }
.project-intro { display: block; padding: var(--space-3) 0 var(--space-6); }
.project-intro .lead { max-width: var(--measure); margin-top: var(--space-5); }
.project-intro h1 { text-wrap: balance; }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-5); margin-top: var(--space-4); min-height: var(--target-size); }
.project-meta .disciplines { margin: 0; }
.project-meta a { display: inline-flex; min-width: var(--target-size); min-height: var(--target-size); align-items: center; }
.project-date { color: var(--muted); font-size: var(--text-sm); }
.project-sim { max-width: var(--case-width); margin: var(--space-2) 0 var(--space-7); }
.project-sim #flight { height: var(--flight-project-height); box-shadow: none; }
#flight .sim-load, #flight .sim-hud[data-mode="showcase"] .sim-actions {
  top: auto; bottom: var(--space-5);
}
#flight .sim-load {
  transform: translateX(-50%); min-height: var(--target-size);
  padding: var(--space-3) var(--space-5); font-size: var(--text-sm);
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}
#flight .sim-load:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
#flight .sim-hud[data-mode="showcase"] .sim-actions { left: 0; right: 0; justify-content: center; }
.project-sim .sim-caption { margin-top: 0; font-size: var(--text-sm); }
.project-video { margin: var(--space-5) 0 var(--space-7); max-width: var(--case-width); }
.video-link { margin-top: var(--space-2); }
.video-link a { display: inline-flex; min-height: var(--target-size); align-items: center; }
.media-pending { display: flex; min-height: 9em; padding: var(--space-6); align-items: center; justify-content: center; background: var(--surface); color: var(--muted); }
.gallery-section { margin: 0 0 var(--space-7); }
.gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.gallery figcaption { max-width: var(--measure); }
.project-pagination { display: flex; justify-content: space-between; gap: var(--space-5) var(--space-8); border-top: var(--hairline) solid var(--line); margin-top: var(--space-8); padding-top: var(--space-5); }
.project-pagination a { display: inline-flex; align-items: center; min-height: var(--target-size); max-width: 46%; }
.inner-page .resume-section h2 { font-size: var(--text-xl); }
.team-project-link a, .resume-entry > p > a { display: inline-flex; align-items: center; min-height: var(--target-size); min-width: var(--target-size); }
@media (max-width: 1100px) and (min-width: 681px) {
  .wrap { width: calc(100% - var(--space-8)); }
  .hero-intro { font-size: var(--text-md); }
  .hero-name { font-size: var(--text-3xl); }
}
@media (max-width: 680px) {
  body { font-size: var(--text-sm); line-height: 1.5; }
  .wrap { width: calc(100% - 2 * var(--gutter-phone)); }
  .wordmark { font-size: var(--text-md); }
  .site-header nav a { font-size: var(--text-sm); }
  .hero { display: flex; flex-direction: column; padding-block: var(--space-5) 0; min-height: 0; }
  .hero-name { font-size: min(var(--text-3xl), var(--text-3xl-phone-fit)); padding-top: 0; letter-spacing: -.015em; }
  .hero-intro { font-size: var(--text-md); line-height: 1.4; max-width: none; margin-top: var(--space-5); }
  .discipline-legend { font-size: var(--text-sm); margin-top: var(--space-4); }
  .hero-sim { width: 100%; margin-top: var(--space-4); }
  #flight[data-mode="fly"] { height: var(--flight-active-phone); }
  #flight .sim-controls { top: var(--flight-controls-phone); }
  #flight .sim-poster { object-fit: cover; }
  .sim-caption { padding-top: var(--space-3); }
  .sim-caption p { font-size: var(--text-sm); }
  .hero-links { gap: 0 var(--space-5); margin-top: 0; }
  .hero-links a { font-size: var(--text-sm); }
  .hero-links a:first-child { flex-basis: auto; }
  .home-section { padding-top: var(--space-6); }
  .section-title { font-size: var(--text-2xl); margin-bottom: var(--space-5); }
  .build-date { margin: var(--space-1) 0 var(--space-3); }
  .build-copy .text-links { margin-top: var(--space-1); }
  .text-links a { font-size: var(--text-sm); }
  .disciplines { margin-left: var(--space-1); }
  .contact-email { font-size: var(--text-lg); }
  .site-footer { display: block; margin-top: var(--space-7); }
  .site-footer nav { gap: var(--space-5); }
  .project-intro, .resume-section { display: block; }
  .project-intro .project-figure { margin-top: var(--space-5); }
  .gallery { display: block; }
  .gallery .project-figure { width: 100%; margin-bottom: var(--space-6); }
  .page-heading { padding-top: var(--space-6); }
  .resume-heading { align-items: start; flex-direction: column; }
  .resume-section > h2 { margin-bottom: var(--space-4); }
  .entry-heading { display: block; }
  .entry-heading p { margin-top: var(--space-1); white-space: normal; }
  .inner-page h1.section-title { font-size: var(--text-2xl); max-width: 100%; }
  .inner-page h2.section-title { font-size: var(--text-xl); margin-bottom: var(--space-4); }
  .project-intro { padding-top: var(--space-1); padding-bottom: var(--space-5); }
  .project-intro .lead { font-size: var(--text-md); margin-top: var(--space-4); }
  .project-meta { margin-top: var(--space-3); gap: var(--space-1) var(--space-5); }
  .project-sim { margin: 0 0 var(--space-6); }
  .project-sim #flight { height: var(--flight-project-phone); }
  .project-sim #flight[data-mode="fly"] { height: var(--flight-active-phone); }
  .project-video { margin: var(--space-3) 0 var(--space-6); }
  .media-pending { min-height: 8em; padding: var(--space-5); text-align: center; }
  .gallery-section { margin-bottom: var(--space-6); }
  .project-pagination { flex-direction: column; gap: var(--space-3); margin-top: var(--space-7); }
  .project-pagination a { max-width: none; }
  .inner-page .site-footer nav { gap: 0 var(--space-4); }
}
.wordmark { gap: var(--space-2); }
.wordmark-mark { width: var(--space-8); height: var(--space-8); flex: 0 0 auto; }
.project-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-7) var(--space-8); align-items: center; padding-top: var(--space-5); margin-bottom: var(--space-7); }
.project-row .discipline-bar { position: absolute; inset: 0 0 auto; display: flex; height: var(--space-1); }
.discipline-bar span { flex: 1; }
.project-row h3 { font-size: var(--text-xl); line-height: 1.2; }
.project-row h3 a, .project-row h2 a, .home-teams a { display: inline-flex; align-items: center; min-width: var(--target-size); min-height: var(--target-size); text-decoration: none; }
.project-row h3 a:hover, .project-row h2 a:hover, .home-teams a:hover { text-decoration: underline; }
.project-row .disciplines { margin: var(--space-3) 0; }
.project-row .build-copy:only-child { grid-column: 1 / -1; }
.project-row:not(:has(figure)) { grid-template-columns: 1fr; }
.home-teams { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.home-teams .role { font-size: var(--text-sm); color: var(--muted); }
.about-content { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--space-7); align-items: start; margin-top: var(--space-6); max-width: var(--case-width); }
.about-content > :only-child { grid-column: 1 / -1; }
.about-contact { margin-top: var(--space-7); }
.about-photo { aspect-ratio: 16 / 10; }
.contact-email { user-select: text; overflow-wrap: anywhere; }
.about-content .media-pending { min-height: 12em; }
.project-meta .disciplines { flex-wrap: wrap; line-height: 1.2; }
.try-it { margin: var(--space-2) 0 var(--space-7); max-width: var(--case-width); }
.demo-pending { justify-content: start; min-height: 8em; }
.interactive-demo { position: relative; }
.demo-mount { --amp-font: var(--font-text); --rover-font: var(--font-text); }
.interactive-demo .amp-demo { font-size: var(--text-sm); }
.interactive-demo .amp-demo :is(p, button, select, small, label, output, .amp-status, .amp-level, .amp-control, .amp-switch-state, .amp-source-play > span, .amp-pedal-name > span, .amp-footer),
.interactive-demo .rover-demo :is(p, button, label, figcaption, figcaption span, .rover-readout) { font-size: var(--text-sm); }
.interactive-demo .amp-live-input { flex-wrap: wrap; }
.interactive-demo .amp-live-input label, .interactive-demo .amp-live-input label:last-child { flex: 1; min-width: 7em; }
.interactive-demo .amp-live-input select { width: 100%; max-width: 100%; }
.interactive-demo .amp-muff { --amp-silver-base: var(--pedal-silver); background-color: var(--amp-silver-base); }
.interactive-demo .amp-control output { opacity: 1; }
.interactive-demo .amp-notes button { min-width: var(--target-size); }
.interactive-demo .rover-demo input[type="checkbox"] { width: var(--target-size); height: var(--target-size); }
.interactive-demo .rover-demo :is(summary, span) { font-size: var(--text-sm); }
.interactive-demo .rover-demo .rover-visuals .rover-estimate figcaption { font-size: var(--text-sm); }
.demo-mount { --quad-font: var(--font-text); --arduino-font: var(--font-text); }
@media (max-width: 640px) {
  .interactive-demo .rover-primary { display: grid; grid-template-columns: 1fr 1fr; }
}
.demo-rest img { width: 100%; max-height: var(--flight-project-height); object-fit: contain; background: var(--surface); }
.demo-start, .demo-stop { min-height: var(--target-size); padding: var(--space-3) var(--space-4); font: inherit; color: var(--on-accent); background: var(--accent); border: 0; cursor: pointer; }
.demo-start { margin-top: var(--space-3); }
.demo-stop { margin-block: var(--space-3); }
.demo-caption, .demo-status { font-size: var(--text-sm); color: var(--muted); margin-top: var(--space-2); }
.interactive-demo :is(.arm-demo, .hand-demo, .quad-demo, .arduino-demo) :is(p, button, label, input, select, output, span, summary, small, figcaption) { font-size: var(--text-sm); }
.interactive-demo .arm-status, .interactive-demo .arm-home { font-size: var(--text-sm) !important; }
.interactive-demo :is(input[type="range"], summary) { min-height: var(--target-size); }
.interactive-demo :is(.arm-demo, .hand-demo, .quad-demo, .arduino-demo) button { min-width: var(--target-size); }
.interactive-demo .arduino-demo :is(li, h3) { font-size: var(--text-sm); }
.interactive-demo :is(.arm-view-hint, .hand-view-hint, .arm-axis-key) { background: var(--page); padding: var(--space-1) var(--space-2); }
.interactive-demo .arm-axis-key { bottom: calc(var(--space-8) + var(--space-2)); }
.interactive-demo .hand-start { background: var(--hand-bg); }
.interactive-demo :is(.arm-start button, .arm-coordinates button, .arm-modes button[aria-pressed="true"]):hover { background: var(--arm-button); color: var(--arm-button-text); }
@media (max-width: 1100px) and (min-width: 681px) {
  .hero { gap: var(--space-5); min-height: 0; }
  #flight { height: var(--flight-home-height); }
  .hero-intro { margin-top: var(--space-2); }
  .hero-name { padding-top: 0; }
  .discipline-legend { white-space: normal; }
  .project-row { gap: var(--space-5); }
  .home-teams { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .wordmark { font-size: var(--text-md); }
  .hero { gap: 0; padding-top: var(--space-5); }
  .hero-name { line-height: .95; }
  .hero-intro { margin-top: var(--space-4); }
  .discipline-legend { margin-top: var(--space-4); }
  #flight { height: var(--flight-home-phone); min-height: var(--flight-home-phone); }
  .sim-caption { gap: 0 var(--space-3); }
  .project-row { display: block; margin-bottom: var(--space-5); padding-top: var(--space-4); }
  .project-row h3 { font-size: var(--text-lg); margin-top: var(--space-2); }
  .project-row .disciplines { margin: var(--space-1) 0 var(--space-2); }
  .project-row .text-links { margin-top: var(--space-1); }
  .project-row figcaption { margin-top: var(--space-2); }
  .home-teams { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
  .home-teams h3 { font-size: var(--text-lg); }
  .about-content { grid-template-columns: 1fr; gap: var(--space-4); }
  .about-content .media-pending { min-height: 10em; }
  .try-it { margin-bottom: var(--space-6); }
}
@media (max-width: 360px) {
  .discipline-legend { white-space: normal; line-height: 2; }
  .wordmark { font-size: var(--text-sm); gap: var(--space-1); }
  .wordmark-mark { width: var(--space-7); height: var(--space-7); }
}
.diagram-description { margin-top: var(--space-3); max-width: var(--measure); }
.diagram-description summary { min-height: var(--target-size); padding-block: var(--space-3); cursor: pointer; text-decoration: underline; text-underline-offset: .22em; }
.diagram-description summary:focus-visible { outline: var(--focus-width) solid var(--accent); outline-offset: var(--space-1); }
.qset-renders { margin-bottom: var(--space-7); }
.qset-renders h2 { margin-bottom: var(--space-5); }
.qset-comparison, .qset-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); align-items: start; }
.qset-details { margin-top: var(--space-6); }
.qset-renders img { width: 100%; }
@media (max-width: 680px) {
  .qset-comparison, .qset-details { grid-template-columns: 1fr; gap: var(--space-6); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  /* Keep automatic rotor motion behind the still until the visitor chooses flight. */
  #flight:not([data-mode="fly"]) .sim-canvas { opacity: 0; }
  #flight .sim-hud[data-mode="showcase"] .sim-readout,
  #flight .sim-hud[data-mode="showcase"] .sim-instruments { display: none; }
}
@media print {
  body { font-size: var(--text-print); }
  .wrap { width: 100%; }
  .site-header, .site-footer, .button-link, .skip-link { display: none; }
  .resume-section { break-inside: avoid; }
}

/* Media frames and the full-size gallery. */
.media-frame { display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.media-frame img.static-image { object-fit: contain; }
.project-video video, .project-video > img { display: block; width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; background: var(--surface); }
.gallery-open { overflow: hidden; }
.gallery-dialog { width: min(var(--dialog-width), calc(100% - var(--space-6))); max-height: calc(100dvh - var(--space-6)); padding: var(--space-5); background: var(--page); color: var(--text); border: var(--hairline) solid var(--line); }
.gallery-dialog::backdrop { background: var(--backdrop); }
.gallery-dialog img { width: 100%; height: min(66dvh, var(--dialog-media-height)); object-fit: contain; background: var(--surface); touch-action: pan-y pinch-zoom; }
.gallery-dialog figcaption { max-width: var(--measure); }
.gallery-toolbar, .gallery-controls { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.gallery-toolbar { margin-bottom: var(--space-4); }
.gallery-controls { margin-top: var(--space-4); }
.gallery-dialog button, .nav-toggle { font: inherit; font-size: var(--text-sm); min-height: var(--target-size); min-width: var(--target-size); padding: var(--space-2) var(--space-3); border: var(--hairline) solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.gallery-dialog button:hover, .nav-toggle:hover { border-color: var(--accent); }
.site-header { min-height: calc(2 * var(--target-size)); display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); position: relative; }
.site-header nav { display: flex; margin-left: auto; gap: 0 var(--space-6); }
@media (max-width: 800px) {
  .site-header { min-height: calc(var(--space-8) + var(--space-4)); flex-wrap: wrap; gap: 0 var(--space-3); padding-block: var(--space-2); }
  .nav-toggle { margin-left: auto; }
  .site-header nav { width: 100%; justify-content: flex-end; flex-wrap: wrap; gap: 0 var(--space-4); }
  .js .site-header nav.is-open { position: absolute; top: calc(100% - var(--space-1)); right: 0; width: min(var(--menu-width), 100%); display: grid; grid-template-columns: 1fr; justify-content: stretch; gap: var(--space-1); padding: var(--space-3); border: var(--hairline) solid var(--line); background: var(--surface); z-index: 10; }
  .js .site-header nav.is-open a { padding-inline: var(--space-3); }
}
@media (max-width: 680px) {
  .gallery-dialog { padding: var(--space-3); }
  .gallery-dialog img { height: 54dvh; }
  .gallery-controls { gap: var(--space-2); }
  .about-content { grid-template-columns: 1fr; gap: var(--space-5); }
  .contact-email { font-size: var(--text-md); }
}

/* Hardware photos need 4:3 to retain the arm and drone at full height. */
.home .media-frame, .project-page:not([data-project="qset"]) .media-frame { aspect-ratio: 4 / 3; }
.project-page:not([data-project="qset"]) .project-video video, .project-page:not([data-project="qset"]) .project-video > img { aspect-ratio: 4 / 3; }

/* V6 round 3: real lead media and a shared, compact team page. */
.project-lead { max-width: var(--case-width); margin: var(--space-1) 0 var(--space-7); }
.project-lead .media-frame { width: 100%; }
.project-lead figcaption { max-width: var(--measure); }
.project-lead .project-video { margin: 0; }
.site-header { position: relative; z-index: 10; }
.about-content .prose { max-width: var(--measure); }
.email-copy { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.email-copy button { font: inherit; font-size: var(--text-sm); min-height: var(--target-size); padding: var(--space-2) var(--space-4); border: var(--hairline) solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.email-copy button:hover { border-color: var(--accent); }
[data-copy-status] { font-size: var(--text-sm); min-height: var(--space-5); }
@media (max-width: 680px) {
  .project-lead { margin-bottom: var(--space-6); }
}

/* Media slot and draft fallback. */
.media-slot { min-width: 0; width: 100%; margin: 0; }
.media-slot figure { margin: 0; }
.media-slot .slot-frame { aspect-ratio: var(--slot-ratio); width: 100%; display: flex; flex-direction: column; justify-content: center; padding: var(--space-5); background: var(--surface); border: var(--hairline) solid var(--line); }
.slot-frame p { font-size: var(--text-sm); line-height: 1.4; max-width: 52ch; margin: 0; }
.slot-frame .slot-shot { color: var(--text); font-weight: 500; }
.slot-frame .slot-capture, .slot-frame .slot-consent { color: var(--muted); margin-top: var(--space-3); }
:is(.project-page, .about-photos) .media-slot .media-frame, .media-slot video { width: 100%; aspect-ratio: var(--slot-ratio); height: auto; object-fit: contain; background: var(--surface); }
:is(.project-page, .about-photos) .media-slot .media-frame img { object-fit: contain; }
.media-slot video { display: block; }
.slot-hosted { padding: var(--space-5); background: var(--surface); }
.slot-hosted a { display: inline-flex; align-items: center; min-height: var(--target-size); }
.slot-caption, .media-slot figcaption { margin-top: var(--space-3); color: var(--muted); font-size: var(--text-sm); }
.case-code { margin-block: var(--space-6); }
.code-note { color: var(--muted); }
@media (max-width: 680px) {
  .media-slot .slot-frame { padding: var(--space-4); }
  .slot-frame p { line-height: 1.3; }
}

/* Shared navigation cards, controls and named team media placeholders. */
.card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: var(--hairline) solid var(--line-soft);
  border-radius: var(--radius-2);
  overflow: hidden;
  transition: var(--control-transition);
}
.card:hover { background: var(--surface-2); border-color: var(--line); box-shadow: var(--shadow-hover); color: inherit; }
.card:hover .card-title { color: var(--accent); }
.card-frame { position: relative; display: block; }
.card-media { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--page); }
.card-body { display: grid; gap: var(--space-1); padding: var(--space-4) var(--space-4) var(--space-5); }
.card-title { font-size: var(--text-xl); font-weight: 600; line-height: 1.1; }
.card-meta, .card-role { font-size: var(--text-sm); line-height: 1.4; }
.card-meta { color: var(--muted); }
.card-placeholder {
  display: grid;
  place-content: center;
  gap: var(--space-1);
  text-align: center;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-2);
  background-color: var(--page);
  background-image: linear-gradient(var(--line-soft) var(--hairline), var(--clear) var(--hairline)),
    linear-gradient(90deg, var(--line-soft) var(--hairline), var(--clear) var(--hairline));
  background-size: var(--space-5) var(--space-5);
  color: var(--muted);
}
.card-placeholder .ph-mark { font: 700 var(--text-2xl) / 1 var(--font-display); }
.card-placeholder .ph-sub { font-size: var(--text-sm); }
.cs-page [data-cs="hero"] .card-placeholder { aspect-ratio: 21 / 9; }
.cs-page [data-cs="hero"] .ph-mark { font-size: var(--placeholder-title); }

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-size);
  padding: var(--space-2) var(--space-4);
  border: var(--hairline) solid var(--accent);
  border-radius: var(--radius-1);
  color: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--control-transition);
}
.button-link:hover, .button-link.primary { background: var(--accent); color: var(--on-accent); }
.button-link.primary:hover { background: var(--text); border-color: var(--text); color: var(--page); }
:where(.nav-toggle, .gallery-dialog button, .email-copy button, .reel-controls button,
  .interaction-buttons button, .spin-start, .exploded-start, .exploded-reset,
  .demo-start, .demo-stop, .pcb-viewer button) {
  border-radius: var(--radius-1);
  transition: var(--control-transition);
}
.visually-hidden {
  position: absolute;
  width: var(--hairline);
  height: var(--hairline);
  padding: 0;
  margin: calc(-1 * var(--hairline));
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Homepage hero: name, then copy beside the flight sim. */
.hero { grid-template-columns: minmax(var(--hero-copy-min), var(--hero-copy-max)) minmax(0, 1fr); grid-template-rows: auto auto; gap: var(--space-6) var(--space-7); padding-block: var(--space-6) var(--space-7); }
.hero-copy { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; gap: var(--space-5); }
.hero-copy .hero-intro { margin: 0; font-size: var(--text-lg); line-height: 1.45; max-width: 30ch; }
.hero-copy .discipline-legend { margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero-copy .hero-links { margin: 0; gap: 0 var(--space-5); }
.hero-copy .hero-links a:first-child { flex-basis: auto; }
.hero-sim { grid-column: 2; grid-row: 2; }

/* Section heads: title, one supporting line, a rule above. */
.home-section { padding-top: var(--space-8); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-3) var(--space-6);
  border-top: var(--hairline) solid var(--line); padding-top: var(--space-6); margin-bottom: var(--space-6); }
.section-head .section-title { margin: 0; }
.section-dek { color: var(--muted); font-size: var(--text-md); max-width: 46ch; }

/* Case studies share both edges with the site header and footer (REVIEW_V10 #28): the article
   uses the full site column, and text keeps its own --measure. */
.cs-page, .cs-page + .project-pagination { max-width: none; }
.cs-page .cs-head { max-width: none; padding: var(--space-2) 0 var(--space-5); }
.inner-page .cs-head h1.section-title {
  font-size: var(--text-2xl);
  line-height: 1;
  max-width: none;
  text-wrap: balance;
}
.cs-page [data-cs="hero"] { max-width: none; margin: 0 0 var(--space-5); }
.cs-summary { font-size: var(--text-lg); line-height: 1.45; max-width: var(--summary-measure); margin-bottom: var(--space-6); }
.cs-specs { border-top: var(--hairline) solid var(--line); }
.cs-spec-grid { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--space-7); }
.cs-spec-grid > div {
  display: grid;
  grid-template-columns: var(--spec-label-width) minmax(0, 1fr);
  align-items: baseline;
  gap: var(--space-4);
  padding-block: var(--space-3);
  border-bottom: var(--hairline) solid var(--line-soft);
}
.cs-spec-grid > .wide { grid-column: 1 / -1; }
.cs-spec-grid dt { font-size: var(--text-sm); font-weight: 600; line-height: 1.25; letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--muted); }
.cs-spec-grid dd { margin: 0; font-size: var(--text-md); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); overflow-wrap: anywhere; }
.cs-spec-grid .disciplines { margin: 0; flex-wrap: wrap; }
.cs-specs .cs-quick { margin-top: var(--space-3); }
.cs-section, .cs-try { margin-top: var(--space-9); }
.cs-specs + .cs-section { margin-top: var(--space-8); }
.inner-page .cs-section h2.section-title, .inner-page .cs-try h2.section-title { font-size: var(--text-xl); line-height: 1.1; margin: 0 0 var(--space-5); }
.cs-overview, .cs-step .prose { max-width: var(--measure); }
.cs-overview:not(:last-child) { margin-bottom: var(--space-7); }
.cs-block + .cs-block { margin-top: var(--space-8); padding-top: var(--space-7); border-top: var(--hairline) solid var(--line); }
.cs-block > h3 { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-lg); line-height: 1.25; margin-bottom: var(--space-4); }
.cs-block > h3 .disciplines { margin: 0; }
.chip-cad { border: var(--hairline) solid var(--muted); color: var(--text); background: var(--clear); }
.cs-step + .cs-step { margin-top: var(--space-6); }
.cs-step.case-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); align-items: start; }
.cs-step h4, .cs-step h3 { font-size: var(--text-md); font-weight: 600; line-height: 1.3; margin: 0 0 var(--space-2); }
.cs-step-media { display: grid; min-width: 0; gap: var(--space-5); }
.cs-step .media-frame, .cs-step video { border-radius: var(--radius-2); }
/* Reserve the full photo link before a lazy image has decoded. */
.cs-page .cs-step .media-frame {
  width: min(100%, calc(var(--step-image-height) * var(--image-ratio)));
  aspect-ratio: var(--image-ratio);
  background: var(--clear);
}
.cs-page .cs-step .media-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cs-try .try-it, .cs-try .exploded-view, .cs-try .pcb-viewer { margin: 0 0 var(--space-7); max-width: 100%; }
.cs-try > section:last-child { margin-bottom: 0; }
.cs-head .cs-jumps { margin-top: var(--space-2); }
.interactive-demo .hand-presets { margin-block: var(--space-3) var(--space-5); }
.interactive-demo .demo-touch-guide { display: none; }
@media (pointer: coarse) {
  .interactive-demo .demo-key-guide { display: none; }
  .interactive-demo .demo-touch-guide { display: inline; }
}
.cs-try .try-it > p:first-of-type:not(.demo-caption) {
  max-width: var(--measure);
  margin: 0 0 var(--space-4);
}
.cs-gallery .gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
.cs-gallery .project-figure { margin: 0; }
.cs-page .cs-gallery .media-frame {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-2);
  border: var(--hairline) solid var(--line-soft);
}
.cs-gallery .media-frame img { object-fit: cover; }
.cs-gallery .media-frame img:is(.static-image, .contain, .system-diagram), .cs-gallery .contain .media-frame img { object-fit: contain; background: var(--surface); }
/* REVIEW_V10 #30: a full-frame (portrait or odd-aspect) photo keeps its own shape, no taller than
   a 4:3 tile, so it never sits in a frame with bars. */
.cs-gallery .project-figure.contain { container-type: inline-size; }
.cs-page .cs-gallery .contain .media-frame { aspect-ratio: var(--image-ratio, 4 / 3); width: min(100%, calc(75cqi * var(--image-ratio, 4 / 3))); margin-inline: auto; }

.cs-links ul, ul.cs-links { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.cs-links li { border-top: var(--hairline) solid var(--line); }
.cs-links li:last-child { border-bottom: var(--hairline) solid var(--line); }
.cs-links li a { display: flex; align-items: center; min-height: var(--space-7); text-decoration: none; }
.cs-links li a::after { content: '\2192'; margin-left: auto; padding-left: var(--space-4); color: var(--muted); }
.cs-links li a:hover { text-decoration: underline; }
.cs-links .code-note { color: var(--muted); margin-top: var(--space-4); font-size: var(--text-sm); }
.project-pagination { margin-top: var(--space-8); }
.about-outside { margin-top: var(--space-7); }
.inner-page .about-outside h2.section-title { font-size: var(--text-xl); margin-bottom: var(--space-3); }

@media (max-width: 1100px) and (min-width: 681px) {
  .hero { grid-template-columns: var(--hero-copy-min) minmax(0, 1fr); gap: var(--space-5); }
  .cs-step.case-pair { grid-template-columns: 1fr; gap: var(--space-4); }
}
@media (max-width: 680px) {
  .hero { gap: 0; padding-block: var(--space-4) var(--space-6); }
  .hero-copy { gap: var(--space-4); margin-top: var(--space-4); }
  .hero-copy .hero-intro { font-size: var(--text-md); max-width: none; }
  .hero-sim { margin-top: var(--space-5); }
  .home-section { padding-top: var(--space-7); }
  .section-head { padding-top: var(--space-5); margin-bottom: var(--space-5); }
  .section-dek { font-size: var(--text-sm); }
  .cs-section, .cs-try, .cs-specs + .cs-section { margin-top: var(--space-7); }
  .cs-block + .cs-block { margin-top: var(--space-7); padding-top: var(--space-6); }
  .cs-step.case-pair { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .cs-spec-grid { grid-template-columns: minmax(0, 1fr); }
  .cs-spec-grid > div { grid-template-columns: var(--spec-label-compact) minmax(0, 1fr); gap: var(--space-3); }
}
@media (max-width: 959px) { .cs-gallery .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .cs-gallery .gallery { grid-template-columns: minmax(0, 1fr); } }
/* REVIEW_V10 #21: a step's set of plots reads as one gallery-style row under its paragraph. */
.cs-step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); align-items: start; margin-top: var(--space-4); }
.cs-step-grid .project-figure { margin: 0; min-width: 0; }
.cs-page .cs-step-row .media-frame { width: 100%; }
@media (max-width: 959px) { .cs-step-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .cs-step-grid { grid-template-columns: minmax(0, 1fr); } }

/* v10 (T-172): the Design Teams section and team pages are styled in team-media.css. */
.card-frame .reel-kind { position: absolute; inset: var(--space-2) auto auto var(--space-2); background: var(--page); }
@media (min-width: 960px) { .home-section { padding-top: var(--space-9); } }
.cs-page [data-cs="hero"] video { aspect-ratio: var(--slot-ratio, 16 / 9); }

/* T-130 review item 5: the hero figure takes its media's own aspect ratio. No frame colour,
   so a render or diagram drawn on the page colour never shows letterbox bars. */
.cs-page [data-cs="hero"] .media-frame, .cs-page [data-cs="hero"] .media-slot .media-frame { aspect-ratio: auto; height: auto; background: var(--clear); }
.cs-page [data-cs="hero"] .project-figure { max-width: min(100%, calc(var(--hero-max-height) * var(--image-ratio))); }
.cs-page [data-cs="hero"] .media-frame img, .cs-page [data-cs="hero"] video { width: 100%; height: auto; max-height: var(--hero-max-height); object-fit: contain; }
.cs-page [data-cs="hero"] .media-frame:has(> img.system-diagram) { width: min(100%, var(--diagram-width)); }

/* T-130 review item 9: the rover Try it at phone widths. Start sits below the poster instead
   of covering the scene, and the running map stacks under the 3D view with room to read. */
@media (max-width: 680px) {
  .interactive-demo .rover-demo:not([data-ready="true"]) { display: flex; flex-direction: column; }
  .interactive-demo .rover-demo:not([data-ready="true"]) .rover-gate { position: static; order: 1; padding: var(--space-3) 0 0; }
  .interactive-demo .rover-demo:not([data-ready="true"]) .rover-status { order: 2; }
  .interactive-demo .rover-visuals[data-view="split"] .rover-estimate { position: static; width: auto; border: 0; border-top: var(--hairline) solid var(--line); background: var(--clear); }
  .interactive-demo .rover-visuals[data-view="split"] .rover-map { height: var(--rover-map-height); }
  .interactive-demo .rover-visuals[data-view="split"] .rover-room { height: clamp(12rem, 29svh, var(--rover-map-height)); }
  .interactive-demo .rover-visuals[data-view="split"] .rover-estimate figcaption { font-size: var(--text-sm); padding: var(--space-2) var(--space-3) 0; }
  .interactive-demo .rover-visuals[data-view="split"] .rover-estimate figcaption span { display: inline; }
}

/* v10 (T-170): project pages open with the title and subtitle, the rotating 3D model beside a
   photo, then the simulation and the write-up. Team pages keep the v9 hero rules above. */
.cs-page .cs-head .cs-summary { margin: var(--space-4) 0 0; }
.cs-page .cs-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; margin: 0 0 var(--space-5); }
.cs-page .cs-hero-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-model { margin: 0; min-width: 0; }
.cs-model-stage { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-2); background: var(--surface); }
.cs-model-stage > img, .cs-model-stage > canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.cs-model-stage > canvas { cursor: grab; touch-action: pan-y; }
.cs-model-stage > canvas:active { cursor: grabbing; }
.cs-model[data-state="ready"] .cs-model-still { visibility: hidden; }
.cs-model-start {
  position: absolute; top: var(--space-3); right: var(--space-3); min-height: var(--target-size);
  padding: var(--space-2) var(--space-4); font: inherit; font-size: var(--text-sm); color: var(--text);
  background: var(--page); border: var(--hairline) solid var(--line); border-radius: var(--radius-2); cursor: pointer;
  transition: var(--control-transition);
}
.cs-model-start:hover { border-color: var(--accent); }
.cs-model-status { margin-top: var(--space-3); color: var(--muted); font-size: var(--text-sm); }
/* Model, photo and slot captions share one baseline. */
.cs-page .cs-hero figcaption { margin-top: var(--space-3); line-height: 1.35; }
.cs-model-status:empty { display: none; }
.cs-page .cs-hero .project-lead { min-width: 0; max-width: none; margin: 0; }
.cs-page .cs-hero .project-lead .project-figure { max-width: none; margin: 0; }
.cs-page .cs-hero .project-lead .media-frame { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-2); background: var(--surface); }
.cs-page .cs-hero .project-lead .media-frame img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.cs-page .cs-hero .project-lead .media-frame img.system-diagram { object-fit: contain; }
.cs-page .cs-hero .project-lead .media-frame:has(> img.system-diagram) { width: 100%; }
.cs-page .cs-hero .project-lead .slot-frame { aspect-ratio: 4 / 3; }
.cs-try + .cs-specs { margin-top: var(--space-9); }
.cs-overview-pair { margin-bottom: var(--space-7); }
/* Supporting videos lower on the page: one labelled clip per song, sound on, never autoplayed. */
.slot-segments { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.slot-segments li { min-width: 0; }
.segment-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); margin: 0 0 var(--space-2); font-size: var(--text-md); }
.segment-title span { color: var(--muted); font-size: var(--text-sm); }
.slot-segments video { width: 100%; height: auto; border-radius: var(--radius-2); }
@media (max-width: 959px) { .slot-segments { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) {
  .cs-page .cs-hero-pair { grid-template-columns: minmax(0, 1fr); }
  .cs-try + .cs-specs { margin-top: var(--space-7); }
}

/* CSS reserves the final header height before the navigation module runs. */
.nav-toggle { display: none; }
@media (max-width: 800px) {
  .js .nav-toggle { display: inline-flex; align-items: center; }
  .js #main-navigation:not(.is-open) { display: none; }
}

/* Draw the signature; the name rises in its reserved space as the last two strokes finish, then the copy settles. */
@keyframes v9-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
.intro-play .wordmark-mark path {
  stroke-dasharray: 1;
  animation: v9-draw 420ms var(--ease-draw) both;
}
.intro-play .wordmark-mark .e { animation-delay: 140ms; }
.intro-play .wordmark-mark .s { animation-delay: 280ms; }
@keyframes name-rise {
  from { opacity: 0; transform: translateY(12%); }
  to { opacity: 1; transform: none; }
}
@keyframes copy-settle {
  from { opacity: 0; transform: translateY(var(--space-1)); }
  to { opacity: 1; transform: none; }
}
/* REVIEW_V10 #15: logo and name are one moment. The mark draws large at the top left, just
   above where the name rises, then settles into the header; the copy and the sim follow. */
@keyframes mark-settle {
  from { transform: scale(var(--intro-mark-scale)); }
  to { transform: none; }
}
:root { --intro-mark-scale: 2; }
.intro-play .wordmark-mark { transform-origin: 0 0; animation: mark-settle 320ms var(--ease-out) 640ms both; }
.intro-play .wordmark > span { animation: copy-settle 320ms var(--ease-out) 700ms both; }
.intro-play .hero-name { animation: name-rise 560ms var(--ease-out) 420ms both; }
.intro-play .hero-copy { animation: copy-settle 320ms var(--ease-out) 700ms both; }
.intro-play .hero-sim { animation: copy-settle 320ms var(--ease-out) 760ms both; }
.intro-play .hero-more { animation: copy-settle 320ms var(--ease-out) 760ms both; }
@media (max-width: 680px) {
  :root { --intro-mark-scale: 1.4; }
}
@media (prefers-reduced-motion: reduce) {
  .intro-play .wordmark-mark path { animation: none; stroke-dasharray: none; }
  .intro-play .hero-name, .intro-play .hero-copy, .intro-play .hero-sim, .intro-play .hero-more, .intro-play .wordmark-mark, .intro-play .wordmark > span { animation: none; }
}

/* v10 A (T-169): the longer first-person intro beside the flight sim, the About photo strip,
   one row per email address and the USB resume's sub-lines. */
.hero-copy .hero-intro p + p { margin-top: var(--space-4); }
@media (min-width: 1101px) {
  .hero { grid-template-columns: minmax(0, 32rem) minmax(0, 1fr); }
  .hero-copy .hero-intro { font-size: var(--text-md); line-height: 1.55; max-width: none; }
}
@media (max-width: 1100px) and (min-width: 681px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-copy .hero-intro { font-size: var(--text-md); line-height: 1.5; max-width: none; }
}
@media (max-width: 680px) {
  .hero-copy .hero-intro { font-size: var(--text-sm); line-height: 1.5; }
  .hero-copy .hero-intro p + p { margin-top: var(--space-3); }
}

.about-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); margin-top: var(--space-5); }
.about-strip figcaption { margin-top: var(--space-2); }
.about-strip-caption { margin-top: var(--space-2); color: var(--muted); font-size: var(--text-sm); }
/* REVIEW_V10 #25: the About photos fill their frames, with no band at the sides. */
.about-photos .media-slot .media-frame img { object-fit: cover; }
/* REVIEW_V10 #29 (Vraj, 2 Dec 2026): on phones the second paragraph (the FTC founder line) moves
   below the flight sim, so the visual lands in the first screen. The build repeats it in
   .hero-more after the sim; exactly one copy shows at each width. */
.hero-more { display: none; }
@media (max-width: 680px) {
  .hero-copy .hero-intro p + p { display: none; }
  .hero-more { display: block; margin-top: var(--space-4); font-size: var(--text-sm); line-height: 1.5; }
  .hero-more p + p { margin-top: var(--space-3); }
}
.about-pending { margin-top: var(--space-7); max-width: var(--case-width); }
.email-copy > a { display: inline-flex; align-items: center; min-height: var(--target-size); }
.email-copy + .email-copy { margin-top: var(--space-2); }
.email-copy [data-copy-status] { min-height: 0; }
@media (min-width: 681px) {
  .email-copy .contact-email { min-width: 12em; }
}
@media (max-width: 680px) {
  .about-photos { display: contents; }
  .about-strip, .about-strip-caption { order: 1; margin-top: 0; }
  .about-strip-caption { margin-top: calc(-1 * var(--space-2)); }
}

.resume-entry .entry-heading p { margin: 0; }
.resume-entry .entry-sub { margin-bottom: var(--space-3); }
.resume-others { margin-top: var(--space-5); }

@media screen and (forced-colors: none) {
  body {
    isolation: isolate;
    --grid-step: 24px;
    --grid-minor: rgb(170 183 196 / 3%);
    --grid-major: rgb(170 183 196 / 6%);
    --grid-mask-ink: #000;
    --grid-opacity: 1;
    --grid-band-height: 24rem;
    --grid-period: calc(5 * var(--grid-step));
    --grid-hero-mask: radial-gradient(ellipse 70% 60% at 20% 0%, var(--grid-mask-ink) 30%, var(--clear) 100%);
  }

  :is(.home, .inner-page .page-heading, .project-page .cs-head,
      #projects > .section-head, #teams > .section-head, .cs-build, .cs-links, .experience-section)::before {
    --grid-stops: var(--grid-major) 0 var(--hairline), var(--clear) var(--hairline) var(--grid-step),
      var(--grid-minor) var(--grid-step) calc(var(--grid-step) + var(--hairline)),
      var(--clear) calc(var(--grid-step) + var(--hairline)) calc(2 * var(--grid-step)),
      var(--grid-minor) calc(2 * var(--grid-step)) calc(2 * var(--grid-step) + var(--hairline)),
      var(--clear) calc(2 * var(--grid-step) + var(--hairline)) calc(3 * var(--grid-step)),
      var(--grid-minor) calc(3 * var(--grid-step)) calc(3 * var(--grid-step) + var(--hairline)),
      var(--clear) calc(3 * var(--grid-step) + var(--hairline)) calc(4 * var(--grid-step)),
      var(--grid-minor) calc(4 * var(--grid-step)) calc(4 * var(--grid-step) + var(--hairline)),
      var(--clear) calc(4 * var(--grid-step) + var(--hairline)) var(--grid-period);
    --engineering-grid: repeating-linear-gradient(var(--grid-stops)),
      repeating-linear-gradient(90deg, var(--grid-stops));
    position: absolute;
    content: '';
    pointer-events: none;
    z-index: -1;
    background-image: var(--engineering-grid);
    opacity: var(--grid-opacity);
  }

  .home::before {
    inset: var(--space-8) 0 auto;
    height: 68rem;
    padding-inline: max(calc(var(--space-9) / 2), calc((100% - var(--site-width)) / 2));
    background-origin: content-box;
    background-size: var(--grid-period) var(--grid-period);
    mask-image: var(--grid-hero-mask);
  }

  :is(.inner-page .page-heading, .project-page .cs-head,
      #projects > .section-head, #teams > .section-head, .cs-build, .cs-links, .experience-section) {
    position: relative;
  }

  :is(.inner-page .page-heading, .project-page .cs-head)::before {
    inset: 0 calc(-1 * var(--gutter-phone)) auto;
    height: 100%;
    background-position: var(--gutter-phone) 0;
    mask-image: var(--grid-hero-mask), linear-gradient(90deg, var(--clear), var(--grid-mask-ink) var(--gutter-phone), var(--grid-mask-ink) 90%, var(--clear)),
      linear-gradient(var(--clear), var(--grid-mask-ink) var(--space-5));
    mask-composite: intersect;
  }
  .about-personal .page-heading::before { height: calc(100% + 20rem); }
  .project-page .cs-head::before { height: min(100%, 9rem); }
  .engineering-intro .cs-head::before { inset-inline-end: 0; }

  :is(#projects > .section-head, #teams > .section-head, .cs-build, .cs-links, .experience-section)::before {
    inset: 0 calc(-1 * var(--gutter-phone)) auto;
    height: var(--grid-band-height);
    background-position: var(--gutter-phone) 0;
    --grid-major: rgb(170 183 196 / 4%);
    --grid-minor: rgb(170 183 196 / 2.7%);
    mask-image: linear-gradient(var(--clear), var(--grid-mask-ink) 3rem, var(--clear));
  }
}

@media screen and (forced-colors: none) and (min-width: 681px) and (max-width: 1100px) {
  .home::before { padding-inline: calc(var(--space-8) / 2); }
}

@media screen and (forced-colors: none) and (max-width: 680px) {
  body { --grid-step: 20px; --grid-opacity: .7; --grid-band-height: 19rem; }
  .home::before {
    height: 24rem;
    padding-inline: var(--gutter-phone);
  }
  :is(.inner-page .page-heading, .project-page .cs-head)::before { max-height: 19rem; }
  :is(#projects > .section-head, #teams > .section-head, .cs-build, .cs-links, .experience-section)::before { content: none; }
}

/* Unsupported browsers ignore this opt-in and follow the same ordinary links. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  [data-transition-lead] { view-transition-name: var(--transition-name, none); }
  ::view-transition-group(*) { animation-duration: var(--dur-2); animation-timing-function: var(--ease-out); }
  ::view-transition-old(site-header), ::view-transition-new(site-header) { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .site-header, [data-transition-lead], [data-transition-source] { view-transition-name: none !important; }
}

.team-interaction { margin-block: 0 var(--space-8); }
.interaction-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-5); margin-bottom: var(--space-5); }
.interaction-heading .section-title { font-size: var(--text-2xl); margin: 0; }
.interaction-heading p { color: var(--muted); font-size: var(--text-md); }
.team-render-stage { position: relative; aspect-ratio: 8 / 5; background: var(--page); border: var(--hairline) solid var(--line); overflow: hidden; }
.team-render-stage > img { width: 100%; height: 100%; object-fit: contain; }
.render-kind { position: absolute; top: var(--space-4); left: var(--space-4); padding: var(--space-1) var(--space-2); background: var(--page); color: var(--muted); font-size: var(--text-sm); line-height: 1.4; pointer-events: none; }
.team-render-stage .render-kind { z-index: 2; }
.compare-stage { aspect-ratio: 4 / 3; }
.compare-stage > img { position: absolute; inset: 0; }
.compare-stage [data-compare-reveal] { clip-path: inset(0 0 0 var(--position)); }
.compare-boundary { position: absolute; top: 0; bottom: 0; left: var(--position); width: var(--rule-bold); transform: translateX(-50%); background: var(--page); box-shadow: 0 0 0 var(--hairline) var(--text); pointer-events: none; }
.compare-stage input[type="range"] { position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; border: 0; background: var(--clear); appearance: none; -webkit-appearance: none; cursor: ew-resize; touch-action: pan-y; }
.compare-stage input[type="range"]::-webkit-slider-runnable-track { height: var(--target-size); background: var(--clear); }
.compare-stage input[type="range"]::-moz-range-track { height: var(--target-size); background: var(--clear); }
.compare-stage input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: var(--target-size); height: var(--target-size); border: var(--focus-width) solid var(--page); outline: var(--rule-bold) solid var(--text); border-radius: 50%; background: var(--text); }
.compare-stage input[type="range"]::-moz-range-thumb { width: calc(var(--target-size) - 2 * var(--focus-width)); height: calc(var(--target-size) - 2 * var(--focus-width)); border: var(--focus-width) solid var(--page); outline: var(--rule-bold) solid var(--text); border-radius: 50%; background: var(--text); }
.compare-stage:focus-within { outline: var(--focus-width) solid var(--accent); outline-offset: var(--space-1); }
.compare-stage input[type="range"]:focus-visible { outline: 0; }
.compare-labels { display: flex; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-3); font-size: var(--text-sm); }
.compare-labels span { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.compare-labels strong { font-variant-numeric: tabular-nums; font-weight: 600; }
.compare-labels span:last-child { justify-content: flex-end; text-align: right; }
.interaction-buttons { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.interaction-buttons button, .spin-start { min-width: var(--target-size); min-height: var(--target-size); padding: var(--space-2) var(--space-4); border: var(--hairline) solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: var(--text-sm); cursor: pointer; }
.interaction-buttons button:hover, .spin-start:hover { border-color: var(--accent); }
.interaction-buttons button[aria-pressed="true"] { border-color: var(--text); background: var(--text); color: var(--page); }
.compare-buttons { margin-top: var(--space-5); }
.interaction-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }
.interaction-controls output { color: var(--muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; min-width: 4ch; text-align: right; }
.interaction-help { color: var(--muted); font-size: var(--text-sm); margin: var(--space-3) 0 0; }
.team-interaction figcaption { max-width: 72ch; margin-top: var(--space-3); }
.interaction-note { margin-top: var(--space-4); max-width: 72ch; }
.spin-stage { cursor: grab; touch-action: pan-y; user-select: none; }
.spin-stage.is-dragging { cursor: grabbing; }
.spin-start { position: absolute; bottom: var(--space-4); left: 50%; transform: translateX(-50%); white-space: nowrap; }
.gear-stage { display: grid; }
.gear-stage img { grid-area: 1 / 1; }
.gear-stage [data-gear-image="new"] { opacity: 0; }
[data-gear="new"] .gear-stage [data-gear-image="new"] { opacity: 1; }
[data-gear="new"] .gear-stage [data-gear-image="old"] { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .gear-stage img { transition: opacity var(--dur-1) var(--ease-out); }
}
@media (max-width: 680px) {
  .team-interaction { margin-bottom: var(--space-7); }
  .interaction-heading { margin-bottom: var(--space-4); }
  .interaction-heading .section-title { font-size: var(--text-xl); }
  .interaction-heading p { font-size: var(--text-sm); }
  .render-kind { top: var(--space-2); left: var(--space-3); }
  .compare-labels { font-size: var(--text-sm); }
  .compare-labels span { display: block; }
  .compare-labels strong { display: block; }
  .spin-start { bottom: var(--space-3); }
}

/* v10 (T-172): chapter-level interactions take their heading from the chapter. */
.team-chapter .team-interaction { margin: 0; }
.interaction-heading-compact { margin-bottom: var(--space-3); }

/* v10 Design Team pages: title and summary, one hero visual, quick facts, then chapters that each
   pair their prose with at most one visual, a gallery and links. */
.team-page .team-head { padding-bottom: var(--space-5); }
.team-full-name { color: var(--muted); font-size: var(--text-md); line-height: 1.35; margin: var(--space-3) 0 var(--space-4); }
.team-page .team-head .cs-summary { margin-bottom: 0; }
.team-page .team-hero { margin: 0 0 var(--space-7); }
.team-page .team-hero .card-placeholder { aspect-ratio: 21 / 9; }
.team-page .team-hero[style*="--hero-cap"] .media-slot { max-width: var(--hero-cap); margin-inline: auto; }
.team-hero-compare .team-interaction { margin: 0; }
.team-hero-compare figure { max-width: calc(var(--hero-max-height) * 4 / 3); }
.team-hero-compare .compare-stage { aspect-ratio: 4 / 3; }
.team-hero-compare figcaption { color: var(--muted); font-size: var(--text-sm); }
.team-story > .cs-body { display: grid; }
.team-chapter { display: grid; gap: var(--space-5); padding-top: var(--space-7); margin-top: var(--space-7); border-top: var(--hairline) solid var(--line); }
.team-chapter:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.team-chapter h3 { font-size: var(--text-lg); font-weight: 600; line-height: 1.25; margin: 0 0 var(--space-3); }
.team-chapter-copy { min-width: 0; }
.team-chapter-copy .prose { max-width: var(--measure); }
.team-chapter-copy .prose p + p { margin-top: var(--space-3); }
.team-chapter-visual { min-width: 0; }
.team-chapter-visual .project-figure { margin: 0; }
.team-page .team-chapter-visual .media-frame {
  width: min(100%, calc(var(--step-image-height) * var(--image-ratio)));
  aspect-ratio: var(--image-ratio);
  border-radius: var(--radius-2);
  background: var(--clear);
}
.team-page .team-chapter-visual .media-frame img { width: 100%; height: 100%; object-fit: contain; }
.team-chapter-visual video { border-radius: var(--radius-2); }
.team-chapter-visual figcaption { color: var(--muted); font-size: var(--text-sm); margin-top: var(--space-3); }
@media (min-width: 960px) {
  .team-chapter-pair { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-7); align-items: start; }
  .team-chapter-interactive { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
}

/* v10 homepage Design Teams: the list on the left, one stage on the right (Projects is the
   reverse). Phones get one card per team: visual, name and role, then a line and a link. */
.teams-layout { display: grid; gap: var(--space-7); }
.team-item { --lead: var(--axis-m); display: grid; gap: var(--space-3); min-width: 0; }
.team-frame { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface); border-radius: var(--radius-2); }
.team-frame .team-stage-image { width: 100%; height: 100%; object-fit: cover; }
.team-frame .reel-kind { position: absolute; inset: var(--space-2) auto auto var(--space-2); padding: var(--space-1) var(--space-2); font-size: var(--text-sm); }
.team-frame .card-placeholder { width: 100%; height: 100%; aspect-ratio: auto; }
.team-visual-tile .team-frame { aspect-ratio: 3 / 1; }
.team-visual-tile .ph-sub { padding-inline: var(--space-4); }
.team-compare .compare-stage { aspect-ratio: 4 / 3; border-radius: var(--radius-2); }
.team-compare .compare-labels { margin-top: var(--space-2); }
.team-caption { color: var(--muted); font-size: var(--text-sm); line-height: 1.35; margin: var(--space-2) 0 0; }
.team-row { display: block; color: var(--text); text-decoration: none; }
.team-row:hover .team-row-title { color: var(--accent); }
.team-thumb { display: none; }
.team-row-copy { display: grid; gap: var(--space-1); }
.team-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.team-row-title { font-size: var(--text-xl); font-weight: 600; line-height: 1.1; }
.team-row-head .disciplines { margin: 0; gap: var(--space-1); }
.team-row-head .disciplines > span { font-size: var(--text-sm); }
.team-row-name, .team-row-role { font-size: var(--text-sm); line-height: 1.35; }
.team-row-name { color: var(--muted); }
.team-detail p { font-size: var(--text-md); line-height: 1.45; max-width: var(--summary-measure); margin: 0; }
.team-detail .text-links { margin-top: var(--space-2); font-size: var(--text-sm); }
@media (max-width: 959px) {
  .team-item { padding-bottom: var(--space-6); border-bottom: var(--hairline) solid var(--line); }
  .team-row { margin-top: var(--space-2); }
  .team-visual-tile .ph-sub { display: none; }
  .team-item:last-child { padding-bottom: 0; border-bottom: 0; }
  .team-detail p { font-size: var(--text-sm); }
}
@media (min-width: 960px) {
  .teams-layout { grid-template-columns: minmax(0, 480fr) minmax(0, 720fr); grid-template-rows: repeat(4, auto) 1fr auto; column-gap: var(--space-7); row-gap: 0; align-items: start; }
  .team-item { display: contents; }
  .team-item > .team-visual { grid-column: 2; grid-row: 1 / 6; }
  .team-item > .team-detail { grid-column: 2; grid-row: 6; padding-top: var(--space-4); }
  .team-item:not(.is-active) > :is(.team-visual, .team-detail) { display: none; }
  .team-item:nth-child(1) > .team-row { grid-row: 1; }
  .team-item:nth-child(2) > .team-row { grid-row: 2; }
  .team-item:nth-child(3) > .team-row { grid-row: 3; }
  .team-item:nth-child(4) > .team-row { grid-row: 4; }
  .team-row { grid-column: 1; display: grid; grid-template-columns: var(--reel-thumb-width) minmax(0, 1fr); gap: var(--space-4); align-items: center;
    padding: var(--space-4); border-top: var(--hairline) solid var(--line); border-left: var(--focus-width) solid var(--clear); }
  .team-item:nth-child(4) > .team-row { border-bottom: var(--hairline) solid var(--line); }
  .team-item.is-active > .team-row { background: var(--surface); border-left-color: var(--lead); }
  .team-thumb { display: grid; place-items: center; width: var(--reel-thumb-width); height: var(--reel-thumb-height); overflow: hidden; background: var(--page); border: var(--hairline) solid var(--line-soft); border-radius: var(--radius-1); }
  .team-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .team-thumb-mark { font: 700 var(--text-md) / 1 var(--font-display); color: var(--muted); }
  .team-row-title { font-size: var(--text-lg); }
  .team-visual-tile .team-frame { aspect-ratio: 4 / 3; }
  .team-visual-tile .ph-mark { font-size: var(--placeholder-title); }
  .team-visual-compare .compare-labels { font-size: var(--text-md); }
}
@media (prefers-reduced-motion: no-preference) {
  .team-row { transition: background-color var(--dur-1) var(--ease-std), border-color var(--dur-1) var(--ease-std); }
}


.team-page[data-project="qset"] .gallery > :only-child { grid-column: 1 / -1; width: 100%; }
.team-page[data-project="qset"] .gallery > :only-child .media-frame { width: 100%; height: auto; aspect-ratio: var(--image-ratio); }
.qset-briefs { margin-top: var(--space-5); padding: var(--space-3); border: var(--hairline) dashed var(--line); border-radius: var(--radius-2); }
.qset-briefs summary { cursor: pointer; }
.qset-briefs summary span { margin-right: var(--space-2); font: 600 var(--text-sm) var(--font-text); color: var(--accent); }
.qset-briefs .slot-empty { margin-top: var(--space-3); }
.team-thumb img.ftc-mark { object-fit: contain; }
@media (max-width: 959px) {
  .team-item > .team-visual-tile { display: none; }
  .team-row { display: grid; grid-template-columns: var(--team-mark-size) minmax(0,1fr); align-items: center; gap: var(--space-3); }
  .team-thumb { display: grid; width: var(--team-mark-size); height: var(--team-mark-size); place-items: center; overflow: hidden; background: var(--surface-2); border-radius: var(--radius-1); }
  .team-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .team-thumb-mark { font: 600 var(--text-sm) var(--font-text); }
}

.swerve-hero { margin: 0; }
.swerve-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius-2);
  background: var(--swerve-poster-background);
}
.swerve-stage .swerve-poster,
.swerve-stage .swerve-render,
.swerve-stage .swerve-outgoing {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.swerve-render { pointer-events: none; }
.swerve-pause { white-space: nowrap; }
.swerve-hero[data-swerve-state="live"] .swerve-render { pointer-events: auto; }
.swerve-stage .swerve-poster { object-fit: cover; background-color: var(--page); }
.swerve-render:focus-visible { outline: var(--hairline) solid var(--accent); outline-offset: calc(-1 * var(--space-1)); }
.swerve-outgoing {
  background: var(--swerve-poster-background);
  animation: swerve-fade var(--dur-reel) var(--ease-std) both;
}
@keyframes swerve-fade { to { opacity: 0; } }
.swerve-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.swerve-caption p + p { margin-top: 0; }
.swerve-caption a { color: var(--text); font-weight: 600; }
.swerve-pause {
  min-width: var(--target-size);
  min-height: var(--target-size);
  padding: var(--space-1) var(--space-2);
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius-2);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.swerve-pause:hover { border-color: var(--muted); }
@media (max-width: 680px) {
  .swerve-stage { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  .swerve-outgoing { animation: none; }
}
