.arduino-demo{--arduino-bg:#151b22;--arduino-panel:#1b242deb;--arduino-text:#eef2f4;--arduino-muted:#bac6ce;--arduino-line:#55636f;--arduino-accent:#9dddc9;position:relative;background:var(--arduino-bg);color:var(--arduino-text);font:15px/1.45 var(--arduino-font,Arial,sans-serif);isolation:isolate;overflow:hidden;min-height:650px}

.arduino-demo [hidden]{display:none!important}.arduino-demo button,.arduino-demo select{font:inherit;min-height:44px;border:1px solid var(--arduino-line);border-radius:4px;padding:8px 13px;color:var(--arduino-text);background:var(--arduino-panel);cursor:pointer}.arduino-demo button:focus-visible,.arduino-demo select:focus-visible,.arduino-demo canvas:focus-visible,.arduino-stage:focus-visible{outline:2px solid var(--arduino-accent);outline-offset:-3px}.arduino-demo [aria-pressed=true]{background:var(--arduino-accent);color:var(--arduino-bg)}
.arduino-poster{width:100%;height:600px;display:block;object-fit:cover}.arduino-gate{position:absolute;left:24px;bottom:72px;max-width:290px;background:var(--arduino-panel);padding:20px;border:1px solid var(--arduino-line);z-index:3}.arduino-gate h2{font-size:24px;font-weight:500;margin:0 0 8px}.arduino-gate p{color:var(--arduino-muted);margin:0 0 16px}.arduino-status{margin:0;padding:12px 18px;color:var(--arduino-muted);font-size:13px}.arduino-demo[data-ready=true] .arduino-poster{display:none}.arduino-demo[data-running=true] .arduino-gate{display:none}.arduino-demo[data-running=false][data-ready=true] .arduino-live{display:none}.arduino-demo[data-running=false][data-ready=true] .arduino-poster{display:block}
.arduino-toolbar{display:flex;gap:10px;align-items:center;padding:12px 16px}.arduino-modes,.arduino-actions{display:flex;gap:5px}.arduino-actions{margin-left:auto}.arduino-toolbar label{font-size:13px}.arduino-stage{position:relative}.arduino-visuals{position:relative}.arduino-room{height:480px;width:100%;overflow:hidden}.arduino-room canvas{display:block;width:100%;height:100%;touch-action:none}.arduino-sidebar{position:absolute;left:16px;top:12px;width:230px;pointer-events:none;background:var(--arduino-panel);padding:12px;border:1px solid var(--arduino-line);border-radius:4px;font-size:13px}.arduino-sensor-values{display:flex;gap:16px}.arduino-left{color:#65c9b1}.arduino-right{color:#f2bc68}.arduino-sidebar h3{font-size:14px;font-weight:500;margin:12px 0 6px}.arduino-reading-kind,.arduino-sensor-note{color:var(--arduino-muted);margin:7px 0 0}.arduino-log{list-style:none;margin:0;padding:0}.arduino-log li{margin-top:6px}.arduino-log li:not(:first-child){display:none}.arduino-touch{position:absolute;right:20px;bottom:16px;display:flex;align-items:center;gap:14px;padding:12px;background:var(--arduino-panel);border-radius:8px}.arduino-touch p{font-size:12px;color:var(--arduino-muted);margin:0}.arduino-stick{width:100px;height:100px;border:1px solid var(--arduino-line);border-radius:50%;display:grid;place-items:center;touch-action:none;user-select:none;background:var(--arduino-bg)}.arduino-stick i{width:38px;height:38px;background:var(--arduino-accent);opacity:.8;border-radius:50%;pointer-events:none}.arduino-stick[aria-disabled=true]{opacity:.4}.arduino-help,.arduino-note,.arduino-contact{margin:10px 18px;color:var(--arduino-muted);font-size:13px}.arduino-contact{color:var(--arduino-text)}
@media(max-width:600px){.arduino-demo{min-height:680px}.arduino-toolbar{gap:7px;flex-wrap:wrap;padding:10px}.arduino-toolbar button{padding:8px 12px}.arduino-toolbar label{order:3;width:100%;display:flex;align-items:center;gap:8px}.arduino-toolbar select{flex:1}.arduino-room{height:435px}.arduino-sidebar{left:10px;top:8px;width:calc(100% - 46px);padding:10px}.arduino-sidebar h3,.arduino-sensor-note{display:none}.arduino-reading-kind{margin:4px 0}.arduino-log{font-size:12px}.arduino-touch{right:12px;bottom:12px;padding:8px}.arduino-touch p{display:none}.arduino-stick{width:94px;height:94px}.arduino-help{font-size:12px}.arduino-poster{height:610px;object-position:center}.arduino-gate{left:14px;right:14px;bottom:75px;max-width:none}.arduino-status{font-size:12px}}

/* 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; }
}

/* Project write-ups with source figures, recorded demos and calibration data. */
@font-face {
  font-family: 'DejaVu Engineering Mono';
  src: url('/media/projects/robotic-arm/engineering/dejavu-sans-mono.woff') format('woff');
  font-display: swap;
}
.engineering-intro {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  align-items: center;
  gap: var(--space-7);
  padding-block: var(--space-4) var(--space-6);
  margin-bottom: var(--space-6);
  border-bottom: var(--hairline) solid var(--line);
}
.engineering-intro .cs-summary { max-width: 37ch; }
.engineering-intro .cs-head .cs-jumps { margin-top: var(--space-5); }
.engineering-video, .engineering-figure, .engineering-code { margin: 0; min-width: 0; }
.engineering-video video, .engineering-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-2);
  background: var(--surface);
}
.engineering-video video { aspect-ratio: 8 / 5; }
.engineering-figure img {
  width: auto;
  max-width: 100%;
  max-height: var(--step-image-height);
  margin-inline: auto;
}
.engineering-video figcaption, .engineering-figure figcaption {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--muted);
}
.engineering-video figcaption strong { color: var(--text); margin-right: var(--space-2); }
.engineering-intro ~ .cs-build .cs-block > h3 {
  font: 600 var(--text-xl)/1.15 var(--font-display);
  border-top: var(--rule-bold) solid var(--accent);
  padding-top: var(--space-4);
  margin: 0 0 var(--space-5);
}
.engineering-intro ~ .cs-build .cs-block + .cs-block { border: 0; padding: 0; }
.engineering-intro ~ .cs-build .cs-step h4 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}
.engineering-intro ~ .cs-build .cs-step { min-width: 0; }
.engineering-intro ~ .cs-build .cs-step + .cs-step {
  padding-top: var(--space-6);
  margin-top: var(--space-6);
  border-top: var(--hairline) solid var(--line-soft);
}
.arm-film { position: relative; }
/* Composite the still and first decoded frame in the same coordinate space. */
.arm-film:has(.opening-poster[srcset]) { transform: translateZ(0); }
.arm-film picture, .arm-film .opening-poster { display: block; width: 100%; }
.arm-film .opening-poster {
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: contain;
  background: var(--surface);
  border-radius: var(--radius-2);
}
.arm-film video { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.arm-film.film-playing video { opacity: 1; }
/* Reserve the long offscreen sections until the reader approaches them. */
@media screen {
  .engineering-intro:has(.opening-poster[srcset]) ~ :is(.cs-try, .cs-specs, .cs-gallery),
  .engineering-intro:has(.opening-poster[srcset]) ~ .cs-build .cs-block {
    content-visibility: auto;
    contain-intrinsic-block-size: auto 700px;
  }
}
.engineering-intro ~ .cs-hero .cs-model-start { position: static; margin: var(--space-2) 0 0; }
.engineering-intro ~ .cs-hero .cs-model-start:not([hidden]) { display: block; }
.arm-film button, .engineering-intro ~ .cs-specs .cs-quick a {
  padding: var(--space-2) var(--space-4);
  min-height: var(--target-size);
  color: var(--text);
  background: var(--page);
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius-2);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.arm-film button { position: absolute; bottom: var(--space-3); left: var(--space-3); font-size: var(--text-sm); }
.arm-film button:hover, .engineering-intro ~ .cs-specs .cs-quick a:hover { border-color: var(--accent); }
.arm-chip {
  display: table;
  color: var(--text);
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius-2);
  background: var(--surface);
  padding: var(--space-1) var(--space-3);
  margin-top: var(--space-2);
  font: 500 var(--text-sm)/1.4 var(--font-text);
}
.arm-parts { margin-block: var(--space-5); }
.arm-parts h3 { margin: 0 0 var(--space-3); }
.arm-parts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--space-3); }
.arm-parts li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); background: var(--surface); border-radius: var(--radius-2); }
.arm-parts svg, .arm-shot-cover { max-height: 200px; border: 1px solid var(--line); background-size: cover; background-position: center; }
:is(.shot-rover-side,.shot-rover-top,.shot-rover-strafe) .arm-shot-cover { background-image: linear-gradient(0deg,var(--page),#151b2244),var(--shot-image); }
.arm-shot svg { fill: none; stroke: currentColor; stroke-width: 1.7; fill: none; stroke: currentColor; stroke-width: 1.5; width: 32px; flex: none; color: var(--axis-e); }
.arm-parts strong, .arm-parts span { display: block; }
.arm-parts span { font-size: var(--text-sm); color: var(--muted); }
.arm-shot { min-width: 0; }
.arm-shot-cover {
  border-radius: var(--radius-2); overflow: hidden;
  display: flex; gap: var(--space-3); align-items: end;
  aspect-ratio: 16 / 9; padding: var(--space-4); box-sizing: border-box;
  color: var(--text); background: var(--surface);
}
.arm-shot svg { color: currentColor; width: 27px; }
.arm-shot .slot-shot { margin: var(--space-2) 0; }
.arm-shot small, .engineering-code pre, .engineering-code code, .fig-architecture [font-family="monospace"] {
  font-family: 'DejaVu Engineering Mono', ui-monospace, Consolas, monospace;
}
.arm-shot .slot-capture { margin: 0; font-size: var(--text-sm); color: var(--muted); }
.arm-stat { display: inline-grid; padding: var(--space-3) var(--space-4); border-left: 3px solid var(--axis-s); background: var(--surface); margin-top: var(--space-4); }
.arm-stat strong { font: 600 var(--text-2xl)/1 var(--font-display); }
.arm-stat span { color: var(--muted); }
.arm-split { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: auto 1fr; gap: var(--space-3) var(--space-5); }
.arm-split .cs-step-media { grid-column: 2; grid-row: 1 / 3; align-self: start; }
.arm-split .arm-rest { grid-column: 1; }
.engineering-figure svg, .engineering-figure img { display: block; width: 100%; height: auto; max-height: none; }
.engineering-figure.fig-plot img { max-height: 540px; object-fit: contain; }
.engineering-figure.fig-controller-plot, .engineering-figure.fig-controller-sliders { display: none; }
.engineering-intro ~ .cs-links ul.cs-links { max-width: none; width: 100%; }
.engineering-intro ~ .cs-links li a { padding: var(--space-3); }
.engineering-intro ~ .cs-links li a:hover { background: var(--surface); }
.engineering-sequence { margin: var(--space-4) 0; padding-left: var(--space-5); }
.engineering-sequence li + li { margin-top: var(--space-2); }
.engineering-sequence li::marker { color: var(--accent); font-weight: 600; }
.engineering-references { margin-top: var(--space-4); }
.engineering-data { width: 100%; border-collapse: collapse; line-height: 1.4; font-size: var(--text-sm); }
.prose > .engineering-data { margin-top: var(--space-4); }
.engineering-data th, .engineering-data td {
  padding: var(--space-3) var(--space-2);
  text-align: left;
  vertical-align: top;
  border-bottom: var(--hairline) solid var(--line);
}
.engineering-data th { color: var(--text); background: var(--surface); }
.engineering-data caption, .engineering-code figcaption {
  text-align: left;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 var(--space-3);
}
.engineering-code pre {
  overflow: auto;
  padding: var(--space-4);
  margin: 0 0 var(--space-2);
  border-left: var(--rule-bold) solid var(--axis-s);
  background: var(--surface);
  color: var(--text);
  font-size: .9em;
  line-height: 1.5;
  tab-size: 4;
}
.engineering-code > a { color: var(--accent); }
@media (max-width: 680px) {
  .engineering-intro { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding-top: 0; }
  .engineering-intro .cs-head { padding-bottom: 0; }
  .arm-parts ul, .arm-split { grid-template-columns: minmax(0,1fr); }
  .arm-split .cs-step-media, .arm-split .arm-rest { grid-area: auto; }
  .engineering-figure.fig-controller { display: none; }
  .engineering-figure.fig-controller-plot, .engineering-figure.fig-controller-sliders { display: block; }
  .fig-controller-sliders { margin-top: var(--space-4); }
  .engineering-code pre { white-space: pre-wrap; overflow-wrap: anywhere; }
}

/* Case-study resource links and project navigation. */
.case-resources, .case-pager {list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-4);padding:0;}
.case-resources li, .project-pagination.case-pager a {position:relative;display:flex;gap:var(--space-4);align-items:center;min-width:0;border:1px solid var(--line);border-radius:var(--radius-2);background:var(--surface);overflow:hidden;padding:var(--space-3);text-decoration:none;}
.case-resources img,.case-pager img {object-fit:cover;flex:none;border-radius:var(--radius-2);width:30%;max-width:104px;aspect-ratio:4/3;height:auto;}
.case-resources a,.case-pager a {color:var(--text);text-decoration:none;font-weight:600;}
.cs-links ul.case-resources {max-width:none;}
.engineering-intro ~ .cs-links .case-resources li a {padding:0;min-height:0;}
.cs-links .case-resources li a::after {content:"";position:absolute;inset:0;margin:0;padding:0;}
.case-resources li:focus-within,.case-resources li:hover,.case-pager a:hover {border-color:var(--accent);}
.case-resources small,.case-pager small {display:block;font:normal .78rem/1.5 'DejaVu Engineering Mono',monospace;color:var(--muted);}
.project-pagination.case-pager {display:grid;align-items:stretch;}
.project-pagination.case-pager a {max-width:none;}
.case-pager a:last-child {text-align:left;}
.case-stats {margin:var(--space-4) 0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-2);}
.case-stats div {display:flex;flex-direction:column-reverse;justify-content:flex-end;padding:var(--space-3);border-top:2px solid var(--axis-s);background:var(--surface);}
.case-stats dt {font-size:var(--text-sm);line-height:1.25;}
.case-stats dd {margin:0 0 var(--space-2);font:600 var(--text-xl)/1.1 var(--font-display);}
.shot-arm-shoulder-pair .arm-shot-cover {background-image:linear-gradient(0deg,var(--page),#151b2290),url('/media/slots/arm-shoulder.webp');background-position:center 67%;}
.architecture-copy {columns:2;column-gap:var(--space-6);max-width:none!important;}
.architecture-copy > * {break-inside:avoid;}
.architecture-step .engineering-figure {margin-top:var(--space-5);}
.engineering-figure.fig-architecture-phone {display:none;}
.engineering-figure svg text {font-family:var(--font-text);}
.engineering-figure svg [font-family="monospace"] {font-family:'DejaVu Engineering Mono',monospace;}
.engineering-figure .diagram-image {background:transparent;border-radius:0;object-fit:contain;}
.engineering-figure.fig-plot .diagram-image, .fig-plot svg {max-height:560px;}
.fig-interpolation .diagram-image, .fig-interpolation svg {max-height:406px;}
.engineering-figure .chart-title {padding:var(--space-3) var(--space-4) 0;background:#202a35;color:var(--text);font:600 var(--text-xl)/1.15 var(--font-display);border-radius:var(--radius-2) var(--radius-2) 0 0;}
.engineering-intro ~ .cs-build .cs-step-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-5);align-items:start;}
.cs-step-grid > [data-media-slot="arm-drivers"] {grid-column:1/-1;}
.cs-step-grid > [data-media-slot="arm-drivers"] .media-frame {width:100%;max-height:520px;}
.calibration-step .fig-poses {margin-block:var(--space-4);}
.engineering-code pre {white-space:pre;overflow-x:auto;scrollbar-gutter:stable;scrollbar-color:var(--muted) var(--surface);}
.engineering-code pre::-webkit-scrollbar {height:10px;}
.engineering-code pre::-webkit-scrollbar-thumb {background:var(--muted);border-radius:4px;}
@media(max-width:680px){
  .case-resources,.project-pagination.case-pager,.engineering-intro ~ .cs-build .cs-step-grid {grid-template-columns:minmax(0,1fr);}
  .arm-film {overflow:hidden;border-radius:var(--radius-2);}
  [data-project="robotic-arm"] .arm-film :is(video,.opening-poster) {transform:scale(1.07);}
  .arm-film button {top:12px;right:12px;bottom:auto;left:auto;}
  .architecture-copy {columns:1;}
  .engineering-figure.fig-architecture {display:none;}
  .engineering-figure.fig-architecture-phone {display:block;}
  .fig-controller-sliders {margin-top:24px;}
  .fig-controller-plot figcaption,.fig-controller-sliders figcaption {margin-top:24px;}
  .case-stats {grid-template-columns:minmax(0,1fr);}
  .case-stats div {flex-direction:row-reverse;align-items:center;justify-content:space-between;gap:var(--space-2);}
  .case-stats dd {margin:0;}
}
.engineering-code pre { white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-gutter: auto; }
.controller-step .cs-step-media { align-content: start; }
.controller-step .cs-step-media .media-frame,
.controller-step .cs-step-media figure { margin-inline: 0; }
.calibration-step .cs-step-media { gap: var(--space-2); }
.calibration-step .fig-poses { margin: 0; }
.calibration-step .fig-poses :is(svg,.diagram-image) { max-height: 145px; }
.calibration-step .engineering-data :is(th,td) { padding-block: var(--space-2); }
.controller-step .fig-interpolation { margin-top: var(--space-4); }
.engineering-figure .figure-phone, .rover-phone-preview { display: none; }
.rover-demo[data-ready="true"] .rover-preview-caption { display: none; }
[data-project="quadcopter"] :is(.project-sim,.exploded-view figure) { width: 100%; max-width: none; margin-inline: 0; }
[data-project="quadcopter"] .exploded-stage { aspect-ratio: 2 / 1; height: auto; }
[data-project="quadcopter"] .exploded-poster { object-fit: contain; }
[data-project="lidar-rover"] .cs-hero .project-lead .media-frame:has(.system-diagram) { aspect-ratio: 350 / 422; }
.shot-rover-side { --shot-image: url('/media/projects/lidar-rover/engineering/wheel-detail.webp'); }
.shot-rover-top { --shot-image: url('/media/projects/lidar-rover/engineering/board-detail.webp'); }
.shot-rover-strafe { --shot-image: url('/media/projects/lidar-rover/engineering/rover-mapping.webp'); }
.case-stats dd:has(.arm-chip) { font-size: var(--text-md); }
.case-stats dd .arm-chip { margin: 0; }
@media (max-width:680px) {
  .engineering-code pre { font-size: 12px; }
  [data-project="quadcopter"] .exploded-stage { aspect-ratio: 4 / 3; }
  .engineering-figure .figure-wide { display: none; }
  .engineering-figure .figure-phone { display: block; }
  .interactive-demo .rover-demo:not([data-ready="true"]) .rover-poster { display: none; }
  .rover-demo:not([data-ready="true"]) .rover-phone-preview { display: grid; }
  .rover-phone-preview img { display: block; width: 100%; height: 300px; object-fit: cover; }
  .rover-phone-preview figure:last-child img { object-fit: contain; }
  .interactive-demo .rover-demo .rover-visuals[data-view="split"] { display: grid; grid-template-columns: minmax(0,1fr); }
  .interactive-demo .rover-demo .rover-visuals[data-view="split"] .rover-estimate { position: static; width: 100%; border: 0; }
  .interactive-demo .rover-demo .rover-visuals[data-view="split"] canvas { height: 320px; }
  .rover-demo .rover-phone-preview figcaption { padding: 8px 12px; font-size: 16px; }
}

.pending-measurements { max-width: 32rem; margin-block: var(--space-4); }
.pending-measurements th { background: transparent; font-weight: 400; }
.pending-measurements td { width: 5rem; color: var(--muted); }
.model-disclosure { grid-column: 1 / -1; }
.model-disclosure > summary, .bench-photo > summary { cursor: pointer; padding-block: var(--space-3); }
.model-disclosure figure { max-width: 640px; }
.cs-page[data-project="lidar-rover"] .cs-hero .media-frame:has(.system-diagram) { width: 100%; aspect-ratio: 920 / 236; max-height: none; }
.cs-page[data-project="lidar-rover"] .cs-hero :is(picture,.system-diagram) { display: block; width: 100%; height: 100%; }
.cs-page[data-project="quadcopter"] .cs-hero > .project-figure { width: 100%; margin: 0; }
.cs-page[data-project="quadcopter"] .cs-hero > .project-figure .media-frame { width: 100%; aspect-ratio: 4/3; }
.cs-page[data-project="quadcopter"] .cs-hero > .project-figure img { height: 100%; width: 100%; object-fit: cover; }
.cs-page .plot-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-5); align-items: start; }
.cs-page .plot-pair .project-figure { width: 100%; margin: 0; }
.cs-page:is([data-project="robotic-hand"],[data-project="arduino-robot"],[data-project="spider-robot"]) .cs-step-media .project-figure { width: 100%; max-width: none; margin-inline: 0; }
.cs-page:is([data-project="robotic-hand"],[data-project="arduino-robot"],[data-project="spider-robot"]) .cs-step-media .project-figure .media-frame { width: 100%; height: auto; max-height: none; aspect-ratio: var(--image-ratio); }
.cs-page:is([data-project="robotic-hand"],[data-project="arduino-robot"],[data-project="spider-robot"]) .cs-step-media .media-frame img { width: 100%; height: auto; max-height: none; display: block; }
.cs-page .pcb-viewer figure { width: min(100%,36rem); margin: 0; }
.cs-page .pcb-stage { aspect-ratio: 8 / 5; }
.cs-page .pcb-viewer .arm-shot { margin-top: var(--space-4); max-width: 36rem; }
.cs-page .arm-shot-cover { aspect-ratio: auto; height: clamp(96px,12vw,160px); }
@media(max-width:680px) {
  .cs-page[data-project="lidar-rover"] .cs-hero .media-frame:has(.system-diagram) { aspect-ratio: 350 / 422; }
  .cs-page .plot-pair { grid-template-columns: minmax(0,1fr); }
  .interactive-demo .amp-poster { display: flex; flex-direction: column; min-height: 0; }
  .interactive-demo .amp-poster > img { height: auto; width: 100%; object-fit: contain; opacity: .85; }
  .interactive-demo .amp-start-panel { position: static; margin: 0; width: 100%; box-sizing: border-box; }
  .interactive-demo .amp-pedalboard { grid-template-columns: minmax(0,1fr); }
  .interactive-demo .amp-pedal-knobs { flex-wrap: wrap; }
}
