/* ==========================================================================
   Tatjana Matsubara — site styles
   One family (Geist), one accent (sea teal), one corner (6px).
   The whale shark spot pattern is the only ornament.
   ========================================================================== */

:root {
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Colour roles — light */
  --ground: #FAFAF7;
  --surface: #EEF1EE;
  --ink: #0F1A1C;
  --ink-2: #4A5658;
  --line: rgba(15, 26, 28, 0.12);
  --accent: #0B7A74;
  --accent-hover: #08635E;
  --accent-ink: #FFFFFF;
  --spot: #1BA8A3;
  --shark: #0F1A1C;
  --deep: #0C2427;
  --deep-ink: #EAF2F0;
  --deep-ink-2: #A8BEBC;
  --error: #B42318;
  --success: #0B7A74;
  --focus: #0B7A74;
  --scrim: rgba(8, 14, 16, 0.86);

  /* Type */
  --t-small: 0.875rem;
  --t-body: 1.0625rem;
  --t-lead: clamp(1.25rem, 1.6vw, 1.5rem);
  --t-h3: 1.375rem;
  --t-h2: clamp(2rem, 3.8vw, 3.25rem);
  --t-display: clamp(3rem, 8.4vw, 7.5rem);

  /* Space — 4px base */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 144px;
  --section: clamp(96px, 13vw, 192px);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --measure: 62ch;

  --radius: 6px;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --d-press: 140ms;
  --d-ui: 200ms;
  --d-enter: 700ms;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --ground: #0A1012;
  --surface: #131C1E;
  --ink: #E9EEEC;
  --ink-2: #9AA8A8;
  --line: rgba(233, 238, 236, 0.14);
  --accent: #3CC9C0;
  --accent-hover: #6AD9D1;
  --accent-ink: #061012;
  --spot: #2DC9C0;
  --shark: #E9EEEC;
  --deep: #0E2A2C;
  --error: #FF8A73;
  --success: #3CC9C0;
  --focus: #3CC9C0;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0A1012;
    --surface: #131C1E;
    --ink: #E9EEEC;
    --ink-2: #9AA8A8;
    --line: rgba(233, 238, 236, 0.14);
    --accent: #3CC9C0;
    --accent-hover: #6AD9D1;
    --accent-ink: #061012;
    --spot: #2DC9C0;
    --shark: #E9EEEC;
    --deep: #0E2A2C;
    --error: #FF8A73;
    --success: #3CC9C0;
    --focus: #3CC9C0;
    color-scheme: dark;
  }
}

/* ---------- Reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.55;
  font-feature-settings: 'ss01' on;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video, svg, canvas, iframe { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; text-wrap: balance; }
p { text-wrap: pretty; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
::selection { background: var(--spot); color: #061012; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
input, textarea { caret-color: var(--accent); }
html { scrollbar-color: color-mix(in srgb, var(--ink) 28%, transparent) transparent; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--gutter); top: -60px; z-index: 100; background: var(--ink); color: var(--ground); padding: 10px 16px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; }

.muted { color: var(--ink-2); }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--radius); border: 1px solid transparent;
  font-size: 1rem; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color var(--d-ui) var(--ease), color var(--d-ui) var(--ease), border-color var(--d-ui) var(--ease), transform var(--d-press) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-secondary { border-color: color-mix(in srgb, var(--ink) 22%, transparent); color: var(--ink); background: transparent; }
.btn .arrow { transition: transform var(--d-ui) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--accent-hover); }
  .btn-secondary:hover { border-color: var(--ink); }
  .btn:hover .arrow { transform: translateX(3px); }
  .btn[download]:hover .arrow { transform: translateY(2px); }
}
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.text-link { color: var(--accent); font-weight: 500; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
@media (hover: hover) and (pointer: fine) { .text-link:hover { text-decoration-color: currentColor; } }

/* ---------- Site header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 94%, transparent);
  transition: box-shadow var(--d-ui) var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; min-height: 44px; }
.brand-mark { width: 30px; height: 20px; background: var(--spot); -webkit-mask: url('logo.png') center / contain no-repeat; mask: url('logo.png') center / contain no-repeat; }
.site-nav { display: flex; align-items: center; gap: var(--s-2); }
.site-nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  color: var(--ink-2); text-decoration: none; font-size: 1rem; font-weight: 500;
  transition: color var(--d-ui) var(--ease);
}
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]::after { content: ''; position: absolute; left: 50%; bottom: 6px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--spot); }
@media (hover: hover) and (pointer: fine) { .site-nav a:hover { color: var(--ink); } }

.theme-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: var(--s-2);
  border: 0; background: transparent; border-radius: 50%; color: var(--ink-2);
  transition: color var(--d-ui) var(--ease), transform var(--d-press) var(--ease-out);
}
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle svg { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .theme-toggle:hover { color: var(--ink); } }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.menu-toggle { display: none; }

@media (max-width: 720px) {
  .site-header .wrap { height: 64px; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px 0 12px;
    border: 0; background: transparent; font-weight: 500; color: var(--ink);
  }
  .menu-toggle .bars { position: relative; width: 18px; height: 10px; }
  .menu-toggle .bars::before, .menu-toggle .bars::after { content: ''; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform var(--d-ui) var(--ease-out), top var(--d-ui) var(--ease-out); }
  .menu-toggle .bars::before { top: 0; }
  .menu-toggle .bars::after { top: 8.5px; }
  .site-header.is-open .menu-toggle .bars::before { top: 4.25px; transform: rotate(45deg); }
  .site-header.is-open .menu-toggle .bars::after { top: 4.25px; transform: rotate(-45deg); }

  .site-nav {
    position: fixed; inset: 64px 0 auto 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s-2) var(--gutter) var(--s-6);
    background: var(--ground); box-shadow: 0 1px 0 var(--line), 0 24px 40px -24px rgba(0,0,0,0.25);
    opacity: 0; transform: translateY(-8px); visibility: hidden;
    transition: opacity var(--d-ui) var(--ease-out), transform var(--d-ui) var(--ease-out), visibility 0s linear var(--d-ui);
  }
  .site-header.is-open .site-nav { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
  .site-nav a { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; min-height: 56px; padding: 0; color: var(--ink); }
  .site-nav a[aria-current="page"]::after { left: auto; right: 0; bottom: auto; top: 50%; margin: -2.5px 0 0; }
  .theme-toggle { margin: var(--s-3) 0 0 -10px; }
}

/* ---------- Footer ---------- */

.site-footer { padding-block: var(--s-8) var(--s-7); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-6); align-items: start; }
.site-footer .who strong { display: block; font-weight: 600; margin-bottom: var(--s-1); }
.site-footer .who p { color: var(--ink-2); max-width: 34ch; }
.site-footer h2 { font-size: var(--t-small); font-weight: 500; color: var(--ink-2); letter-spacing: 0; margin-bottom: var(--s-2); }
.site-footer ul a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .site-footer ul a:hover { color: var(--accent); } }
.site-footer .legal { grid-column: 1 / -1; color: var(--ink-2); font-size: var(--t-small); padding-top: var(--s-6); }
@media (max-width: 720px) {
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .who { grid-column: 1 / -1; }
}

/* ---------- Whale shark pattern ---------- */

.shark {
  --mx: -999px; --my: -999px;
  position: relative;
  aspect-ratio: 2400 / 871;
  width: 100%;
}
.shark::before, .shark::after {
  content: ''; position: absolute; inset: 0;
  -webkit-mask: url('whaleshark-transparent.png') center / contain no-repeat;
  mask: url('whaleshark-transparent.png') center / contain no-repeat;
}
.shark::before { background: var(--shark); opacity: 0.88; }
.shark::after {
  background: radial-gradient(160px circle at var(--mx) var(--my), var(--spot) 0%, var(--spot) 35%, transparent 100%);
  transition: opacity 400ms var(--ease);
}
.shark.is-idle::after { opacity: 0; }

/* Repeating spot field, used as a quiet ground on dark bands */
.spot-field {
  position: absolute; inset: 0; pointer-events: none;
  background: var(--spot);
  -webkit-mask: url('hero-dot-pattern-alpha.png') top center / auto 520px repeat-x, linear-gradient(to bottom, #000 0%, transparent 85%);
  -webkit-mask-composite: source-in;
  mask: url('hero-dot-pattern-alpha.png') top center / auto 520px repeat-x, linear-gradient(to bottom, #000 0%, transparent 85%);
  mask-composite: intersect;
}

/* ---------- Reveal on scroll (only once JS has run) ---------- */

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--d-enter) var(--ease-out), transform var(--d-enter) var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { transform: none; transition: opacity 300ms linear; transition-delay: 0ms; }
}

/* ==========================================================================
   Home
   ========================================================================== */

.hero { padding-top: clamp(32px, 4.5vw, 72px); }
@media (max-width: 560px) { .contact-head h1, .contact-band h2 { font-size: 16.5vw; } }
.hero h1 { font-size: var(--t-display); font-weight: 600; letter-spacing: -0.045em; line-height: 0.92; margin-left: -0.04em; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-6) var(--s-9); margin-top: var(--s-6); align-items: end; }
.hero-lead { font-size: var(--t-lead); line-height: 1.4; letter-spacing: -0.01em; max-width: 30ch; }
.hero-side { display: grid; gap: var(--s-5); justify-items: start; }
.status { display: flex; gap: var(--s-3); align-items: baseline; color: var(--ink); max-width: 36ch; }
.status::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--spot); box-shadow: 0 0 0 4px color-mix(in srgb, var(--spot) 22%, transparent); transform: translateY(-1px); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.hero-shark { margin-top: clamp(24px, 3vw, 48px); overflow-x: clip; padding-top: 8px; }
.hero-shark .shark { width: min(104vw, 1640px); margin-left: 50%; transform: translateX(calc(-50% + var(--drift, 0px))); will-change: transform; }
.shark-caption { display: flex; justify-content: flex-end; margin-top: var(--s-3); }
.shark-caption p { max-width: 46ch; color: var(--ink-2); font-size: var(--t-small); line-height: 1.55; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-shark .shark { width: 150vw; }
  .shark-caption { justify-content: flex-start; }
}

/* Section heading row */
.section { padding-top: var(--section); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-5) var(--s-9); align-items: end; margin-bottom: var(--s-8); }
.section-head h2 { font-size: var(--t-h2); }
.section-head p { color: var(--ink-2); max-width: 46ch; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; margin-bottom: var(--s-7); } }

