/* ==========================================================================
   Victor Gnes — website
   Built on the "Victor Gnes Design System" (Claude Design project).
   Foundations: tokens/colors.css, tokens/typography.css, tokens/spacing.css.
   Surface values (ink #0A0B10, cream #EDE0CC, per-project accents) are the
   ones the Portfolio 2026 deck actually uses — carbon scheme, one accent
   per chapter.
   ========================================================================== */

@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&f[]=switzer@300,400,500,600&display=swap');

/* ---------------------------------------------------------------- tokens */
:root {
  /* Base neutrals — deck values */
  --vg-ink:        #0A0B10;
  --vg-ink-lift:   #101219;   /* one step up, for banded sections */
  --vg-paper:      #EDE0CC;   /* warm cream — the deck's light sheets */
  --vg-cream:      #EDE0CC;
  --vg-cream-soft: rgba(237, 224, 204, .58);
  --vg-cream-dim:  rgba(237, 224, 204, .34);
  --vg-line-on-ink: rgba(237, 224, 204, .16);
  --vg-line:        rgba(20, 20, 20, .14);

  /* Per-project accents — one token swap per chapter */
  --vg-gold:   #E4B81A;   /* Rover 4000 */
  --vg-cyan:   #57CBD8;   /* Dyson Sphere */
  --vg-blue:    #3D6FE8;  /* Mini Airman */
  --vg-crimson: #E04434;  /* Icon A-Z — the hull red */
  --vg-teal:    #128A7D;

  /* The Dynamic Island — always dark, reads on any background */
  --vg-island-bg:  rgba(12, 13, 18, .82);
  --vg-island-fg:  #FFFFFF;
  --vg-island-div: rgba(255, 255, 255, .2);

  /* Semantic aliases — what everything actually consumes */
  --vg-accent:     var(--vg-gold);
  --vg-bg:         var(--vg-ink);
  --vg-text:       var(--vg-cream);
  --vg-text-muted: var(--vg-cream-soft);
  --vg-hairline:   var(--vg-line-on-ink);

  /* Type */
  --vg-font-display: 'Clash Display', 'Switzer', system-ui, sans-serif;
  --vg-font-text:    'Switzer', system-ui, sans-serif;
  --vg-track-label:  .16em;
  --vg-track-tight:  -.012em;

  /* Web type scale — the slide scale (150/76/60/56/34/26/24 at 1920) as clamps */
  --vg-size-hero:    clamp(56px, 10.4vw, 150px);
  --vg-size-display: clamp(34px, 5.3vw, 76px);
  --vg-size-h2:      clamp(28px, 4.2vw, 60px);
  --vg-size-figure:  clamp(34px, 3.9vw, 56px);
  --vg-size-lead:    clamp(19px, 2.4vw, 34px);
  --vg-size-body:    clamp(15px, 1.35vw, 20px);
  --vg-size-label:   clamp(10px, .82vw, 13px);

  /* Spacing */
  --vg-space-1: 8px;  --vg-space-2: 16px; --vg-space-3: 24px; --vg-space-4: 34px;
  --vg-space-5: 48px; --vg-space-6: 64px; --vg-space-7: 90px;
  --vg-margin:  clamp(22px, 4.7vw, 90px);   /* the 90px slide inset, responsive */
  --vg-bottom:  clamp(96px, 9vw, 150px);    /* content bottom — clears the island */

  /* Radii — full-bleed is hard-edged, contained imagery is soft */
  --vg-radius-island: 32px;
  --vg-radius-image:  14px;

  --vg-ease: cubic-bezier(.2, .7, .2, 1);
}

/* Chapter accent swaps — one token, nothing else changes */
[data-accent="gold"] { --vg-accent: var(--vg-gold); }
[data-accent="cyan"] { --vg-accent: var(--vg-cyan); }
[data-accent="blue"] { --vg-accent: var(--vg-blue); }
[data-accent="crimson"] { --vg-accent: var(--vg-crimson); }
[data-accent="teal"] { --vg-accent: var(--vg-teal); }

/* Paper scheme — the deck's light sheets */
[data-scheme="paper"] {
  --vg-bg:         var(--vg-paper);
  --vg-text:       #141414;
  --vg-text-muted: rgba(20, 20, 20, .58);
  --vg-hairline:   var(--vg-line);
}

/* ------------------------------------------------- cross-page transitions */
/* Navigating between chapters is one continuous move, not a page load. The
   island keeps its identity across documents — it is the constant. */
