/* Home page components (Figma Portfolio / Home 1328:8455, components 1330:1730).
   Load order: css/tokens.css, css/ds.css, this file (D25). Tokens only
   (scripts/check-tokens.sh). Motion lives in js/home/*.js: components get
   .is-live when their script has set them up, so without JS, under reduced
   motion, or if a script fails, everything stays in normal flow and readable. */

/* ---------- page grid: the shared layout tokens (D13), measured per breakpoint ---------- */
body {
  position: relative; /* the centre line is positioned against the whole document */
  --content: min(var(--layout-content-width), 100% - 2 * var(--layout-margin));
  --col: calc((var(--content) - (var(--layout-columns) - 1) * var(--layout-gutter)) / var(--layout-columns));
  /* text block: 4 columns (desktop/tablet columns 2–5 = Figma's 580px at 1280; phone all 4) */
  --text-width: calc(4 * var(--col) + 3 * var(--layout-gutter));
}
/* No CSS smooth scrolling here: ScrollTrigger measures by scrolling the page and putting it back (on every refresh), and a
   smoothed scroll turns that into an animation it measures in the middle of, which throws pins and the axis off and
   shows as jumps on real devices. Anchor links glide in JS instead (js/home/nav.js). */
html, body { overflow-x: clip; } /* nothing may widen the page sideways; clip (not hidden) keeps pinning and sticky working */
html { overflow-anchor: none; } /* nor may the browser shift the scroll position to keep a pinned section's content in place */
.viewport-probe { position: fixed; top: 0; left: 0; width: 0; height: 100vh; height: 100svh; visibility: hidden; pointer-events: none; } /* js/home/viewport.js: the small viewport height; it is frozen as --stage-h, which every screen-tall box below uses (D82: in an Android WebView 100svh moves with the toolbar) */
.home { position: relative; z-index: 1; } /* above the centre line */
.home > section, .home > .work { scroll-margin-top: calc(var(--size-header) - var(--layout-section-padding-y)); }
.home > .hero, .home > .contact { scroll-margin-top: 0; }

/* ---------- header (1328:9259): fixed, the page scrolls behind its fade ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: var(--site-header-z);
  height: var(--size-header);
  display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); align-items: center;
  padding-inline: var(--inset-wide);
  pointer-events: none; /* the fade doesn't block clicks on the content under it */
}
.site-header::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--site-header-gradient); opacity: var(--header-fade, 1); pointer-events: none; } /* with the weather on the background the fade starts at 0 and comes in as the page scrolls (js/home/bg-sky.js) */
.site-header > * { pointer-events: auto; }
.site-header__end { display: flex; justify-content: flex-end; }

/* ---------- location widget (1330:1746) ---------- */
.location-widget { display: flex; align-items: center; gap: var(--gap-group); }
.location-widget__photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.location-widget__text { white-space: nowrap; }
.location-widget__text time { font-variant-numeric: tabular-nums; }
.location-widget__sep:has(+ time:empty) { display: none; } /* no JS: place only */
/* The caption is stacked at every width (Figma 1816:3614): place over time beside the tile; its type is the header label (see the glass block below). */
.location-widget__sep { display: none; }
.location-widget--inline { display: none; } /* phones: the widget moves from the header into the hero */

/* The tile is a button: it moves the weather between the page background and the tile (js/home/weather-view.js, html[data-weather-view]).
   Figma: weather on the background = a tinted tile with the sky's icon (1809:2130); weather in the widget = the sky itself (1809:2665); the badge's arrow points to where the weather is. */
.location-widget__tile { position: relative; flex-shrink: 0; width: var(--location-widget-tile); height: var(--location-widget-tile); padding: 0; border: 0; border-radius: var(--radius-compact); background: none; color: var(--text-body); cursor: pointer; display: block; }
.location-widget__tile:disabled { cursor: default; } /* no script yet: the tile is only a picture */
.location-widget__face { position: absolute; inset: 0; overflow: hidden; isolation: isolate; border-radius: var(--radius-compact); display: grid; place-items: center; }
.location-widget__badge { position: absolute; left: calc(var(--location-widget-tile) - 16px); top: calc(var(--location-widget-tile) - 12px); display: flex; padding: 2px; border-radius: var(--radius-6); background: var(--surface-accent); } /* @raw-ok measure: the 24px badge's centre sits on the pill's bottom edge: 44 of the 56px tile, so it overhangs by 12px (Ioli, 2026-11-10; was 40, 4px high) */
.location-widget__glyph { display: block; width: var(--size-icon-20); height: var(--size-icon-20); background: currentColor; -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat; }
.location-widget__glyph--sky { display: none; width: var(--size-icon-16); height: var(--size-icon-16); } /* the sky's icon: 16px, Bold (Figma 1835:4200) */
/* ---------- header surfaces: frosted glass (Figma component set "Header", 1835:4421; D58, D59) ----------
   White at 50% with a 30px backdrop blur, text --text-on-light: measured 5.2:1 or better over all 28 weather states (the old tints failed in 24 of them).
   Every surface is 56px tall and a full pill: the widget (tile + caption, one capsule), the nav bar, the résumé pill, the phone menu button.
   The type is the Martian Mono header label: 10px, uppercase, tracked. */
.site-header .location-widget, .site-header .top-nav {
  height: var(--site-header-control);
  background: var(--site-header-glass); -webkit-backdrop-filter: blur(var(--site-header-glass-blur)); backdrop-filter: blur(var(--site-header-glass-blur));
}
.site-header .location-widget { width: fit-content; gap: var(--gap-stack); padding-right: var(--inset-card); border-radius: var(--radius-pill); } /* the caption: 12px after the tile, 20px before the edge (Figma 1835:4201) */
.site-header .location-widget__tile, .site-header .location-widget__face { border-radius: var(--radius-pill) 0 0 var(--radius-pill); } /* the tile is the pill's rounded left half; the glass is the right half (Figma 1835:4199) */
.site-header .location-widget__tile { color: var(--text-on-light); }
.location-widget__badge { color: var(--text-body); } /* the arrow stays white on the accent */
.site-header .location-widget__text, .site-header .top-nav__item {
  font: var(--site-header-label); text-transform: uppercase; letter-spacing: var(--site-header-tracking); color: var(--text-on-light);
}
.site-header .location-widget__text { margin: 0; } /* one line: "Málaga, 17:52" (Figma 1835:4202) */
.site-header .location-widget__sep { display: inline; }
/* Focus on the glass: the page's pale ring (--focus-ring) vanishes on pale glass (1.1:1 to 1.5:1 measured in the review of D58), so the ring is indigo and sits inside the control, always on the glass. */
.site-header :focus-visible, .menu-toggle:focus-visible { outline-color: var(--focus-ring-on-light); outline-offset: calc(var(--border-2) * -1); }
/* The tile and the avatar hold artwork that paints over an inside ring (the review of D59: the ring vanished on the photo and on the sky), so theirs sits outside: a pale ring against the control and a dark one around it, readable on the glass, the sky and the night. */
.site-header .location-widget__tile:focus-visible, .site-header .top-nav__avatar:focus-visible { outline-offset: var(--border-2); box-shadow: 0 0 0 var(--border-2) var(--focus-ring); }
.location-widget__badge .location-widget__glyph { --glyph: url(../assets/icons/weather/arrow-down-right.svg); }
html[data-weather-view="bg"] .location-widget__badge .location-widget__glyph { --glyph: url(../assets/icons/weather/arrow-up-left.svg); }
/* the sky's icon, set by js/home/weather-view.js from the same scene the sky is drawn from (Phosphor Bold at 16px, as Figma's Sun, 1835:4200; the badge's arrows stay Regular, 1835:4204) */
.location-widget__glyph[data-icon="sun"] { --glyph: url(../assets/icons/weather/sun.svg); }
.location-widget__glyph[data-icon="moon"] { --glyph: url(../assets/icons/weather/moon.svg); }
.location-widget__glyph[data-icon="cloud-sun"] { --glyph: url(../assets/icons/weather/cloud-sun.svg); }
.location-widget__glyph[data-icon="cloud-moon"] { --glyph: url(../assets/icons/weather/cloud-moon.svg); }
.location-widget__glyph[data-icon="cloud"] { --glyph: url(../assets/icons/weather/cloud.svg); }
.location-widget__glyph[data-icon="cloud-fog"] { --glyph: url(../assets/icons/weather/cloud-fog.svg); }
.location-widget__glyph[data-icon="cloud-rain"] { --glyph: url(../assets/icons/weather/cloud-rain.svg); }
.location-widget__glyph[data-icon="cloud-snow"] { --glyph: url(../assets/icons/weather/cloud-snow.svg); }
.location-widget__glyph[data-icon="cloud-lightning"] { --glyph: url(../assets/icons/weather/cloud-lightning.svg); }

/* Sky tile (D56): drawn from the live weather and the sun's height. js/home/weather.js sets data-sky (the condition) with
   data-sky-cover and data-sky-intensity; js/home/sky.js builds the layers and sets the palette (--sky-*) from the tokens.
   Until weather.js has data, and without JS, the photo stays. */
.location-widget__sky { display: none; }
.location-widget[data-sky] .location-widget__photo { display: none; }
.location-widget[data-sky] .location-widget__sky { display: block; }
/* weather on the background: the tile is tinted and shows the icon; the page gets the sky (.location-widget-bg) */
html[data-weather-view="bg"] .location-widget[data-sky] .location-widget__sky { display: none; }
html[data-weather-view="bg"] .location-widget[data-sky] .location-widget__glyph--sky { display: block; }

/* @raw-ok:start artwork: the sky is drawn on the 44px tile; shapes, positions and timings measured on its prototype */
.location-widget__sky {
  /* palette: day by default; sky.js sets these from the stage tokens, the sun's height and the weather */
  --sky-top: var(--location-widget-sky-day-top); --sky-mid: var(--location-widget-sky-day-mid); --sky-bot: var(--location-widget-sky-day-bot);
  --sky-hi: var(--location-widget-sky-day-hi); --sky-lo: var(--location-widget-sky-day-lo);
  --sky-hz: var(--location-widget-sky-horizon); --sky-hzo: 0; --sky-hzx: 50%;
  --sky-halo: color-mix(in srgb, var(--location-widget-sky-sun-halo-high) 85%, transparent);
  --sky-core: var(--location-widget-sky-sun-core-high);
  --sky-stars: 0; --sky-drop: var(--location-widget-sky-drop);
  position: absolute; left: 0; top: 0; isolation: isolate;
  width: 44px; height: 44px; /* the artwork's own size; the tile scales it, the face clips and rounds it */
  transform: scale(var(--location-widget-sky-scale)); transform-origin: 0 0;
  background: linear-gradient(to bottom, var(--sky-top), var(--sky-mid) 55%, var(--sky-bot));
}
.location-widget__sky * { position: absolute; box-sizing: border-box; }
.location-widget__horizon { inset: 0; background: radial-gradient(ellipse 95% 55% at var(--sky-hzx) 108%, var(--sky-hz), transparent 72%); opacity: var(--sky-hzo); }

/* stars */
.location-widget__stars { inset: 0; opacity: var(--sky-stars); }
.location-widget__stars i { width: 0.7px; height: 0.7px; border-radius: 50%; background: var(--location-widget-sky-white); animation: sky-twinkle 3.2s ease-in-out infinite; }