/* Work grid */
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-9) clamp(24px, 4vw, 64px); }
.work-grid > li:nth-child(even) { margin-top: var(--s-10); }
.work-card { display: block; text-decoration: none; color: inherit; }
.work-card .media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.work-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.work-card .title-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); margin-top: var(--s-5); }
.work-card h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); letter-spacing: -0.03em; }
.work-card .kind { color: var(--ink-2); font-size: var(--t-small); white-space: nowrap; }
.work-card .blurb { margin-top: var(--s-2); max-width: 46ch; }
.work-card .role { margin-top: var(--s-2); color: var(--ink-2); font-size: var(--t-small); }
.work-card .go { display: inline-flex; gap: 6px; margin-top: var(--s-4); color: var(--accent); font-weight: 500; font-size: 1rem; }
.work-card .go span { transition: transform var(--d-ui) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .work-card:hover .media img { transform: scale(1.03); }
  .work-card:hover .go span { transform: translateX(4px); }
}
.work-card:focus-visible { outline-offset: 8px; border-radius: var(--radius); }

.in-progress { margin-top: var(--s-9); display: flex; gap: var(--s-4); align-items: baseline; padding: var(--s-5) 0; color: var(--ink-2); }
.in-progress strong { color: var(--ink); font-weight: 600; }
.in-progress::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--spot); transform: translateY(-1px); }

@media (max-width: 720px) {
  .work-grid { grid-template-columns: 1fr; gap: var(--s-8); }
  .work-grid > li:nth-child(even) { margin-top: 0; }
}

/* Skills */
.skills { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s-7) var(--s-9); align-items: start; }
.skills .skills-head { position: sticky; top: 120px; }
.skills .skills-head h2 { font-size: var(--t-h2); }
.skills .skills-head p { margin-top: var(--s-4); color: var(--ink-2); max-width: 30ch; }
.skill-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7) var(--s-7); }
.skill-list li { display: grid; grid-template-columns: 22px 1fr; column-gap: var(--s-3); }
.skill-list .blob { width: 14px; height: 14px; margin-top: 6px; background: var(--spot); -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.skill-list h3 { font-size: var(--t-body); letter-spacing: -0.015em; line-height: 1.3; }
.skill-list p { grid-column: 2; margin-top: var(--s-2); color: var(--ink-2); }
@media (max-width: 860px) {
  .skills { grid-template-columns: 1fr; }
  .skills .skills-head { position: static; }
}
@media (max-width: 560px) { .skill-list { grid-template-columns: 1fr; gap: var(--s-6); } }

.toolbox { margin-top: var(--s-9); display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s-5) var(--s-9); }
.toolbox h3 { font-size: var(--t-h3); letter-spacing: -0.02em; }
.tool-list { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); }
.tool-list li { display: inline-flex; align-items: center; gap: 10px; }
.tool-list img { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; }
:root[data-theme="dark"] .tool-list img.invert-dark { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tool-list img.invert-dark { filter: invert(1); } }
@media (max-width: 860px) { .toolbox { grid-template-columns: 1fr; } }

/* About teaser */

/* Contact band */
.contact-band {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: var(--section);
  background: var(--deep); color: var(--deep-ink);
  padding-block: clamp(96px, 12vw, 176px);
}
.contact-band .spot-field { opacity: 0.22; z-index: -1; }
.contact-band h2 { font-size: var(--t-display); letter-spacing: -0.045em; line-height: 0.92; }
.contact-band p { margin-top: var(--s-6); font-size: var(--t-lead); color: var(--deep-ink-2); max-width: 32ch; line-height: 1.4; }
.contact-band .actions { margin-top: var(--s-7); }
.contact-band .btn-primary { background: #3CC9C0; color: #061012; }
.contact-band .btn-secondary { color: var(--deep-ink); border-color: rgba(234, 242, 240, 0.35); }
@media (hover: hover) and (pointer: fine) {
  .contact-band .btn-primary:hover { background: #6AD9D1; }
  .contact-band .btn-secondary:hover { border-color: var(--deep-ink); }
}
.contact-band ::selection { background: #3CC9C0; color: #061012; }
.contact-band :focus-visible { outline-color: #3CC9C0; }

/* ==========================================================================
   Case study
   ========================================================================== */

.case-head { padding-top: clamp(32px, 5vw, 72px); }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 1rem; }
.back span { transition: transform var(--d-ui) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .back:hover { color: var(--ink); } .back:hover span { transform: translateX(-3px); } }
.case-head h1 { margin-top: var(--s-6); font-size: clamp(3rem, 8vw, 7rem); letter-spacing: -0.045em; line-height: 0.95; margin-left: -0.03em; }
.case-intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-7) var(--s-9); margin-top: var(--s-7); align-items: start; }
.case-intro .lede { font-size: var(--t-lead); line-height: 1.45; letter-spacing: -0.01em; max-width: 40ch; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-6); }
.facts dt { color: var(--ink-2); font-size: var(--t-small); }
.facts dd { margin-top: 2px; font-weight: 500; line-height: 1.4; }
@media (max-width: 860px) { .case-intro { grid-template-columns: 1fr; } }

.case-hero { margin-top: var(--s-9); }
.case-hero .frame { border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.case-hero img, .case-hero video { width: 100%; }

.zoom { display: block; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; }
.zoom img { transition: transform 700ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .zoom:hover img { transform: scale(1.015); } }

.screens { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); margin-top: var(--s-5); }
.screens figure .zoom { aspect-ratio: 4 / 3; background: var(--surface); }
.screens figure img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.screens.contain figure img { object-fit: contain; }
.screens figcaption { margin-top: var(--s-2); color: var(--ink-2); font-size: var(--t-small); }
@media (max-width: 720px) { .screens { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Timeline of steps — a dotted spine, like the shark's lateral spots */
.steps { position: relative; padding-top: var(--section); }
.step { position: relative; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s-5) var(--s-7); padding-bottom: var(--s-10); }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: ''; position: absolute; left: 4px; top: 30px; bottom: 6px; width: 2px;
  background: radial-gradient(circle, color-mix(in srgb, var(--ink) 30%, transparent) 1px, transparent 1.5px) center top / 2px 10px repeat-y;
}
.step:last-child::before { display: none; }
.step-name { position: relative; padding-left: 28px; color: var(--ink-2); font-weight: 500; line-height: 1.3; padding-top: 6px; }
.step-name::before { content: ''; position: absolute; left: 0; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--spot); }
.step h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -0.03em; max-width: 22ch; }
.step p { margin-top: var(--s-4); max-width: var(--measure); }
.step p + p { margin-top: var(--s-4); }
.step-media { margin-top: var(--s-7); }
.step-media .zoom { background: var(--surface); }
.step-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 0; }
.step-media.contain .zoom { background: #000; }
.step-media.contain img { object-fit: contain; }
@media (max-width: 760px) {
  .step { grid-template-columns: 1fr; padding-bottom: var(--s-9); padding-left: 28px; }
  .step::before { top: 24px; }
  .step-name { margin-left: -28px; }
}

.block { padding-top: var(--section); }
.block > h2 { font-size: var(--t-h2); max-width: 20ch; }
.block > .intro { margin-top: var(--s-4); color: var(--ink-2); max-width: 56ch; }
.block-body { margin-top: var(--s-7); }
.prose p { max-width: var(--measure); }
.prose p + p { margin-top: var(--s-4); }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.gallery .wide { grid-column: 1 / -1; }
.gallery .zoom { background: var(--surface); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery.square .zoom { aspect-ratio: 1; }
.gallery figcaption { margin-top: var(--s-2); color: var(--ink-2); font-size: var(--t-small); max-width: 52ch; }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }

.embed { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); aspect-ratio: 1194 / 834; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Insights & ideas (Eyes on the Street) */
.insights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-8) var(--s-7); counter-reset: insight; }
.insights li { border-top: 2px solid var(--ink); padding-top: var(--s-4); }
.insights .n { display: block; color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.insights h3 { margin-top: var(--s-2); font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.25; }
.insights p { margin-top: var(--s-3); }
.insights .cards { margin-top: var(--s-3); color: var(--ink-2); font-size: var(--t-small); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .insights { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .insights { grid-template-columns: 1fr; gap: var(--s-6); } }

.idea-list { display: grid; gap: 0; }
.idea-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-5) 0; border-bottom: 1px solid var(--line); font-size: var(--t-lead); line-height: 1.4; letter-spacing: -0.01em; }
.idea-list li:first-child { border-top: 1px solid var(--line); }
.idea-list .n { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Slides */
.slides { position: relative; }
.slides .stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface); display: grid; place-items: center; }
.slides .stage img, .slides .stage canvas { width: 100%; height: 100%; object-fit: contain; }
.slides .stage .loading { position: absolute; color: var(--ink-2); }
.slides .controls { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-4); }
.slides .controls .count { margin-left: auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.icon-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); background: transparent; color: var(--ink);
  transition: border-color var(--d-ui) var(--ease), transform var(--d-press) var(--ease-out);
}
.icon-btn:active { transform: scale(0.94); }
.icon-btn[disabled] { opacity: 0.35; cursor: default; }
@media (hover: hover) and (pointer: fine) { .icon-btn:not([disabled]):hover { border-color: var(--ink); } }