@view-transition { navigation: auto; }

::view-transition-old(root) {
  animation: vg-vt-out .34s var(--vg-ease) both;
}
::view-transition-new(root) {
  animation: vg-vt-in .46s var(--vg-ease) both;
}
@keyframes vg-vt-out { to { opacity: 0; transform: scale(1.015); } }
@keyframes vg-vt-in  { from { opacity: 0; transform: scale(.985); } }

::view-transition-group(island) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2,.7,.2,1); }
::view-transition-old(island), ::view-transition-new(island) { animation: none; mix-blend-mode: normal; height: 100%; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--vg-ink);
  color: var(--vg-cream);
  font-family: var(--vg-font-text);
  font-size: var(--vg-size-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: var(--vg-accent); color: var(--vg-ink); }

/* ------------------------------------------------------------ primitives */

/* A section is either a Plate (full-bleed image, text over a scrim)
   or a Sheet (text-led, generous whitespace). Both are full-viewport-ish
   bands with the same left inset, and the bottom third breathes. */
.vg-section {
  position: relative;
  background: var(--vg-bg);
  color: var(--vg-text);
  padding: clamp(72px, 9vw, 124px) var(--vg-margin) var(--vg-bottom);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.vg-section--tight { min-height: 0; padding-bottom: clamp(64px, 7vw, 110px); }

.vg-plate { color: var(--vg-cream); }
.vg-plate .vg-plate__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.vg-plate .vg-plate__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,11,16,.15) 0%, rgba(10,11,16,.55) 55%, rgba(10,11,16,.88) 100%);
}
.vg-plate > *:not(.vg-plate__bg) { position: relative; z-index: 1; }

/* Eyebrow — Switzer, uppercase, wide tracking. Names the section, nothing else. */
.vg-eyebrow {
  font-size: var(--vg-size-label);
  letter-spacing: var(--vg-track-label);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--vg-text-muted);
  margin: 0 0 var(--vg-space-4);
}
.vg-eyebrow .n { color: var(--vg-accent); }

/* Headlines — Clash Display, sentence case, never all-caps */
.vg-h1, .vg-h2, .vg-hero {
  font-family: var(--vg-font-display);
  letter-spacing: var(--vg-track-tight);
  line-height: .98;
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}
.vg-hero  { font-size: var(--vg-size-hero); font-weight: 500; line-height: .88; }
.vg-h1    { font-size: var(--vg-size-display); }
.vg-h2    { font-size: var(--vg-size-h2); }
.vg-h1 em, .vg-h2 em, .vg-hero em {
  font-style: italic; font-weight: 400; color: var(--vg-accent); display: block;
}

.vg-lead {
  font-size: var(--vg-size-lead);
  line-height: 1.3;
  max-width: 20ch;
  margin: var(--vg-space-3) 0 0;
  font-weight: 400;
}
.vg-body { max-width: 46ch; color: var(--vg-text-muted); margin: var(--vg-space-4) 0 0; }
.vg-body p { margin: 0 0 var(--vg-space-3); }
.vg-body p:last-child { margin-bottom: 0; }
.vg-body strong { color: var(--vg-text); font-weight: 500; }

/* The one accent word */
.vg-accent { color: var(--vg-accent); }

/* Hairline rule under a headline — a divider, never a box */
.vg-rule { width: 44px; height: 2px; background: var(--vg-accent); margin: var(--vg-space-3) 0 0; border: 0; }

/* Two-column split: text left, imagery right. Strong left alignment. */
.vg-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 5vw, 90px);
  align-items: center;
}
.vg-split--narrow { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.vg-split--wide   { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }

/* Contained imagery — soft radius: an object placed on the page */
.vg-img { border-radius: var(--vg-radius-image); overflow: hidden; }
.vg-img img { width: 100%; height: 100%; object-fit: cover; }

.vg-grid { display: grid; gap: clamp(10px, 1.2vw, 18px); }
.vg-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vg-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vg-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Numbered callouts — Switzer numerals in the accent colour */
.vg-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 40px); margin-top: var(--vg-space-5); }
.vg-step__n { font-family: var(--vg-font-text); font-weight: 600; color: var(--vg-accent); letter-spacing: .06em; font-size: var(--vg-size-label); }
.vg-step__t { font-weight: 500; margin: var(--vg-space-2) 0 var(--vg-space-1); font-size: calc(var(--vg-size-body) * 1.05); }
.vg-step__b { color: var(--vg-text-muted); font-size: calc(var(--vg-size-body) * .92); line-height: 1.5; }

