/* Steven Bleau, Design
   Single stylesheet. Tokens in :root. 8px spacing scale. Titillium Web.
   Visual language matched to stevenbleau.design: monochrome black-on-white,
   square corners, gold (#f2a902) only on black surfaces (AA on black, not on white).
   Dark mode via prefers-color-scheme. Breakpoints only where content breaks. */

/* ---- Tokens ---- */
:root {
  --bg: #ffffff;
  --bg-raised: #ffffff;
  --fg: #1a1b1f;
  --muted: #55555c;
  --line: #e4e4e6;
  --line-strong: #85858c; /* control borders: 3:1 on white (WCAG 1.4.11) */
  /* Soft lift for black chips over imagery (hero portrait and lines, dot labels). */
  --float-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
  --block: #000000;      /* solid black panels (typed lines, buttons) */
  --block-fg: #ffffff;
  --gold: #f2a902;       /* only on --block or dark bg, fails AA on white */
  /* "Set back" treatment: the hero collage behind the intro, and the cards
     that aren't in view in a sideways card row. */
  --frost-blur: 3px;
  --frost-sat: 0.75;
  --frost-filter: blur(var(--frost-blur)) saturate(var(--frost-sat));
  --frost-opacity: 0.55;
  --accent: #1a1b1f;     /* links match text, underlined (live-site behavior) */

  /* 8px spacing scale */
  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2rem;
  --s6: 3rem;
  --s8: 4rem;
  --s12: 6rem;

  /* Fluid type scale */
  --fs--1: clamp(0.84rem, 0.8rem + 0.15vw, 0.95rem);
  /* Small uppercase labels (nav, eyebrows, CTAs). 12px at the reference's
     ~1500px design width, scaling up so it stays legible on a large display. */
  --fs-label: clamp(0.75rem, 0.8vw, 1rem);
  --fs-0:  clamp(1rem, 0.95rem + 0.25vw, 1.1875rem);
  --fs-1:  clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  --fs-2:  clamp(1.45rem, 1.25rem + 0.9vw, 2rem);
  --fs-3:  clamp(1.8rem, 1.4rem + 1.8vw, 2.75rem);
  --fs-display: clamp(2.6rem, 1.9rem + 3.4vw, 4.25rem);

  --font-sans: "Titillium Web", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 0;
  --wrap: 96rem; /* cards land ~744px, close to their 720px source width */
  /* 5rem = the 80px the reference site pads its header from the viewport edge */
  --gutter: clamp(1.25rem, 4vw, 5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121114;
    --bg-raised: #1a191e;
    --fg: #eceae6;
    --muted: #a3a0ab;
    --line: #2c2a32;
    --line-strong: #706d78; /* 3:1 on --bg and --bg-raised */
    --accent: #eceae6;
  }
}

/* ---- Base ---- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

html.js { scroll-behavior: smooth; scroll-snap-type: y mandatory; }

/* A same-page link (dot menu, brand) is gliding to its section: snapping is
   off until the page comes to rest there (js/main.js). Left on, the browser
   re-snaps mid-glide whenever layout or the viewport changes and can drop the
   page on a neighboring section instead. */
html.js.is-jumping { scroll-snap-type: none; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-0);
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  margin-block: 0 var(--s2);
}

h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-3); }
h3 { font-size: var(--fs-2); }