/* Takeaways */
.takeaways { padding-top: var(--section); }
.takeaways-inner { background: var(--surface); border-radius: var(--radius); padding: clamp(32px, 6vw, 80px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s-7) var(--s-9); align-items: start; }
.takeaways h2 { font-size: var(--t-h2); }
.takeaways ol { display: grid; gap: var(--s-6); counter-reset: tk; }
.takeaways ol li { counter-increment: tk; display: grid; grid-template-columns: 40px minmax(0, 1fr); font-size: 1.1875rem; line-height: 1.45; letter-spacing: -0.005em; }
.takeaways ol li::before { content: counter(tk); color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.takeaways .tools { grid-column: 2; padding-top: var(--s-5); border-top: 1px solid var(--line); color: var(--ink-2); }
.takeaways .tools strong { color: var(--ink); font-weight: 500; margin-right: var(--s-3); }
@media (max-width: 860px) { .takeaways-inner { grid-template-columns: 1fr; } .takeaways .tools { grid-column: 1; } }

/* Next project */
.next { padding-block: var(--section) var(--s-9); }
.next a { display: block; text-decoration: none; }
.next .label { color: var(--ink-2); }
.next .name { display: flex; align-items: baseline; gap: 0.25em; margin-top: var(--s-2); font-size: clamp(2.5rem, 7vw, 6rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.next .name span { color: var(--spot); transition: transform var(--d-ui) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .next a:hover .name span { transform: translateX(10px); } }
.next .all { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--s-5); }

/* Lightbox */
.lightbox { border: 0; padding: 0; max-width: none; max-height: none; width: 100vw; height: 100dvh; background: transparent; color: #fff; }
.lightbox::backdrop { background: var(--scrim); }
.lightbox[open] { display: grid; place-items: center; animation: lb-in 240ms var(--ease-out); }
.lightbox img { max-width: min(92vw, 1600px); max-height: 86dvh; width: auto; height: auto; object-fit: contain; border-radius: var(--radius); }
.lightbox .close { position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.35); background: rgba(0,0,0,0.3); color: #fff; display: grid; place-items: center; }
.lightbox .close:active { transform: scale(0.94); }
@keyframes lb-in { from { opacity: 0; transform: scale(0.97); } }
@media (prefers-reduced-motion: reduce) { .lightbox[open] { animation: none; } }

/* ==========================================================================
   About
   ========================================================================== */

.about-head { padding-top: clamp(40px, 6vw, 96px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-7) var(--s-9); align-items: end; }
.about-head h1 { font-size: clamp(2.75rem, 6.5vw, 5.75rem); letter-spacing: -0.045em; line-height: 0.95; }
.about-head .lede { margin-top: var(--s-6); font-size: var(--t-lead); line-height: 1.45; max-width: 36ch; letter-spacing: -0.01em; }
.about-head .portrait { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.about-head .portrait img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .about-head { grid-template-columns: 1fr; } .about-head .portrait { max-width: 420px; } }

.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s-5) var(--s-9); align-items: start; }
.story h2 { font-size: var(--t-h2); }
.story .prose p { font-size: 1.1875rem; line-height: 1.6; }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; } }