/* Spec rows — dry and factual, hairline-separated */
.vg-specs { margin: var(--vg-space-5) 0 0; max-width: 640px; }
.vg-spec { display: grid; grid-template-columns: minmax(0, 12em) minmax(0, 1fr); gap: var(--vg-space-3); padding: var(--vg-space-2) 0; border-top: 1px solid var(--vg-hairline); }
.vg-spec:last-child { border-bottom: 1px solid var(--vg-hairline); }
.vg-spec dt { font-size: var(--vg-size-label); letter-spacing: var(--vg-track-label); text-transform: uppercase; color: var(--vg-accent); font-weight: 500; align-self: center; }
.vg-spec dd { margin: 0; color: var(--vg-text-muted); }

/* Big figures — let the numbers carry the weight */
.vg-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 70px); margin-top: var(--vg-space-6); }
.vg-figure__v { font-family: var(--vg-font-display); font-size: var(--vg-size-figure); font-weight: 600; line-height: 1; letter-spacing: var(--vg-track-tight); }
.vg-figure__l { color: var(--vg-text-muted); font-size: calc(var(--vg-size-body) * .9); margin-top: var(--vg-space-2); line-height: 1.4; }

/* Yesterday / today two-column list */
.vg-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 5vw, 80px); margin-top: var(--vg-space-5); max-width: 720px; }
.vg-cols h4 { font-size: var(--vg-size-label); letter-spacing: var(--vg-track-label); text-transform: uppercase; font-weight: 500; color: var(--vg-text-muted); margin: 0 0 var(--vg-space-3); }
.vg-cols ul { list-style: none; margin: 0; padding: 0; }
.vg-cols li { padding: 6px 0; }
.vg-cols--was li { color: var(--vg-text-muted); }
.vg-cols--now li { color: var(--vg-text); }

/* ----------------------------------------------------- the Dynamic Island */
/* The single persistent edge element — and the site's only navigation.
   Collapsed it reads the section you're in; opened it becomes the map of
   the work. One construction, contextual contents. */
.vg-island {
  position: fixed;
  left: 50%;
  bottom: clamp(16px, 2.4vw, 34px);
  transform: translateX(-50%);
  z-index: 90;
  display: grid;
  grid-template-rows: 0fr auto;
  width: max-content;
  min-width: 0;
  max-width: calc(100vw - 24px);
  background: var(--vg-island-bg);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  color: var(--vg-island-fg);
  border-radius: var(--vg-radius-island);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  font-family: var(--vg-font-text);
  font-size: clamp(10px, .78vw, 13px);
  font-weight: 600;
  line-height: 1;
  overflow: hidden;
  view-transition-name: island;
  transition:
    grid-template-rows .32s var(--vg-ease),
    min-width .32s var(--vg-ease),
    border-radius .32s var(--vg-ease),
    box-shadow .32s var(--vg-ease);
}
.vg-island.is-shown {
  background: rgba(9, 10, 14, .94);
  grid-template-rows: 1fr auto;
  min-width: min(660px, calc(100vw - 24px));
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}

/* --- the collapsed bar ---------------------------------------------- */
.vg-island__bar {
  grid-row: 2;
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 20px);
  height: clamp(44px, 4.2vw, 62px);
  padding: 0 clamp(16px, 1.9vw, 28px);
  white-space: nowrap;
  overflow: hidden;
  text-align: left;
}
.vg-island__bar:focus-visible { outline: 2px solid var(--vg-accent); outline-offset: -3px; }

.vg-island__seg {
  display: inline-flex; align-items: center;
  overflow: hidden;
  max-width: 40ch;
  transition: opacity .28s var(--vg-ease), max-width .28s var(--vg-ease);
}
.vg-island__seg[hidden] { display: inline-flex; opacity: 0; max-width: 0; }
.vg-island__div { width: 1px; height: clamp(16px, 1.7vw, 24px); background: var(--vg-island-div); flex: none; }
.vg-island__div[hidden] { display: block; width: 0; opacity: 0; }

.vg-island__name    { text-transform: uppercase; letter-spacing: .1em; }
.vg-island__project { letter-spacing: .04em; color: #fff; }
.vg-island__section { text-transform: uppercase; letter-spacing: var(--vg-track-label); opacity: .6; }
.vg-island__chip    { letter-spacing: .05em; color: var(--vg-accent); }
.vg-island__sheet   { opacity: .5; letter-spacing: .06em; font-variant-numeric: tabular-nums; }

/* scroll progress — a hairline of accent along the bottom edge of the pill */
.vg-island__progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--vg-accent);
  transform: scaleX(0); transform-origin: 0 50%;
  opacity: .85;
  pointer-events: none;
}