p {
  margin-block: 0 var(--s2);
  text-wrap: pretty;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

::selection { background: var(--gold); color: #000; }

ul[class], ol[class] {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---- Utilities ---- */
/* One centred column shared by header, content and footer, so everything sits
   on the same two alignment lines and leftover space is split evenly. Capped
   rather than full-bleed: on a very wide display an uncapped grid stretches the
   cards past their source image width and the prose past a readable measure.
   Only .hero-collage deliberately bleeds past this. */
.wrap {
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header and footer bars span the full viewport, one --gutter from each edge.
   The nav sits hard right; the brand lockup now floats bottom-right as a
   fixed widget. They deliberately do NOT share the content column's alignment
   line; the bars frame the page, the column holds the reading content. */
.wrap--bleed { max-width: none; }

.measure { max-width: 68ch; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  font-size: var(--fs--1);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-block: 0 var(--s2);
}

.lede {
  font-size: var(--fs-1);
  color: var(--muted);
  max-width: 58ch;
}

.meta {
  font-size: var(--fs--1);
  color: var(--muted);
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--s2);
  inset-block-start: -100%;
  background: var(--block);
  color: var(--block-fg);
  padding: var(--s1) var(--s2);
  z-index: 10;
}

.skip-link:focus { inset-block-start: var(--s2); }

/* ---- Header ---- */
/* The landing page has no header bar: navigation is the right-edge dot menu
   and the floating brand widget. Archived case-study pages still render the
   classic header (wordmark left, nav right); their styles live below. */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s1) var(--s3);
  padding-block: var(--s4);
}

/* Legacy header/footer lockup, used by the archived case pages. */
.wordmark {
  font-size: var(--fs-0);
  font-weight: 600; /* Titillium Web has no 500; 600 is its medium/semibold step */
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

span.wordmark { text-decoration: none; }

a.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  text-decoration: none;
}

.wordmark-mark {
  width: clamp(2.25rem, 3.25vw, 4rem); /* ~56px at 1728 */
  height: auto;
  flex-shrink: 0;
}

a.wordmark span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a.wordmark:hover span { text-decoration-thickness: 2px; }

/* ---- Floating brand widget (bottom right, always visible) ---- */
/* Logo + "Steven Bleau . Design", locked to a fixed spot at the viewport's
   bottom-right corner. The gold mark floats free; the black box with white
   text belongs to the wordmark only, in the same language as the typed hero
   lines. The wordmark starts condensed (.is-condensed in the markup) so only
   the mark floats there; hovering or focusing it expands the wordmark out;
   clicking jumps home to the work gallery. */
.brand-float {
  --brand-logo-w: clamp(2.6rem, 3vw, 3.25rem);
  position: fixed;
  /* Shift the widget toward the edge so the logo's CENTER sits on the same
     line as the 14px dots' center (inset-end + half the logo width = gutter
     + half a dot). The expanded wordmark box simply extends leftward. */
  inset-inline-end: calc(var(--gutter) - var(--brand-logo-w) / 2 + 15px);
  inset-block-end: calc(var(--gutter) + 0.75rem);
  z-index: 7;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-float-mark {
  width: var(--brand-logo-w);
  height: auto;
  flex-shrink: 0;
  transition: filter 0.25s ease;
}

.brand-float-text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  max-width: 22em;
  opacity: 1;
  margin-inline-start: 0.6em;
  background: var(--block);
  color: var(--block-fg);
  font-size: var(--fs-0);
  font-weight: 600; /* Titillium Web has no 500; 600 is its medium/semibold step */
  padding: 0.2em 0.6em;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.08em;
  /* Same lift as the hero lines and dot labels while the wordmark shows;
     dropped when condensed so the zero-width box leaves no smudge. */
  box-shadow: var(--float-shadow);
  transition: max-width 0.35s ease, opacity 0.25s ease, margin-inline-start 0.35s ease, padding 0.35s ease, box-shadow 0.25s ease;
}

/* Condensed: the wordmark and its box slide out, leaving only the mark. */
.brand-float.is-condensed .brand-float-text {
  max-width: 0;
  opacity: 0;
  margin-inline-start: 0;
  padding-inline: 0;
  box-shadow: none;
}

/* Hovering the floating mark expands the wordmark back out (same gold-on-black
   hover as the typed hero links). */
.brand-float:hover .brand-float-text,
.brand-float:focus-visible .brand-float-text {
  max-width: 22em;
  opacity: 1;
  margin-inline-start: 0.6em;
  padding-inline: 0.6em;
  color: var(--gold);
  box-shadow: var(--float-shadow);
}

/* The mark lifts on hover too; drop-shadow follows its round outline. */
.brand-float:hover .brand-float-mark,
.brand-float:focus-visible .brand-float-mark { filter: drop-shadow(var(--float-shadow)); }

/* Over the hero collage the widget sits on top of the browsing dots. */
@media (max-width: 75rem) {
  /* App-icon sized mark on phones and tablets: easier thumb-target, still
     edge-tucked, with a little air from the viewport edge. */
  .brand-float { --brand-logo-w: 3.25rem; margin-inline-end: 0.75rem; }
}

.site-nav ul {
  display: flex;
  gap: var(--s3);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Near-black at weight 500, matching the reference, uppercase at this size is
   hard to read in the muted grey. Hover underlines rather than changing weight,
   which would shift the layout. */
.site-nav a {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
}

.site-nav a::before { content: "."; }

.site-nav a[aria-current="page"] { font-weight: 600; }

.site-nav a:hover,
.site-nav a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

/* Five nav items need a tighter rhythm on small screens. */
@media (max-width: 52rem) {
  .site-nav ul { gap: var(--s2); }
}

/* ---- Sections ---- */
section { padding-block: var(--s6); }

/* Full-screen snap sections: each section fills the viewport and the page
   snaps section-to-section (scroll-snap-stop: always gives the threshold,    a small scroll pops to the next section instead of drifting). The header
   overlays the hero and scrolls away with it, like the reference site. */
body > .wrap--bleed:first-of-type .site-header {
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  z-index: 5;
  padding-inline: var(--gutter);
}

.hero-collage,
main .wrap > section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.site-footer { scroll-snap-align: end; }

/* Heights use svh, not dvh: dvh resizes as mobile browser bars slide in and
   out, which moved the snap points mid-fling (the catch-and-jitter). svh is
   fixed at the bars-shown height, and equals vh on desktop.
   Touch keeps mandatory snapping but lets a fast fling carry past a section
   instead of forcing a stop at every one. */
@media (pointer: coarse) {
  .hero-collage,
  main .wrap > section { scroll-snap-stop: normal; }
}

main .wrap > section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  justify-content: safe center;
  min-height: 100vh;
  min-height: 100svh;
}

/* ---- Horizontal snap rows ---- */
/* Card lists inside full-screen sections scroll sideways with a snap threshold
   and peek: cards keep a steady footprint and instead breathe with cursor
   proximity (js/main.js, eased per frame, capped to half the gap so they
   never overlap; with no JS everything renders at full size in a plain
   grid/stack). */
.work-list.work-list--h,
.edu.edu--h {
  display: flex;
  grid-template-columns: none;
  gap: var(--s6);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-inline: calc((100% - var(--item-w)) / 2);
  padding-block: var(--s2);
}

.work-list--h { --item-w: min(64rem, 86vw); }

/* Phones: 86vw is viewport-relative but the list sits inside .wrap's gutters
   (plus the dot column's right inset), so a card would be wider than the strip
   and center-snap would crop its left edge. Fill the strip's content box. */
@media (max-width: 51.99rem) {
  .work-list--h { --item-w: 100%; }
}
.edu--h { --item-w: min(26rem, 78vw); }

/* Slot pager (js/main.js builds one slot per card): click a slot to flip the
   strip to that card; the centered card's slot stays filled. offsetLeft is
   measured against the list, so it becomes the positioning ancestor. */
.work-list--h,
.edu--h { position: relative; }

.hsnap-slots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-block-start: var(--s2);
}