/* sun: no disc, only its glow flickering (by day its centre is above the frame), flares and a light sheen; the moon keeps its shape */
.location-widget__sun, .location-widget__moon { left: 0; top: 0; width: 0; height: 0; }
.location-widget__sun .location-widget__halo { width: 42px; height: 42px; left: -21px; top: -21px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--location-widget-sky-white) 95%, transparent) 0%, var(--sky-halo) 24%, transparent 70%); animation: sky-glare 4.7s ease-in-out infinite; }
.location-widget__halo2 { width: 20px; height: 20px; left: -10px; top: -10px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--location-widget-sky-white) 90%, transparent), transparent 70%); animation: sky-glare2 3.1s ease-in-out infinite; }
.location-widget__moon .location-widget__halo { width: 34px; height: 34px; left: -17px; top: -17px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--location-widget-sky-glow) 55%, transparent) 0%, transparent 66%); animation: sky-halo 6s ease-in-out infinite alternate; }
.location-widget__core { width: 9px; height: 9px; left: -4.5px; top: -4.5px; border-radius: 50%; box-shadow: inset -3px 0 0 var(--sky-core); transform: rotate(-18deg); }
.location-widget__sheen { inset: -6px; background: linear-gradient(115deg, transparent 28%, color-mix(in srgb, var(--location-widget-sky-white) 20%, transparent) 47%, transparent 66%); animation: sky-sheen 11s ease-in-out infinite alternate; }
.location-widget__flare { --flo: 0.6; --fx: 0px; --fy: 0px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--location-widget-sky-white) 55%, transparent), color-mix(in srgb, var(--location-widget-sky-white) 10%, transparent) 70%, transparent); opacity: var(--flo); animation: sky-flare 7s ease-in-out infinite; }

/* clouds: one cumulus shape (a pill with two round bumps, one vertical gradient), drifting sideways; kept soft and translucent */
.location-widget__clouds { inset: 0; }
.location-widget__cloud { --amp: 8px; --dur: 24s; --del: 0s; animation: sky-drift var(--dur) ease-in-out infinite alternate; animation-delay: var(--del); }
.location-widget__mass { --amp: 6px; --dur: 30s; --del: 0s; border-radius: 50%; animation: sky-drift var(--dur) ease-in-out infinite alternate; animation-delay: var(--del); } /* fog and storm: a soft shaded mass drifting over the image */
.location-widget__cloud svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; filter: blur(0.9px); }