.hobbies { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); }
.hobbies .zoom { aspect-ratio: 3 / 4; background: var(--surface); }
.hobbies img { width: 100%; height: 100%; object-fit: cover; }
.hobbies h3 { margin-top: var(--s-4); font-size: 1.125rem; letter-spacing: -0.015em; }
.hobbies p { margin-top: var(--s-1); color: var(--ink-2); }
@media (max-width: 900px) { .hobbies { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.shark-feature { padding-top: var(--section); }
.shark-feature .shark { width: min(100%, 1400px); margin-inline: auto; }
.shark-feature .shark-caption { justify-content: center; text-align: center; }
.shark-feature .shark-caption p { font-size: 1rem; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-head { padding-top: clamp(40px, 6vw, 96px); }
.contact-head h1 { font-size: var(--t-display); letter-spacing: -0.045em; line-height: 0.92; }
.contact-head .lede { margin-top: var(--s-6); font-size: var(--t-lead); max-width: 34ch; line-height: 1.4; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s-8) var(--s-10); margin-top: var(--s-9); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.form { display: grid; gap: var(--s-6); }
.field { display: grid; gap: var(--s-2); }
.field label { font-weight: 500; }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: 14px 16px;
  border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  background: var(--ground); font-size: 1rem; line-height: 1.5;
  transition: border-color var(--d-ui) var(--ease), box-shadow var(--d-ui) var(--ease);
}
.field textarea { min-height: 160px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--ink-2) 80%, transparent); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field .msg { min-height: 1.25em; font-size: var(--t-small); color: var(--error); }
.field .msg.is-info { color: var(--ink-2); }
.consent { display: flex; gap: var(--s-3); align-items: center; min-height: 44px; }
.consent input { width: 24px; height: 24px; margin: 0; accent-color: var(--accent); flex: none; }
.form-error { color: var(--error); }

.direct { display: grid; gap: var(--s-6); }
.direct a { display: grid; gap: 2px; text-decoration: none; padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.direct a span:first-child { color: var(--ink-2); font-size: var(--t-small); }
.direct a span:last-child { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.015em; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .direct a:hover span:last-child { color: var(--accent); } }

.dialog { border: 0; border-radius: var(--radius); padding: clamp(28px, 5vw, 48px); max-width: min(440px, calc(100vw - 32px)); background: var(--ground); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,0.45); }
.dialog::backdrop { background: rgba(8,14,16,0.55); }
.dialog[open] { animation: lb-in 240ms var(--ease-out); }
.dialog .tick { width: 44px; height: 44px; border-radius: 50%; background: var(--spot); display: grid; place-items: center; color: #061012; }
.dialog h2 { margin-top: var(--s-5); font-size: 1.75rem; }
.dialog p { margin-top: var(--s-3); color: var(--ink-2); }
.dialog .btn { margin-top: var(--s-6); }

/* ==========================================================================
   Simple pages (privacy, 404)
   ========================================================================== */

.simple { padding-top: clamp(40px, 6vw, 96px); padding-bottom: var(--s-9); }
.simple h1 { font-size: clamp(2.75rem, 6vw, 5rem); letter-spacing: -0.045em; line-height: 0.95; }
.simple .updated { margin-top: var(--s-4); color: var(--ink-2); }
.simple .policy { margin-top: var(--s-8); display: grid; gap: var(--s-7); max-width: 62ch; }
.simple .policy h2 { font-size: var(--t-h3); letter-spacing: -0.02em; }
.simple .policy p { margin-top: var(--s-3); }

.lost { min-height: 60vh; display: grid; align-content: center; }
.lost .code { font-size: clamp(6rem, 22vw, 16rem); font-weight: 600; letter-spacing: -0.06em; line-height: 0.85; color: var(--spot); }
.lost h1 { margin-top: var(--s-5); font-size: clamp(2rem, 4vw, 3rem); }
.lost p { margin-top: var(--s-4); max-width: 44ch; color: var(--ink-2); }
.lost .actions { margin-top: var(--s-7); }

/* ==========================================================================
   Colour & motion layer
   The palette of the water the whale shark swims in: lagoon teal, open-sea
   blue and a little sunlight. Each project carries its own colour (--c).
   ========================================================================== */

:root {
  --lagoon: #3FC8BC;
  --sea: #2C7BD6;
  --sun: #FFC266;
  --coral: #FF7A5C;
  --deep-2: #0F4152;
  --grad-sea: linear-gradient(115deg, #0B7A74 0%, #136E9E 100%);
  --aurora-1: rgba(63, 200, 188, 0.34);
  --aurora-2: rgba(44, 123, 214, 0.22);
  --aurora-3: rgba(255, 194, 102, 0.30);
  --tint: linear-gradient(160deg, #E6F5F2 0%, #EAF1FB 55%, #FBF3E6 100%);
  --c: var(--spot);
}
:root[data-theme="dark"] {
  --grad-sea: linear-gradient(115deg, #3CC9C0 0%, #6FB3FF 100%);
  --aurora-1: rgba(45, 201, 192, 0.30);
  --aurora-2: rgba(44, 123, 214, 0.32);
  --aurora-3: rgba(255, 170, 90, 0.14);
  --tint: linear-gradient(160deg, #0E2124 0%, #0F1A2A 60%, #1A1813 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --grad-sea: linear-gradient(115deg, #3CC9C0 0%, #6FB3FF 100%);
    --aurora-1: rgba(45, 201, 192, 0.30);
    --aurora-2: rgba(44, 123, 214, 0.32);
    --aurora-3: rgba(255, 170, 90, 0.14);
    --tint: linear-gradient(160deg, #0E2124 0%, #0F1A2A 60%, #1A1813 100%);
  }
}

/* Primary action: a sea gradient that shifts on hover */
.btn-primary { background: var(--grad-sea); background-size: 160% 100%; background-position: 0% 50%; transition: background-position 300ms var(--ease-out), transform var(--d-press) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { background: var(--grad-sea); background-size: 160% 100%; background-position: 100% 50%; } }

/* ---------- Hero: aurora light through water, rising spots ---------- */
.hero { position: relative; isolation: isolate; }
.aurora { position: absolute; inset: -72px 0 0 0; z-index: -1; overflow: hidden; pointer-events: none;
  -webkit-mask: linear-gradient(to bottom, #000 55%, transparent 100%); mask: linear-gradient(to bottom, #000 55%, transparent 100%); }
.aurora span { position: absolute; border-radius: 50%; filter: blur(70px); will-change: transform; }
.aurora .a1 { width: 52vw; height: 52vw; left: 46%; top: -18vw; background: radial-gradient(circle, var(--aurora-1), transparent 68%); animation: drift-a 26s var(--ease-in-out) infinite alternate; }
.aurora .a2 { width: 46vw; height: 46vw; left: 70%; top: 14vw; background: radial-gradient(circle, var(--aurora-2), transparent 68%); animation: drift-b 32s var(--ease-in-out) infinite alternate; }
.aurora .a3 { width: 38vw; height: 38vw; left: 22%; top: 2vw; background: radial-gradient(circle, var(--aurora-3), transparent 68%); animation: drift-c 22s var(--ease-in-out) infinite alternate; }
@keyframes drift-a { to { transform: translate(-14vw, 8vw) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-18vw, -6vw) scale(0.9); } }
@keyframes drift-c { to { transform: translate(16vw, 10vw) scale(1.2); } }

.bubbles { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bubbles i { position: absolute; bottom: -20px; left: var(--x); width: var(--s); height: var(--s); border-radius: 52% 48% 55% 45%;
  background: var(--spot); opacity: 0; animation: rise var(--d) linear var(--delay) infinite; }
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: 0.55; }
  50% { transform: translate(14px, -45vh); }
  85% { opacity: 0.35; }
  100% { transform: translate(-8px, -90vh); opacity: 0; }
}
.hero .wrap, .hero-shark { position: relative; }

/* The shark's spots run from deep sea at the head to lagoon at the tail,
   with a slow band of sunlight sweeping along its body. */
.shark::before {
  opacity: 1;
  background: linear-gradient(100deg, var(--shark) 0%, var(--shark) 22%, #12807A 46%, var(--lagoon) 58%, var(--sun) 64%, var(--lagoon) 70%, #2C7BD6 88%, var(--shark) 100%);
  background-size: 260% 100%;
  background-position: 100% 50%;
  animation: shimmer 14s var(--ease-in-out) infinite alternate;
}
.shark::after { background: radial-gradient(170px circle at var(--mx) var(--my), var(--coral) 0%, var(--sun) 30%, transparent 100%); }
@keyframes shimmer { to { background-position: 0% 50%; } }

/* ---------- Moving skill band ---------- */
.marquee { margin-top: var(--s-8); background: var(--grad-sea); color: #fff; overflow: hidden; padding-block: var(--s-5); transform: rotate(-1.2deg); margin-inline: -2vw; }
:root[data-theme="dark"] .marquee { color: #061012; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .marquee { color: #061012; } }
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee ul { display: flex; flex: none; }
.marquee li { display: inline-flex; align-items: center; gap: var(--s-6); padding-right: var(--s-6); font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
.marquee li::after { content: ''; width: 10px; height: 10px; border-radius: 52% 48% 55% 45%; background: currentColor; opacity: 0.55; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (hover: hover) and (pointer: fine) { .marquee:hover .marquee-track { animation-play-state: paused; } }

/* ---------- Work cards carry their project colour ---------- */
.work-card .media { box-shadow: 0 0 0 0 transparent; transition: box-shadow 500ms var(--ease-out), transform 500ms var(--ease-out); }
.work-card .media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--c) 55%, transparent) 100%); opacity: 0; transition: opacity 500ms var(--ease-out); }
.work-card .kind { display: inline-flex; align-items: center; gap: 8px; }
.work-card .kind::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
@media (hover: hover) and (pointer: fine) {
  .work-card:hover .media { transform: translateY(-6px); box-shadow: 0 30px 60px -24px color-mix(in srgb, var(--c) 75%, transparent); }
  .work-card:hover .media::after { opacity: 1; }
}

/* ---------- Tinted, gradient-washed section ---------- */
.section-tint { position: relative; margin-top: var(--section); padding-block: var(--section); background: var(--tint); overflow: hidden; isolation: isolate; }
.section-tint::before { content: ''; position: absolute; width: 60vw; height: 60vw; right: -20vw; top: -20vw; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, var(--aurora-1), transparent 65%); filter: blur(40px); animation: drift-b 30s var(--ease-in-out) infinite alternate; }
.section-tint .skills .skills-head { top: 120px; }
.skill-list li:nth-child(5n+1) .blob { background: var(--spot); }
.skill-list li:nth-child(5n+2) .blob { background: var(--sea); }
.skill-list li:nth-child(5n+3) .blob { background: var(--sun); }
.skill-list li:nth-child(5n+4) .blob { background: var(--coral); }
.skill-list li:nth-child(5n+5) .blob { background: var(--lagoon); }
.skill-list .blob { width: 16px; height: 16px; transition: transform 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .skill-list li:hover .blob { transform: scale(1.5) rotate(25deg); } }

/* ---------- Contact band: moving deep-sea gradient and drifting spots ---------- */
.contact-band { background: linear-gradient(125deg, #08191C 0%, #0C2E35 35%, #0F4152 60%, #0B5E62 100%); background-size: 200% 200%; animation: tide 18s var(--ease-in-out) infinite alternate; }
@keyframes tide { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.contact-band .spot-field { right: auto; width: calc(100% + 728px); opacity: 0.3; animation: swim 46s linear infinite; }
@keyframes swim { to { transform: translateX(-728px); } }
.contact-band .glow { position: absolute; z-index: -1; width: 50vw; height: 50vw; right: -10vw; bottom: -25vw; border-radius: 50%; background: radial-gradient(circle, rgba(63, 200, 188, 0.35), transparent 65%); filter: blur(30px); animation: drift-a 24s var(--ease-in-out) infinite alternate; }
.contact-band h2 { background: linear-gradient(95deg, #EAF2F0 0%, #9BEBE1 45%, #FFD38A 90%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.06em; }
.contact-band .btn-primary { background: linear-gradient(115deg, #3CC9C0, #8FD3FF); background-size: 160% 100%; color: #061012; }
@media (hover: hover) and (pointer: fine) { .contact-band .btn-primary:hover { background: linear-gradient(115deg, #3CC9C0, #8FD3FF); background-size: 160% 100%; background-position: 100% 50%; } }

/* ---------- Case studies: a wash of the project colour ---------- */
.case-head { position: relative; isolation: isolate; }
.case-head::before { content: ''; position: absolute; z-index: -1; left: 50%; width: 100vw; margin-left: -50vw; top: -72px; height: 760px; pointer-events: none;
  background:
    radial-gradient(42% 60% at 78% 22%, color-mix(in srgb, var(--c) 34%, transparent), transparent 70%),
    radial-gradient(36% 50% at 18% 6%, color-mix(in srgb, var(--spot) 20%, transparent), transparent 70%);
  animation: wash 20s var(--ease-in-out) infinite alternate; }
@keyframes wash { to { transform: translate3d(-3vw, 2vw, 0) scale(1.06); } }
.case-head h1 { background: linear-gradient(100deg, var(--ink) 30%, color-mix(in srgb, var(--c) 70%, var(--ink)) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.05em; }
.step-name::before { background: var(--c); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 22%, transparent); }
.takeaways-inner { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, var(--surface)) 0%, var(--surface) 55%, color-mix(in srgb, var(--spot) 12%, var(--surface)) 100%); }
.takeaways ol li::before { color: color-mix(in srgb, var(--c) 65%, var(--ink)); }
.insights li { border-top-color: var(--c); }
.next .name span { color: var(--c); }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--spot), var(--c)); }

/* ---------- Reduced motion: keep the colour, drop the movement ---------- */
@media (prefers-reduced-motion: reduce) {
  .aurora span, .bubbles, .shark::before, .marquee-track, .section-tint::before,
  .contact-band, .contact-band .spot-field, .contact-band .glow, .case-head::before { animation: none !important; }
  .bubbles { display: none; }
  .marquee-track { flex-wrap: wrap; }
  .marquee ul[aria-hidden] { display: none; }
}

.marquee-wrap { overflow: hidden; padding-block: var(--s-6); margin-top: var(--s-6); }
.marquee-wrap .marquee { margin-top: 0; }
.site-header { background: transparent; transition: background-color var(--d-ui) var(--ease), box-shadow var(--d-ui) var(--ease); }
.site-header.is-scrolled, .site-header.is-open { background: color-mix(in srgb, var(--ground) 94%, transparent); }

@media (max-width: 560px) { .bubbles i:nth-child(2n) { display: none; } .bubbles i { width: calc(var(--s) * 0.7); height: calc(var(--s) * 0.7); } }

/* ---------- A touch of colour on the simpler pages ---------- */
.contact-head, .about-head, .simple { position: relative; isolation: isolate; }
.contact-head { --c: #FFB347; }
.about-head { --c: var(--coral); }
.simple { --c: var(--sea); }
.contact-head::before, .about-head::before, .simple::before {
  content: ''; position: absolute; z-index: -1; left: 50%; width: 100vw; margin-left: -50vw; top: -72px; height: 720px; pointer-events: none;
  background:
    radial-gradient(40% 58% at 80% 20%, color-mix(in srgb, var(--c) 26%, transparent), transparent 70%),
    radial-gradient(38% 52% at 16% 4%, color-mix(in srgb, var(--spot) 20%, transparent), transparent 70%);
  animation: wash 20s var(--ease-in-out) infinite alternate;
}
.contact-head h1 { background: linear-gradient(100deg, var(--ink) 25%, color-mix(in srgb, var(--spot) 75%, var(--ink)) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.05em; }

.direct a span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.direct a span:first-child::before { content: ''; width: 8px; height: 8px; border-radius: 52% 48% 55% 45%; background: var(--spot); }
.direct a:nth-child(2) span:first-child::before { background: var(--sea); }
.direct a:nth-child(3) span:first-child::before { background: var(--sun); }

.consent input:checked { accent-color: var(--spot); }

.site-footer { background: linear-gradient(180deg, var(--ground) 0%, color-mix(in srgb, var(--spot) 8%, var(--ground)) 100%); }
@media (hover: hover) and (pointer: fine) { .site-footer ul a { transition: color var(--d-ui) var(--ease); } }

@media (prefers-reduced-motion: reduce) { .contact-head::before, .about-head::before, .simple::before { animation: none; } }
.contact-head h1 { display: inline-block; }

/* What I bring: short list, intro in turquoise, hint per skill on hover */
.skills .skill-list { gap: var(--s-5) var(--s-7); }
.skills .skills-head p { color: var(--accent); }
.skill-list .skill-hint { margin-top: var(--s-1); font-size: 0.9375rem; transition: opacity var(--d-ui) var(--ease), transform var(--d-ui) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .skill-list .skill-hint { opacity: 0; transform: translateY(-4px); }
  .skill-list li:hover .skill-hint { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .skill-list .skill-hint { transition: none; transform: none; } }

/* Project animations: looping card videos and case-study films */
.work-card .media video.card-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none;
  transition: opacity 400ms var(--ease-out), transform 600ms var(--ease-out); }
.work-card .media.is-playing video.card-video { opacity: 1; }
/* Once the video has faded in, hide the cover under it so no bright sliver
   of the still shows through at fractional edges when a frame goes dark. */
.work-card .media.is-playing img { opacity: 0; transition: opacity 0s linear 400ms; }
@media (hover: hover) and (pointer: fine) { .work-card:hover .media video.card-video { transform: scale(1.03); } }
.case-film { margin-top: var(--s-8); }
.case-film video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: #000; }
@media (prefers-reduced-motion: reduce) { .work-card .media video.card-video { display: none; } }

/* ---------- Narrower work grid: two cards across about half the screen ---------- */
.work-grid { max-width: clamp(560px, 54vw, 820px); margin-inline: auto; gap: var(--s-8) clamp(20px, 2.6vw, 40px); }
.work-grid > li:nth-child(even) { margin-top: var(--s-9); }
.work-card .title-row { flex-wrap: wrap; row-gap: var(--s-1); margin-top: var(--s-4); }
.work-card h3 { font-size: clamp(1.25rem, 1.6vw, 1.5rem); }
.work-card .blurb { font-size: 1rem; }
@media (max-width: 720px) {
  .work-grid { max-width: 440px; }
  .work-grid > li:nth-child(even) { margin-top: 0; }
}
#work .section-head, #work .in-progress { max-width: clamp(560px, 54vw, 820px); margin-inline: auto; }
#work .section-head { grid-template-columns: 1fr; gap: var(--s-4); }
@media (max-width: 720px) { #work .section-head, #work .in-progress { max-width: 440px; } }

/* Phone screens in case studies */
.screens.phones figure .zoom, .phone-row figure .zoom { aspect-ratio: 9 / 19.5; background: var(--surface); }
.phone-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); margin-top: var(--s-7); }
.phone-row figure img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone-row figcaption { margin-top: var(--s-2); color: var(--ink-2); font-size: var(--t-small); }
@media (max-width: 720px) { .phone-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Hero: smaller name, with a tilted photo print on the far left */
.hero-intro { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-6) clamp(32px, 4vw, 64px); align-items: start; }
.hero .hero-main h1 { font-size: clamp(2.25rem, 4.2vw, 3.75rem); }
.hero-photo { width: clamp(170px, 16vw, 240px); margin-top: var(--s-2); padding: 8px 8px 26px; background: #F4F1EA;
  transform: rotate(-4deg); box-shadow: 0 14px 30px -12px rgb(0 0 0 / 0.6); }
.hero-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 35%; }
@media (max-width: 760px) {
  .hero-intro { grid-template-columns: 1fr; }
  .hero-photo { width: 150px; padding: 6px 6px 20px; }
}
@media (max-width: 560px) { .hero .hero-main h1 { font-size: 11vw; } }

/* ==========================================================================
   Gallery: visuals only. A tile opens full width, right below its row.
   ========================================================================== */
.more-title { font-size: var(--t-h2); margin-bottom: var(--s-7); }
.more-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 1000px) { .more-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); } }
.more-thumb { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); }
.more-thumb .thumb { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface); transition: transform var(--d-press) var(--ease-out); }
.more-thumb img, .more-thumb .tile-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.more-thumb .tile-video { opacity: 0; transition: opacity 400ms var(--ease-out), transform 600ms var(--ease-out); }
.more-thumb .tile-video.is-playing { opacity: 1; }
.more-thumb .plus { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--ground) 70%, transparent); backdrop-filter: blur(6px); opacity: 0; transform: scale(0.8); transition: opacity var(--d-ui) var(--ease-out), transform var(--d-ui) var(--ease-out); }
.more-thumb .plus::before, .more-thumb .plus::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.75px; background: var(--ink); border-radius: 2px; transform: translate(-50%, -50%); }
.more-thumb .plus::after { transform: translate(-50%, -50%) rotate(90deg); }
@media (hover: hover) and (pointer: fine) {
  .more-thumb:hover img, .more-thumb:hover .tile-video { transform: scale(1.04); }
  .more-thumb:hover .plus { opacity: 1; transform: none; }
}
.more-thumb:active .thumb { transform: scale(0.98); }
.more-thumb:focus-visible { outline-offset: 6px; }
.more-slot { grid-column: 1 / -1; }
.more-item.is-open .thumb { outline: 2px solid var(--c); outline-offset: 4px; }
.more-item.is-open .plus { opacity: 1; transform: rotate(45deg); }
.more-panel { position: relative; padding: var(--s-5); border-radius: var(--radius); background: linear-gradient(135deg, color-mix(in srgb, var(--c) 14%, var(--surface)) 0%, var(--surface) 60%); }
.more-panel[hidden] { display: none; }
.more-slot .more-panel { animation: more-in 420ms var(--ease-out); }
@keyframes more-in { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .more-slot .more-panel { animation: none; } }
.more-media > img, .more-media > video { display: block; max-width: 100%; max-height: 72vh; width: auto; height: auto; margin-inline: auto; border-radius: var(--radius); }
.more-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--ground) 80%, transparent); backdrop-filter: blur(6px); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: transform var(--d-press) var(--ease-out); }
.more-close:active { transform: scale(0.92); }