.hsnap-slot {
  width: 40px;
  height: 6px;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hsnap-slot.is-active {
  background: var(--block);
  border-color: var(--block);
}

.hsnap-slot:hover { border-color: var(--fg); }

.work-list--h::-webkit-scrollbar,
.edu--h::-webkit-scrollbar { display: none; }

/* Cards keep a constant footprint (no pop-forward scale/duck); js/main.js
   drives their scale per-frame from cursor proximity, eased to avoid
   overlapping neighbors. */
.work-list--h > li,
.edu--h > li {
  flex: 0 0 var(--item-w);
  scroll-snap-align: center;
  will-change: transform;
}

/* From tablet widths up: one card per row, image beside text. Below the wide
   layout, cap the plate height so the card's text still fits one screen. */
@media (min-width: 52rem) {
  .work-list--h .work-entry { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 52rem) and (max-width: 74.99rem) {
  .work-list--h .work-entry > img,
  .work-list--h .work-entry .work-gallery,
  .work-list--h .work-entry .work-plate { aspect-ratio: auto; height: min(44svh, 420px); }
  .work-list--h .work-entry .work-plate--video { aspect-ratio: auto; }
}

/* Full-width body when a card has no media beside it (education card). */
.work-entry-body:only-child { grid-column: 1 / -1; }

/* About card: the photo collage sits beside the bio in equal columns. */
@media (min-width: 52rem) {
  #about .work-entry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Photo collage: a 2x2 grid of 3:2 tiles. Spans clip the hover zoom. */
.about-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s2);
  width: 100%;
}
.about-photos span { display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.about-photos img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.about-photos span:nth-child(1) img { object-position: center 8%; } /* portrait shot: keep the head in frame */
/* Bolded phrases in the bio pop to the foreground so the card scans. */
#about .work-snapshot strong { color: var(--fg); font-weight: 600; }

/* Mobile: fit the About card's collage + text on one screen (no scroll/swipe).
   The bio steps down in type and the section trims its padding so the card
   fills the viewport. */
@media (max-width: 51.99rem) {
  #about { padding-block: var(--s3); }
  #about h2 { font-size: var(--fs-2); margin-block-end: var(--s2); }
  #about .work-list { margin-block-start: var(--s2); }
  #about .work-entry { gap: var(--s2); }
  #about .work-index { margin-block-end: var(--s1); }
  #about .work-snapshot {
    font-size: 0.9rem;
    line-height: 1.35;
    max-width: none;
    margin-block-end: var(--s2);
  }
}

/* Mobile: fit the Currently card (media, text, slot pager) on one screen,
   matching the About compaction. The media is 3:2 of the card width, capped
   by what the viewport leaves after the text. */
@media (max-width: 51.99rem) {
  #currently { padding-block: var(--s3); }
  #currently h2 { font-size: var(--fs-2); margin-block-end: var(--s2); }
  #currently .work-list { margin-block-start: var(--s2); }
  #currently .work-entry { gap: var(--s2); }
  #currently .work-index { margin-block-end: var(--s1); }
  #currently .work-subhead { font-size: 1rem; margin-block-end: 0.25rem; }
  #currently .work-snapshot {
    font-size: 0.9rem;
    line-height: 1.35;
    max-width: none;
    margin-block-end: var(--s2);
  }
  #currently .work-plate,
  #currently .work-gallery {
    aspect-ratio: auto;
    height: max(7rem, min(calc((100vw - var(--gutter) * 2 - 2.5rem) * 2 / 3), calc(100svh - 530px)));
  }
  /* Previously card: the three past roles step down in type to fit too. */
  #previously .edu { gap: var(--s2); margin-block-start: var(--s2); }
  #previously .edu-item h3 { font-size: var(--fs-2); margin-block-end: 0.25rem; }
  #previously .edu-item .meta { margin-block-end: 0.25rem; }
  #previously .edu-item p:last-child { font-size: 0.9rem; line-height: 1.35; }
}

/* Mobile: fit the Contact section (heading, both lines, the whole form and
   its Send button) on one screen, matching the About and Currently
   compaction. Name and Email share a row, spacing tightens, and the message
   box takes whatever height the viewport has left (between 4.5 and 8rem).
   Field text stays at 16px: anything smaller makes iOS zoom the page on
   focus. */
@media (max-width: 51.99rem) {
  #contact { padding-block: var(--s3); }
  #contact h2 { font-size: var(--fs-2); margin-block-end: var(--s2); }
  #contact .contact-lede { font-size: var(--fs-1); }
  #contact .contact-sub { font-size: 0.9rem; line-height: 1.35; }
  #contact .contact-form { gap: 0.75rem; margin-block-start: var(--s2); }
  #contact .contact-form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  #contact .contact-field { gap: 0.25rem; }
  #contact .contact-field input,
  #contact .contact-field textarea { padding: 0.45rem 0.6rem; }
  #contact .contact-field textarea {
    min-height: 0;
    height: clamp(4.5rem, calc(100svh - 29rem), 8rem);
  }
  #contact .contact-submit { padding: 0.55rem 1.2rem; }
}

/* Stacked Previously roles (below the 3-column breakpoint): each logo becomes
   a square tile flush left, with its role's name, discipline and blurb beside
   it. */
@media (max-width: 59.99rem) {
  #previously .edu-item {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    column-gap: var(--s2);
    align-items: start;
  }
  #previously .edu-item img {
    grid-row: 1 / span 3;
    width: 5.5rem;
    height: 5.5rem;
    padding: 0.6rem;
    margin-block-end: 0;
  }
}
@media (max-width: 51.99rem) {
  #previously .edu-item { grid-template-columns: 4.5rem minmax(0, 1fr); }
  #previously .edu-item img { width: 4.5rem; height: 4.5rem; padding: 0.5rem; }
}

/* About on wide screens fills the same width and left edge as the work row:
   the collage takes the larger column, capped so its 3:2 tiles still fit under
   the heading on short screens, and the bio steps up to fill its column. */
@media (min-width: 75rem) {
  #about .work-list--h { --item-w: 100%; padding-inline: 0; }
  #about .work-entry { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  #about .about-photos { max-width: calc((100svh - 300px) * 1.5); }
  #about .work-snapshot { font-size: var(--fs-1); line-height: 1.5; max-width: none; }
}

/* Currently on wide screens (MacBook Pro fullscreen): media stacked over text
   in a single card, left-flush at 78% of the column so the ducked next card
   peeks in from the right, the whitespace itself signals "scroll sideways for
   more". The plate caps at 50svh so heading + plate + text below all fit one
   screen without scrolling. */
@media (min-width: 75rem) {
  /* The media takes what the viewport leaves after the heading, card text and
     slot pager (~600px of chrome), capped at 46svh, floored so it never
     collapses on a short laptop screen. */
  #currently { --currently-media-h: clamp(10rem, calc(100svh - 600px), 46svh); }
  #currently .work-list--h {
    --item-w: 78%;
    padding-inline: 0;
  }
  #currently .work-list--h > li { scroll-snap-align: start; }
  #currently .work-list--h .work-entry { grid-template-columns: 1fr; }
  /* Explicit height, not aspect-ratio + max-height: the latter makes the
     box shrink its width to height x 3/2 when capped, leaving the plate a
     narrow island instead of the full card width. */
  #currently .work-plate,
  #currently .work-gallery { aspect-ratio: auto; height: var(--currently-media-h); }
  #currently .work-snapshot { max-width: 72ch; }
  /* Previously card mirrors the two above: the three logo plates become tall
     tiles in a media row (same height and gap as the photo strip), the label
     sits under them, and each role's text lines up beneath its logo. The list
     wrappers dissolve (display: contents) so every piece lands on one grid. */
  #previously .work-entry-body {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--s2);
  }
  #previously .edu,
  #previously .edu-item { display: contents; }
  #previously .work-index { grid-row: 2; grid-column: 1 / -1; }
  #previously .edu-item img {
    grid-row: 1;
    height: var(--currently-media-h);
    padding: 0 18%;
    margin-block-end: var(--s3);
  }
  #previously .edu-item h3 {
    grid-row: 3;
  }
  #previously .edu-item .meta { grid-row: 4; }
  #previously .edu-item p:last-child { grid-row: 5; }
}