/* --- the opened panel ------------------------------------------------ */
.vg-island__panel {
  grid-row: 1;
  min-height: 0;
  overflow: hidden;
  padding: clamp(18px, 2vw, 26px) clamp(16px, 1.9vw, 28px) 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 34px) clamp(20px, 3vw, 44px);
  opacity: 0;
  transition: opacity .24s var(--vg-ease);
}
.vg-island.is-shown .vg-island__panel { opacity: 1; overflow-y: auto; max-height: min(58vh, 460px); }

.vg-island__ttl {
  margin: 0 0 10px;
  font-size: 10px;
  letter-spacing: var(--vg-track-label);
  text-transform: uppercase;
  color: rgba(255, 255, 255, .38);
  font-weight: 500;
}

.vg-island__link {
  display: grid;
  grid-template-columns: 2.2em minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  transition: background .18s var(--vg-ease);
}
.vg-island__link:hover,
.vg-island__link.is-cursor { background: rgba(255, 255, 255, .08); }
.vg-island__link[aria-current] .vg-island__link-t { color: var(--vg-accent); }
.vg-island__link-n {
  font-size: 10px; letter-spacing: .1em;
  color: rgba(255, 255, 255, .4);
  font-variant-numeric: tabular-nums;
}
.vg-island__link[data-accent="gold"]    .vg-island__link-n { color: var(--vg-gold); }
.vg-island__link[data-accent="cyan"]    .vg-island__link-n { color: var(--vg-cyan); }
.vg-island__link[data-accent="blue"]    .vg-island__link-n { color: var(--vg-blue); }
.vg-island__link[data-accent="crimson"] .vg-island__link-n { color: var(--vg-crimson); }
.vg-island__link-body { display: block; min-width: 0; }
.vg-island__link-t {
  display: block;
  font-family: var(--vg-font-display);
  font-size: 15px; font-weight: 600; line-height: 1.15;
  letter-spacing: var(--vg-track-tight);
}
.vg-island__link--sec .vg-island__link-t {
  font-family: var(--vg-font-text);
  font-size: 11px; font-weight: 500;
  letter-spacing: var(--vg-track-label);
  text-transform: uppercase;
}
.vg-island__link-s {
  display: block;
  margin-top: 3px;
  font-size: 11px; font-weight: 400; line-height: 1.35;
  letter-spacing: 0;
  color: rgba(255, 255, 255, .45);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.vg-island__hint {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 10px; font-weight: 400;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .32);
}
.vg-island__key {
  display: inline-block;
  padding: 2px 5px;
  margin-right: 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .09);
  color: rgba(255, 255, 255, .6);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------- work grid */
.vg-work { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); margin-top: var(--vg-space-6); }
.vg-work__item {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--vg-cream);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--vg-radius-image);
  background: var(--vg-ink-lift);
}
.vg-work__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--vg-ease), opacity .4s var(--vg-ease);
  opacity: .82;
}
.vg-work__item:hover img { transform: scale(1.035); opacity: 1; }
.vg-work__meta {
  position: absolute; inset: auto 0 0 0;
  padding: clamp(16px, 2vw, 32px);
  background: linear-gradient(180deg, rgba(10,11,16,0) 0%, rgba(10,11,16,.86) 70%);
}
.vg-work__n { font-size: var(--vg-size-label); letter-spacing: var(--vg-track-label); color: var(--vg-accent); font-weight: 500; }
.vg-work__t { font-family: var(--vg-font-display); font-size: clamp(22px, 2.4vw, 38px); font-weight: 600; line-height: 1; margin: 10px 0 6px; letter-spacing: var(--vg-track-tight); }
.vg-work__s { color: var(--vg-cream-soft); font-size: calc(var(--vg-size-body) * .92); }

/* ---------------------------------------------------------- chapter nav */
.vg-next {
  display: flex; align-items: baseline; gap: var(--vg-space-3);
  text-decoration: none; color: var(--vg-text);
  margin-top: var(--vg-space-5);
}
.vg-next__l { font-size: var(--vg-size-label); letter-spacing: var(--vg-track-label); text-transform: uppercase; color: var(--vg-text-muted); }
.vg-next__t { font-family: var(--vg-font-display); font-size: var(--vg-size-h2); font-weight: 600; letter-spacing: var(--vg-track-tight); }
.vg-next:hover .vg-next__t { color: var(--vg-accent); }

