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


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

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

.about-personal {
  width: 100%;
}

.about-personal .page-heading {
  padding-top: var(--space-7);
}

.about-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .52fr);
  align-items: start;
  gap: var(--space-7);
  margin-top: var(--space-5);
}

.about-bio {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.about-profile > .media-slot {
  grid-column: 2;
  width: min(100%, 19rem);
  justify-self: end;
}
.about-profile > [data-media-slot="about-headshot"] { grid-row: 1; }
.about-profile > [data-media-slot="about-bass"] { grid-row: 2; }

.about-personal .media-slot .media-frame {
  aspect-ratio: var(--slot-ratio);
}

.about-profile .media-slot .media-frame {
  border-radius: var(--radius-2);
}

.about-photo-notes:not(:empty) {
  margin-top: var(--space-5);
}

.about-extra-photos,
.about-pending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  align-items: start;
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.about-extra-photos .media-frame {
  border-radius: var(--radius-2);
}
.about-pending > summary { cursor: pointer; color: var(--muted); }
.about-pending { margin-top: var(--space-7); padding: var(--space-4); border: var(--hairline) dashed var(--line); }
.draft-tag { display: inline-block; margin-inline: var(--space-2); padding: var(--space-1) var(--space-2); background: var(--surface-2); color: var(--text); font-size: var(--text-sm); }
.about-emails { display: grid; grid-template-columns: minmax(0, max-content) max-content; gap: var(--space-2) var(--space-4); }
.about-emails .email-copy { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; margin: 0; }
.about-emails .email-copy > a { overflow-wrap: anywhere; min-width: 0; }
.about-emails [data-copy-status]:empty { display: none; }
.about-emails [data-copy-status] { grid-column: 1 / -1; }

.about-workbench, .about-personal .about-contact {
  border-top: var(--hairline) solid var(--line);
  padding-top: var(--space-5);
  margin-top: var(--space-7);
}

.about-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-7);
}

#currently-building {
  scroll-margin-top: var(--space-5);
}
.about-module { margin: var(--space-4) 0 0; }
.about-module video { display: block; width: 100%; height: auto; border-radius: var(--radius-2); }
.about-module figcaption { margin-top: var(--space-2); color: var(--muted); }

.about-personal h2:not(.section-title) {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.1;
  margin: 0 0 var(--space-3);
}

.about-workbench dl {
  display: grid;
  gap: var(--space-2);
  margin: 0;
}

.about-workbench dl > div {
  display: grid;
  grid-template-columns: 8em minmax(0, 1fr);
  gap: var(--space-2);
}

.about-workbench dt {
  color: var(--muted);
}

.about-workbench dd {
  margin: 0;
}

/* Reserve space while the browser skips layout far below the viewport. */
.about-personal .bench {
  content-visibility: auto;
  contain-intrinsic-block-size: auto 42rem;
}
.bench-heat-scroll:has(noscript img) > svg { display: none; }

@media (max-width: 680px) {
  .about-personal .page-heading { padding-top: var(--space-6); }
  .about-profile { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .about-bio, .about-profile > .media-slot[data-media-slot] { grid-area: auto / 1; }
  .about-profile > .media-slot[data-media-slot] { width: 100%; justify-self: stretch; }
  .about-profile [data-media-slot="about-headshot"] .media-frame { aspect-ratio: 4 / 5; }
  .about-profile [data-media-slot="about-bass"] .media-frame { aspect-ratio: 4 / 3; }
  .about-profile .media-frame img { object-fit: cover; }
  .about-profile [data-media-slot="about-bass"] img { object-position: center bottom !important; }
  .about-workbench { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .about-workbench dl > div { grid-template-columns: 6em minmax(0, 1fr); }
}


#currently-building { grid-column: 1 / -1; }
.module-gallery { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-5); align-items: center; margin-top: var(--space-4); }
.module-gallery figure { margin: 0; }
.module-player { position: relative; }
.module-player video { aspect-ratio: 8 / 5; object-fit: contain; background: var(--surface); }
.module-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: var(--radius-2); }
.module-playback { position: absolute; right: var(--space-2); bottom: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-1); background: var(--page); color: var(--text); font-size: var(--text-sm); }
.module-stills { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.module-stills a { display: block; aspect-ratio: 4 / 3; }
.module-stills img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-2); }
.module-stills figcaption { color: var(--muted); font-size: var(--text-sm); margin-top: var(--space-2); }
@media (max-width: 680px) { .module-gallery { grid-template-columns: 1fr; } }