/* fog (and the storm sky): the banded violet-lead image from the design, drifting sideways; recoloured for dawn, dusk and night by gradient maps */
.location-widget__fog { left: -100px; top: -194px; width: 297px; height: 297px; background: url(../assets/images/home/sky-fog.png) 0 0 / 100% 100% no-repeat; will-change: transform; filter: saturate(0.75) brightness(1.08); animation: sky-bgfogdrift 40s ease-in-out infinite alternate; } /* the page background's fog at the tile's scale: the same square image, a window of 44px onto its lower bands (the background shows 253px of its 410px sky, 44 / 253), not the whole image */
.location-widget__fog--b { left: -90px; top: -160px; width: 267px; height: 267px; opacity: 0.55; scale: -1 1; animation: sky-bgfogdrift2 67s ease-in-out infinite alternate-reverse, sky-fogsway 19s ease-in-out infinite alternate; } /* the second, mirrored copy (the background's: 0.9 size, higher, slower) */
.location-widget__fade { inset: 0; background: linear-gradient(to bottom, color-mix(in srgb, var(--surface-page) 0%, transparent), color-mix(in srgb, var(--surface-page) 2%, transparent) 20%, color-mix(in srgb, var(--surface-page) 11%, transparent) 40%, color-mix(in srgb, var(--surface-page) 27%, transparent) 60%, color-mix(in srgb, var(--surface-page) 45%, transparent) 80%, color-mix(in srgb, var(--surface-page) 65%, transparent)); } /* the background's fade into the page colour over the part the tile shows, so fog and storm are as dark as on the page */
.location-widget__fog--dawn { filter: url(#location-widget-fog-dawn) saturate(0.75); }
.location-widget__fog--dusk { filter: url(#location-widget-fog-dusk) saturate(0.6); }
.location-widget__fog--night { filter: url(#location-widget-fog-night) saturate(0.8) brightness(1.5); }
.location-widget__fog--storm { filter: saturate(0.6) contrast(1.7) brightness(0.98); }
.location-widget__fog--storm.location-widget__fog--dawn { filter: url(#location-widget-fog-dawn) contrast(1.5) brightness(0.72) saturate(0.65); }
.location-widget__fog--storm.location-widget__fog--dusk { filter: url(#location-widget-fog-dusk) contrast(1.5) brightness(0.72) saturate(0.5); }
.location-widget__fog--storm.location-widget__fog--night { filter: url(#location-widget-fog-night) contrast(1.5) brightness(1.75) saturate(0.55); }

/* rain: drops of one length, thickness and speed, evenly spread (sky.js sets the count, length, slant and speed per condition) */
.location-widget__rain, .location-widget__snow { inset: 0; }
.location-widget__rain i { --a: 0deg; --dx: 0px; --ty: 0px; width: 0.4px; top: -16px; opacity: 0.5; background: linear-gradient(to bottom, transparent, var(--sky-drop)); transform-origin: 50% 0; animation: sky-fall linear infinite; }
/* snow: small equal flakes with a faded outline, like the night stars */
.location-widget__snow i { --sa: 0.95; --sw: 0px; --ty: 0px; width: 1.5px; height: 1.5px; top: -4px; opacity: 0.9; border-radius: 50%; filter: blur(0.3px); background: radial-gradient(circle, color-mix(in srgb, var(--location-widget-sky-white) calc(var(--sa) * 100%), transparent) 14%, color-mix(in srgb, var(--location-widget-sky-white) calc(var(--sa) * 40%), transparent) 40%, transparent 72%); animation: sky-snow linear infinite; }
/* storm: a rare flash and a thin, faint jagged line (no icon) */
.location-widget__flash { inset: 0; opacity: 0; background: radial-gradient(ellipse 90% 70% at 50% 25%, color-mix(in srgb, var(--location-widget-sky-white) 90%, transparent), color-mix(in srgb, var(--location-widget-sky-flash-tint) 30%, transparent) 60%, transparent); animation: sky-flash 7s linear infinite; }
.location-widget__bolt { inset: 0; width: 100%; height: 100%; opacity: 0; filter: drop-shadow(0 0 1.2px color-mix(in srgb, var(--location-widget-sky-glow) 90%, transparent)); animation: sky-strike 7s linear infinite; }
.location-widget__bolt polyline { fill: none; stroke: var(--location-widget-sky-white); stroke-width: 0.7; stroke-linejoin: round; stroke-linecap: round; }

@keyframes sky-drift { from { transform: translateX(calc(var(--amp) * -1)); } to { transform: translateX(var(--amp)); } }
@keyframes sky-fogsway { from { translate: 0 -2.4px; } to { translate: 0 2.4px; } } /* the background's ±14px at the tile's scale */
@keyframes sky-fall { from { transform: translate(0, 0) rotate(var(--a)); } to { transform: translate(var(--dx), 66px) rotate(var(--a)); } }
@keyframes sky-snow { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(var(--sw), 24px); } 90% { opacity: 1; } 100% { transform: translate(0, 52px); opacity: 0; } }
@keyframes sky-twinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes sky-sheen { from { transform: translateX(-16px); } to { transform: translateX(16px); } }
@keyframes sky-halo { from { transform: scale(0.92); opacity: 0.75; } to { transform: scale(1.18); opacity: 1; } }
@keyframes sky-glare { 0% { opacity: 0.7; transform: scale(0.95); } 12% { opacity: 1; transform: scale(1.1); } 24% { opacity: 0.72; } 38% { opacity: 0.95; transform: scale(1); } 55% { opacity: 0.58; transform: scale(0.96); } 70% { opacity: 1; transform: scale(1.16); } 84% { opacity: 0.8; } 100% { opacity: 0.7; transform: scale(0.95); } }
@keyframes sky-glare2 { 0%, 100% { opacity: 0.25; } 10% { opacity: 0.95; } 22% { opacity: 0.3; } 41% { opacity: 0.8; } 47% { opacity: 0.2; } 66% { opacity: 1; } 80% { opacity: 0.35; } }
@keyframes sky-flare { 0% { transform: translate(0, 0); opacity: 0.1; } 18% { opacity: var(--flo); } 30% { opacity: 0.15; } 52% { opacity: var(--flo); transform: translate(var(--fx), var(--fy)); } 70% { opacity: 0.12; } 100% { transform: translate(0, 0); opacity: var(--flo); } }
@keyframes sky-strike { 0%, 88%, 92%, 100% { opacity: 0; } 89% { opacity: 0.9; } 90% { opacity: 0.25; } 91% { opacity: 0.8; } }
@keyframes sky-flash { 0%, 88%, 92%, 100% { opacity: 0; } 89% { opacity: 0.55; } 90% { opacity: 0.1; } 91% { opacity: 0.4; } }

/* Reduced motion (the OS setting, D26): one still frame that keeps the content: clouds at their start, fog as the image is, drops caught mid-fall, no flash or line. */
@media (prefers-reduced-motion: reduce) {
  .location-widget__sky *, .location-widget__sky *::before, .location-widget__sky *::after { animation: none !important; } /* !important: it must beat every layer's own animation, whatever its specificity */
  .location-widget__fog { will-change: auto; }
  .location-widget__rain i, .location-widget__snow i { top: var(--ty); }
}
/* @raw-ok:end */

/* ---------- weather on the page background (Figma 1809:2124, 1809:2159): the same sky, drawn across the top of the hero ---------- */
/* js/home/bg-sky.js builds the layers from the scene js/home/sky.js reads (palette, sun height, condition); it exists only while
   html[data-weather-view="bg"]. It is fixed to the first screen's height and fades into the page colour by the bottom of the screen. It never moves:
   as the page scrolls it fades out (js/home/bg-sky.js), and the header's fade comes in with it (--header-fade). */
.hero { position: relative; }
[data-bg-sky] { display: none; }
html[data-weather-view="bg"] [data-bg-sky] { display: block; }
/* @raw-ok:start artwork: the background sky is drawn at the hero's size; shapes, positions and timings measured on its prototype (prototypes/bg-weather.html) */
.location-widget-bg.is-offscreen { visibility: hidden; }
.location-widget-bg.is-offscreen *, .location-widget-bg.is-offscreen *::before, .location-widget-bg.is-offscreen *::after { animation-play-state: paused; } /* js/home/bg-sky.js: faded out, nothing runs (D83) */
.location-widget-bg {
  --sky-top: var(--location-widget-sky-day-top); --sky-mid: var(--location-widget-sky-day-mid); --sky-bot: var(--location-widget-sky-day-bot);
  --sky-hi: var(--location-widget-sky-day-hi); --sky-lo: var(--location-widget-sky-day-lo);
  --sky-hz: var(--location-widget-sky-horizon); --sky-hzo: 0; --sky-hzx: 50%;
  --sky-halo: color-mix(in srgb, var(--location-widget-sky-sun-halo-high) 85%, transparent);
  --sky-core: var(--location-widget-sky-sun-core-high);
  --sky-stars: 0; --sky-drop: var(--location-widget-sky-drop); --fall: 520px; --pw: 1;
  position: fixed; z-index: -1; top: 0; left: 0; right: 0; height: 100vh; height: var(--stage-h, 100svh);
  pointer-events: none; overflow: hidden; isolation: isolate; /* the fade below is one smooth ease (smoothstep from 5% to 100%): no kink in the slope, none at the bottom edge */
  background: linear-gradient(to bottom, var(--sky-top), var(--sky-mid) 55%, var(--sky-bot));
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1.000) 0%, rgba(0,0,0,1.000) 5%, rgba(0,0,0,0.992) 10%, rgba(0,0,0,0.969) 15%, rgba(0,0,0,0.933) 20%, rgba(0,0,0,0.886) 25%, rgba(0,0,0,0.829) 30%, rgba(0,0,0,0.764) 35%, rgba(0,0,0,0.693) 40%, rgba(0,0,0,0.617) 45%, rgba(0,0,0,0.539) 50%, rgba(0,0,0,0.461) 55%, rgba(0,0,0,0.383) 60%, rgba(0,0,0,0.307) 65%, rgba(0,0,0,0.236) 70%, rgba(0,0,0,0.171) 75%, rgba(0,0,0,0.114) 80%, rgba(0,0,0,0.067) 85%, rgba(0,0,0,0.031) 90%, rgba(0,0,0,0.008) 95%, rgba(0,0,0,0.000) 100%);
          mask-image: linear-gradient(to bottom, rgba(0,0,0,1.000) 0%, rgba(0,0,0,1.000) 5%, rgba(0,0,0,0.992) 10%, rgba(0,0,0,0.969) 15%, rgba(0,0,0,0.933) 20%, rgba(0,0,0,0.886) 25%, rgba(0,0,0,0.829) 30%, rgba(0,0,0,0.764) 35%, rgba(0,0,0,0.693) 40%, rgba(0,0,0,0.617) 45%, rgba(0,0,0,0.539) 50%, rgba(0,0,0,0.461) 55%, rgba(0,0,0,0.383) 60%, rgba(0,0,0,0.307) 65%, rgba(0,0,0,0.236) 70%, rgba(0,0,0,0.171) 75%, rgba(0,0,0,0.114) 80%, rgba(0,0,0,0.067) 85%, rgba(0,0,0,0.031) 90%, rgba(0,0,0,0.008) 95%, rgba(0,0,0,0.000) 100%);
}
.location-widget-bg * { position: absolute; box-sizing: border-box; }
.location-widget-bg__horizon { inset: 0; background: radial-gradient(ellipse 95% 55% at var(--sky-hzx) 108%, var(--sky-hz), transparent 72%); opacity: var(--sky-hzo); }
.location-widget-bg__stars { inset: 0 0 68% 0; opacity: var(--sky-stars); }
.location-widget-bg__stars i { border-radius: 50%; background: var(--location-widget-sky-white); animation: sky-twinkle 3.2s ease-in-out infinite; }
.location-widget-bg__sun, .location-widget-bg__moon { left: 0; top: 0; width: 0; height: 0; }
.location-widget-bg__halo { --d: clamp(320px, 41vw, 529px); width: var(--d); height: var(--d); left: calc(var(--d) / -2); top: calc(var(--d) / -2); border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--location-widget-sky-white) 95%, transparent) 0%, var(--sky-halo) 24%, transparent 70%); animation: sky-glare 4.7s ease-in-out infinite; }
.location-widget-bg__halo2 { --d: clamp(150px, 20vw, 250px); width: var(--d); height: var(--d); left: calc(var(--d) / -2); top: calc(var(--d) / -2); border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--location-widget-sky-white) 90%, transparent), transparent 70%); animation: sky-glare2 3.1s ease-in-out infinite; }
.location-widget-bg__sheen { inset: -10%; background: linear-gradient(115deg, transparent 28%, color-mix(in srgb, var(--location-widget-sky-white) 20%, transparent) 47%, transparent 66%); animation: sky-bgsheen 11s ease-in-out infinite alternate; }
.location-widget-bg__flare { --flo: 0.5; --fx: 0px; --fy: 0px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--location-widget-sky-white) 55%, transparent), color-mix(in srgb, var(--location-widget-sky-white) 10%, transparent) 70%, transparent); opacity: var(--flo); animation: sky-flare 8s ease-in-out infinite; }
.location-widget-bg__moon .location-widget-bg__halo { --d: 220px; background: radial-gradient(circle, color-mix(in srgb, var(--location-widget-sky-glow) 50%, transparent) 0%, transparent 66%); animation: sky-halo 6s ease-in-out infinite alternate; }
.location-widget-bg__core { width: 52px; height: 52px; left: -26px; top: -26px; border-radius: 50%; box-shadow: inset -16px 0 0 var(--sky-core); transform: rotate(-18deg); filter: blur(0.8px); } /* the disc's edge softened a hair, so it does not read as cut paper */
.location-widget-bg__fog { --sz: var(--fs); --at: var(--fy); left: 0; width: var(--sz); height: var(--sz); top: calc(var(--at) - 0.75 * var(--sz)); background: url(../assets/images/home/sky-fog.png) 0 0 / 100% 100% no-repeat; will-change: transform; animation: sky-bgfogdrift 40s ease-in-out infinite alternate; } /* the image is square: one big square (js/home/bg-sky.js sets --fs, --fy), never tiled and never stretched, placed so its bright swoosh (75% down the image) sits at --fy; it drifts sideways inside its overscan */
.location-widget-bg__fog { -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent); mask-image: linear-gradient(to bottom, #000 80%, transparent); } /* the screen-tall layer no longer hides the square image's bottom edge: it fades out instead (D92) */
.location-widget-bg__fog--b { --sz: calc(var(--fs) * 0.9); --at: calc(var(--fy) * 1.4); opacity: 0.55; scale: -1 1; animation: sky-bgfogdrift2 67s ease-in-out infinite alternate-reverse, sky-bgfogsway 19s ease-in-out infinite alternate; } /* a second, mirrored copy at another size, height and speed, so the layers never line up */
.location-widget-bg__fog--dawn { filter: url(#location-widget-fog-dawn); }
.location-widget-bg__fog--dusk { filter: url(#location-widget-fog-dusk); }
.location-widget-bg__fog--night { filter: url(#location-widget-fog-night); }
.location-widget-bg__fog--storm { filter: contrast(1.7) brightness(0.62); }
.location-widget-bg__fog--storm.location-widget-bg__fog--dawn { filter: url(#location-widget-fog-dawn) contrast(1.5) brightness(0.72); }
.location-widget-bg__fog--storm.location-widget-bg__fog--dusk { filter: url(#location-widget-fog-dusk) contrast(1.5) brightness(0.72); }
.location-widget-bg__fog--storm.location-widget-bg__fog--night { filter: url(#location-widget-fog-night) contrast(1.5) brightness(0.72); }
.location-widget-bg__clouds { inset: 0; }
.location-widget-bg__cloud { --amp: 40px; --dur: 26s; --del: 0s; animation: sky-drift var(--dur) ease-in-out infinite alternate, sky-bgbreathe calc(var(--dur) * 0.6) ease-in-out infinite alternate; animation-delay: var(--del); } /* a soft mass (its shape is gradients set by js/home/bg-sky.js): drifts sideways and breathes slowly */
.location-widget-bg__brush { --bo: 0.08; left: 10%; top: 14%; width: 70%; height: 90px; rotate: -4deg; opacity: var(--bo); background: radial-gradient(ellipse 50% 50% at 50% 50%, var(--sky-hi) 0%, transparent 100%); --amp: 90px; animation: sky-drift 60s ease-in-out infinite alternate; } /* clear sky: one very faint brushed streak */
.location-widget-bg__rain, .location-widget-bg__snow { inset: 0; }
.location-widget-bg__rain i { --a: 0deg; --dx: 0px; --ty: 0px; width: calc(1.4px * var(--pw)); top: -40px; opacity: 0.45; background: linear-gradient(to bottom, transparent, var(--sky-drop)); transform-origin: 50% 0; animation: sky-bgfall linear infinite; }
.location-widget-bg__snow i { --sw: 0px; --ty: 0px; width: calc(4.5px * var(--pw)); height: calc(4.5px * var(--pw)); top: calc(-9px * var(--pw)); border-radius: 50%; background: radial-gradient(circle, var(--location-widget-sky-white) 40%, color-mix(in srgb, var(--location-widget-sky-white) 55%, transparent) 65%, transparent 100%); animation: sky-bgsnow linear infinite; }
.location-widget-bg__flash { inset: 0; opacity: 0; background: radial-gradient(ellipse 90% 70% at 62% 25%, color-mix(in srgb, var(--location-widget-sky-white) 90%, transparent), color-mix(in srgb, var(--location-widget-sky-flash-tint) 30%, transparent) 60%, transparent); animation: sky-flash 7s linear infinite; }
.location-widget-bg__bolt { left: 62%; top: 0; width: 120px; height: 62%; opacity: 0; overflow: visible; filter: drop-shadow(0 0 3px color-mix(in srgb, var(--location-widget-sky-glow) 90%, transparent)); animation: sky-strike 7s linear infinite; }
.location-widget-bg__bolt polyline { fill: none; stroke: var(--location-widget-sky-white); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }

@keyframes sky-bgfogdrift { from { transform: translateX(0); } to { transform: translateX(-22%); } }
@keyframes sky-bgfogdrift2 { from { transform: translateX(0); } to { transform: translateX(12%); } } /* the layer is mirrored (scale: -1 1), which flips its transform: +12% moves it left on screen */
@keyframes sky-bgfogsway { from { translate: 0 -14px; } to { translate: 0 14px; } }
@keyframes sky-bgbreathe { from { scale: 1; opacity: 0.85; } to { scale: 1.07; opacity: 1; } }
@keyframes sky-bgsheen { from { transform: translateX(-60px); } to { transform: translateX(60px); } }
@keyframes sky-bgfall { from { transform: translate(0, 0) rotate(var(--a)); } to { transform: translate(var(--dx), var(--fall)) rotate(var(--a)); } }
@keyframes sky-bgsnow { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(var(--sw), calc(var(--fall) * 0.45)); } 90% { opacity: 1; } 100% { transform: translate(0, var(--fall)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .location-widget-bg *, .location-widget-bg *::before, .location-widget-bg *::after { animation: none !important; }
  .location-widget-bg__fog { will-change: auto; }
  .location-widget-bg__rain i, .location-widget-bg__snow i { top: var(--ty); }
}
/* @raw-ok:end */

/* ---------- top navigation (Figma 1835:4287, items 1835:4263, avatar 1835:4256) ---------- */
.top-nav {
  position: relative; /* holds the sliding pill */
  display: flex; align-items: center; gap: var(--gap-stack);
  padding: var(--inset-tight) var(--inset-compact) var(--inset-tight) var(--inset-tight);
  border-radius: var(--radius-pill);
}
.top-nav__avatar { position: relative; display: block; width: var(--top-nav-avatar); height: var(--top-nav-avatar); border-radius: var(--radius-pill); flex-shrink: 0; }
.top-nav__avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Avatar states (Figma 1835:4256): Default is the whole picture, Active (the hero is in view) a closer crop, Hover the closest; Hover wins while the pointer is on it (D72). Same 40px box, no ring. */
.top-nav__avatar-img--hover, .top-nav__avatar-img--active { opacity: 0; }
.top-nav__avatar[aria-current] .top-nav__avatar-img--active { opacity: 1; }
@media (hover: hover) { .top-nav__avatar:hover .top-nav__avatar-img--hover { opacity: 1; z-index: 1; } } /* hovered, the avatar wears the Hover artwork even while Active (D72); a tap leaves :hover stuck on touch screens, so only where there is a pointer */
.top-nav__list { display: flex; align-items: center; gap: var(--gap-stack); list-style: none; margin: 0; padding: 0; }
/* Items (Figma 1835:4273): Default text on light, Active a tint behind the text; Hover see below (not the Figma accent text). */
.top-nav__item {
  display: block; padding: var(--spacing-4) var(--inset-compact);
  border-radius: var(--radius-pill);
  text-decoration: none; white-space: nowrap;
}
.top-nav__item { position: relative; z-index: 1; } /* above the pill */
/* The tap target is the whole control, not the 22px label: an invisible area as high as the nav and half a gap wider each side, so a tap on the glass above, below or between the labels lands on an item (a11y review 2026-11-10, N2). The look is unchanged. */
.top-nav__item::after { content: ''; position: absolute; top: calc((var(--top-nav-avatar) + 2 * var(--inset-tight) - 100%) / -2); bottom: calc((var(--top-nav-avatar) + 2 * var(--inset-tight) - 100%) / -2); left: calc(var(--gap-stack) / -2); right: calc(var(--gap-stack) / -2); }
.top-nav__item[aria-current] { background: var(--surface-tint); }
/* With the pill (js/home/nav.js adds .is-live) the item itself has no background;
   the pill slides to the active item. */
.top-nav__pill { display: none; }
.top-nav.is-live .top-nav__pill {
  display: block; position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 0;
  border-radius: var(--radius-pill); background: var(--surface-tint);
  pointer-events: none; opacity: 0; transition: opacity var(--duration-200) var(--ease-fast-out-slow-in);
}
.top-nav.is-live .top-nav__item[aria-current] { background: none; }
.site-header .top-nav__item:hover { background: var(--surface-tint-hover); } /* Figma 1835:4276 has accent text on hover: 1.6:1 to 4.1:1 on the glass in all 28 weather states (4.5:1 needed for 10px text), so hover is a stronger tint behind the on-light text (6.3:1 or better; D59) */


/* ---------- phone menu (Figma 1716:8084): the toggle morphs list → X, the overlay fades in and
   the links rise in turn. Transition taken from zainabkabira.com's menu. Phones only. ---------- */
.menu-toggle, .menu { display: none; }

/* ---------- buttons (1328:8911): primary accent, secondary tint; optional 16px icon ---------- */
.btn {
  position: relative; isolation: isolate; /* holds the hover layer under the label */
  display: inline-flex; align-items: center; justify-content: center; gap: var(--spacing-6);
  min-width: 140px; /* @raw-ok measure: one-off, the buttons' minimum width (Figma 1328:8911) */
  height: var(--size-touch); padding: var(--inset-compact) var(--spacing-16);
  border-radius: var(--radius-pill);
  color: var(--text-body); text-decoration: none; white-space: nowrap;
  transition: background-color var(--duration-200) var(--ease-fast-out-slow-in);
}
.btn--primary { background: var(--surface-accent); }
.btn--secondary { background: var(--surface-tint); }
/* Hover (1360:9352): primary takes gradient/angular-accent, stretched to the button like
   Figma's fill (the PNG is baked in normalised space); it cross-fades in. */
.btn--primary::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--gradient-angular-accent) center / 100% 100% no-repeat;
  opacity: 0; transition: opacity var(--duration-200) var(--ease-fast-out-slow-in);
}
.btn--primary:is(:hover, :focus-visible)::before { opacity: 1; }
.btn--secondary:is(:hover, :focus-visible) { background: var(--surface-tint-hover); } /* 1360:9358 */
.btn__icon { width: var(--size-icon-16); height: var(--size-icon-16); display: block; flex-shrink: 0; }

/* ---------- hint: a name on hover (graph stickers, colophon logos) ----------
   No Figma design; built from existing tokens (D26, D28). Hover only: the alt text
   or aria-label of the item carries the same name for screen readers. */
.hint-host { position: relative; display: inline-flex; }
.hint {
  position: absolute; left: 50%; transform: translateX(-50%); z-index: var(--hint-z);
  padding: var(--inset-tight) var(--inset-compact);
  border-radius: var(--radius-compact);
  background: var(--surface-tint); color: var(--text-body);
  white-space: nowrap; pointer-events: none; opacity: 0;
  transition: opacity var(--duration-200) var(--ease-fast-out-slow-in);
}
.hint--above { bottom: calc(100% + var(--gap-tight)); } /* the colophon is at the page end */
.hint-host:hover > .hint { opacity: 1; }

/* ---------- section heads (label → text 20; heading → text 12, or 20 in hero/contact) ---------- */
.section-head {
  position: relative; z-index: 0; /* holds the axis mask below its text */
  display: flex; flex-direction: column; align-items: center; gap: var(--gap-group);
  width: var(--text-width); margin-inline: auto; text-align: center;
}
.section-head__text { display: flex; flex-direction: column; gap: var(--gap-stack); width: 100%; text-align: center; }
.section-head__text--loose { gap: var(--gap-group); }
.section-label { color: var(--text-accent); text-align: center; }
.section-label__type { display: inline-block; } /* js/home/label-type.js clips this to type the label in */
/* Axis mask: a page-coloured bar behind the text block hides the centre line, with
   24px clear above and below; it moves with the text, so it masks while pinned too. */
.section-head::before, .work__label::before {
  content: ''; position: absolute; z-index: -1; left: 50%;
  top: calc(-1 * var(--spacing-24)); bottom: calc(-1 * var(--spacing-24));
  width: calc(4 * var(--border-2)); margin-left: calc(-2 * var(--border-2));
  background: var(--surface-page);
}

/* ---------- emoji: played once when they cross the middle of the screen ----------
   js/home/emoji.js adds .is-played; same approach as the Gemstones meta-card and round icons
   (css/work-gemstones.css), original motions in the spirit of Noto Emoji Animation, not its assets.
   Reduced motion: none of them move. */
.emoji { display: inline-block; font-style: normal; } /* upright: the headings are italic, and a slanted emoji looks distorted */
.emoji[data-emoji="wave"] { transform-origin: 70% 70%; }  /* the wrist */
.emoji[data-emoji="brush"] { transform-origin: 80% 20%; } /* the handle end */
.emoji[data-emoji="pop"] { transform-origin: 50% 60%; }
.emoji.is-played[data-emoji="wave"] { animation: emoji-wave 700ms ease-in-out 1; } /* @raw-ok motion: icon choreography timing */
/* 👩🏻‍💻 types (D38): two copies of the glyph cut at one seam, the top of the laptop. The upper part (head and
   shoulders) rocks, the lower part (laptop and sleeves) taps. Prototype: experiments/emoji-typing/. */
.emoji[data-emoji="type"] { position: relative; }
.emoji__up, .emoji__low { display: block; }
.emoji__low { position: absolute; inset: 0; clip-path: inset(60% 0 0 0); } /* @raw-ok artwork: the seam, measured on the Noto art: the laptop's top edge */
.emoji__up { clip-path: inset(0 0 40% 0); transform-origin: 50% 60%; } /* @raw-ok artwork: the seam, measured on the Noto art */
.emoji.is-played[data-emoji="type"] > .emoji__up { animation: emoji-type-rock 900ms ease-in-out 1; } /* @raw-ok motion: icon choreography timing */
.emoji.is-played[data-emoji="type"] > .emoji__low { animation: emoji-type-tap 900ms linear 1; } /* @raw-ok motion: icon choreography timing */
.emoji.is-played[data-emoji="brush"] { animation: emoji-brush var(--duration-800) ease-in-out 1; }
.emoji.is-played[data-emoji="pop"] { animation: emoji-pop 650ms var(--ease-out-quint); } /* @raw-ok motion: icon choreography timing */
/* 👩🏻‍🦱 smirks (D38): a second copy of the glyph cut to a patch of plain skin around the mouth lifts one corner
   (skew, a little wider and higher) and settles. Prototype: experiments/emoji-smirk/. */
.emoji[data-emoji="smirk"] { position: relative; }
.emoji__base { display: block; }
.emoji__mouth { position: absolute; inset: 0; display: block; clip-path: inset(57% 38% 30% 38%); transform-origin: 50% 63%; } /* @raw-ok artwork: the mouth patch, measured on the Noto art */
.emoji.is-played[data-emoji="smirk"] > .emoji__mouth { animation: emoji-smirk 1100ms ease-in-out 1; } /* @raw-ok motion: icon choreography timing */
@keyframes emoji-wave { /* the Gemstones hat wave */
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(14deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(8deg); }
}
@keyframes emoji-type-rock { /* the shoulders rock, the head follows */
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(-2.2deg); }
  35% { transform: rotate(1.8deg); }
  55% { transform: rotate(-1.8deg); }
  75% { transform: rotate(1.4deg); }
}
@keyframes emoji-type-tap { /* quick taps, 0.8px */
  0%, 16%, 32%, 52%, 70%, 90%, 100% { transform: translateY(0); }
  8%, 24%, 44%, 62%, 82% { transform: translateY(-0.8px); }
}
@keyframes emoji-brush { /* a stroke: swings out, back past rest, settles */
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(-18deg); }
  65% { transform: rotate(12deg); }
}
@keyframes emoji-smirk {
  0%, 100% { transform: none; }
  25%, 70% { transform: translate(0.8%, -0.9%) skewY(-8deg) scaleX(1.12); } /* @raw-ok motion: one corner up */
}
@keyframes emoji-pop { /* the Gemstones party popper */
  0% { transform: scale(1) rotate(0deg); }
  40% { transform: scale(1.35) rotate(-14deg); }
  70% { transform: scale(0.95) rotate(6deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .emoji.is-played[data-emoji], .emoji.is-played[data-emoji] > * { animation: none; }
}

/* ---------- 01 hero ---------- */
.hero {
  min-height: 100vh; min-height: var(--stage-h, 100svh);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--spacing-24);
  padding-block: var(--size-header);
}
.hero__intro { display: flex; flex-direction: column; align-items: center; gap: var(--gap-block); width: var(--text-width); }
/* The hero heading is the exception to the display role's colour: on the weather background it is --text-body (white), because --text-secondary dips under 3:1 on the bright skies (clear day, partly cloudy, dawn); with the weather in the tile it keeps the role's --text-secondary (D92) */
html[data-weather-view="bg"] .hero .display { color: var(--text-body); }

/* ---------- 02/03 work: one label + two scenes (1330:1673, 1330:1674) ---------- */
.work { position: relative; padding-top: var(--layout-section-padding-y); }
/* In flow (phones, reduced motion, no JS): label, Case studies, its cards, Other work, its cards */
.work__label { position: relative; z-index: 2; }
.scene { position: relative; }
.scene__copy { z-index: 1; }
.scene + .scene { margin-top: var(--layout-section-padding-y); }
.work__label + .scene .scene__copy { margin-top: var(--gap-group); }
.scene__cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--layout-gutter); width: var(--content); margin: var(--gap-block) auto 0; }
.card {
  display: block; width: min(var(--card-size), 100%); aspect-ratio: 1 / 1;
  background: var(--surface-raised); border-radius: var(--radius-card);
  opacity: var(--o); transform: rotate(calc(var(--r) / 2)); /* half the Figma tilt while in flow */
  color: inherit; text-decoration: none;
}
/* The Case studies covers (Figma 1466:18098): three squares in one row, 40 apart, the width of the content.
   js/home/scenes.js sets --cover (the size, smaller on short screens) and --row-top. */
.scene__cards--row { display: block; }
.scene__row { display: flex; align-items: flex-start; justify-content: center; gap: var(--gap-block); width: 100%; }
.card--cover { --r: 0deg; --o: var(--opacity-80); width: auto; min-width: 0; transform: none;
  flex: 0 1 var(--cover, 270px); /* @raw-ok measure: one-off, the Case studies covers (Figma 1466:18106) */ }

/* Pinned (motion allowed; js/home/scenes.js adds .is-live to .work and pins the one stage, D52). The stage is one screen
   tall and holds the label, both scenes and the axis tip. The label and the Case studies text sit at --label-top and
   --copy-top (measured by the script); Other work's text takes the same place when it replaces Case studies. Nothing is
   masked: content is hidden only by the header's own fade. */
.work.is-live { padding-top: 0; scroll-margin-top: 0; height: calc(100vh + var(--work-length, 0px)); height: calc(var(--stage-h, 100svh) + var(--work-length, 0px)); } /* Work in the nav lands on the pin start; --work-length: the scroll the stage holds for (js/home/scenes.js) */
.work.is-live .work__stage { position: sticky; top: 0; height: 100vh; height: var(--stage-h, 100svh); } /* held by the browser, not a script (D81) */
/* The scroll axis inside a pinned stage (Figma 1328:8462 and 1360:9294): the tip above the label, fixed with the stage,
   and (Work) the line from under Other work's text, drawn once the pin has let go. js/home/center-line.js lights them. */
.stage-axis { display: none; }
.work.is-live .stage-axis, .about.is-live .stage-axis {
  display: block; position: absolute; top: 0; left: 50%; z-index: 2; /* with the label: covers pass behind both */
  width: var(--border-2); margin-left: calc(var(--border-2) / -2);
  height: calc(var(--label-top, var(--spacing-24)) - var(--spacing-24)); /* ends 24 above the label, like every axis mask did; 0 until the script measures */
  background: var(--scroll-line-gradient) 0 calc(-1 * var(--axis-off, 0px)) / 100% var(--axis-total, 100%) no-repeat; /* its slice of the one gradient; @raw-ok measure */
  pointer-events: none;
}
.work.is-live .work__label::before, .work.is-live .section-head::before { display: none; } /* nothing runs behind the text here, and covers pass behind the label: no page-coloured bar */
.work.is-live .work__label { position: absolute; left: 0; width: 100%; top: var(--label-top, 0); }
.work.is-live .scene { position: static; margin: 0; }
.work.is-live .scene__copy { position: absolute; left: 50%; top: var(--copy-top, 0); margin: 0 0 0 calc(var(--text-width) / -2); }
.work.is-live .scene__cards {
  position: absolute; inset: 0; z-index: 1; display: block; width: auto; margin: 0; /* under the label, over the text: covers pass behind the WORK label */
  overflow: clip; /* the card layer clips itself; no ancestor gets overflow, so pinning keeps working */
  pointer-events: none;
}
.work.is-live .card--cover { position: relative; top: auto; opacity: var(--o); pointer-events: auto; }
/* Case study cover (Figma 1466:18108, Project=Gemstones|Search, State=Default|Hover). Default: the work on the raised
   surface (Gemstones: the shipped landing page and the mega-menu, cropped by the square). Hover or keyboard focus: an
   overlay with the title fades in. The title is always in the page, so the link keeps its name. */
.cover { --o: 1; position: relative; overflow: clip; text-decoration: none; }
.cover__collage { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); display: block; aspect-ratio: 1200 / 630; } /* @raw-ok artwork: the hero collage, Figma 1466:18110 */
.cover__shot { position: absolute; display: block; overflow: hidden; border-radius: var(--radius-6); box-shadow: var(--shadow-md); transform: translateY(-50%); }
.cover__shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover__shot--page { left: 20.23%; right: 33.07%; top: 79.07%; aspect-ratio: 240 / 389; } /* @raw-ok artwork: Figma 1466:18111, 78.5px under the middle of 270 */
.cover__shot--menu { left: 44.36%; right: 11.48%; top: 40.16%; aspect-ratio: 1160 / 597; } /* @raw-ok artwork: Figma 1466:18112, 26.6px over the middle of 270 */
/* Search (Figma 1466:18113): a 1200 x 630 collage centred on the square, two phones and the search dialog; percentages of that 1200 x 630 */
.cover__collage--search { top: -66.667%; bottom: -66.667%; } /* @raw-ok artwork: 180px over and under 270, Figma 1489:4256 */
.cover__shot--phone, .cover__shot--dialog { border-radius: var(--radius-card); }
.cover__shot--phone { left: 40.08%; width: 10.17%; aspect-ratio: 122 / 264; } /* @raw-ok artwork: Figma 1489:4257, 1489:4259 */
.cover__shot--phone img { object-fit: fill; }
.cover__shot--phone-top { top: 27.78%; } /* @raw-ok artwork: Figma 1489:4257 */
.cover__shot--phone-bottom { top: 72.22%; } /* @raw-ok artwork: Figma 1489:4259 */
.cover__shot--dialog { left: 46.58%; width: 30.25%; top: 50%; aspect-ratio: 363 / 210; } /* @raw-ok artwork: Figma 1489:4258 */
.cover__shot--dialog img { position: absolute; left: -0.01%; top: 0.06%; width: 100.01%; height: 131.55%; object-fit: fill; } /* @raw-ok artwork: Figma crop */
.cover__overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: var(--inset-card);
  background: color-mix(in srgb, var(--surface-raised) 93%, transparent); /* @raw-ok artwork: draft — the overlay is the raised surface at 93%, Figma's 80% leaves the accent name in the hover label row at about 2.6:1 over the white screenshots (review 2026-11-12), as Other work's 93% (D75) */
  opacity: 0; transition: opacity var(--duration-200) var(--ease-fast-out-slow-in);
}
.cover__title { flex: 1 0 0; min-width: 0; margin: 0; font: var(--type-statement); color: var(--text-body); }
.cover:focus-visible .cover__overlay { opacity: 1; }
@media (hover: hover) { .cover:hover .cover__overlay { opacity: 1; } } /* a tap never leaves the overlay behind */
.cover__head, .cover__page { display: none; }
/* The label row (Figma Frame 1410085671): 40 high, a hairline under it; "Case study/" in the secondary text, the name in the accent. */
.cover__head { align-items: center; gap: var(--gap-tight); height: var(--spacing-40); border-bottom: var(--border-0-5) solid var(--border-color-subtle); }
.cover__kind { color: var(--text-secondary); } /* the label-section role; the name keeps its accent */
/* status / under-construction (Figma 1934:8761 closed 24x24, 1935:8885 open 181x24; D76): the accent chip with the roadworks emoji; opened it
   shows the label too. The right edge stays put and the left edge pulls open (the label column and the emoji's padding animate, no script).
   Mouse screens: closed, opens under the pointer (or, in the Other work carousel, while a control has keyboard focus). Touch screens: open.
   The label is always in the page, clipped when closed, so it stays in the accessibility tree. */
.status {
  display: inline-grid; grid-template-columns: var(--spacing-24) 0fr; align-items: center; height: var(--spacing-24);
  overflow: clip; border-radius: var(--radius-6); background: var(--surface-accent); color: var(--text-secondary);
  transition: grid-template-columns var(--duration-400) var(--ease-out-quint);
}
.status__icon { display: flex; align-items: center; justify-content: center; width: var(--spacing-24); height: 100%; font: var(--type-body-default); transition: padding-left var(--duration-400) var(--ease-out-quint); }
.status__label { min-width: 0; overflow: clip; white-space: nowrap; }
.status__label > span { display: block; padding-inline: 10px var(--gap-stack); color: var(--text-body); } /* @raw-ok artwork: Figma 1935:8885, 10 between the emoji and the label. White, not Figma's --text-secondary: that is 4.45:1 on the accent chip for 10px text, white is 5.8:1 (D78) */
.status:hover, .ow-carousel:has(:focus-visible) .ow-card.is-front .status { grid-template-columns: var(--spacing-24) 1fr; }
.status:hover .status__icon, .ow-carousel:has(:focus-visible) .ow-card.is-front .status__icon { padding-left: var(--spacing-12); } /* the emoji sits 12 from the left edge once open */
@media (max-width: 780px), (hover: none) { /* touch: always open */
  .status { grid-template-columns: var(--spacing-24) 1fr; }
  .status__icon { padding-left: var(--spacing-12); }
}
@media (prefers-reduced-motion: reduce) { .status, .status__icon { transition: none; } }
/* Third cover (Figma "Portfolio cover"): a static card, the label row and the title always shown, with the cover shadow; no link, no hover. */
.cover--soon { display: flex; flex-direction: column; gap: var(--gap-group); padding: var(--inset-compact) var(--inset-compact) 0; box-shadow: var(--shadow-md); }
.cover--soon .cover__head { display: flex; flex-wrap: wrap; align-content: center; row-gap: 0; } /* a narrow card (tablet): the two parts wrap as two lines, not as two columns */
.cover--soon .cover__kind, .cover--soon .cover__name { white-space: nowrap; }
/* Hover (screens with a mouse): the same label row as Other work's hover sits at the top of the overlay, the title centred in the space under its rule. The touch screens keep the row in the card (below). */
@media (hover: hover) {
  .cover:not(.cover--soon) .cover__head { display: flex; position: absolute; z-index: 1; top: var(--inset-card); left: var(--inset-card); right: var(--inset-card); opacity: 0; pointer-events: none; transition: opacity var(--duration-200) var(--ease-fast-out-slow-in); }
  .cover:not(.cover--soon):hover .cover__head { opacity: 1; }
  .cover:not(.cover--soon) .cover__overlay { padding-top: calc(var(--inset-card) + var(--spacing-40)); }
}
.cover:not(.cover--soon):focus-visible .cover__head { opacity: 1; }
.cover--soon .cover__title { flex: none; margin-block: auto; padding-bottom: calc(var(--gap-group) * 2 + var(--spacing-24)); } /* Figma 1870:6055: centred between the rule and the chip row (20 + chip 24 + 20), same auto-margin and padding trick as the Other work hover */
.cover__status { position: absolute; right: var(--gap-stack); bottom: var(--gap-stack); } /* Figma 1870:6078 / 1870:6055: 12 from the card's right and bottom */
/* No hover, phone (Figma Project collection): 342 cards, the label row, the title (statement) and the shipped page at the foot cropped by the card (318 wide, round on top, shadow), all always shown. The crop is Figma's: the image is the card's width, moved up by --cy (a share of the picture's own box). */
@media (hover: none) { /* every touch screen (D77: the iPad too), at its own width */
  .cover { display: flex; flex-direction: column; gap: var(--gap-group); padding: var(--inset-compact) var(--inset-compact) 0; box-shadow: var(--shadow-md); }
  .cover__collage { display: none; }
  .cover__head { display: flex; }
  .cover__overlay { position: static; inset: auto; display: block; padding: 0; background: none; opacity: 1; pointer-events: none; }
  .cover__page { display: block; position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; border-radius: var(--radius-card) var(--radius-card) 0 0; box-shadow: var(--shadow-md); }
  .cover__page img { position: absolute; left: 0; top: var(--cy); width: 100%; height: auto; max-width: none; display: block; }
  .cover--soon .cover__title { font: var(--type-heading); } /* @raw-ok one-off: Figma 1870:6055, this phone card's title is the heading role (the other covers' are the statement) */
}
/* Touch screens up to 1024 wide (phones, the iPad upright; D77): the covers in one column of squares, as the phone's (Figma Project collection: 20 between them). Wider touch screens keep the row of three, whose covers are about 340 there. */
@media (hover: none) and (max-width: 1024px) {
  .scene__row { flex-direction: column; align-items: center; gap: var(--gap-group); }
  .scene__row .card--cover { flex: none; width: 100%; } /* the phone: as wide as the page's columns */
}
@media (hover: none) and (min-width: 781px) and (max-width: 1024px) {
  .scene__row .card--cover { width: min(100%, 342px); } /* @raw-ok measure: Figma Project collection, 342 squares; the iPad's columns are wider */
}

.work.is-live .scene__row { position: absolute; left: calc(50% - var(--content) / 2); top: var(--row-top, 0); width: var(--content); } /* no transform: scenes.js moves the row on phones */

/* Other work's carousel (Figma 1839:4601, phone 1839:5188, component "Other work gallery" 1926:8238; js/home/carousel.js, D73, D74).
   The carousel is as tall as its front card (--ow-w x --ow-h, set by the script) and as wide as the page; the ring's other
   cards rise above it, behind the section text (z-index 0 here, the text is 1). The script places and sizes each card and
   sets its look as numbers from its slot: --ow-img (image), --ow-shade (the 90% overlay), --ow-head (phone header), --ow-s
   (scale of the card's text, laid out at the front card's size, --ow-full-w), --ow-head-h (the header's height).
   Default = the front card, background = the two beside it (image under the overlay), plain = the deeper two. */
.ow-carousel { position: relative; z-index: 0; height: var(--ow-h); margin-top: var(--gap-block); overflow-x: clip; touch-action: pan-y; }
.ow-carousel__ring { position: absolute; inset: 0; z-index: 0; } /* the cards stack inside it, so the arrows stay above every card */
.ow-card { position: absolute; left: 50%; top: 50%; overflow: clip; border-radius: var(--radius-card); background: var(--surface-raised); }
.ow-card__img { pointer-events: none; /* the card takes the pointer: a browser extension's own Save button (Pinterest) hangs on the picture under the mouse, D95 */ position: absolute; inset: 0; display: block; width: 100%; height: 100%; border-radius: var(--radius-card); object-fit: cover; opacity: var(--ow-img); }
.ow-card__shade, .ow-card__veil { position: absolute; inset: 0; pointer-events: none; }
.ow-card__shade { background: color-mix(in srgb, var(--surface-page) 90%, transparent); /* @raw-ok artwork: draft — Other work covers (Figma 1926:8238), the background overlay is the page colour at 90% */ opacity: var(--ow-shade); }
.ow-card__veil { background: color-mix(in srgb, var(--surface-page) 93%, transparent); /* @raw-ok artwork: draft — the hover overlay is 93%, Figma's 90% leaves the small accent eyebrow at 4.4:1 (review 2026-11-10, B3) */ }
/* Hover (desktop, Figma state=hover): the settled front card only. The veil is the same overlay, the text sits on it. */
.ow-card__veil { opacity: 0; transition: opacity var(--duration-200) var(--ease-fast-out-slow-in); }
.ow-card__text {
  position: absolute; left: 0; top: 0; width: var(--ow-full-w); height: var(--ow-full-h); transform: scale(var(--ow-s)); transform-origin: 0 0; /* laid out at the front card's size, scaled with the card */
  display: flex; flex-direction: column; gap: var(--gap-group); padding: var(--inset-card); pointer-events: none;
  opacity: 0; transition: opacity var(--duration-200) var(--ease-fast-out-slow-in);
}
.ow-card__status { /* the chip, laid out at the front card's size and scaled with it like the text: bottom-right in the hover overlay (Figma 1926:8286) */
  position: absolute; left: 0; top: 0; width: var(--ow-full-w); height: var(--ow-full-h); transform: scale(var(--ow-s)); transform-origin: 0 0;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: var(--inset-card); pointer-events: none;
  opacity: 0; transition: opacity var(--duration-200) var(--ease-fast-out-slow-in);
}
.ow-card__status .status { pointer-events: auto; }
.ow-card__eyebrow { display: flex; align-items: center; gap: var(--gap-tight); height: var(--spacing-40); border-bottom: var(--border-0-5) solid var(--border-color-subtle); }
.ow-card__kind { color: var(--text-secondary); }
.ow-card__name { color: var(--text-accent); }
.ow-card__title { margin: 0; font: var(--type-statement); color: var(--text-body); margin-block: auto; padding-bottom: calc(var(--spacing-24) + var(--gap-group)); } /* hover (Figma 1926:8286): centred between the rule and the chip row (chip 24 + the group gap): auto margins centre the box, the padding lifts the text by half of it */
@media (hover: hover) { .ow-card.is-front:hover :is(.ow-card__veil, .ow-card__text, .ow-card__status) { opacity: 1; } } /* a tap never leaves it behind */
.ow-carousel:has(:focus-visible) .ow-card.is-front :is(.ow-card__veil, .ow-card__text, .ow-card__status) { opacity: 1; } /* keyboard: the same information */
@media (hover: hover) and (min-width: 781px) { .ow-carousel.is-dismissed .ow-card.is-front :is(.ow-card__veil, .ow-card__text, .ow-card__status) { opacity: 0; } } /* Escape: the overlay steps aside (the touch header is not hover content and stays) */
@media (prefers-reduced-motion: reduce) { .ow-card__veil, .ow-card__text, .ow-card__status { transition: none; } }
/* Arrows (Figma CaretLeft / CaretRight, 40): centred on the front card's height, 20 outside its edges */
.ow-carousel__arrow { position: absolute; top: 50%; z-index: 1; width: var(--spacing-40); height: var(--spacing-40); margin-top: calc(var(--spacing-40) / -2); padding: 0; border: 0; background: none; cursor: pointer; }
.ow-carousel__arrow img { display: block; width: 100%; height: 100%; }
.ow-carousel__arrow--prev { right: calc(50% + var(--ow-w) / 2 + var(--spacing-20)); }
.ow-carousel__arrow--next { left: calc(50% + var(--ow-w) / 2 + var(--spacing-20)); }
/* Touch screens (Figma component "Other work gallery", device Touch; every phone, and any screen with no hover, the iPad too): no hover,
   so the front card always shows its text: a header (eyebrow + title) on top, the image under it. Same ring, same motion; the
   header is --ow-head (1 on the front card, 0 on the others, so it folds away as the card turns into a background card). */
@media (max-width: 780px), (hover: none) {
  .ow-card { --ow-top: calc(var(--ow-head-h) * var(--ow-s) * var(--ow-head)); } /* where the image starts: under the header, none when the card is a side card */
  .ow-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--ow-top) + var(--radius-card)); background: var(--surface-media); opacity: var(--ow-head); } /* the white card: the header and the strip behind the image's rounded top corners; none behind the image's bottom and sides, where its edge would show as a hairline */
  .ow-card__img { top: var(--ow-top); height: calc(100% - var(--ow-top)); }
  .ow-card__veil { display: none; }
  /* Figma 1926:8595: header padding 16 / 12 / 16, 4 between eyebrow and title, 8 more before the image (the white shows through it). The header is laid out
     at the front card's size and scaled by --ow-u, so every gap is divided by it: on screen they stay 16 / 12 / 4 / 8 at any width, and the image takes the rest of the height. */
  .ow-card { --ow-gap-s: max(var(--ow-u, 1), 0.01); }
  .ow-card__text { height: auto; gap: calc(var(--gap-hair) / var(--ow-gap-s)); padding: calc(var(--spacing-16) / var(--ow-gap-s)) calc(var(--gap-stack) / var(--ow-gap-s)) calc((var(--spacing-16) + var(--gap-tight)) / var(--ow-gap-s)); opacity: var(--ow-head); transition: none; }
  .ow-card__title { margin-block: 0; padding-bottom: 0; }
  .ow-card__status { padding: calc(var(--gap-stack) / var(--ow-gap-s)); opacity: var(--ow-head); transition: none; } /* Figma: 12 from the right and bottom, front card only; constant on screen like the header */
  .ow-card__eyebrow { height: auto; border-bottom: 0; }
  .ow-card__kind { color: var(--text-on-light); }
  .ow-card__name { color: var(--text-accent-on-light); }
  .ow-card__title { color: var(--text-on-light); }
}
/* Phones (Figma 1839:5188): 60 under the text, the front card as wide as the columns, a 3-card ring; no arrows on screen. The arrows
   stay in the page, visually hidden, and appear on the screen edges when a keyboard focuses them. */
@media (max-width: 780px) {
  .ow-carousel { margin-top: var(--spacing-60); padding-inline: var(--layout-margin); }
  .ow-card[data-project="retail"] .ow-card__img { object-position: calc(50% + 23.7% * var(--ow-shade)) 50%; } /* @raw-ok artwork: Figma 1926:8739, the retail background crop sits 74% across */
  .ow-carousel__arrow--prev { right: auto; left: 0; }
  .ow-carousel__arrow--next { left: auto; right: 0; }
  .ow-carousel__arrow:focus-visible { outline-offset: calc(var(--border-2) * -1); } /* inside the button: the carousel clips sideways, an outer ring would lose its outer edge at the screen edge */
  .ow-carousel__arrow:not(:focus-visible) { width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); } /* @raw-ok idiom: the standard visually-hidden pattern, as .sr-only */
}
/* The nav dots (phones, Figma 1935:8892; built by js/home/carousel.js): 40 under the front card, a dash for the selected project and a dot for each other
   one; each is a button (14 x 32 tap area on a 14 pitch) that turns the ring to its project. The script places them; the dash moves like the nav pill. */
.ow-dots { display: none; position: absolute; left: 50%; top: calc(100% + var(--gap-block)); translate: -50% 0; z-index: 1; height: 6px; } /* @raw-ok artwork: Figma 1935:8892, the dots are 6 high */
.ow-dots__dot { position: absolute; top: 50%; width: 14px; height: 32px; margin: -16px 0 0; padding: 0; border: 0; background: none; cursor: pointer; transition: left var(--duration-500) var(--ease-out-quint); } /* @raw-ok artwork: the tap area, a 14 pitch, 32 high */
.ow-dots__dot::before { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: var(--radius-pill); background: var(--surface-frost); /* @raw-ok artwork: Figma 1935:8892, 6 dots */
  transition: opacity var(--duration-200) var(--ease-fast-out-slow-in) calc(var(--duration-500) / 2); } /* @raw-ok motion: the dot shows again once the dash's trailing edge has passed */
.ow-dots__dot.is-selected::before { opacity: 0; transition-delay: var(--duration-80); } /* the dash is there instead */
.ow-dots__dash { position: absolute; left: 0; top: 0; width: 12px; height: 6px; border-radius: var(--radius-pill); background: var(--surface-accent); pointer-events: none; } /* @raw-ok artwork: Figma 1935:8892, the dash is 12 x 6 */
@media (max-width: 780px) {
  .ow-dots { display: block; }
  .ow-carousel { margin-bottom: calc(var(--gap-block) + 6px); } /* in flow: room for the dots */ /* @raw-ok artwork: the dots' height */
}
@media (prefers-reduced-motion: reduce) { .ow-dots__dot, .ow-dots__dot::before { transition: none; } }
/* Without the script: the front card alone, in flow */
.ow-carousel:not(.is-ready) { height: auto; }
.ow-carousel:not(.is-ready) .ow-carousel__ring { position: static; }
.ow-carousel:not(.is-ready) .ow-card, .ow-carousel:not(.is-ready) .ow-carousel__arrow { display: none; }
.ow-carousel:not(.is-ready) .ow-card:first-child { display: block; position: relative; left: auto; top: auto; width: var(--text-width); margin-inline: auto; aspect-ratio: 438 / 286; } /* @raw-ok artwork: Figma 1926:8378 */
/* Pinned: under Other work's landed text (--carousel-top, js/home/scenes.js) */
.work.is-live .ow-carousel { position: absolute; left: 0; right: 0; top: var(--carousel-top, 0); margin: 0; }

/* ---------- 04 about ---------- */
.about { padding-block: var(--layout-section-padding-y); }
/* Pinned (motion allowed, all widths; js/home/about.js adds .is-live and pins the stage): the label and
   heading stay still, centred with the full text; the two paragraphs and the button rise from the
   bottom of the stage one after the other. The stage clips them until they arrive. */
/* D54: the section overlaps the end of Work's pin by --about-overlap (px, set by js/home/about.js), so it is already coming in
   while the last Other work block leaves; its content (.about__lift) is scrubbed to rise faster than the page, the stage never moves. */
.about.is-live { padding-block: 0; scroll-margin-top: 0; position: relative; z-index: 1; margin-top: calc(var(--about-overlap, 0) * -1px); } /* @raw-ok measure: px from the script */
.about.is-live { height: calc(100vh + var(--about-length, 0px)); height: calc(var(--stage-h, 100svh) + var(--about-length, 0px)); } /* --about-length: the scroll the stage holds for (js/home/about.js) */
.about.is-live .about__stage { position: sticky; top: 0; height: 100vh; height: var(--stage-h, 100svh); overflow: clip; } /* held by the browser, not a script (D81) */
.about.is-live .about__lift { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: calc(var(--about-top, 0) * 1px); } /* @raw-ok measure: js/home/about.js sets --about-top, in px */
.about__bio { display: flex; flex-direction: column; gap: var(--gap-stack); } /* Figma 1360:9307: paragraphs 12 apart */

/* ---------- 05 latest updates: graph (1330:1694) ---------- */
.graph {
  position: relative; overflow: clip;
  height: max(100vh, 10 * var(--graph-sticker)); height: max(var(--stage-h, 100svh), 10 * var(--graph-sticker));
}
.graph__edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.graph__edges line { stroke: var(--border-color-graph); stroke-width: var(--border-1); }
.graph__nodes { list-style: none; margin: 0; padding: 0; }
/* Rest position: Figma's node centre (--fx/--fy) as a share of the stage */
.graph__node {
  position: absolute; z-index: 1;
  left: calc(var(--fx) * 100%); top: calc(var(--fy) * 100%);
  width: var(--graph-sticker); height: var(--graph-sticker);
  margin-left: calc(var(--graph-sticker) / -2); margin-top: calc(var(--graph-sticker) / -2);
}
.graph__node img { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.graph__node:hover, .graph__node.is-dragging { z-index: 2; }
.graph__node:hover .hint, .graph__node.is-dragging .hint { opacity: 1; }
.graph__hint { top: calc(100% + var(--gap-tight)); } /* under the sticker */
/* Live: js/home/graph.js places each node with a transform and makes it draggable */
.graph.is-live .graph__node { left: 0; top: 0; margin: 0; will-change: transform; cursor: grab; touch-action: none; } /* free dragging with a pointer */
@media (hover: none) { .graph.is-live .graph__node { touch-action: pan-y; } } /* touch screens (D81): a vertical swipe on a sticker scrolls the page; a sideways one drags it (js/home/graph.js) */
.graph.is-live .graph__node.is-dragging { cursor: grabbing; }
.graph__message {
  position: absolute; z-index: 1; left: 50%; top: 43.3%; /* above the edges; Figma: centre at 433/1002 of the stage */
  transform: translate(-50%, -50%);
  width: var(--text-width);
  display: flex; flex-direction: column; align-items: center; gap: var(--gap-group); text-align: center;
}

/* ---------- 06 contact (1328:8534) + colophon (1328:8538) ---------- */
.contact { background: var(--gradient-linear-accent) 0 0 / 100% 100% no-repeat var(--surface-page); }
.contact__sticky {
  min-height: 100vh; min-height: var(--stage-h, 100svh);
  display: flex; flex-direction: column; align-items: center; gap: var(--gap-section);
  padding-top: var(--layout-section-padding-y); padding-bottom: 0; /* the colophon panel sits flush with the page foot */
}
/* The last scroll (js/home/contact.js, D72): the stage is one screen plus the scroll the slide needs (--contact-stage); inside it the sticky box is one screen
   that holds still. The block is placed at --contact-top and moved up by --contact-lift; the colophon waits below the screen and slides up over it.
   D83: the box is the visible screen (dvh), not the frozen --stage-h: this is the end of the page, so when a toolbar slides in or out the page's end
   moves with the screen, nothing above it shifts, and the colophon stays at the screen's foot. contact.js measures again on every change. */
.contact.is-stage { background: var(--surface-accent); } /* the gradient's last colour, in case a frame shows below the box */
.contact.is-stage .contact__stage { height: calc(100vh + var(--contact-stage, 0px)); height: calc(100dvh + var(--contact-stage, 0px)); }
.contact.is-stage .contact__sticky {
  position: sticky; top: 0; display: block; height: 100vh; height: 100dvh; min-height: 0; padding-top: 0; overflow: clip;
  background: var(--gradient-linear-accent) 0 0 / 100% 100% no-repeat var(--surface-page);
}
.contact.is-stage .contact__body { position: absolute; left: 0; right: 0; margin-inline: auto; top: var(--contact-top, 0px); }
.contact.is-stage .colophon { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; transform: translateY(var(--colophon-y, 100%)); box-shadow: var(--shadow-lg); will-change: transform; } /* a layer above the page: its edge throws the soft shade */
.contact__body { width: var(--text-width); } /* Figma 1466:17765 */
.contact__lift { display: flex; flex-direction: column; align-items: center; gap: var(--gap-group); translate: 0 calc(var(--contact-lift, 0) * -1px); } /* drifts up under the colophon as it covers it (js/home/contact.js, D72) */ /* @raw-ok measure: js/home/contact.js sets --contact-lift in px */
.emoji:not(.heading-emoji) { vertical-align: -0.14em; /* @raw-ok artwork: the inline wave sits on the text's baseline like a glyph */ }
.emoji__img { display: block; width: 1em; height: 1em; max-width: none; /* @raw-ok artwork: Noto emoji art is one em square, the same on every device (D61) */ }
.heading-emoji { display: block; width: fit-content; margin: 0 auto var(--gap-stack); } /* shrink-wrapped: the animations pivot on the glyph, not on a full-width box */ /* the emoji line above a heading (Figma 1839:4893) */
.heading-emoji .emoji__img { width: var(--type-icon-section-size); height: var(--type-icon-section-size); } /* the emoji above a section title takes the icon-section size (60, 36 on phones), not the heading's em */
.contact__emoji { display: block; }
.contact__lead { text-align: center; } /* Figma 1716:8015 */
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap-stack); list-style: none; margin: 0; padding: 0; } /* Figma 1466:17775: email chip, LinkedIn chip */
/* Picture stack (Figma 1466:17769): a back card behind one of eight pictures with their label chips, on a 580 × 300
   stage; a click shows the next one, and after the last comes the first (js/home/pic-stack.js). */
.pic-stack {
  position: relative; display: block; width: 100%;
  height: 300px; /* @raw-ok measure: one-off, the stage of the picture stack (Figma 1466:17769) */
  padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
}
.pic-stack__back {
  position: absolute; left: 50%; top: 50%; display: block;
  width: var(--bw, 232.627px); height: var(--bh, 174.471px); /* @raw-ok artwork: Figma 1466:17770, the darker frame behind; it follows the picture's orientation (D40) */
  border-radius: var(--radius-card); background: var(--surface-page);
  transform: translate(calc(-50% + 15.9px), calc(-50% - 19.2px)) rotate(3.94deg); /* @raw-ok artwork: Figma 1466:17770, up and to the right of the picture's centre */
}
/* The eight pictures of the component set (Figma pic-stack 1466:18158), shown one at a time, in the order of the set.
   Each item is centred on the first picture's centre and carries its own back card (portrait pictures get a portrait one); its size, the crop of
   its image and the place and tilt of its label are Figma's, set as custom properties on the item (--pw/--ph size,
   --lx/--ly label centre from the picture's top-left, --lr tilt, --ix/--iy/--iw/--ih image crop). */
.pic-stack__item { position: absolute; left: 50%; width: var(--pw); height: var(--ph); margin-left: calc(var(--pw) / -2); margin-top: calc(var(--ph) / -2); opacity: 0; }
.pic-stack__item { top: 151px; } /* @raw-ok artwork: the centre of the first picture on the 300px stage, Figma 1466:18152 */
.pic-stack__item.is-active { opacity: 1; }
.pic-stack__pic { position: absolute; inset: 0; display: block; overflow: hidden; border-radius: var(--radius-card); background: var(--surface-accent); }
.pic-stack__img { position: absolute; left: var(--ix, 0); top: var(--iy, 0); width: var(--iw, 100%); height: var(--ih, 100%); max-width: none; display: block; object-fit: cover; }
.pic-stack__label {
  position: absolute; left: var(--lx); top: var(--ly); display: block;
  padding: 10px; /* @raw-ok measure: one-off, Figma 1410:12879 */
  border-radius: var(--radius-card); background: var(--surface-light); color: var(--text-on-light);
  font: var(--type-statement); white-space: var(--ws, nowrap); text-align: center; /* the statement style (D63); the colour stays dark on the light chip */
  transform: translate(calc(-50% + var(--nudge-x, 0px)), -50%) rotate(var(--lr, 0deg)); /* --nudge-x: js/home/pic-stack.js keeps the label on the screen */
}
/* Contact chips (Figma 1466:17775): email chip 218 × 36 (the chip's own padding), LinkedIn the same chip with the logo alone. */
.contact__actions .action-chip--icon { padding: var(--inset-tight); } /* LinkedIn: the logo alone, 36 × 36 */
/* Touch size (Figma 1716:8016): 44 high, LinkedIn 44 × 44; email chip 218 × 44 */
@media (max-width: 1279px), (hover: none) {
  .contact__actions .action-chip { height: var(--size-touch); }
  .contact__actions .action-chip--icon { padding-inline: var(--inset-compact); }
}
/* Copied (1360:9364): the label and icon sit centred as a group in the chip's held width (no resize); the Check replaces Copy */
/* Colophon (1328:8538): how the site was made, at the foot of the contact gradient.
   Contact holds its text at mid-screen while this slides up over it as a layer of its own (js/home/contact.js, D72). */
.colophon {
  margin-top: auto; width: 100%;
  padding: var(--inset-card) var(--spacing-100) var(--gap-section); /* Figma Colophon: 20 / 100 / 60 */
  border-radius: var(--radius-100) var(--radius-100) 0 0; background: var(--surface-light); color: var(--text-on-light);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
/* Figma Colophon (Home 1280, 390): a light panel with rounded top corners at the foot of the contact gradient; three lines of text, each 40 (24 for the emoji line) high, two "..." dividers between them. */
.colophon__line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--gap-hair); margin: 0; }
.colophon__part { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--gap-hair); }
.colophon__divider { margin: 0; }
.colophon img { width: var(--colophon-logo); height: var(--colophon-logo); display: block; }
.colophon .hint-host:not(.colophon__emoji) img { width: var(--spacing-40); height: var(--spacing-40); } /* the three tool logos are 40 (Figma), the emoji 24 */
.colophon__emoji { width: var(--colophon-logo); height: var(--colophon-logo); align-items: center; justify-content: center; }
.colophon .hint { background: var(--surface-page); color: var(--text-body); } /* the hint is a dark chip on the light panel */
.colophon__credit { text-transform: uppercase; min-height: var(--spacing-40); } /* 40 high like the line of logos (Figma) */
.colophon__credit a { color: var(--text-on-light); }