/* --------------------------------------------------------------- toggles */
/* Two states of one thing. Hairline rail, no boxes — the active label is
   simply the one wearing the accent. */
.vg-toggle { display: inline-flex; gap: 0; margin: var(--vg-space-4) 0 0; border-top: 1px solid var(--vg-hairline); }
.vg-toggle__btn {
  appearance: none; border: 0; background: none; cursor: pointer;
  color: var(--vg-text-muted);
  font-family: var(--vg-font-text);
  font-size: var(--vg-size-label);
  letter-spacing: var(--vg-track-label);
  text-transform: uppercase;
  font-weight: 500;
  padding: var(--vg-space-3) var(--vg-space-4) var(--vg-space-3) 0;
  position: relative;
  transition: color .24s var(--vg-ease);
}
.vg-toggle__btn::before {
  content: ""; position: absolute; left: 0; right: var(--vg-space-4); top: -1px; height: 2px;
  background: var(--vg-accent); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .28s var(--vg-ease);
}
.vg-toggle__btn.is-on { color: var(--vg-text); }
.vg-toggle__btn.is-on::before { transform: scaleX(1); }
.vg-toggle__btn:focus-visible { outline: 2px solid var(--vg-accent); outline-offset: 3px; }

.vg-panes { position: relative; margin-top: var(--vg-space-4); }
.vg-pane { display: none; }
.vg-pane.is-on { display: block; animation: vg-fade .34s var(--vg-ease) both; }
@keyframes vg-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .vg-pane.is-on { animation: none; } }

/* -------------------------------------------------------------- lightbox */
.vg-lightbox {
  position: fixed; inset: 0; z-index: 120;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(8px, 2vw, 28px);
  padding: clamp(48px, 6vw, 80px) clamp(12px, 3vw, 40px);
  background: rgba(6, 7, 10, .93);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; transition: opacity .22s var(--vg-ease);
}
.vg-lightbox.is-in { opacity: 1; }
.vg-lightbox img {
  grid-column: 2; justify-self: center;
  max-width: 100%; max-height: calc(100vh - 160px);
  width: auto; height: auto; object-fit: contain;
  border-radius: var(--vg-radius-image);
}
.vg-lightbox__nav, .vg-lightbox__close {
  appearance: none; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .08);
  color: #fff; font-family: var(--vg-font-text);
  border-radius: 999px;
  transition: background .2s var(--vg-ease);
}
.vg-lightbox__nav { width: 46px; height: 46px; font-size: 18px; }
.vg-lightbox__nav--prev { grid-column: 1; }
.vg-lightbox__nav--next { grid-column: 3; }
.vg-lightbox__nav:hover, .vg-lightbox__close:hover { background: rgba(255, 255, 255, .16); }
.vg-lightbox__close {
  position: absolute; top: clamp(14px, 2vw, 26px); right: clamp(14px, 3vw, 40px);
  padding: 10px 18px;
  font-size: var(--vg-size-label); letter-spacing: var(--vg-track-label); text-transform: uppercase;
}
.vg-lightbox__cap {
  grid-column: 2; margin: 0; text-align: center;
  position: absolute; left: 0; right: 0; bottom: clamp(14px, 2.4vw, 30px);
  font-size: var(--vg-size-label); letter-spacing: var(--vg-track-label); text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
}
@media (max-width: 620px) {
  .vg-lightbox__nav { width: 38px; height: 38px; }
}

/* ------------------------------------------------------------- 3d viewer */
/* The model is the page, not an illustration of it: full-bleed, lit from the
   scheme's own background, no frame. */
.vg-viewer-wrap { position: relative; }
.vg-viewer {
  display: block;
  width: 100%;
  height: clamp(340px, 62vh, 660px);
  background: transparent;
  --poster-color: transparent;
  --progress-bar-color: var(--vg-accent);
  --progress-mask: transparent;
  outline: none;
}
.vg-viewer::part(default-progress-bar) { background: var(--vg-accent); height: 2px; }
.vg-viewer-wrap::before {
  content: "";
  position: absolute; inset: -6% -4%;
  background: radial-gradient(58% 52% at 50% 52%, color-mix(in srgb, var(--vg-accent) 16%, transparent) 0%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}
.vg-viewer-wrap > * { position: relative; z-index: 1; }

.vg-viewer__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--vg-space-3);
  margin-top: var(--vg-space-3);
  padding-top: var(--vg-space-3);
  border-top: 1px solid var(--vg-hairline);
}
.vg-viewer__hint {
  margin: 0;
  font-size: var(--vg-size-label);
  letter-spacing: var(--vg-track-label);
  text-transform: uppercase;
  color: var(--vg-text-muted);
}
.vg-viewer__hint b { color: var(--vg-accent); font-weight: 500; }