/* Sideways card rows: every card but the one in view sits back behind the
   same frost as the hero collage. js/main.js sets --frost per card from the
   scroll position (0 in view, 1 a full card away), so the frost tracks the
   swipe with no transition; without JS the class is absent and cards stay
   sharp. A fully clear card drops the filter so its text renders crisply. */
.hsnap-frost > li {
  filter: blur(calc(var(--frost-blur) * var(--frost, 1)))
    saturate(calc(1 - (1 - var(--frost-sat)) * var(--frost, 1)));
  opacity: calc(1 - (1 - var(--frost-opacity)) * var(--frost, 1));
}
.hsnap-frost > li.is-clear { filter: none; opacity: 1; }

/* Focus ring on the keyboard-scrollable strip. */
.work-list--h:focus-visible,
.edu--h:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }

/* ---- Hero: typed lines over full-bleed collage ---- */
/* Proportions taken from the reference site, which is laid out for a ~1500px
   viewport: 300x200 tiles, 5px gaps, 3 rows, 56px type, type 98px below the
   grid. Those are fixed pixels there, so the hero shrinks away on a large
   display. Here --tile-w drives all of them instead, so the composition is
   identical to the reference at 1500px and holds its proportions at any width.
   Every ratio below is literally <reference px> / 300. */
.hero-collage {
  --tile-w: clamp(260px, 20vw, 480px);
  --tile-gap: 5px;
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  padding-block: 0;
}

/* Column-flow grid in a hidden-scrollbar strip: scrolls horizontally by
   touch/trackpad natively; main.js adds slow auto-scroll + mouse drag.
   The three rows share the hero's viewport height evenly, so the collage
   always fills the screen; images cover-crop into the resulting tiles. */
.collage {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, 1fr);
  grid-auto-columns: var(--tile-w);
  gap: var(--tile-gap);
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden; /* tiles pop on hover; keep the strip from gaining a vertical scroll range */
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.collage::-webkit-scrollbar { display: none; }

html.js .collage { cursor: grab; }
html.js .collage.dragging { cursor: grabbing; }

/* Mouse-accessible scrollbar for the continuous collage strip (js/main.js
   builds the thumb and keeps it synced with the auto-scroll + drag state). */
.hsb {
  position: absolute;
  inset-inline: var(--gutter);
  inset-block-end: var(--s1);
  height: 10px;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  z-index: 4;
  cursor: pointer;
}

.hsb-thumb {
  height: 100%;
  min-width: 24px;
  background: var(--block-fg);
  cursor: grab;
}

/* Fixed tile box (js/main.js wraps each shot); only the media inside zooms,
   clipped here, so neighboring tiles never shift or overlap. */
.collage .tile {
  display: block;
  overflow: hidden;
}

.collage img,
.collage video,
.collage canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collage video { background: #000; }

html.js .collage img,
html.js .collage video,
html.js .collage canvas { cursor: pointer; }

/* Hover hint that shots open: the caption title slides up as a black chip.
   Mouse only; touch visitors get the same cue from the modal on first tap. */
@media (hover: hover) {
  html.js .collage .tile[data-title]::before {
    content: attr(data-title);
    position: absolute;
    inset-inline-start: 0.5rem;
    inset-block-end: 0.5rem;
    z-index: 1;
    max-width: calc(100% - 1rem);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: var(--block);
    color: var(--block-fg);
    font-size: var(--fs-label);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.3em 0.6em;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
  }
  html.js .collage .tile[data-title]:hover::before {
    opacity: 1;
    transform: none;
  }
}

/* Keyboard focus on a tile: black ring with a gold core, drawn over the
   media so it reads on light and dark shots alike. */
.collage .tile { position: relative; }
.collage .tile:focus-visible { outline: none; }
.collage .tile:focus-visible::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--block);
  box-shadow: inset 0 0 0 3px var(--gold), inset 0 0 0 6px var(--block);
  pointer-events: none;
}

/* Pause/play for gallery motion (hero) and the card videos: small black
   squares, white glyph, gold on hover/focus. aria-pressed swaps the glyph. */
.hero-pause,
.video-pause {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--block);
  color: var(--block-fg);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero-pause svg,
.video-pause svg { width: 0.875rem; height: 0.875rem; fill: currentColor; }

.hero-pause:hover,
.hero-pause:focus-visible,
.video-pause:hover,
.video-pause:focus-visible { color: var(--gold); }

.hero-pause:focus-visible,
.video-pause:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.hero-pause .i-play,
.video-pause .i-play,
.hero-pause[aria-pressed="true"] .i-pause,
.video-pause[aria-pressed="true"] .i-pause { display: none; }

.hero-pause[aria-pressed="true"] .i-play,
.video-pause[aria-pressed="true"] .i-play { display: block; }

/* Minimize: same black chip, bottom-right corner of the type block, inside
   the bracket and level with the bottom of the last line (the 0.2em is that
   line's bottom margin, at the statement lines' smaller size). Fades in once typing
   finishes so it doesn't slide right as the lines widen the block. */
.hero-minimize {
  position: absolute;
  inset-block-end: calc(0.2em * var(--small-fs));
  inset-inline-end: 0;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--block);
  color: var(--block-fg);
  cursor: pointer;
  box-shadow: var(--float-shadow);
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.typed-done .hero-minimize { opacity: 1; visibility: visible; }
.hero-minimize svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 6;
}
.hero-minimize:hover,
.hero-minimize:focus-visible { color: var(--gold); }
.hero-minimize:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hero-collage.browsing .hero-minimize { pointer-events: none; }

/* Bottom-left of the hero, just above the scrollbar track. */
.hero-pause {
  inset-inline-start: var(--gutter);
  inset-block-end: calc(var(--s1) + 10px + var(--s1));
}

/* Bottom-right of the video plate (the brand chip holds bottom-left). */
.video-pause {
  inset-block-end: 1rem;
  inset-inline-end: 1rem;
}

/* ---- Gallery post modal (Instagram-style) ---- */
.post-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.post-modal.is-open { opacity: 1; }

.post-modal[hidden] { display: none; }

html.modal-open { overflow: hidden; }