/* The line between Other work's text and About's tip, once Work has let go: fixed in the screen, its top/height set by
   js/home/center-line.js every frame from the two things it joins, so it can never overlap either. */
.axis-link {
  position: fixed; top: 0; left: 50%; z-index: 0; width: var(--border-2); margin-left: calc(var(--border-2) / -2); height: 0;
  background: var(--scroll-line-gradient) 0 calc(-1 * var(--axis-off, 0px)) / 100% var(--axis-total, 100%) no-repeat; /* its slice of the one gradient; @raw-ok measure */
  pointer-events: none;
}

/* ---------- centre line (1328:8463): one continuous line, filled by the scroll ---------- */
/* It starts at an arrow (Figma 1461:17394, 22.627 × 43.485) whose tip is 100px above the
   bottom of the first screen at any viewport height, and ends above the ABOUT label.
   js/home/center-line.js sets its length and fills it in with the scroll: the arrow
   rides up with the page; where the line starts to extend (the lit front at 60% of the
   screen) the arrow's head goes and the lit line carries on from its shaft. The
   unfilled part is invisible (no track). Full opacity throughout. */
.scroll-line {
  position: absolute; left: 50%; z-index: 0;
  top: calc(100vh - var(--spacing-100) - 43.485px); top: calc(var(--stage-h, 100svh) - var(--spacing-100) - 43.485px); /* @raw-ok artwork: the arrow's height, Figma 1461:17394 */
  width: var(--border-2); height: var(--line-height, 0);
  margin-left: calc(var(--border-2) / -2); pointer-events: none;
}
.scroll-line__lit {
  position: absolute; inset: 0; background: var(--scroll-line-gradient) 0 calc(-1 * var(--axis-off, 0px)) / 100% var(--axis-total, 100%) no-repeat; /* one gradient for the whole line: this piece paints its slice (center-line.js sets --axis-total / --axis-off); @raw-ok measure */
} /* fully drawn unless js/home/center-line.js scrubs its clip-path (reduced motion: drawn, still) */
/* The arrow: Figma's path as a mask over gradient/angular-accent; hidden without the script */
.scroll-line__arrow {
  display: none; position: absolute; top: 0; left: 50%;
  width: 22.627px; height: 43.485px; margin-left: -11.3137px; /* @raw-ok artwork: Figma 1461:17394, its shaft centred on the 2px line */
  background: var(--gradient-angular-accent) center / 100% 100% no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20width%3D%2722.6275%27%20height%3D%2743.4854%27%20viewBox%3D%270%200%2022.6275%2043.4854%27%20fill%3D%27none%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%3Cpath%20d%3D%27M%2012.3113%2039.6592%20L%2021.2134%2030.7571%20L%2022.6275%2032.1711%20L%2011.3142%2043.4854%20L%200%2032.1711%20L%201.4141%2030.7571%20L%2010.3113%2039.6543%20L%2010.3113%200%20L%2012.3113%200%20L%2012.3113%2039.6592%20Z%27%20fill%3D%27black%27%2F%3E%3C%2Fsvg%3E") center / 100% 100% no-repeat; /* @raw-ok artwork: assets/icons/scroll-arrow.svg inlined, a file mask is blocked on file:// */
  mask: url("data:image/svg+xml,%3Csvg%20width%3D%2722.6275%27%20height%3D%2743.4854%27%20viewBox%3D%270%200%2022.6275%2043.4854%27%20fill%3D%27none%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%3Cpath%20d%3D%27M%2012.3113%2039.6592%20L%2021.2134%2030.7571%20L%2022.6275%2032.1711%20L%2011.3142%2043.4854%20L%200%2032.1711%20L%201.4141%2030.7571%20L%2010.3113%2039.6543%20L%2010.3113%200%20L%2012.3113%200%20L%2012.3113%2039.6592%20Z%27%20fill%3D%27black%27%2F%3E%3C%2Fsvg%3E") center / 100% 100% no-repeat; /* @raw-ok artwork: same */
}
.scroll-line.has-arrow .scroll-line__arrow { display: block; }
.scroll-line.has-arrow:not(.is-extending) .scroll-line__lit { opacity: 0; } /* the arrow is the line's start */
.scroll-line.has-arrow.is-extending .scroll-line__arrow { display: none; }  /* its head is lost; the lit line carries on */