/* ==========================================================================
   Animation slots on case studies
   Each slot shows its still image until the animation is dropped in.
   Add ?anim to a project URL to see every slot labelled.
   ========================================================================== */
.anim-slot { position: relative; }
.step-media video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: var(--surface); }
.step-media.is-portrait video { width: auto; max-width: 100%; max-height: 80vh; aspect-ratio: auto; background: #000; }
.case-hero > video { display: block; width: 100%; border-radius: var(--radius); }
.anim-slot.empty { display: none; }
.show-anim .anim-slot { outline: 2px dashed #FFC266; outline-offset: 6px; border-radius: var(--radius); }
.show-anim .anim-slot::after { content: attr(data-anim) "  ·  " attr(data-anim-desc); position: absolute; z-index: 3; top: 12px; left: 12px; right: 12px; width: max-content; max-width: calc(100% - 24px);
  padding: 6px 10px; border-radius: 6px; background: #FFC266; color: #1a1306; font-size: 13px; font-weight: 500; line-height: 1.3; pointer-events: none; }
.show-anim .case-hero.anim-slot::after { left: calc(var(--gutter) + 12px); }
.show-anim .anim-slot.empty { display: block; aspect-ratio: 16 / 10; background: repeating-linear-gradient(135deg, var(--surface) 0 14px, transparent 14px 28px); }
.step .insights { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7) var(--s-6); }
@media (max-width: 560px) { .step .insights { grid-template-columns: 1fr; } }
.case-hero > video.anim-video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: var(--surface); }
.step-media video.anim-video { aspect-ratio: 16 / 10; }


/* ==========================================================================
   Case Studies (home): a thin name column on the left, a full-height loop
   filling the rest of the screen to the right. One project per screen.
   ========================================================================== */
.cases { padding: var(--section) 0 0; }
.cases-head { padding: 0 var(--gutter); max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto var(--s-8); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-5) var(--s-8); align-items: end; }
.cases-head h2 { font-size: var(--t-h2); }
.cases-head p { color: var(--ink-2); max-width: 46ch; }
.cases-list { display: grid; gap: 12px; padding: 0 12px 0 0; }
.case-row {
  --panel: calc(100svh - 72px - 24px);
  display: grid; grid-template-columns: minmax(0, 34fr) minmax(0, 66fr);
  height: var(--panel); min-height: 520px; max-height: 1200px;
  text-decoration: none; color: inherit;
}
.case-side { display: flex; flex-direction: column; justify-content: space-between; padding: var(--s-6) var(--s-7) var(--s-6) var(--gutter); }
.case-idx { font-size: var(--t-small); color: var(--ink-2); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.case-name { font-size: clamp(2.5rem, 5.4vw, 5.25rem); font-weight: 600; letter-spacing: -0.045em; line-height: 0.95; max-width: 9ch; }
.case-foot { display: grid; gap: var(--s-3); }
.case-kind { color: var(--ink-2); }
.case-go { color: var(--accent); font-weight: 500; display: inline-flex; gap: 8px; }
.case-go span { transition: transform var(--d-ui) var(--ease-out); }
.case-media { position: relative; overflow: hidden; border-radius: 10px; background: var(--surface) center / cover no-repeat; }
.case-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.case:nth-child(1) .case-media { background-color: #EAE3D3; }
.case:nth-child(3) .case-media, .case.is-caution .case-media { background-color: #030303; }
@media (hover: hover) and (pointer: fine) {
  .case-row:hover .case-video { transform: scale(1.025); }
  .case-row:hover .case-go span { transform: translateX(4px); }
}
.case-row:focus-visible { outline-offset: -3px; }
/* The last one is a warning, not a title */
.case.is-caution .case-name { font-size: clamp(1.5rem, 2.6vw, 2.25rem); letter-spacing: 0.18em; text-transform: uppercase; color: #FF3B30; display: inline-flex; align-items: center; gap: 0.5em; }
.case.is-caution .case-name::before { content: ''; width: 1.1em; height: 1em; background: currentColor; clip-path: polygon(50% 0, 100% 100%, 0 100%); flex: none; }
.case.is-caution .case-go { color: #FF6B61; }
.case.is-caution .case-media::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 50%, transparent 40%, rgba(40, 0, 0, 0.55)); mix-blend-mode: multiply; pointer-events: none; }
@media (max-width: 860px) {
  .cases-head { grid-template-columns: 1fr; margin-bottom: var(--s-7); }
  .cases-list { gap: var(--s-8); padding: 0 var(--gutter); }
  .case-row { display: flex; flex-direction: column; height: auto; min-height: 0; max-height: none; gap: var(--s-4); }
  .case-media { aspect-ratio: 4 / 5; }
  .case-side { padding: 0; gap: var(--s-3); }
  .case-name { font-size: clamp(2rem, 9vw, 3rem); max-width: none; }
  .case-idx { order: -1; }
}

/* Parchment loop: keep the wordmark when the panel is wider than the video */
.case:nth-child(1) .case-video { object-position: 50% 0; }
.case.is-bol .case-media { background-color: #F1D3CC; }

/* Hero: the three roles as pills instead of a sentence */
.hero-copy { display: grid; gap: var(--s-4); justify-items: start; }
.hero-role { font-size: var(--t-small); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.role-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.role-pills a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px 0 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); text-decoration: none; font-size: 1.0625rem; font-weight: 500; color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); transition: border-color var(--d-ui) var(--ease), background-color var(--d-ui) var(--ease), transform var(--d-press) var(--ease-out); }
.role-pills a::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.role-pills a span { color: var(--ink-2); font-size: 0.9em; transition: transform var(--d-ui) var(--ease-out), color var(--d-ui) var(--ease); }
.role-pills a:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .role-pills a:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
  .role-pills a:hover span { color: var(--ink); transform: translate(2px, -2px); }
}
.hero-copy .hero-lead { margin-top: var(--s-2); }

/* ---------- Banner: pauses on hover and explains each skill ---------- */
.marquee li { gap: 0; padding-right: 0; }
.marquee li::after { margin-inline: var(--s-6); }
.mq-item { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 4px 2px; cursor: pointer; border-radius: 6px; transition: opacity var(--d-ui) var(--ease); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
.marquee.is-paused .marquee-track { animation-play-state: paused; }
.marquee.is-paused .mq-item { opacity: 0.5; }
.marquee.is-paused .mq-item.is-active { opacity: 1; text-decoration-color: currentColor; }
.mq-item:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.mq-detail { padding: var(--s-6) 12px 0 0; display: grid; grid-template-columns: minmax(0, 34fr) minmax(0, 66fr); min-height: 200px; }
.mq-hint { grid-column: 2; display: flex; align-items: center; color: var(--ink-2); font-size: var(--t-small); padding-top: var(--s-3); }
.mq-hint[hidden] { display: none; }
.mq-hint span[aria-hidden] { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--spot); box-shadow: 0 0 0 4px color-mix(in srgb, var(--spot) 22%, transparent); margin-right: 14px; }
.mq-card { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 34fr) minmax(0, 66fr); align-items: start; animation: mq-in 360ms var(--ease-out); }
.mq-card[hidden] { display: none; }
.mq-card h3 { padding: 0 var(--s-7) 0 var(--gutter); font-size: clamp(1.75rem, 3vw, 2.75rem); letter-spacing: -0.04em; line-height: 1; }
.mq-card .mq-body { display: grid; gap: var(--s-4); justify-items: start; padding-right: var(--gutter); }
.mq-card p { font-size: var(--t-lead); line-height: 1.4; max-width: 46ch; }
.mq-card .role-pills a { min-height: 38px; font-size: 0.9375rem; }
@keyframes mq-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Toolbox, laid out like a case study row ---------- */
.tools { padding-top: var(--s-10); }
.tools-row { display: grid; grid-template-columns: minmax(0, 34fr) minmax(0, 66fr); padding-right: 12px; }
.tools-side { display: grid; align-content: start; gap: var(--s-4); padding: var(--s-6) var(--s-7) var(--s-6) var(--gutter); }
.tools-side .case-name { font-size: clamp(2.25rem, 4.4vw, 4.25rem); }
.tools-panel { border-radius: 10px; background: var(--surface); border: 1px solid var(--line); padding: clamp(28px, 4vw, 56px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6); }
.tools-group h3 { font-size: var(--t-small); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; margin-bottom: var(--s-4); }
.tools-group ul { display: grid; gap: var(--s-4); }
.tools-group li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.tools-group img { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; flex: none; }
:root[data-theme="dark"] .tools-group img.invert-dark { filter: invert(1); }
@media (max-width: 860px) {
  .mq-detail, .mq-card, .tools-row { grid-template-columns: 1fr; padding-right: 0; }
  .mq-detail { padding: var(--s-5) var(--gutter) 0; min-height: 0; }
  .mq-hint { grid-column: 1; }
  .mq-card h3 { padding: 0 0 var(--s-3); }
  .mq-card .mq-body { padding: 0; }
  .tools-row { padding: 0 var(--gutter); }
  .tools-side { padding: 0 0 var(--s-5); }
  .tools-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .mq-card { animation: none; } }