/* About's project log and listening history. */
.bench {
  --leaf: #9ac9ad;
  --record: #c5b9ac;
  --ink: #302b28;
  margin-top: var(--space-7);
  border-top: 1px solid var(--line);
  padding-top: var(--space-6);
}
.about-personal .bench > h2 {font:600 clamp(2.7rem,4.4vw,4rem)/1 var(--font-display);margin:0 0 var(--space-5);letter-spacing:-.02em}
.bench h3 {display:flex;align-items:center;gap:.65rem;font:600 clamp(1.85rem,3vw,2.38rem)/1.1 var(--font-display);margin:0 0 1rem}
.bench h4,.bench h5 {font:600 1.22rem/1.22 var(--font-text);margin:0}
.bench p,.bench ol,.bench ul,.bench dl,.bench dd {margin:0}
.bench ul,.bench ol {list-style:none;padding:0}
.bench header {display:flex;align-items:baseline;justify-content:space-between;gap:.15rem .7rem;flex-wrap:wrap}
.bench small,.bench time,.bench .ticks {font-size:.94rem;line-height:1.35;color:var(--muted)}
.bench a {text-decoration:none;color:inherit}
.bench a:hover,.bench a:focus-visible {text-decoration:underline;text-underline-offset:.2em}
.bench button {cursor:pointer;color:inherit;font:inherit}
.bench :focus-visible {outline:3px solid var(--axis-s);outline-offset:2px}
.bench [hidden] {display:none!important}
.bench-git-layout {display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:2.25rem}
.bench-git-left,.bench-git-right {min-width:0}
.bench-building h3 svg {width:1.8rem;height:1.8rem;padding:.32rem;border-radius:50%;background:#2a3d32;color:var(--leaf)}
.bench-calendar {background:#1c2927;border-radius:var(--radius-2);padding:1.15rem}
.bench-calendar header small {color:#c1d2c7}
.bench-heat-scroll {overflow-x:auto;overscroll-behavior-x:contain}
.bench-heat {display:block;width:100%;height:auto;margin:.75rem auto .35rem}
.bench-heat text {fill:#c6d3ca;font:12px var(--font-text)}
.bench-cell {cursor:pointer}
.bench-cell:focus-visible,.bench-cell[aria-expanded=true],.bench-cell:hover {stroke:#f6f4d4;stroke-width:1.8px;outline:none}
.bench .lv0 {fill:#35463c;background:#35463c}
.bench .lv1 {fill:#436d54;background:#436d54}
.bench .lv2 {fill:#5a9471;background:#5a9471}
.bench .lv3 {fill:#82bb92;background:#82bb92}
.bench .lv4 {fill:#b9dea6;background:#b9dea6}
.bench-cal-foot {display:flex;align-items:center;justify-content:space-between;gap:.5rem;font-size:.84rem;color:#c4d2c8;min-height:1.7rem}
.bench-scale {display:inline-flex;align-items:center;gap:3px;white-space:nowrap}
.bench-scale i {width:.57rem;height:.57rem;border-radius:2px}
.bench-stats {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:1rem 0;border-bottom:1px solid var(--line)}
.bench-stats > div {display:flex;flex-direction:column-reverse;justify-content:flex-end;gap:4px}
.bench-stats > div+div {border-left:1px solid var(--line);padding-left:.65rem}
.bench-stats dd {color:#dfede5;font:600 2.2rem/1.06 var(--font-display);font-variant-numeric:tabular-nums}
.bench-stats dt {font-size:.9rem;color:var(--muted)}
.bench-lang-bar {display:flex;gap:2px;height:.48rem;overflow:hidden;border-radius:4px;margin:.7rem 0 .45rem}
.bench-lang-bar i {flex-basis:0}
.bench-lang-0 {background:#72add9}.bench-lang-1 {background:#e4b467}.bench-lang-2 {background:#ad9ac1}.bench-lang-3 {background:#8995a1}
.bench-lang-legend {display:flex;gap:.15rem .85rem;flex-wrap:wrap}
.bench-lang-legend li {font-size:.9rem;color:var(--muted)}
.bench-lang-legend b {font-weight:500;color:var(--text)}
.bench-lang-legend i {display:inline-block;width:.45rem;height:.45rem;margin-right:.32rem;border-radius:50%}
.bench-languages:not([hidden]) + .bench-commits {margin-top:1.2rem}
.bench-commit-list li {display:flex;align-items:baseline;justify-content:space-between;gap:.65rem;border-bottom:1px solid var(--line-soft);padding:.35rem 0}
.bench-commit-main {min-width:0;line-height:1.15;overflow-wrap:anywhere}
.bench-commit-title {font-size:1rem;font-weight:500}
.bench-commit-repo,.bench-commit-list time small {display:block;font-size:.82rem}
.bench-commit-list time {text-align:right;white-space:nowrap;font-size:.88rem}
.bench-chip {display:inline-block;border:1px solid var(--line);border-radius:3px;padding:0 .25rem;color:var(--muted);font-size:.8rem}
.bench-week {display:flex;align-items:baseline;flex-wrap:wrap;gap:.15rem .45rem;margin-top:.7rem;font-size:.94rem}
.bench-week a {color:var(--leaf);font-weight:600}
.bench-week span {color:var(--muted);font-size:.87rem}
.bench-more {display:none}
.bench-day,.bench-artist-detail,.bench-soundtrack {padding:1rem;border-left:3px solid var(--leaf);background:var(--surface);margin-top:1rem}
.bench-day-close,.bench-detail-close {min-height:2.75rem;border:1px solid var(--line);border-radius:var(--radius-2);padding:0 .75rem;background:var(--page)}
.bench-day {grid-column:1/-1;margin-top:0}
.bench-day header {align-items:center;flex-wrap:nowrap}
.bench .bench-day-close,.bench .bench-artist-detail .bench-detail-close {flex:none;width:32px;height:32px;min-height:32px;padding:0;display:grid;place-items:center;font:1.5rem/1 var(--font-text)}
.bench-git-layout:has(.bench-day:not([hidden])) .bench-week {display:none}
.bench-music {margin-top:1.75rem;padding-top:1.5rem;border-top:1px solid var(--line)}
.bench .glyph {display:inline-grid;place-items:center;border-radius:50%;width:1.8rem;height:1.8rem;background:#3f3630;color:#e2bea2;font:1.18rem var(--font-text)}
.bench .album-area {position:relative;isolation:isolate;overflow:hidden;display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);align-items:center;gap:1.6rem;padding:1.4rem 1.6rem;border-radius:var(--radius-2);border-left:.3rem solid #a08269;background:var(--record);color:var(--ink)}
.bench .album-area::before {content:"";position:absolute;inset:-40px;z-index:-1;background:var(--bench-cover,none) center/cover;filter:blur(35px) saturate(.55);opacity:.13;pointer-events:none}
.bench .player {display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);align-items:center;gap:1rem}
.bench .sleeve {position:relative;isolation:isolate;display:block;width:81%}
.bench .sleeve::before {content:"";position:absolute;z-index:-1;left:25%;top:2%;width:96%;height:96%;border-radius:50%;background:repeating-radial-gradient(circle,#34312e 0 1px,#232221 1px 3px);box-shadow:2px 3px 5px #29231f5e}
.bench .sleeve img {display:block;width:100%;height:auto;aspect-ratio:1;box-shadow:0 2px 9px #29231f55}
.bench .song h4 {font:600 clamp(2.1rem,3.4vw,3.65rem)/1 var(--font-display);margin:.3rem 0;overflow-wrap:anywhere}
.bench .song p {font-size:1.2rem}
.bench .song .meta {font-size:.8rem;text-transform:uppercase;letter-spacing:.1em;font-weight:600}
.bench .album-area small,.bench .song time {color:#4c443c}
.bench .song time {display:block;margin:.22rem 0 .7rem}
.bench .spotify {display:inline-block;padding:.3rem 0;font-weight:600;border-bottom:1px solid #75685d}
.bench .bench-preview {display:flex;flex-wrap:wrap;align-items:center;gap:.65rem 1rem;padding:.7rem 1rem;background:var(--surface)}
.bench-preview audio {width:min(100%,18rem)}
.bench-preview-status {font-size:1rem}
.bench-preview a {text-decoration:underline;text-underline-offset:.2em}
.bench .recent {min-width:0;border-left:1px solid #938575;padding-left:1.25rem}
.bench .bench-covers {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.55rem;margin-top:.6rem}
.bench-covers li {position:relative}
.bench-covers a,.bench-covers li>span {display:block}
.bench-last {display:inline-block;background:#302b28;color:#fff;border-radius:2px;font-size:.75rem;font-weight:600;line-height:1.4;padding:0 .3rem}
.bench-covers img + .bench-last {position:absolute;top:.25rem;left:.25rem}
.bench-covers img {display:block;width:100%;aspect-ratio:1;height:auto;object-fit:cover;border-radius:2px}
.bench-covers b,.bench-covers small {display:block;font-size:.93rem;line-height:1.2;overflow-wrap:anywhere;margin-top:.25rem}
.bench .discovery {display:grid;grid-template-columns:1fr;gap:1.4rem;margin-top:1.65rem}
.bench .discovery:has(.clock):has(.artists) {grid-template-columns:minmax(0,2.3fr) minmax(0,1fr)}
.bench .artists {min-width:0;position:relative}
.bench .artists header {align-items:baseline;justify-content:flex-start;min-height:2.35rem}
.bench .ranges {display:flex;align-items:center;gap:2px;position:absolute;right:0;top:-.4rem;border:1px solid var(--line);border-radius:4px;padding:2px}
.bench .ranges button {border:0;border-radius:2px;background:transparent;color:var(--muted);font-size:.95rem;min-height:2.5rem;padding:.25rem .6rem}
.bench .ranges button[aria-pressed=true] {background:var(--surface-2);color:var(--text)}
.bench .bench-artists {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.85rem;margin-top:.55rem}
.bench-artists li {min-width:0}
.bench-artists button {padding:0;border:0;background:transparent;position:relative;display:flex;flex-direction:column;width:100%;height:100%;text-align:left}
.bench-artists img {width:100%;height:auto;aspect-ratio:1.4;object-fit:cover;border-radius:3px}
.bench-artists button:is(:hover,[aria-expanded=true]) img {outline:2px solid #d1b192;outline-offset:-2px}
.bench-artists .rank-name {padding:.4rem .06rem 0;overflow-wrap:anywhere;max-width:100%;font-weight:500}
.bench-artists .rank-no {position:absolute;left:.35rem;top:.35rem;background:#172029ee;color:#f1d1ac;border-radius:3px;font-size:.92rem;font-weight:600;padding:.05rem .28rem}
.bench-artist-detail {border-color:#bd9e83}
.bench .bench-artist-detail header {align-items:center;justify-content:space-between;flex-wrap:nowrap}
.bench-artist-ranking {margin-top:1rem}
.bench-detail-tracks li {border-bottom:1px solid var(--line-soft)}
.bench-detail-tracks a,.bench-artist-link {display:inline-flex;align-items:center;min-height:2.75rem}
.bench-detail-tracks li>:is(a,span) {display:flex;align-items:center;gap:.65rem;padding:.25rem 0}
.bench-detail-tracks img {width:40px;height:40px;object-fit:cover;border-radius:2px}
.bench .clock {align-self:start;border-radius:4px;padding:1rem;background:var(--surface)}
.bench-clock-chart {display:block;width:100%;height:auto;margin:.75rem 0 .25rem}
.bench .ticks {display:flex;justify-content:space-between;font-size:.84rem}
.bench .instruments {display:flex;align-items:center;gap:5px;border-top:1px solid var(--line-soft);padding-top:.75rem;margin-top:1rem}
.bench .instruments svg {width:1.55rem;height:1.55rem;fill:none;stroke:#d2ae8b;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}
.bench .instruments span {margin-left:.65rem;font-weight:500}
.bench .instruments small {display:block;font-weight:400}
.bench .instruments .bench-favourites {margin-left:auto}
.bench-eq {display:inline-flex;gap:2px;height:.85em;align-items:end;margin-left:.45rem}
.bench-eq i {width:3px;height:80%;background:currentColor;transform-origin:bottom}
.bench-eq i:nth-child(2) {height:100%;animation-delay:-.4s}
.bench-eq i:nth-child(3) {height:65%;animation-delay:-.2s}
.bench-soundtrack li {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:.25rem 1rem;margin-top:.65rem}
.bench-soundtrack li small {grid-row:2}
@media(prefers-reduced-motion:no-preference){
  .bench-eq i {animation:bench-beat .7s ease-in-out infinite alternate}
  .bench-in-view .bench-cell {animation:bench-appear .45s ease-out both}
}
@keyframes bench-beat {from{transform:scaleY(.25)}to{transform:scaleY(1)}}
@keyframes bench-appear {from{opacity:.25}to{opacity:1}}
@media(min-width:781px){
 .bench-git-layout:has(.bench-day:not([hidden])) {row-gap:1rem}
 .bench-git-right {display:flex;flex-direction:column}
 .bench-git-right .bench-commits,.bench-git-right .bench-commit-list {display:flex;flex-direction:column;flex:1}
 .bench-git-right .bench-commit-list>li {flex:1;align-items:center}
 .bench .bench-detail-tracks {display:grid;grid-template-columns:repeat(auto-fill,96px);gap:1rem;margin-top:.75rem}
 .bench-detail-tracks li {border:0;position:relative}
 .bench-detail-tracks li>:is(a,span) {display:block;padding:0}
 .bench-detail-tracks img {display:block;width:96px;height:96px;margin-bottom:.35rem}
 .bench-track-title {overflow-wrap:anywhere;font-weight:600}
 .bench-detail-tracks img ~ .bench-chip {position:absolute;top:.25rem;right:.25rem;background:var(--page);color:var(--text)}
}
@media(max-width:780px){
 .bench-git-layout,.bench .discovery:has(.clock):has(.artists) {grid-template-columns:minmax(0,1fr)}
 .bench-git-layout {gap:1.25rem}
 .bench-git-layout:has(.bench-day:not([hidden])) .bench-commits {display:none}
 .bench .album-area {grid-template-columns:minmax(0,1fr)}
 .bench .recent {border-left:0;border-top:1px solid #928477;padding:.75rem 0 0}
}
@media(max-width:550px){
 .bench {padding-top:1.4rem}
 .bench-calendar {padding:.8rem}
 .bench-calendar header {display:block}
 .bench-stats {gap:0;grid-template-columns:1.15fr repeat(3,minmax(0,1fr))}
 .bench-stats > div+div {padding-left:.35rem}
 .bench-stats dt {font-size:.8rem}
 .bench-stats dd {font-size:1.8rem}
 .bench-commits .bench-commit-list > li:nth-child(n+4) {display:none}
 .bench-more {display:inline-flex;align-items:center;min-height:2.75rem;color:var(--leaf)!important}
 .bench .album-area {padding:1rem;gap:.9rem}
 .bench .bench-covers {grid-template-columns:repeat(3,minmax(0,1fr))}
 .bench .player {gap:.65rem}
 .bench .bench-artists {grid-template-columns:repeat(3,minmax(0,1fr));gap:.85rem .65rem}
 .bench-artists img {aspect-ratio:1}
 .bench-git-layout:has(.bench-day:not([hidden])) .bench-git-right {order:1}
 .bench .ranges {position:static;width:max-content;margin:.35rem 0 .75rem}
 .bench .artists header {min-height:0}
 .bench .song time {font-size:.88rem}
 .bench-cal-foot {gap:.25rem}
 .bench .bench-scale {font-size:.75rem}
 .bench-soundtrack li {display:block}
 .bench-soundtrack li small {display:block}
 .bench .instruments {flex-wrap:wrap}
 .bench .instruments .bench-favourites {flex-basis:100%;margin:.55rem 0 0}
}