/* Reduced motion: the pill and the hints change state without fading */
@media (prefers-reduced-motion: reduce) {
  .menu__link, .menu__action { translate: none; transition-delay: 0s !important; } /* @raw-ok one-off: no stagger under reduced motion */
  .menu-toggle__icon { rotate: none !important; } /* @raw-ok idiom: the fold is motion; the icons cross-fade */
  .top-nav.is-live .top-nav__pill, .hint, .btn, .btn--primary::before, .cover__overlay, .cover__head { transition: none; }
}

/* ---------- phones (≤780) ---------- */
@media (max-width: 780px) {
  /* @raw-ok artwork: on phones the weather sky's fade is compressed to 96% of its height, so the sky is about 5% weaker behind the hero paragraph and the white text keeps 4.5:1 on the bright skies (D92); the fade still ends at the bottom */
  .location-widget-bg { -webkit-mask-size: 100% 96%; mask-size: 100% 96%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
  .scene__row { flex-direction: column; align-items: center; }
  .card--cover { flex: none; width: min(270px, 100%); } /* @raw-ok measure: one-off, the Case studies covers (Figma 1466:18106) */
  /* Header: the Málaga pill stays put and fades with the scroll (js/home/header-fade.js, D92; it scrolled with the page in D49), the menu button stays */
  .site-header { position: fixed; grid-template-columns: 1fr; justify-items: start; padding-inline: var(--inset-panel); }
  .top-nav, .site-header__end { display: none; }
  .site-header .location-widget { opacity: var(--pill-fade, 1); will-change: opacity; } /* on the pill itself, never on the header: opacity on an ancestor would stop the pill's blur sampling the page */
  .site-header::before { opacity: calc(var(--header-fade, 1) * var(--pill-fade, 1)); }
  html.is-pill-faded .site-header .location-widget { visibility: hidden; }
  .menu-toggle {
    position: fixed; z-index: var(--menu-toggle-z); pointer-events: auto;
    top: calc((var(--size-header) - var(--menu-toggle-size)) / 2); right: var(--inset-panel);
    display: grid; place-items: center; width: var(--menu-toggle-size); height: var(--menu-toggle-size);
    padding: 0; border: 0; border-radius: var(--radius-pill); background: var(--menu-glass); -webkit-backdrop-filter: blur(var(--menu-glass-blur)); backdrop-filter: blur(var(--menu-glass-blur)); color: var(--text-on-light); cursor: pointer;
  }
  .menu-toggle:active { background: var(--menu-glass-pressed); } /* pressed, to open and to close: white, as the nav pill on hover (not in Figma) */
  .menu-toggle__icon { grid-area: 1 / 1; width: var(--size-icon-16); height: var(--size-icon-16); display: block; background: currentColor;
    transition: opacity var(--duration-200) var(--ease-fast-out-slow-in), rotate var(--duration-500) var(--ease-fold); }
  .menu-toggle__icon--open { -webkit-mask: url(../assets/icons/bold/list.svg) center / contain no-repeat; mask: url(../assets/icons/bold/list.svg) center / contain no-repeat; }
  .menu-toggle__icon--close { -webkit-mask: url(../assets/icons/bold/x.svg) center / contain no-repeat; mask: url(../assets/icons/bold/x.svg) center / contain no-repeat; opacity: 0; rotate: -90deg; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__icon--open { opacity: 0; rotate: 90deg; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__icon--close { opacity: 1; rotate: 0deg; }
  /* The group (links, rule, button) is centred in what the header band leaves; its gaps give a little on short screens so it never scrolls. */
  /* The container only holds the button and the panel (it becomes the dialog while open); it takes no taps itself. */
  .menu { display: block; position: fixed; inset: 0; z-index: var(--menu-z); pointer-events: none; }
  .menu__panel {
    position: fixed; inset: 0; z-index: 0; pointer-events: auto;
    display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; max-height: 100vh; max-height: 100dvh; /* @raw-ok measure: never taller than the visible screen; it scrolls only as a last resort, where the group cannot fit (large text sizes or zoom), so every item stays reachable */
    overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: none;
    padding-top: var(--size-header); padding-top: min(var(--size-header), 15vh); padding-top: min(var(--size-header), 15dvh); /* @raw-ok measure: the band shrinks on short screens */
    background: var(--surface-page);
    opacity: 0; visibility: hidden;
    transition: opacity var(--duration-400) var(--ease-fast-out-slow-in), visibility 0s linear var(--duration-400); /* @raw-ok one-off: visibility flips at the end of the fade out */
  }
  .menu__panel::-webkit-scrollbar { display: none; }
  html { scrollbar-gutter: stable; } /* the open menu hides the page scrollbar; keeping its gutter stops the fixed button sliding sideways */
  html.menu-open, html.menu-open body { overflow: hidden; overscroll-behavior: none; } /* the page does not scroll, and shows no scrollbar, behind the open menu */
  .menu.is-open .menu__panel { opacity: 1; visibility: visible; transition-delay: 0s; } /* @raw-ok one-off: visible at once on open */
  .menu__group { margin-block: auto; width: 100%; display: flex; flex-direction: column; align-items: center; }
  .menu__links {
    width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: var(--gap-block); gap: min(var(--gap-block), 4.5vh); gap: min(var(--gap-block), 4.5dvh); /* @raw-ok measure: Figma's 40 gap, less on short screens */
    padding: var(--gap-section) var(--layout-margin); padding-block: min(var(--gap-section), 5vh); padding-block: min(var(--gap-section), 5dvh); /* @raw-ok measure: Figma's 60, less on short screens */
  }
  /* Short screens (landscape phones): the four links sit in two columns, so the group fits and the menu does not scroll.
     The columns stay clear of the fixed menu button (top right); links are touch height where there is room. */
  @media (max-height: 480px) {
    .menu__group { contain: paint; } /* the links' rise on open cannot stretch the menu by a few px */
    .menu__links {
      display: grid; grid-template-columns: 1fr 1fr; justify-items: stretch; column-gap: var(--gap-block); margin-inline: auto;
      max-width: min(calc(2 * var(--spacing-200)), calc(100% - 2 * (var(--menu-toggle-size) + var(--inset-panel) + var(--spacing-8))));
    }
    .menu__link { min-height: var(--size-touch); display: flex; align-items: center; justify-content: center; }
  }
  .menu__link, .menu__action {
    opacity: 0; translate: 0 var(--spacing-24);
    transition: opacity var(--duration-400) var(--ease-fast-out-slow-in), translate var(--duration-500) var(--ease-out-quint);
  }
  .menu__link { display: block; width: 100%; text-align: center; color: var(--text-secondary); text-decoration: none; }
  .menu__link[aria-current] { color: var(--text-body); }
  .menu.is-open .menu__link, .menu.is-open .menu__action { opacity: 1; translate: none; }
  .menu.is-open .menu__link:nth-child(2) { transition-delay: var(--duration-80); }
  .menu.is-open .menu__link:nth-child(3) { transition-delay: calc(2 * var(--duration-80)); }
  .menu.is-open .menu__link:nth-child(4) { transition-delay: calc(3 * var(--duration-80)); }
  .menu.is-open .menu__action { transition-delay: calc(4 * var(--duration-80)); }
  .menu__rule { flex: none; width: var(--spacing-80); height: var(--border-2); margin-block: calc((var(--spacing-80) - var(--border-2)) / 2); margin-block: min(calc((var(--spacing-80) - var(--border-2)) / 2), 3.5vh); margin-block: min(calc((var(--spacing-80) - var(--border-2)) / 2), 3.5dvh); } /* Figma 1716:8289: an 80px band, the 2px rule centred; @raw-ok measure: less on short screens */
  .menu__action { padding: var(--gap-section) var(--layout-margin); padding-block: min(var(--gap-section), 5vh); padding-block: min(var(--gap-section), 5dvh); } /* Figma 1716:8305: the button 60 from the rule and the bottom; @raw-ok measure: less on short screens */
  .work { padding-top: calc(var(--spacing-80) + var(--spacing-12)); } /* Figma 1716:7946 + 7948: the 80px the axis crosses, then the label 12px under it */
  .about { padding-top: var(--spacing-12); } /* Figma 1716:7967 */
  .colophon { padding: var(--inset-card) var(--gap-block) var(--gap-block); border-radius: var(--radius-40) var(--radius-40) 0 0; } /* Figma Colophon on 390: 20 / 40 / 40, corners 40 */
  /* Heading → text and paragraph → paragraph are 20 on the phone frame (Figma 1716:7950–7971), 12 on desktop */
  .section-head__text, .about__bio { gap: var(--gap-group); }
  .updates { margin-top: var(--spacing-100); } /* room above the graph, so it does not start the instant About lets go */
  .graph__node { left: calc(var(--px) * 100%); top: calc(var(--py) * 100%); }
  .graph__message { top: 50%; }
}
@media (max-width: 480px) {
  /* Figma's pill is 335px wide; below 480 its gaps tighten so it fits 320px (no phone frame yet) */
  .top-nav, .top-nav__list { gap: var(--gap-hair); }
}