/* Case Studies heading uses the same two columns as the rows below it */
.cases { padding-top: calc(var(--s-10) + var(--s-6)); }
.cases-head { max-width: none; margin: 0 0 var(--s-8); padding: 0 12px 0 0; grid-template-columns: minmax(0, 34fr) minmax(0, 66fr); gap: 0; }
.cases-head h2 { padding: 0 var(--s-7) 0 var(--gutter); }
.mq-detail { min-height: 170px; }
@media (max-width: 860px) { .cases-head { padding: 0 var(--gutter); grid-template-columns: 1fr; gap: var(--s-4); } .cases-head h2 { padding: 0; } }

/* ---------- Hero: same two columns as the case studies ---------- */
.hero .hero-intro { max-width: none; margin: 0; padding: clamp(24px, 4vw, 64px) 12px 0 0; display: grid; grid-template-columns: minmax(0, 34fr) minmax(0, 66fr); gap: 0; align-items: start; }
.hero .hero-photo { margin: 6px 0 0 var(--gutter); width: clamp(220px, 21vw, 330px); transform: rotate(-3deg); transform-origin: 30% 20%; }
.hero .hero-main { display: grid; justify-items: start; gap: var(--s-5); padding-right: var(--gutter); }
.hero .hero-main h1 { font-size: clamp(3.5rem, 8.6vw, 8.75rem); letter-spacing: -0.055em; line-height: 0.88; margin-top: calc(var(--s-2) * -1); }
.hero .hero-role { margin: 0; }
.hero .role-pills { margin-top: var(--s-2); }
.hero .hero-main .hero-lead { font-size: clamp(1.25rem, 1.9vw, 1.75rem); max-width: 26ch; line-height: 1.3; margin-top: var(--s-2); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5) var(--s-7); margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--line); width: 100%; }
.hero-cta .status { max-width: 30ch; }
@media (max-width: 860px) {
  .hero .hero-intro { grid-template-columns: 1fr; padding: var(--s-5) var(--gutter) 0; gap: var(--s-6); }
  .hero .hero-photo { margin: 0; width: 170px; }
  .hero .hero-main { padding: 0; }
  .hero .hero-main h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .hero-cta { flex-direction: column; align-items: flex-start; }
}
/* Hero v2: name at a calmer size, the sentence carries the weight */
.hero .hero-main h1 { font-size: clamp(2.25rem, 3.6vw, 3.5rem); letter-spacing: -0.04em; line-height: 1; margin-top: 0; white-space: nowrap; }
.hero .hero-main .hero-lead { font-size: clamp(1.6rem, 2.7vw, 2.6rem); line-height: 1.18; letter-spacing: -0.025em; max-width: 22ch; margin-top: var(--s-4); }
.hero .role-pills { margin-top: 0; }
.hero .hero-photo { width: clamp(200px, 18vw, 290px); }
@media (max-width: 860px) { .hero .hero-main h1 { font-size: clamp(2rem, 9vw, 2.75rem); white-space: normal; } .hero .hero-main .hero-lead { font-size: 1.6rem; } }

/* ---------- Hero: bento layout (title · image · card) ---------- */
.hero-bento { display: grid; grid-template-columns: minmax(0, 34fr) minmax(0, 40fr) minmax(0, 18fr); grid-template-rows: auto 1fr auto; grid-template-areas: "title image card" "media image card" "text image cta"; gap: 16px 28px; padding: clamp(24px, 3.5vw, 56px) var(--gutter) 0; min-height: min(78svh, 760px); }
.hb-title { grid-area: title; display: grid; gap: var(--s-3); align-content: start; }
.hb-title h1 { font-size: clamp(2.25rem, 3.6vw, 3.5rem); letter-spacing: -0.04em; line-height: 1; }
.hb-title .hero-role { margin: 0; }
.hb-media { grid-area: media; align-self: end; }
.hb-text { grid-area: text; }
.hb-text .hero-lead { font-size: clamp(1.4rem, 2.2vw, 2.1rem); line-height: 1.2; letter-spacing: -0.025em; max-width: 20ch; margin: 0; }
.hb-image { grid-area: image; margin: 0; border-radius: 14px; overflow: hidden; background: var(--surface); }
.hb-image img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; display: block; }
.hb-card { grid-area: card; align-self: start; padding: var(--s-5); border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.hb-card .status { max-width: none; }
.hb-cta { grid-area: cta; align-self: end; }
.hb-cta .actions { display: grid; gap: 10px; }
.hb-cta .btn { width: 100%; justify-content: space-between; }
@media (max-width: 1080px) {
  .hero-bento { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "title image" "media image" "text image" "card cta"; }
  .hb-cta .actions { grid-auto-flow: column; }
}
@media (max-width: 720px) {
  .hero-bento { grid-template-columns: 1fr; grid-template-areas: "title" "image" "media" "text" "card" "cta"; min-height: 0; }
  .hb-image { aspect-ratio: 4 / 5; max-height: 60svh; }
  .hb-cta .actions { grid-auto-flow: row; }
}
.hero-bento { height: clamp(560px, calc(100svh - 170px), 740px); min-height: 0; }
.hb-image { position: relative; min-height: 0; }
.hb-image img { position: absolute; inset: 0; }
@media (max-width: 720px) { .hero-bento { height: auto; } .hb-image img { position: static; } }

/* Hero v3: the statement is the focus; name and photo stay small */
.hero-bento.v2 { grid-template-columns: minmax(0, 22fr) minmax(0, 52fr) minmax(0, 20fr); grid-template-rows: auto 1fr auto; grid-template-areas: "title focus card" "image focus card" "image focus cta"; height: clamp(520px, calc(100svh - 190px), 680px); }
.hero-bento.v2 .hb-title h1 { font-size: clamp(1.5rem, 2vw, 1.9rem); letter-spacing: -0.03em; }
.hero-bento.v2 .hb-image { align-self: end; aspect-ratio: 4 / 5; height: auto; max-height: 100%; }
.hb-focus { grid-area: focus; display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-6); padding: clamp(28px, 3.5vw, 56px); border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.hb-focus .hero-lead { font-size: clamp(2.1rem, 4vw, 4rem); line-height: 1.04; letter-spacing: -0.04em; font-weight: 500; max-width: 15ch; margin: 0; }
.hb-focus .role-pills a { min-height: 48px; font-size: 1.125rem; }
@media (max-width: 1080px) {
  .hero-bento.v2 { height: auto; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); grid-template-areas: "title focus" "image focus" "card cta"; }
}
@media (max-width: 720px) {
  .hero-bento.v2 { grid-template-columns: 1fr; grid-template-areas: "title" "focus" "card" "cta" "image"; }
  .hero-bento.v2 .hb-image { width: 55%; }
  .hb-focus .hero-lead { font-size: 2rem; }
}
/* Hero: no panel behind the statement, so the background gradients show through */
.hb-focus { background: none; border: 0; padding: 0 clamp(8px, 2vw, 32px); }
/* Hero statement types in, phrase by phrase, at reading pace */
.hero-lead .w { opacity: 0; transition: opacity 260ms var(--ease); }
.hero-lead .w.on { opacity: 1; }
.hero-lead .caret { display: inline-block; width: 0.06em; height: 0.9em; margin-left: 0.08em; vertical-align: -0.08em; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.hero-lead .wd { white-space: nowrap; }
.hero-lead .ch { opacity: 0; transition: opacity 90ms linear; }
.hero-lead .ch.on { opacity: 1; }
.hero-lead .caret { transition: opacity 400ms var(--ease); }
.hero-lead .caret.done { opacity: 0; animation: none; }
.hb-focus .hero-lead { font-size: clamp(1.9rem, 3.2vw, 3.25rem); max-width: 19ch; line-height: 1.08; }

/* ---------- Hero: one framed stage, centred, quiet (after getlayers.ai) ---------- */
.hero-stage { position: relative; margin: clamp(12px, 2vw, 24px) 12px 0; border-radius: 22px; overflow: hidden; isolation: isolate; border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); background: color-mix(in srgb, var(--surface) 55%, transparent); min-height: min(76svh, 720px); display: grid; place-items: center; }
.hs-glow { position: absolute; inset: -20%; z-index: -1; filter: blur(60px); opacity: .8;
  background: radial-gradient(30% 35% at 22% 30%, rgba(60,201,192,.32), transparent 70%), radial-gradient(28% 32% at 80% 26%, rgba(111,179,255,.26), transparent 70%), radial-gradient(35% 30% at 60% 85%, rgba(242,169,59,.14), transparent 70%); }