.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(15rem, 1fr);
  width: min(64rem, 100%);
  max-height: 90vh;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  transform: scale(0.965) translateY(14px);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.post-modal.is-open .post-card { transform: none; }

.post-media {
  display: grid;
  place-items: center;
  background: #0b0b0d;
  min-width: 0;
}

.post-media img,
.post-media video {
  width: 100%;
  height: 100%;
  max-height: 90vh;
  object-fit: contain;
}

/* The base img { display: block } outranks the UA's [hidden] rule, which left
   the last opened shot stacked above a video post. Hide the unused slot. */
.post-media [hidden] { display: none; }

.post-caption {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s3);
  overflow: auto;
}

.post-handle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  font-size: var(--fs--1);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  padding-block-end: var(--s1);
}

.post-close {
  font: inherit;
  font-size: var(--fs-1);
  line-height: 1;
  cursor: pointer;
  background: none;
  color: var(--fg);
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  padding: 0.1em 0.55em 0.18em;
}

.post-close:hover,
.post-close:focus-visible {
  background: var(--block);
  border-color: var(--block);
  color: var(--gold);
}

.post-title { font-size: var(--fs-1); font-weight: 600; margin: 0; }

.post-text { color: var(--muted); margin: 0; }

.post-index {
  margin-block-start: auto;
  padding-block-start: var(--s2);
  font-size: var(--fs--1);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 40rem) {
  .post-card { grid-template-columns: 1fr; }
  .post-media img,
  .post-media video { max-height: 46vh; }
}

/* Centered in the hero both ways at every width: the box (portrait plus the
   widest line) is what centers, so the bracket corners sit evenly. */
.hero-type {
  position: absolute;
   /* Above the collage tiles: the typed lines always paint over the
      zooming shots. Dots (6), brand widget (7), and the post modal (20)
      sit above it in turn. */
  z-index: 3;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  translate: -50% -50%;
  pointer-events: none; /* let drags through the transparent overlay box */
  transition: transform 0.35s ease, opacity 0.35s ease;
  transform-origin: center; /* browsing fade collapses into itself, in place */
  display: flex;
  align-items: flex-start;
  /* Shared by the portrait and the typed lines so the two stay locked:
     --type-fs is the .typed font size, --portrait-w spans the "Hi." and
     "I'm Steven." boxes exactly (2 x (1.4 line + 0.4 padding) + 0.2 gap). */
  --type-fs: calc(var(--tile-w) * 0.1867);
  --portrait-w: calc(var(--type-fs) * 3.8);
  --portrait-gap: calc(var(--tile-w) * 0.07);
  gap: var(--portrait-gap);
}

/* The portrait pops out to the left of the typed lines: a transparent circle
   (white corners cut away) that stands over the collage, its top flush with the
   "Hi." box and its bottom flush with the "I'm Steven." box. */
.hero-portrait {
  flex: 0 0 auto;
  width: var(--portrait-w);
  height: auto;
  display: block;
  filter: drop-shadow(var(--float-shadow));
}

/* The greeting lines ("Hi.", "I'm Steven.") sit to the right of the portrait.
   The action links pull back across the gap to the portrait's left edge so the
   whole block reads as one unit. */
.typed-line--flush {
  margin-inline-start: calc(-1 * (var(--portrait-w) + var(--portrait-gap)));
}

/* The statement lines step down so the long first line keeps the block about
   as wide as the greeting stack. --small-fs is shared with the minimize chip
   so it still lines up with the last line's bottom edge. */
.typed { --small-fs: 0.62; }
.typed-line--small { font-size: calc(var(--small-fs) * 1em); }

/* Highlighted words in the hero statement: gold on the black line boxes. */
.typed-line .hl { font-style: normal; color: var(--gold); }

/* Manual horizontal browsing of the collage clears the overlay type for
   good (js/main.js adds .browsing on the first wheel/touch/drag; nothing
   removes it until reload). The dot menu lives at the right edge
   permanently, not only while browsing. */
.hero-collage.browsing .hero-type {
  transform: scale(0.42);
  opacity: 0;
  pointer-events: none;
}

/* The lines opt back in for clicks normally; once faded for good they must
   not stay as invisible ghost-links over the collage. */
.hero-collage.browsing .typed-line { pointer-events: none; }

/* While the intro type is up, the collage sits back: soft, faded and a touch
   desaturated so the type leads. Browsing pulls it into focus; restoring the
   intro (brand click, returning to the gallery) sends it back. The slight
   scale hides the blur's soft edge at the viewport sides. JS only, so the
   no-JS strip stays sharp. */
html.js .collage {
  transition: filter 0.6s ease, opacity 0.6s ease, transform 0.6s ease;
}
html.js .hero-collage:not(.browsing) .collage {
  filter: var(--frost-filter);
  opacity: var(--frost-opacity);
  transform: scale(1.03);
}

/* Pinned to the viewport's right edge, plain circles on a vertical pill of the
   same frost as the hero collage. The pill is only a backdrop blur plus a page-
   colored veil, so it disappears over empty page and shows only over content.
   The chips carry their own contrast (inverse-color box, inverse-color text). */
.dot-nav {
  position: fixed;
  inset-inline-end: var(--gutter);
  inset-block-start: 50%;
  translate: 0 -50%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  background: color-mix(in srgb, var(--bg) calc((1 - var(--frost-opacity)) * 100%), transparent);
  -webkit-backdrop-filter: var(--frost-filter);
  backdrop-filter: var(--frost-filter);
  border-radius: 999px;
  padding: var(--s2) var(--s1);
}

.dot-nav a {
  display: inline-flex;
  flex-direction: row-reverse; /* label sits left of the circle; dot keeps the column edge */
  align-items: center;
  gap: var(--s1);
  border: none;
  background: none;
  padding: 0;
  color: var(--fg);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  opacity: 1;
  transform-origin: right center;
}

/* The circle itself (the anchor also carries the label text beside it). */
.dot-nav a::before {
  content: "";
  display: block;
  flex: none;
  width: 14px;
  height: 14px;
  border: 2px solid var(--fg);
  border-radius: 50%;
  background: var(--bg);
  transition: background 0.15s ease, border-color 0.15s ease;
}

/* Labels expand leftward from the dot when near/hovered. The chip is fully
   opaque, inverse-colored (foreground box, background-color text); js/main.js
   drives the width by cursor proximity, CSS hover covers the JS-off case. */
.dot-nav a { position: relative; }