/* --------------------------------------------------------------- motion */

/* Headlines rise out of a mask, line by line. Quiet — a fade with lift,
   no bounce, no letter-by-letter theatrics. */
.vg-mask { display: block; overflow: hidden; }
.vg-mask > span {
  display: block;
  transform: translateY(105%);
  transition: transform .82s var(--vg-ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.is-in .vg-mask > span,
.vg-mask.is-in > span { transform: none; }

/* Plate backgrounds drift and settle as the section passes. */
.vg-plate__bg { will-change: transform; transform: scale(1.06); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .vg-plate__bg {
      animation: vg-drift linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
    @keyframes vg-drift {
      from { transform: scale(1.12) translateY(-3%); }
      to   { transform: scale(1.12) translateY(3%); }
    }
    /* contained imagery breathes a little on the way past */
    .vg-img > img {
      animation: vg-breathe linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
    @keyframes vg-breathe {
      from { transform: scale(1.08) translateY(-1.4%); }
      to   { transform: scale(1.08) translateY(1.4%); }
    }
  }
}

/* A stage: something pinned while the words move past it. */
.vg-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 90px);
  align-items: start;
}
.vg-stage__pin {
  position: sticky;
  top: max(12vh, 90px);
  align-self: start;
}
.vg-stage__flow > * + * { margin-top: 42vh; }
.vg-stage__step { max-width: 44ch; }
.vg-stage__step h3 {
  font-family: var(--vg-font-display);
  font-size: var(--vg-size-h2);
  font-weight: 600;
  line-height: 1;
  letter-spacing: var(--vg-track-tight);
  margin: 0 0 var(--vg-space-3);
}
@media (max-width: 860px) {
  .vg-stage { grid-template-columns: minmax(0, 1fr); }
  .vg-stage__pin { position: static; }
  .vg-stage__flow > * + * { margin-top: var(--vg-space-6); }
}

/* --------------------------------------------------------------- reveal */
/* Opt-in: the hidden state only exists once JS has taken charge, so content
   is never left invisible if the script fails to run. */
html[data-reveal] .vg-reveal:not(.is-in) { opacity: 0; transform: translateY(18px); }
.vg-reveal { transition: opacity .7s var(--vg-ease), transform .7s var(--vg-ease); }
@media (prefers-reduced-motion: reduce) {
  html[data-reveal] .vg-reveal:not(.is-in) { opacity: 1; transform: none; }
  .vg-reveal { transition: none; }
  .vg-island, .vg-island__seg, .vg-island__div, .vg-work__item img { transition: none; }
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 860px) {
  .vg-split, .vg-split--narrow, .vg-split--wide { grid-template-columns: minmax(0, 1fr); }
  .vg-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vg-figures { grid-template-columns: minmax(0, 1fr); gap: var(--vg-space-4); }
  .vg-work { grid-template-columns: minmax(0, 1fr); }
  .vg-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vg-section { min-height: 0; padding-block: clamp(64px, 14vw, 96px) clamp(90px, 18vw, 120px); }
  .vg-plate { min-height: 88svh; }
  .vg-lead { max-width: none; }
}
@media (max-width: 620px) {
  .vg-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vg-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--vg-space-4); }
  /* the island keeps its spine on small screens: name · section · sheet */
  .vg-island { font-size: 10px; }
  .vg-island__bar { gap: 9px; padding: 0 14px; height: 42px; }
  .vg-island:not(.is-shown) .vg-island__project,
  .vg-island:not(.is-shown) .vg-island__chip,
  .vg-island:not(.is-shown) .vg-island__div[data-for="project"],
  .vg-island:not(.is-shown) .vg-island__div[data-for="chip"] { display: none; }
  .vg-island__panel { grid-template-columns: minmax(0, 1fr); }
  .vg-island.is-shown .vg-island__panel { max-height: 62vh; }
  .vg-island__hint { display: none; }
}