.hero-stage::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .12; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hs-inner { display: grid; justify-items: center; text-align: center; gap: var(--s-5); padding: clamp(48px, 7vw, 96px) var(--gutter); max-width: 980px; }
.hs-badge { display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); background: color-mix(in srgb, var(--ground) 50%, transparent); font-size: var(--t-small); color: var(--ink-2); }
.hs-badge img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; }
.hs-badge b { color: var(--ink); font-weight: 500; }
.hs-head { font-size: clamp(2rem, 4.2vw, 3.6rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; text-wrap: balance; max-width: 24ch; }
.hs-head .hs-b { color: color-mix(in srgb, var(--ink) 55%, transparent); }
.hero-stage .role-pills { justify-content: center; }
.hs-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-4) var(--s-6); margin-top: var(--s-3); }
.hs-btn { display: inline-flex; align-items: center; gap: 14px; height: 52px; padding: 0 6px 0 24px; border-radius: 999px; text-decoration: none; font-weight: 500; color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ink) 14%, transparent); transition: background-color var(--d-ui) var(--ease), border-color var(--d-ui) var(--ease); }
.hs-btn .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); transition: transform var(--d-ui) var(--ease-out); }
.hs-link { color: var(--ink-2); text-decoration: none; font-weight: 500; transition: color var(--d-ui) var(--ease); }
@media (hover: hover) and (pointer: fine) { .hs-btn:hover { border-color: var(--accent); } .hs-btn:hover .ic { transform: translateX(3px); } .hs-link:hover { color: var(--ink); } }
.hs-status { display: inline-flex; align-items: center; gap: 10px; font-size: var(--t-small); color: var(--ink-2); }
.hs-status span { width: 8px; height: 8px; border-radius: 50%; background: var(--spot); box-shadow: 0 0 0 4px color-mix(in srgb, var(--spot) 22%, transparent); }
/* typing (letters keep their colour per clause) */
.hs-head .wd { white-space: nowrap; }
.hs-head .ch { opacity: 0; transition: opacity 90ms linear; }
.hs-head .ch.on { opacity: 1; }
.hs-head .caret { display: inline-block; width: 0.05em; height: 0.85em; margin-left: 0.06em; vertical-align: -0.06em; background: var(--accent); animation: caret 1s steps(1) infinite; transition: opacity 400ms var(--ease); }
.hs-head .caret.done { opacity: 0; animation: none; }
.hero .aurora { opacity: .35; }
@media (max-width: 720px) { .hero-stage { margin: 8px 8px 0; min-height: 0; } .hs-inner { padding: 56px 20px 48px; } }
.hero .hs-head { font-size: clamp(1.9rem, 3.6vw, 3.25rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.12; margin: 0; max-width: 26ch; }
@media (max-width: 720px) { .hero .hs-head { font-size: 1.75rem; } }

/* Hero v5: no panel. Content sits on the page; the whale shark swims behind it. */
.hero-stage { background: none; border: 0; border-radius: 0; overflow: visible; margin: 0; min-height: min(70svh, 640px); position: relative; z-index: 2; }
.hero-stage::after, .hs-glow { display: none; }
.hs-badge { background: color-mix(in srgb, var(--ground) 70%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hero .hero-shark { position: relative; z-index: 1; margin-top: calc(-1 * clamp(220px, 27vw, 430px)); pointer-events: none; animation: swim 9s ease-in-out infinite alternate; }
.hero .hero-shark .shark { opacity: .55; }
.hero .shark-caption { pointer-events: auto; position: relative; z-index: 3; }
@keyframes swim { from { transform: translateY(-10px); } to { transform: translateY(12px); } }
/* soft word reveal */
.hs-head.is-ready .wd { display: inline-block; opacity: 0; filter: blur(8px); transform: translateY(0.25em); transition: opacity 700ms var(--ease-out), filter 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: var(--d); }
.hs-head.is-in .wd { opacity: 1; filter: none; transform: none; }
@media (max-width: 720px) { .hero .hero-shark { margin-top: -90px; } .hero-stage { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .hero .hero-shark { animation: none; } }
.hero .hero-shark { margin-top: calc(-1 * clamp(150px, 19vw, 300px)); }

/* Hero v6: text on the left, the photo as a card that tilts to your cursor */
.hero-stage { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 5vw, 80px); padding: 0 var(--gutter); max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; place-items: initial; }
.hero-stage .hs-inner { order: 1; justify-items: start; text-align: left; padding: clamp(48px, 6vw, 88px) 0; max-width: none; }
.hero-stage .role-pills, .hero-stage .hs-cta { justify-content: flex-start; }
.hs-card-wrap { order: 2; perspective: 1100px; display: grid; place-items: center; }
.hs-card { position: relative; width: clamp(240px, 26vw, 380px); aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; transform-style: preserve-3d; will-change: transform;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.75), 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent); transition: transform 600ms var(--ease-out); animation: card-float 7s ease-in-out infinite alternate; }
.hs-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; display: block; }
.hs-glare { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; opacity: 0; transition: opacity 400ms var(--ease);
  background: radial-gradient(60% 50% at var(--gx, 30%) var(--gy, 20%), rgba(255,255,255,.65), transparent 70%); }
.hs-card.is-tilting { animation: none; transition: transform 120ms linear; }
.hs-card.is-tilting .hs-glare { opacity: 1; }
@keyframes card-float { from { transform: rotateX(4deg) rotateY(-8deg) translateY(-6px); } to { transform: rotateX(-3deg) rotateY(6deg) translateY(6px); } }
@media (max-width: 860px) {
  .hero-stage { grid-template-columns: 1fr; }
  .hs-card-wrap { order: 2; } .hero-stage .hs-inner { padding-bottom: 8px; }
  .hs-card { width: min(64vw, 280px); }
}
@media (prefers-reduced-motion: reduce) { .hs-card { animation: none; } }
.hero .hero-shark { margin-top: calc(-1 * clamp(80px, 11vw, 170px)); }

/* Hero v7: me in the centre, the words around me */
.hero-me { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: clamp(20px, 3vw, 48px); max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: clamp(32px, 5vw, 72px) var(--gutter) 0; position: relative; z-index: 2; }
.hm-left { display: grid; gap: var(--s-5); justify-items: start; align-self: center; padding-bottom: clamp(24px, 6vw, 96px); }
.hm-right { display: grid; gap: var(--s-5); justify-items: start; align-self: center; padding-top: clamp(40px, 10vw, 160px); }
.hero .hm-left .hs-head { font-size: clamp(1.7rem, 2.6vw, 2.5rem); max-width: 17ch; text-align: left; }
.hm-photo { margin: 0; width: clamp(240px, 26vw, 380px); }
.hm-photo img { width: 100%; height: auto; display: block; filter: drop-shadow(0 30px 40px rgba(0,0,0,.35)); }
.hm-right .role-pills { justify-content: flex-start; }
.hm-right .hs-cta { justify-content: flex-start; margin-top: 0; }
@media (max-width: 960px) {
  .hero-me { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-top: 24px; }
  .hm-left, .hm-right { justify-items: center; padding: 0; }
  .hero .hm-left .hs-head { text-align: center; }
  .hm-right .role-pills, .hm-right .hs-cta { justify-content: center; }
  .hm-photo { width: min(70vw, 300px); order: 0; }
  .hm-left { order: -1; } .hm-right { order: 1; }
}
/* smaller hero CTA */
.hs-btn { height: 40px; padding: 0 4px 0 16px; gap: 10px; font-size: 0.9375rem; }
.hs-btn .ic { width: 30px; height: 30px; font-size: 0.875rem; }
.hs-link { font-size: 0.9375rem; }

/* Hero v8: round portrait on the left, everything else beside it */
.hero-round { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(28px, 4.5vw, 72px); max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: clamp(48px, 7vw, 112px) var(--gutter) clamp(40px, 6vw, 96px); position: relative; z-index: 2; }
.hr-avatar { margin: 0; width: clamp(160px, 17vw, 250px); aspect-ratio: 1; border-radius: 50%; padding: 6px; background: conic-gradient(from 210deg, #3CC9C0, #6FB3FF, #F2A93B, #3CC9C0); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.hr-avatar img { width: 100%; height: 100%; border-radius: 50%; display: block; border: 4px solid var(--ground); }
.hr-text { display: grid; gap: var(--s-5); justify-items: start; }
.hero .hr-text .hs-head { font-size: clamp(1.8rem, 3.2vw, 3rem); max-width: 24ch; text-align: left; }
.hr-text .role-pills { justify-content: flex-start; }
.hr-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-7); margin-top: var(--s-2); }
.hr-bottom .hs-cta { margin: 0; justify-content: flex-start; }
@media (max-width: 760px) {
  .hero-round { grid-template-columns: 1fr; justify-items: start; padding-top: 32px; gap: 24px; }
  .hr-avatar { width: 120px; }
  .hr-bottom { flex-direction: column; align-items: flex-start; }
}

/* Hero v9: fewer words; static focus pills; curved "UX designer" under the portrait */
.hr-avatar { position: relative; margin-bottom: 34px; overflow: visible; }
.hr-arc { position: absolute; left: -16%; top: -16%; width: 132%; height: 132%; overflow: visible; pointer-events: none; }
.hr-arc text { fill: var(--ink-2); font-size: 11px; font-weight: 600; letter-spacing: 0.32em; font-family: var(--font); }
.role-pills.is-static span { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px 0 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); background: color-mix(in srgb, var(--ink) 4%, transparent); font-size: 1rem; font-weight: 500; color: var(--ink); }
.role-pills.is-static span::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.hr-text .hs-cta { margin-top: var(--s-4); justify-content: flex-start; }
.hr-arc text { font-size: 10px; letter-spacing: 0.4em; }
.hr-avatar { margin-bottom: 44px; }
.hr-arc { max-width: none; }