.dot-nav a span {
  position: absolute;
  inset-inline-end: calc(100% + var(--s1));
  inset-block-start: 50%;
  translate: 0 -50%;
  opacity: 1;
  max-width: 0;
  overflow: hidden;
  transition: max-width 0.25s ease, padding-inline 0.25s ease;
  white-space: nowrap;
  background: var(--fg);
  color: var(--bg);
  padding: 0.15em 0;
  text-align: right;
}

.dot-nav a:hover,
.dot-nav a:focus-visible { outline: none; }

.dot-nav a:hover::before,
.dot-nav a:focus-visible::before { background: var(--fg); }

/* Fully expand the chip: max-width clears past the longest label, padding
   opens so the text isn't clipped by the collapsed box. */
.dot-nav a:hover span,
.dot-nav a:focus-visible span {
  max-width: 14em;
  padding-inline: 0.5em;
  box-shadow: var(--float-shadow);
}

/* Touch (no hover to catch, and the proximity loop skips touch): a tap
   expands the label via :active/:focus; it stays open until the user taps
   elsewhere, then collapses again. */
.dot-nav a:focus span,
.dot-nav a:active span {
  max-width: 14em;
  padding-inline: 0.5em;
  box-shadow: var(--float-shadow);
}

/* Touch: the dots are 14px, well under a fingertip, and a near miss either
   does nothing or lands on the neighboring dot (the wrong section). An
   invisible pad extends each dot's tap area to meet its neighbors halfway;
   nothing is drawn and mouse hover is unaffected. */
@media (pointer: coarse) {
  .dot-nav a::after {
    content: "";
    position: absolute;
    inset: -1rem -0.75rem;
  }
}

/* Gallery pairing (js/main.js sets/removes the attribute): while the hero
   intro is on screen the typed lines are the navigation; the dot column takes
   over once the intro is minimized. Outside the gallery the attribute is
   never set, so the column is always visible there. */
.dot-nav[hidden] { display: none; }

/* Current section (js/main.js scroll-spy marks the dot, click sets it too). */
.dot-nav a.is-active::before { background: var(--fg); outline: 2px solid var(--gold); outline-offset: 2px; }

.hero-type .typed-line { pointer-events: auto; }

/* Bold dark corner brackets frame the intro block. */
.typed { position: relative; }

.typed::before,
.typed::after {
  content: ""; position: absolute; width: 14px; height: 14px; opacity: 1; pointer-events: none; color: rgba(0, 0, 0, 0.9); }

/* Top-left bracket sits off the portrait's left edge, not the "Hi." box. */
.typed::before { top: -0.4em; left: calc(-1 * (var(--portrait-w) + var(--portrait-gap)) - 0.3em); border-top: 3px solid; border-left: 3px solid; }
.typed::after { bottom: -0.2em; right: -0.3em; border-bottom: 3px solid; border-right: 3px solid; }

.typed {
  font-size: var(--type-fs); /* 56px at the reference's 300px tile */
  line-height: 1.4;
  color: var(--block-fg);
}

.typed-line {
  display: block;
  width: fit-content;
  background: var(--block);
  color: var(--block-fg);
  padding: 0.2em 0.6em;
  margin-block-end: 0.2em;
  text-decoration: none;
  box-shadow: var(--float-shadow);
}

/* main.js sets [hidden] on lines it hasn't typed yet. They keep their slot
   (invisible, unclickable) so the centered block is already its final height
   and doesn't creep upward as each line types in. */
.typed-line[hidden] { visibility: hidden; }

/* An emptied line still holds one line of height, so pending lines and the
   line being typed match the finished line's box exactly. */
.typed-line:empty::before { content: "\200b"; }

a.typed-line {
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.08em;
}

a.typed-line:hover,
a.typed-line:focus-visible {
  color: var(--gold);
  text-decoration-thickness: 0.1em;
}

a.typed-line:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--gold), var(--float-shadow);
}

/* Six blinks (under 5s, WCAG 2.2.2), then the cursor rests solid. */
.cursor::after {
  content: "|";
  animation: blink 0.8s 6;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Stacked (phone) intro. The side-by-side intro is positioned from the
   screen's center (left: 50%), so it can be at most half the window wide; it
   needs ~485px, so below ~970px its lines wrapped ("I'm / Steven.") instead
   of switching layout. The stacked intro takes over from 61rem (976px) down.
   The rest of the page keeps its 52rem breakpoint. */
@media (max-width: 61rem) {
  /* Smaller tiles so the collage reads as a grid (two+ across) instead of one
     huge photo per row on a phone; all hero ratios derive from --tile-w. */
  .hero-collage { --tile-w: clamp(168px, 44vw, 320px); }
  /* Horizontally centered; the container hug-shrinks so lines stay left-aligned
     inside it, like desktop. The portrait stacks above the lines (a left-side
     circle would crowd the links on a narrow screen). */
  .hero-type {
    inset-inline: var(--gutter);
    translate: 0 -50%;
    flex-direction: column;
    align-items: center;
    /* Capped by the screen height on short windows (wide laptop windows,
       phones on their side) so the stack never runs off the top and bottom:
       the lines below take about 8x the type size, plus 5rem of air. */
    --portrait-w: max(6rem, min(calc(var(--tile-w) * 0.9), calc(100svh - 8 * clamp(1.5rem, 7vw, 2.6rem) - 5rem)));
  }
  .typed { font-size: clamp(1.5rem, 7vw, 2.6rem); width: max-content; max-width: 100%; margin-inline: auto; }
  /* Lines stack down the center on a phone instead of hugging the left. */
  .typed-line { margin-inline: auto; text-align: center; }
  .typed-line--flush { margin-inline-start: auto; }
  /* The top bracket rises past the stacked portrait (a square, so its
     height is --portrait-w) so the photo sits inside the frame too. */
  .typed::before { left: -0.3em; top: calc(-1 * (var(--portrait-w) + var(--portrait-gap)) - 0.4em); }
  /* Centered lines leave no gap beside the last one, so the minimize chip
     drops below the lines, and the bottom-right bracket drops with it so the
     chip stays inside the frame (0.3em gap + 2.25rem chip + 0.2em clearance). */
  .hero-minimize { inset-block-end: auto; inset-block-start: calc(100% + 0.3em); }
  .typed::after { bottom: calc(-1 * (0.3em + 2.25rem + 0.2em)); }
}

/* Keep the fixed dot column and the enlarged brand mark over whitespace in the
   reading sections: later sections' cards and text get a wider right inset.
   The hero keeps its full-bleed edge (dots sit on tiles there by design). */
@media (max-width: 52rem) {
  .wrap { padding-inline-end: calc(var(--gutter) + 2.5rem); }
}

/* Wider screens: the peeking next card would otherwise run under the dots.
   Main content only; the footer bar keeps its full-gutter edge. */
@media (min-width: 52.01rem) {
  main .wrap { padding-inline-end: calc(var(--gutter) + 4rem); }
  /* The dots' 4rem inset shifts the content column left of the screen's
     center; an equal left margin on the centered pieces puts them back on it
     (a centered box moves by half its margin). */
  .contact-lede,
  .contact-sub,
  .contact-form { margin-inline-start: 4rem; }
}

@media (max-width: 26rem) {
  .typed { font-size: clamp(1.8rem, 9vw, 2.8rem); }
}

/* ---- Buttons: black blocks, gold on hover (live-site language) ---- */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-block-start: var(--s4);
}