/* Hero: a carpet of whale-shark spots instead of the shark outline */
.hero .hero-shark { animation: none; margin-top: calc(-1 * clamp(40px, 6vw, 96px)); }
.dot-carpet { display: block; width: 100%; height: clamp(220px, 30vw, 420px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 38%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 38%, #000 70%, transparent 100%); }
.hero .shark-caption { margin-top: calc(-1 * clamp(24px, 3vw, 48px)); }

/* "Let's talk" band: calmer size */
.contact-band { padding-block: clamp(64px, 8vw, 112px); }
.contact-band h2 { font-size: clamp(2.25rem, 4.6vw, 4rem); letter-spacing: -0.04em; line-height: 1; }
.contact-band p { margin-top: var(--s-4); font-size: 1.125rem; }
.contact-band .actions { margin-top: var(--s-6); }
.contact-band .btn { min-height: 42px; padding: 0 18px; font-size: 0.9375rem; }
@media (max-width: 560px) { .contact-band h2 { font-size: 2.5rem; } }

/* Hero: the real whale-shark spots (same pattern as the "Let's talk" band),
   hidden until you move over the hero, then revealed around the cursor */
.hero .hero-shark { margin-top: clamp(24px, 3vw, 48px); }
.hero .shark-caption { margin-top: 0; }
.spot-reveal { position: absolute; inset: -72px 0 0 0; z-index: -1; pointer-events: none;
  background: var(--spot); opacity: 0; transition: opacity .6s var(--ease-out, ease);
  --mx: 50%; --my: 40%;
  -webkit-mask: url('hero-dot-pattern-alpha.png') top center / auto 520px repeat,
    radial-gradient(circle 280px at var(--mx) var(--my), #000 0%, rgba(0,0,0,.55) 45%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask: url('hero-dot-pattern-alpha.png') top center / auto 520px repeat,
    radial-gradient(circle 280px at var(--mx) var(--my), #000 0%, rgba(0,0,0,.55) 45%, transparent 100%);
  mask-composite: intersect; }
.spots-on > .spot-reveal { opacity: .5; }

/* Hero: smaller headline, avatar + text centred as one balanced group */
.hero-round { grid-template-columns: auto minmax(0, 620px); justify-content: center; gap: clamp(32px, 5vw, 80px); padding-block: clamp(56px, 8vw, 128px) clamp(56px, 8vw, 120px); }
.hero .hr-text .hs-head { font-size: clamp(1.6rem, 2.5vw, 2.35rem); line-height: 1.16; max-width: 25ch; }
.hr-avatar { width: clamp(150px, 15vw, 220px); }
@media (max-width: 720px) { .hero-round { grid-template-columns: 1fr; justify-content: start; } .hero .hr-text .hs-head { font-size: 1.6rem; } .hr-avatar { width: 120px; } }

/* Hero: role pills sit under the photo */
.hr-left { display: grid; justify-items: center; }
.hr-left .role-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 280px; margin: 0; }
@media (max-width: 720px) { .hr-left { justify-items: start; } .hr-left .role-pills { justify-content: flex-start; max-width: none; } }

/* Signature palette: turquoise, blue and yellow */
:root { --c-turq: #3CC9C0; --c-blue: #6FB3FF; --c-yellow: #FFC34D; }
.marquee { background: linear-gradient(100deg, var(--c-turq) 0%, var(--c-blue) 48%, var(--c-yellow) 100%); background-size: 160% 100%; animation: mq-tide 16s var(--ease-in-out) infinite alternate; }
@keyframes mq-tide { to { background-position: 100% 50%; } }
.tools-group:nth-child(1) h3 { color: var(--c-yellow); }
.tools-group:nth-child(2) h3 { color: var(--c-turq); }
.tools-group:nth-child(3) h3 { color: var(--c-blue); }
.tools-group:nth-child(4) h3 { color: var(--c-yellow); }
.hr-arc text { fill: url(#hr-arc-grad); }
@media (prefers-reduced-motion: reduce) { .marquee { animation: none; } }
/* less yellow: it's an accent, turquoise and blue lead */
.marquee { background: linear-gradient(100deg, var(--c-turq) 0%, var(--c-blue) 62%, #B9C9B0 84%, #F2CF7A 100%); background-size: 140% 100%; }
.tools-group:nth-child(4) h3 { color: var(--c-turq); }

/* Pointer glow (replaces the whale-shark spot reveal) */
.drag-glow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Avatar: fixed square box so it can never stretch (iOS Safari) */
.hr-avatar { height: auto; flex: none; box-sizing: border-box; }
.hr-avatar img { aspect-ratio: 1 / 1; object-fit: cover; height: auto; max-width: 100%; }
@media (max-width: 720px) { .hr-avatar { width: 128px; min-width: 128px; height: 128px; } .hr-avatar img { width: 100%; height: 100%; } }
.mq-hint .t-touch { display: none; }
@media (hover: none) { .mq-hint .t-mouse { display: none; } .mq-hint .t-touch { display: inline; } }


/* ==========================================================================
   Whale-shark spots as the background of the hero and the "Let's talk" CTA.
   A quiet field of spots that fades into the page at the edges and drifts
   slowly; on hover the spots light up around the cursor.
   ========================================================================== */
.spot-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; --mx: 50%; --my: 45%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 68%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 68%, transparent 100%); }
.hero > .spot-bg { inset: -72px 0 0 0; }
.spot-bg::before, .spot-bg::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--sun) 0%, var(--lagoon) 32%, var(--sea) 72%, #6FB3FF 100%); }
.spot-bg::before { opacity: .2;
  -webkit-mask: url('hero-dot-pattern-alpha.png') 0 0 / auto 520px repeat;
  mask: url('hero-dot-pattern-alpha.png') 0 0 / auto 520px repeat; }
.spot-bg::after { opacity: 0; transition: opacity 600ms var(--ease-out);
  -webkit-mask: url('hero-dot-pattern-alpha.png') 0 0 / auto 520px repeat,
    radial-gradient(circle 300px at var(--mx) var(--my), #000 0%, rgba(0,0,0,.6) 45%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask: url('hero-dot-pattern-alpha.png') 0 0 / auto 520px repeat,
    radial-gradient(circle 300px at var(--mx) var(--my), #000 0%, rgba(0,0,0,.6) 45%, transparent 100%);
  mask-composite: intersect; }
.spots-on > .spot-bg::after { opacity: .7; }
@media (prefers-reduced-motion: no-preference) {
  .spot-bg::before { animation: spot-drift 60s linear infinite; }
  .spot-bg::after { animation: spot-drift-lit 60s linear infinite; }
}
@keyframes spot-drift { to { -webkit-mask-position: -728px 0; mask-position: -728px 0; } }
@keyframes spot-drift-lit { to { -webkit-mask-position: -728px 0, 0 0; mask-position: -728px 0, 0 0; } }

/* "Let's talk" is light now, so it melts into the page instead of a dark band */
.contact-band { background: transparent; animation: none; color: var(--ink); }
.contact-band .spot-field { display: none; }
.contact-band .glow { background: radial-gradient(circle, rgba(63, 200, 188, 0.16), transparent 65%); }
.contact-band h2 { background: linear-gradient(95deg, var(--ink) 0%, var(--accent) 50%, #136E9E 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact-band p { color: var(--ink-2); }
.contact-band .btn-primary { background: var(--grad-sea); background-size: 160% 100%; color: #fff; }
@media (hover: hover) and (pointer: fine) { .contact-band .btn-primary:hover { background: var(--grad-sea); background-size: 160% 100%; background-position: 100% 50%; } }
.contact-band .btn-secondary { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 22%, transparent); background: color-mix(in srgb, var(--ground) 70%, transparent); }
@media (hover: hover) and (pointer: fine) { .contact-band .btn-secondary:hover { border-color: var(--ink); } }
.contact-band ::selection { background: var(--accent); color: #fff; }
.contact-band :focus-visible { outline-color: var(--focus); }
/* The cursor glow fades out at the edges too, so nothing ends in a hard line */
.hero > .drag-glow, .contact-band > .drag-glow {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 68%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 68%, transparent 100%); }
.contact-band .glow { display: none; }
/* Gradient headings: room for descenders (g, p, y) so they aren't clipped */
.case-head h1, .contact-head h1, .contact-band h2 { padding-bottom: 0.16em; margin-bottom: -0.11em; }
/* Hero portrait: clean and quiet. One thin teal ring with breathing room,
   a soft shadow, and the "UX designer" label in a single brand colour. */
.hr-avatar { background: none; padding: 0; box-shadow: 0 22px 44px -26px rgba(15, 26, 28, .32); }
.hr-avatar img { border: 0; outline: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 6px; }
.hr-arc text { fill: var(--accent); font-size: 9px; font-weight: 500; letter-spacing: 0.42em; }
.hr-arc { left: -21%; top: -21%; width: 142%; height: 142%; }

/* ---------- 404: lost at sea ---------- */
.lost-sea { position: relative; isolation: isolate; overflow: hidden; padding-bottom: clamp(48px, 8vw, 120px); }
.lost-sea > .spot-bg { inset: -72px 0 0 0; }
.lost-sea .lost { min-height: 0; padding-top: clamp(56px, 9vw, 140px); padding-bottom: 0; display: block; position: relative; z-index: 1; }
.lost-sea .code { font-size: clamp(7rem, 24vw, 18rem); font-weight: 600; letter-spacing: -0.06em; line-height: 0.85; padding-bottom: 0.08em;
  background: linear-gradient(100deg, var(--accent) 0%, var(--sea) 55%, var(--sun) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lost-sea h1 { margin-top: var(--s-4); font-size: clamp(2rem, 4.4vw, 3.5rem); letter-spacing: -0.04em; line-height: 1; }
.lost-sea .lost p:not(.code) { margin-top: var(--s-4); max-width: 46ch; color: var(--ink-2); font-size: 1.125rem; line-height: 1.5; }
.lost-sea .actions { margin-top: var(--s-7); display: flex; flex-wrap: wrap; gap: var(--s-3); }
.lost-shark { position: relative; z-index: 0; margin-top: clamp(32px, 5vw, 72px); width: min(78vw, 900px); margin-left: auto; margin-right: -4vw; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .lost-shark { animation: lost-swim 16s var(--ease-in-out) infinite alternate; }
}
@keyframes lost-swim { from { transform: translate(6vw, 0) rotate(-1.5deg); } to { transform: translate(-10vw, -18px) rotate(1deg); } }
@media (max-width: 720px) { .lost-shark { width: 120vw; margin-right: -30vw; } }
.captcha-field { margin-top: var(--s-1); }
.captcha-field[hidden] { display: none; }
@media (min-width: 960px) {
  .lost-sea { min-height: calc(100vh - 72px); display: flex; align-items: center; padding-bottom: clamp(48px, 6vw, 96px); }
  .lost-sea .lost { padding-top: clamp(40px, 6vw, 96px); width: 100%; }
  .lost-sea .lost > * { max-width: min(46%, 620px); }
  .lost-shark { position: absolute; right: -4vw; top: 50%; margin: 0; width: min(56vw, 980px); translate: 0 -40%; }
}