.btn {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  padding: var(--s1) var(--s3);
  border: 1px solid var(--fg);
  color: var(--fg);
  background: var(--bg-raised);
}

.btn:hover { color: var(--gold); background: var(--block); border-color: var(--block); }

.btn--primary {
  background: var(--block);
  border-color: var(--block);
  color: var(--block-fg);
}

.btn--primary:hover { color: var(--gold); }

/* ---- Work showcase: stacked feature entries, one per case study ---- */
.work-list {
  display: grid;
  gap: var(--s8);
  margin-block-start: var(--s4);
}

.work-entry {
  display: grid;
  gap: var(--s3) var(--s6);
  align-items: center;
  color: inherit;
  text-decoration: none;
  overflow: hidden; /* the card box stays put; inner media zooms within it */
}

/* Mid widths: one card per row, image beside text. */
@media (min-width: 56rem) and (max-width: 74.99rem) {
  .work-entry { grid-template-columns: 3fr 2fr; }
}

/* Wide screens: 2-up card grid, so 4 entries read as 2x2 rather than 1x4.
   Each card stacks (image over text) since it's now only half the width. */
@media (min-width: 75rem) {
  .work-list {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s8) var(--s6);
  }
}

/* Direct child only, the logo inside .work-plate must not be cover-cropped. */
.work-entry > img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Photo strip for entries with imagery: three equal tiles inside one cover box,
   the same footprint as the logo/video plates; tiles cover-crop to fill. The
   box is the definite height (aspect-ratio or a capped height), tiles fill it
   exactly — overflow hidden keeps a stretched tile from spilling into the
   entry text below. */
.work-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s2);
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.work-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

/* A linked tile fills its grid cell like a bare one; the shot stays put and
   the cursor plus focus ring mark it as a link. */
.work-gallery-link {
  display: block;
  min-height: 0;
  overflow: hidden;
}

.work-gallery-link:focus-visible { outline-offset: -3px; }

/* Link cue, same black-chip language as the gallery titles: a small arrow
   chip always sits in the corner (touch has no hover), and on hover/focus it
   opens out to "Read the story". */
.work-gallery-link { position: relative; container-type: inline-size; }

/* The Telo video plate links out the same way: the link fills the plate, the
   video fills the link, and the pause button sits beside it on the plate. */
.work-plate-link {
  position: absolute;
  inset: 0;
  container-type: inline-size;
}

.work-plate-link:focus-visible { outline-offset: -3px; }

.work-gallery-link::after,
.work-plate-link::after {
  content: "\2197";
  position: absolute;
  inset-inline-start: 0.5rem;
  inset-block-end: 0.5rem;
  z-index: 1;
  max-width: calc(100% - 1rem);
  overflow: hidden;
  white-space: nowrap;
  background: var(--block);
  color: var(--block-fg);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.3em 0.6em;
  pointer-events: none;
}

.work-gallery-link:hover::after,
.work-gallery-link:focus-visible::after,
.work-plate-link:hover::after,
.work-plate-link:focus-visible::after { color: var(--gold); }

/* Plate chip bottom-left like the photo chips, lined up with the pause button
   (logo moved top-left to make room). */
.work-plate-link::after { inset-block-end: 1rem; inset-inline-start: 1rem; }

/* The words only fit on wider photos (phones and tablets run ~90-100px per
   photo, the label needs ~135px); narrower ones keep the arrow, turning gold. */
@container (min-width: 10rem) {
  .work-gallery-link:hover::after,
  .work-gallery-link:focus-visible::after { content: "Read the story \2197"; }
  .work-plate-link:hover::after,
  .work-plate-link:focus-visible::after { content: "Watch the video \2197"; }
}

/* Logo plate: stands in for a cover image on gated entries. */
.work-plate {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  padding: 12%;
  background: #f1f1f3;
}

.work-plate--dark { background: #141414; }

.work-plate img {
  width: 100%;
  max-width: 22rem;
  height: auto;
}

/* Video plate: an autoplaying, muted product video fills the 3:2 cover.
   The brand logo sits on a solid chip so it stays legible over any frame,
   in either color scheme. Playback is driven by IntersectionObserver
   (js/main.js) so it only runs while on screen and off under reduced motion. */
.work-plate--video {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: #141414;
}

.work-plate--video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-plate--video .work-plate-logo {
  position: absolute;
  inset-block-start: 1rem;
  inset-inline-start: 1rem;
  width: min(9rem, 46%);
  max-width: none;
  height: auto;
  padding: 0.55rem 0.85rem;
  background: #ffffff;
}


.work-index {
  display: block;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-block-end: var(--s2);
}

.work-entry h3 {
  font-size: var(--fs-2);
  margin-block-end: var(--s2);
}

.work-entry .block {
  display: inline-block;
  background: var(--block);
  color: var(--block-fg);
  padding: 0.2em 0.6em;
  margin-inline-start: -0.6em; /* optically align text with the column edge */
}


/* One line on what the company or program is, between its name and what I do. */
.work-subhead {
  display: block;
  font-size: var(--fs-1);
  font-weight: 600;
  line-height: 1.25;
  color: var(--fg);
  margin-block-end: var(--s1);
}

.work-snapshot {
  display: block;
  color: var(--muted);
  max-width: 44ch;
  margin-block-end: var(--s3);
}

.work-cta {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.work-cta::before { content: "."; }

.work-entry:hover .work-cta { color: var(--fg); }

/* Text plate: stands in for a cover image where no public imagery exists. */
.work-plate--text { background: var(--block); }

.work-plate--text .plate-mark {
  font-size: var(--fs-2);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--block-fg);
}

/* Inline external link on non-card entries (e.g. live Telo site). */
.work-link {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.work-link:hover { text-decoration-thickness: 2px; }

/* ---- Education ---- */
.edu {
  display: grid;
  gap: var(--s4);
  margin-block-start: var(--s4);
  counter-reset: edu;
}

@media (min-width: 60rem) {
  .edu {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s6);
  }
}

.edu-step {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-block: 0 var(--s1);
}

.edu-item h3 {
  font-size: var(--fs-2);
  margin-block-end: var(--s1);
}

/* Name blocks start at the logo's edge rather than hanging left of it. */
#previously .edu-item .block { margin-inline-start: 0; }

.edu-item .meta { margin-block-end: var(--s1); }

/* Company logos sit atop each Previously column, filling the column width on
   the same light logo plate the standalone section used. */
.edu-item img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 6rem;
  padding: 0.9rem;
  background: #f1f1f3;
  margin-block-end: var(--s2);
  object-fit: contain;
  object-position: center;
}

/* White wordmarks sit on the dark plate. */
.edu-item img.logo-dark { background: #141414; }

.edu-item p:last-child {
  color: var(--muted);
  margin-block-end: 0;
}

.edu-note {
  font-size: var(--fs-1);
  max-width: 68ch;
  margin-block: var(--s4) 0;
}

/* ---- About ---- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: var(--s6);
  align-items: start;
}

.portrait {
  width: min(16rem, 60%);
}

/* Education merged into About: breathe between the intro split and the
   "How I got to full stack" snap row. */
.split + h3 {
  margin-block-start: var(--s8);
  font-size: var(--fs-2);
}

/* ---- Case study (only archived pages; styles kept for re-use later) ---- */
.context {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: var(--s2) var(--s4);
  border-block: 1px solid var(--line);
  padding-block: var(--s3);
  margin-block: var(--s4) var(--s6);
}

.context dt {
  font-size: var(--fs--1);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.context dd {
  margin: var(--s1) 0 0;
}

.case figure {
  margin-block: var(--s6);
}

.case figure img {
  width: 100%;
  border: 1px solid var(--line);
}

.case figure img + img { margin-block-start: var(--s3); }

/* Portrait product shots: cap the height so a tall render doesn't push the
   article off-screen, and centre it in the text column. */
.case img.portrait {
  width: auto;
  max-height: min(34rem, 70vh);
  margin-inline: auto;
}

.case figcaption {
  font-size: var(--fs--1);
  color: var(--muted);
  margin-block-start: var(--s1);
}

.todo {
  color: var(--muted);
  font-style: italic;
}

/* ---- Password gate (js/gate.js) ---- */
.gate {
  display: grid;
  gap: var(--s2);
  justify-items: start;
  max-width: 24rem;
  border-block: 1px solid var(--line);
  padding-block: var(--s4);
  margin-block: var(--s4) var(--s6);
}

.gate label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.gate input {
  width: 100%;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  padding: var(--s1) var(--s2);
}

.gate button {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: var(--block-fg);
  background: var(--block);
  border: 1px solid var(--block);
  border-radius: var(--radius);
  padding: var(--s1) var(--s3);
}

.gate button:hover,
.gate button:focus-visible { color: var(--gold); }

.gated:focus { outline: none; }

/* ---- Footer / contact / next-nav ---- */
/* The label and heading keep the page's left edge like every section; the
   lede, sub line and form form one form-width column centered on the page. */
.contact { align-items: center; }
.contact > * { width: 100%; max-width: 40rem; }
.contact > .eyebrow,
.contact > h2 { align-self: stretch; max-width: none; }

.contact h2 { margin-block-end: var(--s3); }

/* Primary line leads in the body color at a larger size; the secondary line
   follows smaller and muted. */
.contact-lede {
  font-size: var(--fs-2);
  font-weight: 600;
  line-height: 1.25;
  color: var(--fg);
  margin-block: 0 var(--s1);
}

.contact-sub {
  color: var(--muted);
  margin-block: 0;
}

.contact .big-link {
  display: inline-block;
  font-size: var(--fs-2);
  font-weight: 600;
  background: var(--block);
  color: var(--block-fg);
  padding: 0.2em 0.6em;
  margin-block-start: var(--s2);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.08em;
}

.contact .big-link:hover,
.contact .big-link:focus-visible {
  color: var(--gold);
  text-decoration-thickness: 0.1em;
}

.contact .big-link:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--gold);
}

/* Contact form (Formspree). Square, monochrome, gold only on the black button. */
.contact-form {
  display: grid;
  gap: var(--s2);
  margin-block-start: var(--s3);
}

.contact-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--s2);
}

.contact-field { display: grid; gap: var(--s1); }

.contact-field label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
}

.contact-field textarea { resize: vertical; min-height: 8rem; }

.contact-field input:focus-visible,
.contact-field textarea:focus-visible {
  outline: none;
  border-color: var(--fg);
  box-shadow: 0 0 0 1px var(--fg);
}

.contact-submit {
  justify-self: start;
  font: inherit;
  font-weight: 600;
  background: var(--block);
  color: var(--block-fg);
  border: 1px solid var(--block);
  border-radius: var(--radius);
  padding: 0.7rem 1.4rem;
  cursor: pointer;
}

.contact-submit:hover,
.contact-submit:focus-visible { color: var(--gold); }

.contact-submit:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--gold);
}

.contact-status {
  margin: 0;
  min-height: 1em;
  font-weight: 600;
  color: var(--fg);
}

/* Sent: a solid confirmation block in the site's black-box language. */
.contact-status.is-sent {
  justify-self: start;
  background: var(--block);
  color: var(--block-fg);
  padding: 0.4em 0.8em;
}

.contact-status.is-sent::before { content: "\2713\00a0"; color: var(--gold); }

.next-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--s3);
  border-top: 1px solid var(--line);
  margin-block-start: var(--s8);
  padding-block-start: var(--s4);
}

.next-nav a {
  display: block;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-1);
}

.next-nav .meta { display: block; margin-block-end: var(--s1); }

.site-footer {
  border-top: 1px solid var(--line);
  margin-block-start: var(--s8);
  padding-block: var(--s4);
}

.site-footer .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s1) var(--s3);
}

.site-footer .meta {
  font-size: var(--fs-label);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---- Motion ---- */
@media (prefers-reduced-motion: reduce) {
  html.js { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
