/* ==========================================================================
   Jack Whitehead · portfolio
   One stylesheet, in page order:
    1 Tokens            2 Base             3 Building blocks     4 Header & menu
    5 Hero              6 Marquee          7 About               8 Work
    9 Skills           10 Testimonial     11 Contact            12 Footer
   13 All projects     14 Case study      15 Lightbox           16 404
   17 Page transitions 18 Reduced motion & no-script
   ========================================================================== */

/* 1 · Tokens ============================================================== */
:root {
  --space: #080A14;
  --space-2: #0E1124;
  --glass: rgba(20, 24, 52, 0.88);
  --line: rgba(190, 200, 255, 0.14);
  --line-strong: rgba(190, 200, 255, 0.28);
  --text: #F3F0E8;
  --text-dim: #A4A8C2;
  --ink: #0B0D18;

  --coral: #F2552F;
  --coral-hi: #FF7A57;
  --coral-deep: #D63E1A;      /* coral that carries white text at 4.5:1 */
  --sun: #F5C443;
  --mint: #4FD6B5;
  --cobalt: #4B73FF;
  --violet: #7C5CFF;
  --pink: #FF7AB0;
  --grad: linear-gradient(96deg, var(--sun) 0%, var(--coral-hi) 48%, var(--pink) 100%);

  --font-display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1280px;
  --edge: clamp(1.25rem, 5vw, 3.5rem);
  --section-pad: clamp(5.5rem, 11vw, 10rem);
  --header-h: 4.25rem;
  --r-md: 22px;
  --r-lg: 34px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* 2 · Base ================================================================ */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--space); color-scheme: dark; scroll-behavior: smooth;
  scrollbar-color: #2B3160 var(--space); scrollbar-gutter: stable; -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0; overflow-x: clip;
  background: var(--space); color: var(--text);
  font: 400 1rem/1.55 var(--font-body); -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--coral-deep); color: #fff; }
p, li, dd, figcaption { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--coral-hi); outline-offset: 3px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 500;
  padding: 0.8rem 1.2rem; border-radius: 0 0 10px 0; background: var(--coral-deep); color: #fff; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* smooth scrolling (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }

/* the 3D layer lives behind the page */
.scene3d { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.scene3d canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s ease; }
.scene3d.ready canvas { opacity: 1; }
main, .site-footer { position: relative; z-index: 1; }
/* no WebGL: a painted sky instead */
.no-3d body {
  background:
    radial-gradient(1200px 700px at 78% 0%, rgba(75, 90, 220, 0.24), transparent 60%),
    radial-gradient(900px 700px at 0% 40%, rgba(120, 60, 170, 0.15), transparent 65%),
    radial-gradient(800px 520px at 100% 100%, rgba(242, 85, 47, 0.1), transparent 60%),
    var(--space);
}
.no-3d body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.7;
  background-image:
    radial-gradient(1.2px 1.2px at 24px 38px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1px 1px at 120px 90px, rgba(190, 210, 255, 0.8), transparent),
    radial-gradient(1.4px 1.4px at 190px 20px, rgba(255, 220, 190, 0.8), transparent),
    radial-gradient(1px 1px at 70px 150px, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.2px 1.2px at 210px 170px, rgba(255, 255, 255, 0.8), transparent);
  background-size: 240px 200px;
}

/* 3 · Building blocks ===================================================== */
.section-inner {
  position: relative; max-width: calc(var(--wrap) + 2 * var(--edge)); margin: 0 auto;
  padding: var(--section-pad) var(--edge);
}

/* things arrive as you scroll to them (translate, so hover transforms never clash) */
[data-reveal] {
  opacity: 0; translate: 0 30px;
  transition: opacity 0.9s var(--ease-out) var(--reveal-delay, 0s), translate 1.1s var(--ease-out) var(--reveal-delay, 0s);
}
[data-reveal].is-visible { opacity: 1; translate: none; }
.reveal-instant, .reveal-instant * { transition: none !important; }

/* section labels, numbered as chapters: 01 About, 02 Recent work... */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.8rem; margin-bottom: 1.5rem;
  font: 500 0.74rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim);
}
.eyebrow::before { content: ""; width: 1.7rem; height: 1px; background: var(--coral); transform-origin: 0 50%; }
[data-reveal].eyebrow::before { transform: scaleX(0); transition: transform 0.8s var(--ease-out) 0.25s; }
[data-reveal].eyebrow.is-visible::before { transform: none; }
#main { counter-reset: chapter; }
#main > section[id] > .section-inner > .eyebrow:first-child,
#main > section[id] > .section-inner > .section-head .eyebrow:first-child,
.project-block-head > .eyebrow:first-child { counter-increment: chapter; }
#main > section[id] > .section-inner > .eyebrow:first-child::after,
#main > section[id] > .section-inner > .section-head .eyebrow:first-child::after,
.project-block-head > .eyebrow:first-child::after {
  content: counter(chapter, decimal-leading-zero); content: counter(chapter, decimal-leading-zero) / "";
  order: -1; color: var(--coral-hi); letter-spacing: 0.08em;
}

.section-title {
  max-width: 16ch; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.7rem, 6.2vw, 5.9rem); line-height: 0.95; letter-spacing: -0.045em; text-wrap: balance;
}
.section-sub { max-width: 44ch; margin-top: 1.4rem; font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--text-dim); }
.section-head { display: grid; gap: 1.6rem; margin-bottom: clamp(3rem, 6vw, 5.5rem); }
.section-head .section-sub { margin-top: 0; }
@media (min-width: 900px) { .section-head { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); align-items: end; } }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* headings rise word by word out of a mask (js/main.js splits them) */
.sw { display: inline-block; overflow: clip; vertical-align: top; padding: 0.06em 0.05em 0.18em; margin: -0.06em -0.05em -0.18em; }
.sw > span { display: inline-block; translate: 0 115%; transition: translate 1.1s var(--ease-out) calc(var(--wi, 0) * 55ms + 0.08s); }
.split-in .sw > span { translate: none; }

/* buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: 0.98rem; line-height: 1.3;
  transition: transform 0.35s var(--ease-out), translate 0.6s var(--ease-spring), background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.btn.is-magnet { transition: transform 0.35s var(--ease-out), translate 0.18s linear, background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s; }
.btn-primary { background: var(--text); color: var(--ink); }
.btn-primary:hover { background: var(--coral-deep); color: #fff; transform: translateY(-2px); box-shadow: 0 16px 34px -14px rgba(242, 85, 47, 0.85); }
.btn-primary:active { transform: none; box-shadow: none; }
.btn-ghost { border: 1px solid var(--line-strong); background: rgba(24, 28, 58, 0.62); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); background: var(--text); color: var(--ink); }
.btn-large { padding: 1.05rem 1.9rem; font-size: 1.15rem; }
.btn-small { padding: 0.6rem 1.15rem; font-size: 0.88rem; line-height: 1.2; }
.btn-arrow, .btn-arrow-down { display: inline-block; transition: transform 0.4s var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn:hover .btn-arrow-down { transform: translateY(3px); }

/* the contextual pointer label ("View") over projects */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 400; width: 5.6rem; height: 5.6rem; margin: -2.8rem 0 0 -2.8rem;
  display: grid; place-items: center; border-radius: 50%; pointer-events: none;
  background: var(--text); color: var(--ink); font: 600 0.72rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7); transform: translate3d(-200px, -200px, 0) scale(0);
}

/* 4 · Header & menu ======================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 1.1rem var(--edge);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), background-color 0.4s, box-shadow 0.4s, padding 0.3s;
}
.site-header.scrolled {
  padding-block: 0.75rem; background: linear-gradient(rgba(8, 10, 20, 0.97), rgba(8, 10, 20, 0.92)); box-shadow: 0 1px 0 var(--line);
}
/* first visit: the header waits for the landing */
html.has-3d:not(.hero-landed) .site-header { opacity: 0; transform: translateY(-14px); }
html.boot:not(.hero-landed) .site-header, html.boot:not(.hero-landed) .hero-foot { opacity: 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; max-width: var(--wrap); margin: 0 auto; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; color: var(--text); }
.logo-dot { display: inline-block; color: var(--coral); transition: transform 0.55s var(--ease-spring), color 0.3s; }
.logo:hover .logo-dot, .logo:focus-visible .logo-dot { transform: translateY(-0.3em) scale(1.3); color: var(--sun); }

.nav { position: relative; isolation: isolate; }
.nav ul { display: flex; gap: 0.1rem; padding: 3px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); }
.nav-link {
  position: relative; z-index: 1; display: block; padding: 0.42rem 1rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; line-height: 1.2; color: var(--text-dim); transition: color 0.25s;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
/* one pill glides behind the links: to the one you point at, or the section you're reading */
.nav-indicator {
  position: absolute; z-index: 0; left: 0; top: 0; width: 0; height: 0; border-radius: 999px; pointer-events: none; opacity: 0;
  background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  transition: transform 0.55s var(--ease-out), width 0.55s var(--ease-out), height 0.55s var(--ease-out), opacity 0.3s;
}
.nav-indicator.visible { opacity: 1; }
.nav-indicator.instant { transition: opacity 0.3s; }
.scroll-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; opacity: 0;
  background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); transition: opacity 0.4s;
}
.site-header.scrolled .scroll-progress { opacity: 0.9; }
.header-cta { display: none; border: 1px solid var(--line-strong); background: var(--glass); color: var(--text); }
.header-cta:hover { border-color: var(--text); background: var(--text); color: var(--ink); }
.menu-toggle { position: relative; z-index: 210; display: flex; flex-direction: column; gap: 5px; padding: 8px; }
.menu-toggle span { width: 24px; height: 2.5px; border-radius: 2px; background: var(--text); transition: transform 0.35s var(--ease-in-out), opacity 0.2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
@media (max-width: 719.98px) { .nav { display: none; } }
@media (min-width: 720px) { .header-cta { display: inline-flex; } .menu-toggle { display: none; } }

/* mobile menu: hidden means unfocusable; links rise in one after another */
.mobile-menu {
  position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(700px 500px at 80% 10%, rgba(75, 90, 220, 0.3), transparent 65%), var(--space);
  transform: translateY(-100%); visibility: hidden; transition: transform 0.55s var(--ease-in-out), visibility 0s linear 0.55s;
}
.mobile-menu.open { transform: none; visibility: visible; transition: transform 0.55s var(--ease-in-out), visibility 0s; }
@media (min-width: 720px) { .mobile-menu { display: none; } }
html.menu-open { overflow: hidden; }
html.menu-open .site-header { z-index: 160; background: transparent; box-shadow: none; }
html.menu-open .scroll-progress { opacity: 0; }
.mobile-menu ul { display: flex; flex-direction: column; gap: 1.8rem; counter-reset: m; }
.mobile-menu li { opacity: 0; transform: translateY(22px); transition: opacity 0.3s, transform 0.3s; }
.mobile-menu.open li { opacity: 1; transform: none; transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-out); }
.mobile-menu.open li:nth-child(1) { transition-delay: 0.14s; }
.mobile-menu.open li:nth-child(2) { transition-delay: 0.19s; }
.mobile-menu.open li:nth-child(3) { transition-delay: 0.24s; }
.mobile-menu.open li:nth-child(4) { transition-delay: 0.29s; }
.mobile-link { display: inline-flex; align-items: baseline; gap: 0.9rem; font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; letter-spacing: -0.03em; }
.mobile-link::before {
  counter-increment: m; content: counter(m, decimal-leading-zero); content: counter(m, decimal-leading-zero) / "";
  font: 500 0.78rem/1 var(--font-mono); letter-spacing: 0.08em; color: var(--coral-hi);
}
.mobile-link.active { color: var(--coral-hi); }
.mobile-mail {
  position: absolute; left: 50%; bottom: max(2rem, env(safe-area-inset-bottom)); transform: translateX(-50%);
  padding: 0.6rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); font-size: 0.95rem; font-weight: 600; color: var(--text-dim);
  opacity: 0; transition: opacity 0.4s;
}
.mobile-menu.open .mobile-mail { opacity: 1; transition-delay: 0.36s; }

/* 5 · Hero ================================================================ */
.hero {
  position: relative; display: flex; align-items: center; min-height: 100vh; min-height: 100svh;
  padding: 7.5rem var(--edge) 5.5rem;
}
.hero-inner { position: relative; z-index: 2; width: 100%; max-width: var(--wrap); margin: 0 auto; }
.hero-copy { max-width: min(36rem, 52vw); text-shadow: 0 0 28px rgba(8, 10, 20, 0.9); will-change: opacity; }
.hero-copy .btn, .hero-copy .status-dot { text-shadow: none; }
.status-pill {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1.7rem; padding: 0.45rem 0.95rem;
  border-radius: 999px; border: 1px solid var(--line); background: var(--glass); font-size: 0.8rem; font-weight: 600;
}
.status-dot { position: relative; flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(79, 214, 181, 0.2), 0 0 14px rgba(79, 214, 181, 0.7); }
.status-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--mint); opacity: 0; animation: ping 2.6s var(--ease-out) 1.2s infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.85; } 70%, 100% { transform: scale(3.4); opacity: 0; } }
.hero-title { margin-bottom: 1.6rem; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.04em; line-height: 0.96; }
.hero-line { display: block; }
.hero-line-1 { font-size: clamp(3.1rem, 7.4vw, 6.6rem); }
.hero-line-2 { max-width: 19ch; margin-top: 1rem; font-size: clamp(1.45rem, 2.5vw, 2.2rem); font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; color: var(--text-dim); }
/* each word of the name rises out of its own mask */
.reveal-word { display: inline-block; vertical-align: top; overflow: clip; padding: 0.06em 0.05em 0.18em; margin: -0.06em -0.05em -0.18em; }
.reveal-word > span { display: inline-block; opacity: 0; transform: translateY(118%); animation: word-rise 1s var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 70ms + 60ms); }
@keyframes word-rise { 0% { opacity: 0; transform: translateY(118%); } 25% { opacity: 1; } 100% { opacity: 1; transform: none; } }
.hero-settled .reveal-word { overflow: visible; }
.hero-sub { max-width: 44ch; margin-bottom: 2rem; font-size: 1.06rem; color: var(--text-dim); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-foot {
  position: absolute; z-index: 2; bottom: 1.5rem; left: max(var(--edge), calc((100% - var(--wrap)) / 2)); right: max(var(--edge), calc((100% - var(--wrap)) / 2));
  display: flex; align-items: center; gap: 1.2rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; color: var(--text-dim);
  transition: opacity 0.8s var(--ease-out);
}
.replay-btn { padding: 0.4rem 0.8rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); letter-spacing: inherit; transition: background-color 0.25s, color 0.25s; }
.replay-btn:hover { background: var(--text); color: var(--ink); }
html:not(.has-3d) .replay-btn { display: none; }
.hero-fallback { display: none; }
.no-3d .hero-fallback { display: block; width: min(320px, 70vw); height: auto; margin-top: 2.5rem; border-radius: 28px; box-shadow: 0 40px 70px -40px rgba(0, 0, 0, 0.8); }
/* until the head lands (first visit only, and only when scripts run), the copy waits */
@media (scripting: enabled) {
  html:not(.skip-intro) .hero-wait .reveal-word > span { animation-play-state: paused; }
  html:not(.skip-intro) .hero-wait [data-reveal] { opacity: 0 !important; translate: 0 30px !important; }
}
/* the loader: a tiny meter where the head will land */
.launch-meter {
  position: fixed; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 0.7rem; transform: translate(-50%, -50%); pointer-events: none;
  font: 500 0.72rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); transition: opacity 0.5s;
}
.launch-meter.done, .skip-intro .launch-meter, html:not(.has-3d) .launch-meter { opacity: 0; visibility: hidden; }
.launch-track { display: block; width: 150px; height: 3px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, 0.14); }
.launch-track i { display: block; height: 100%; background: var(--coral); transform: scaleX(0); transform-origin: left; transition: transform 0.25s; }
@media (max-width: 759.98px), (max-aspect-ratio: 21/20) {
  .hero { align-items: flex-end; padding-top: 0; padding-bottom: 4.5rem; }
  .hero-copy { max-width: 100%; }
  .hero-line-1 { font-size: clamp(2.8rem, 13vw, 4rem); }
  .hero-sub, .hero-foot { display: none; }
  .hero-title { margin-bottom: 1.4rem; }
}
/* the smallest phones: keep the status line and both buttons on one row each */
@media (max-width: 359.98px) {
  .status-pill { gap: 0.5rem; padding-inline: 0.8rem; font-size: 0.74rem; }
  .hero-cta { gap: 0.5rem; }
  .hero-cta .btn { padding-inline: 1.15rem; }
}

/* 6 · Marquee ============================================================= */
.marquee {
  position: relative; z-index: 2; width: 108vw; margin: clamp(0.5rem, 3vw, 2.5rem) 0 0 -4vw; padding: clamp(0.9rem, 1.6vw, 1.3rem) 0;
  overflow: hidden; rotate: -2.4deg;
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(14, 17, 36, 0.3), rgba(14, 17, 36, 0.86) 18% 82%, rgba(14, 17, 36, 0.3));
}
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-group {
  display: flex; flex: none; align-items: center; gap: clamp(1.2rem, 2.6vw, 2.4rem); padding-right: clamp(1.2rem, 2.6vw, 2.4rem);
  font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 6vw, 5.6rem); line-height: 1.05; letter-spacing: -0.045em; white-space: nowrap;
}
.marquee-group .is-outline { color: transparent; -webkit-text-stroke: 1.5px rgba(243, 240, 232, 0.6); }
.marquee-group i { font-style: normal; font-size: 0.5em; color: var(--coral); }

/* 7 · About =============================================================== */
.about-grid { display: grid; gap: clamp(3.5rem, 7vw, 7rem); align-items: center; margin-top: clamp(3rem, 6vw, 5rem); }
@media (min-width: 960px) { .about-grid { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); } }

/* the crew badge floats in zero-g, and tilts toward the pointer or (on touch screens) as you scroll */
.crew { position: relative; width: min(100%, 420px); margin: 0 auto; perspective: 1100px; animation: zero-g 12s ease-in-out infinite; }
@keyframes zero-g { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -14px; rotate: -1.6deg; } }
@media (min-width: 960px) { .crew { margin: 0; } }
.crew-orbit-wrap { display: none; }
@media (min-width: 960px) {
  .crew-orbit-wrap { position: absolute; left: -104px; top: 150px; display: block; width: 608px; height: 322px; pointer-events: none; transform: rotate(-9deg); }
  .crew-orbit { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  .crew-orbit path { fill: none; stroke: rgba(190, 200, 255, 0.34); stroke-width: 1.3; stroke-dasharray: 3 8; vector-effect: non-scaling-stroke; }
  .crew-moon {
    position: absolute; left: 0; top: 0; width: 15px; height: 15px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #FFE9A8, var(--sun) 55%, #9A5B12); box-shadow: 0 0 12px rgba(245, 196, 67, 0.5);
    offset-path: path("M6 161 a298 155 0 1 0 596 0 a298 155 0 1 0 -596 0"); offset-rotate: 0deg; animation: crew-orbit 28s linear infinite;
  }
  .crew.is-away .crew-moon { animation-play-state: paused; }      /* off screen: no need to keep it moving */
}
@keyframes crew-orbit { to { offset-distance: 100%; } }
@supports not (offset-path: path("M0 0")) { .crew-moon { display: none; } }
.crew-card {
  position: relative; z-index: 1; overflow: hidden; border-radius: 30px; border: 1px solid var(--line-strong);
  background: linear-gradient(170deg, rgba(26, 31, 66, 0.96), rgba(13, 15, 32, 0.96));
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.9), 0 0 90px -30px rgba(75, 115, 255, 0.45);
  rotate: 1.4deg; will-change: transform;
}
.crew-top, .crew-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.crew-top { padding: 0.95rem 1.2rem; font: 500 0.66rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
.crew-live { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); }
.crew-live i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px rgba(79, 214, 181, 0.9); animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.crew-photo { position: relative; display: block; margin: 0 0.7rem; overflow: hidden; border-radius: 20px; background: #2A1C14; }
.crew-photo img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 24%; }
.crew-photo::after {            /* viewfinder corners + a little depth at the bottom */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(8, 10, 20, 0.55), transparent 32%),
    linear-gradient(var(--coral), var(--coral)) 12px 12px / 18px 2px no-repeat,
    linear-gradient(var(--coral), var(--coral)) 12px 12px / 2px 18px no-repeat,
    linear-gradient(var(--coral), var(--coral)) right 12px top 12px / 18px 2px no-repeat,
    linear-gradient(var(--coral), var(--coral)) right 12px top 12px / 2px 18px no-repeat,
    linear-gradient(var(--coral), var(--coral)) 12px bottom 12px / 18px 2px no-repeat,
    linear-gradient(var(--coral), var(--coral)) 12px bottom 12px / 2px 18px no-repeat,
    linear-gradient(var(--coral), var(--coral)) right 12px bottom 12px / 18px 2px no-repeat,
    linear-gradient(var(--coral), var(--coral)) right 12px bottom 12px / 2px 18px no-repeat;
}
.crew-bottom { padding: 1rem 1.3rem 1.2rem; }
.crew-bottom strong { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -0.02em; }
.crew-bottom span { font-size: 0.82rem; text-align: right; color: var(--text-dim); }
.crew-patch { position: absolute; z-index: 3; right: -34px; bottom: 74px; width: 118px; height: 118px; animation: spin 38s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.patch-bg { fill: #10142B; stroke: var(--line-strong); stroke-width: 1; }
.patch-ring { fill: none; stroke: var(--coral); stroke-width: 1.5; }
.patch-text { font-family: var(--font-mono); font-size: 8.2px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--text); }
.patch-star { fill: var(--sun); }
@media (max-width: 600px) {
  .crew-bottom { flex-direction: column; align-items: flex-start; gap: 0.1rem; }
  .crew-bottom span { text-align: left; }
  .crew-patch { right: -10px; bottom: 96px; width: 92px; height: 92px; }
}

.about-bio { font-size: clamp(1.2rem, 1.9vw, 1.55rem); line-height: 1.58; letter-spacing: -0.01em; }
/* the key phrases get marked like a highlighter, one after another */
.about-bio strong {
  font-weight: 600; color: #fff;
  background: linear-gradient(transparent 62%, rgba(242, 85, 47, 0.45) 62%) no-repeat 0 0 / 0% 100%;
  transition: background-size 1.1s var(--ease-in-out);
}
.about-bio.is-visible strong { background-size: 100% 100%; }
.about-bio.is-visible strong:nth-of-type(1) { transition-delay: 0.5s; }
.about-bio.is-visible strong:nth-of-type(2) { transition-delay: 0.95s; }
.about-bio.is-visible strong:nth-of-type(3) { transition-delay: 1.4s; }

/* the key facts sit right under the story, as one clear panel: four numbers, then where / what / with whom */
.facts {
  margin-top: 2.4rem; overflow: hidden; container-type: inline-size;
  border-radius: 24px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(28, 32, 68, 0.66), rgba(14, 16, 36, 0.66));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 40px 80px -60px #000;
}
.facts-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fact { display: grid; align-content: start; gap: 0.45rem; padding: 1.25rem 1.25rem 1.3rem; }
.fact:nth-child(even) { border-left: 1px solid var(--line); }
.fact:nth-child(n + 3) { border-top: 1px solid var(--line); }
@container (min-width: 620px) {
  .facts-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fact:nth-child(n) { border-top: 0; border-left: 1px solid var(--line); }
  .fact:first-child { border-left: 0; }
}
.fact-num { display: flex; align-items: flex-start; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 3.2vw, 2.8rem); line-height: 1.05; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.fact-unit { margin: 0.32em 0 0 0.06em; font-size: 0.4em; font-weight: 600; letter-spacing: 0; color: var(--text-dim); }
.fact-live .fact-num { color: var(--mint); }
.fact-label { font-size: 0.88rem; line-height: 1.42; color: var(--text-dim); }
.fact-label .status-dot { display: inline-block; margin-right: 0.5rem; vertical-align: 0.06em; }
.fact-link { display: inline-block; margin-top: 0.3rem; font-weight: 600; color: var(--text); text-decoration: underline 1px var(--line-strong); text-underline-offset: 3px; transition: color 0.25s, text-decoration-color 0.25s; }
.fact-link:hover { color: var(--coral-hi); text-decoration-color: currentColor; }
.facts-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.facts-list div { padding: 1rem 1.25rem 1.1rem; }
.facts-list div + div { border-left: 1px solid var(--line); }
.facts-list dt { margin-bottom: 0.4rem; font: 500 0.66rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
.facts-list dd { font-size: 0.95rem; font-weight: 600; }
@container (max-width: 460px) {
  .facts-list { grid-template-columns: 1fr; }
  .facts-list div + div { border-left: 0; border-top: 1px solid var(--line); }
}
.odo { display: inline-block; height: 1.05em; overflow: hidden; }
.odo-strip { display: block; transition: transform 1.8s var(--ease-out); }
.odo-strip > span { display: block; height: 1.05em; line-height: 1.05em; }

/* 8 · Work: each project pins, and the next one slides over it ============ */
.stack { display: grid; gap: clamp(1.5rem, 4vh, 3rem); }
.stack-item:nth-child(2) { --k: 1; }
.stack-item:nth-child(3) { --k: 2; }
.stack-item:nth-child(4) { --k: 3; }
@media (min-width: 900px) and (min-height: 620px) {
  .stack-item { position: sticky; top: calc(var(--header-h) + 1.4rem + var(--k, 0) * 0.85rem); }
}
.panel {
  position: relative; isolation: isolate; display: grid; gap: clamp(1.4rem, 3vw, 3rem); overflow: hidden;
  padding: clamp(0.8rem, 1.4vw, 1.15rem); border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--tint) 34%, var(--line));
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--tint) 26%, transparent), transparent 62%),
    linear-gradient(165deg, #161A38, #0A0D1C 78%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 60px 120px -70px #000;
  transform-origin: 50% 0; scale: calc(1 - var(--cover, 0) * 0.07);
}
/* covered panels sink into the dark */
.panel::after { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; background: #04050C; opacity: calc(var(--cover, 0) * 0.62); pointer-events: none; }
@media (min-width: 900px) { .panel { grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); } }
.panel-media { position: relative; z-index: 1; overflow: hidden; aspect-ratio: 1200 / 786; border-radius: calc(var(--r-lg) - 10px); background: var(--tint); }
.panel-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.panel:hover .panel-media img { transform: scale(1.045); }
.panel-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 1rem; padding: clamp(0.6rem, 2vw, 1.6rem) clamp(0.6rem, 1.4vw, 1.2rem) clamp(0.6rem, 1.4vw, 1rem); }
@media (min-width: 900px) { .panel-body { padding-left: 0; } }
.panel-count { font: 500 0.72rem/1 var(--font-mono); letter-spacing: 0.14em; color: var(--text-dim); }
.panel-count span { color: var(--text); }
.panel-tags { font: 500 0.72rem/1.4 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: color-mix(in srgb, var(--tint) 62%, var(--text)); }
.panel-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 4.2vw, 3.9rem); line-height: 0.96; letter-spacing: -0.045em; text-wrap: balance; }
.panel-title a::after { content: ""; position: absolute; inset: 0; z-index: 5; border-radius: var(--r-lg); }   /* the whole panel is the link */
.panel-desc { max-width: 34ch; font-size: 1.06rem; color: var(--text-dim); }
.panel-meta { display: grid; gap: 0.75rem; margin-top: auto; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.panel-meta div { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; }
.panel-meta dt { font: 500 0.66rem/1.7 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.panel-meta dd { font-size: 0.95rem; font-weight: 600; }
.panel-cta {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 0.4rem; padding: 0.75rem 1.25rem;
  border-radius: 999px; background: var(--text); color: var(--ink); font-size: 0.92rem; font-weight: 600;
  transition: box-shadow 0.4s var(--ease-out);
}
.panel-cta-arrow { display: inline-block; transition: transform 0.4s var(--ease-out); }
.panel:hover .panel-cta { box-shadow: 0 0 0 5px color-mix(in srgb, var(--tint) 45%, transparent); }
.panel:hover .panel-cta-arrow { transform: translateX(4px); }
.panel-num {
  position: absolute; z-index: 0; right: 0.06em; bottom: -0.2em; pointer-events: none;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(8rem, 17vw, 16rem); line-height: 1; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--tint) 42%, transparent);
}
@supports selector(:has(*)) {
  .panel-title a:focus-visible { outline: none; }
  .panel:has(.panel-title a:focus-visible) { outline: 2px solid var(--coral-hi); outline-offset: 4px; }
}
.work-more { display: flex; justify-content: center; margin-top: clamp(3.5rem, 7vw, 6rem); }

/* 9 · Skills: a small solar system to step through =========================
   js/scene3d.js draws the system into the stage and keeps a label on each planet; js/home.js turns the groups into tabs.
   Without JavaScript the four groups are simply listed, under a flat map of the system. */
.orrery { display: grid; gap: clamp(1.4rem, 3vw, 2.2rem); }
.orrery-view { position: relative; margin-inline: calc(var(--edge) * -1); }        /* phones: the system gets the whole width */
.orrery:not(.is-ready) .orrery-view { width: min(100%, 40rem); margin-inline: auto; }   /* no JavaScript: just a picture above the lists */
.orrery-stage { position: relative; aspect-ratio: 1.2; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.orrery-map { display: none; position: absolute; inset: 8% 3%; width: 94%; height: 84%; overflow: visible; }
.no-3d .orrery-map { display: block; }
.orrery-map-orbits { fill: none; stroke: rgba(190, 200, 255, 0.3); stroke-width: 0.5; stroke-dasharray: 1.5 3; }

/* a label rides on each planet (placed by js/scene3d.js); the chosen one fills with its colour */
.orrery-label {
  position: absolute; left: 0; top: 0; z-index: 2; translate: -50% -100%;
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.32rem 0.7rem 0.32rem 0.55rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: rgba(10, 12, 28, 0.84);
  font-size: 0.74rem; font-weight: 600; line-height: 1.1; white-space: nowrap; color: var(--text-dim); cursor: pointer;
  transition: color 0.3s, background-color 0.3s, border-color 0.3s, opacity 0.3s;
}
.orrery-label::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--c); }
.orrery-label.is-active { border-color: var(--c); background: color-mix(in srgb, var(--c) 32%, #0C0E22); color: #fff; }

/* stepping through: arrows in the bottom corners, where you are between them */
.orrery-step {
  position: absolute; bottom: 0.4rem; z-index: 3; display: grid; place-items: center; width: 2.9rem; height: 2.9rem;
  border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(14, 17, 38, 0.86); font-size: 1.05rem; color: var(--text);
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, scale 0.3s var(--ease-spring);
}
.orrery-step[data-step="-1"] { left: var(--edge); }
.orrery-step[data-step="1"] { right: var(--edge); }
.orrery-step:hover { border-color: var(--text); background: var(--text); color: var(--ink); }
.orrery-step:active { scale: 0.9; }
.orrery-pos { position: absolute; left: 50%; bottom: 1.35rem; translate: -50% 0; font: 500 0.74rem/1 var(--font-mono); letter-spacing: 0.16em; color: var(--text-dim); }

/* the groups: all listed without JavaScript; with it, tabs and the one you picked */
.orrery-groups { display: grid; gap: 2.6rem 2rem; }
@media (min-width: 700px) { .orrery-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.orrery.is-ready .orrery-groups { display: block; }
/* phones: a two-by-two grid of groups; wide screens: a legend beside the system, inner orbit first */
.orrery-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: clamp(1.8rem, 3vw, 2.4rem); }
.orrery-tab {
  display: flex; align-items: center; gap: 0.55rem; padding: 0.7rem 0.85rem; border-radius: 14px; text-align: left;
  border: 1px solid var(--line); background: rgba(16, 19, 44, 0.7); font-size: 0.9rem; font-weight: 600; line-height: 1.2; color: var(--text-dim);
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}
.orrery-tab::before { content: ""; flex: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); transition: scale 0.4s var(--ease-spring); }
.orrery-tab:hover { border-color: var(--line-strong); color: var(--text); }
.orrery-tab[aria-selected="true"] { border-color: color-mix(in srgb, var(--c) 70%, transparent); background: color-mix(in srgb, var(--c) 18%, #0E1129); color: var(--text); }
.orrery-tab[aria-selected="true"]::before { scale: 1.3; }
.orrery-tab-n { margin-left: auto; padding-left: 0.4rem; font: 500 0.72rem/1 var(--font-mono); color: var(--text-dim); }

.orbit-name {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.9rem; row-gap: 0.4rem;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.05; letter-spacing: -0.035em;
}
.orbit-count { font: 500 0.74rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 65%, #fff); }
.orbit-note { max-width: 38ch; margin-top: 0.8rem; color: var(--text-dim); }
.orbit-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
.orbit-tools li {
  padding: 0.5rem 0.95rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
  background: color-mix(in srgb, var(--c) 9%, rgba(14, 17, 38, 0.8)); font-size: 0.95rem; font-weight: 600;
}
/* a newly picked group: its name, then its tools, one after another */
.orrery.is-ready .orbit:not([hidden]) :is(.orbit-name, .orbit-note, li) { animation: orbit-in 0.5s var(--ease-out) both; }
.orrery.is-ready .orbit:not([hidden]) li { animation-delay: calc(0.08s + var(--i, 0) * 0.04s); }
@keyframes orbit-in { from { opacity: 0; translate: 0 10px; } }

@media (min-width: 960px) {
  .orrery.is-ready { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; column-gap: clamp(2.5rem, 5vw, 5rem); }
  .orrery-view { margin-inline: 0; }
  .orrery-stage { aspect-ratio: 1.42; }
  .orrery-tabs { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
  .orrery-tab { padding: 0.75rem 1.05rem; font-size: 0.95rem; }
  .orrery-step[data-step="-1"] { left: 0.4rem; }
  .orrery-step[data-step="1"] { right: 0.4rem; }
}

/* 10 · Testimonial: just the words, lighting up one by one as you read them ======= */
.testimonial .section-inner { display: grid; justify-items: center; text-align: center; }
.testimonial-quote p {
  max-width: 24ch; margin: 0 auto; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.8rem, 4.4vw, 3.5rem);
  line-height: 1.12; letter-spacing: -0.035em; text-wrap: balance;
}
/* fully lit well before the quote reaches the middle of the screen */
.tq-w { opacity: calc(0.16 + 0.84 * clamp(0, (var(--tp, 1) * (var(--tn, 1) + 3) - var(--wi, 0)) / 3, 1)); }
.quote-by { margin-top: clamp(1.8rem, 3vw, 2.6rem); font: 500 0.76rem/1.5 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.quote-by strong { font-weight: 500; color: var(--text); }

/* 11 · Contact ============================================================ */
.contact-inner { padding-bottom: clamp(3rem, 6vw, 4.5rem); text-align: center; }
.contact .eyebrow { justify-content: center; }
.contact-title { margin: 0 auto; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.5rem, 5.2vw, 5rem); line-height: 1.02; letter-spacing: -0.045em; text-wrap: balance; }
.contact-line { display: block; }
/* gravity: letters near the pointer get heavier (js/home.js) */
.gravity-on .contact-line { white-space: nowrap; }
.gl { display: inline-block; font-weight: var(--w, 700); }
.contact-sub { max-width: 50ch; margin: 1.7rem auto 2.4rem; font-size: 1.15rem; color: var(--text-dim); }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; }
.contact .btn-primary { background: var(--coral-deep); color: #fff; }
.contact .btn-primary:hover { background: #fff; color: var(--ink); box-shadow: none; }
.btn-copy[hidden] { display: none; }
.btn-copy svg { flex: none; width: 1.05rem; height: 1.05rem; }
.btn-copy .ic-check { display: none; }
.btn-copy.copied { border-color: var(--mint); background: var(--mint); color: var(--ink); }
.btn-copy.copied .ic-copy { display: none; }
.btn-copy.copied .ic-check { display: block; animation: pop-in 0.45s var(--ease-spring); }
@keyframes pop-in { from { opacity: 0; transform: scale(0.4); } }
.contact-note { margin-top: 1.6rem; font: 500 0.72rem/1.4 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.contact-social { margin-top: 3rem; }
.contact-social-title { margin-bottom: 1.2rem; font: 500 0.68rem/1 var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); }
.social-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem 2.2rem; }
.social { display: flex; flex-direction: column; align-items: center; gap: 0.65rem; color: var(--text-dim); }
.social-icon {
  position: relative; display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(30, 35, 70, 0.72); color: var(--text);
  transition: transform 0.45s var(--ease-out), background 0.3s, border-color 0.3s, box-shadow 0.45s var(--ease-out);
}
.social-icon svg { width: 1.35rem; height: 1.35rem; }
.social-icon::after {          /* a dashed orbit opens around the icon on hover */
  content: ""; position: absolute; inset: -0.45rem; border-radius: 50%; border: 1px dashed rgba(190, 200, 255, 0.5);
  opacity: 0; transform: scale(0.8); transition: opacity 0.35s, transform 0.5s var(--ease-out);
}
.social-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; transition: color 0.3s; }
.social:hover .social-icon, .social:focus-visible .social-icon { transform: translateY(-5px); border-color: transparent; color: #fff; }
.social:hover .social-icon::after, .social:focus-visible .social-icon::after { opacity: 1; transform: none; }
.social:hover .social-label, .social:focus-visible .social-label { color: var(--text); }
.social[data-brand="linkedin"]:hover .social-icon, .social[data-brand="linkedin"]:focus-visible .social-icon { background: #0A66C2; box-shadow: 0 16px 34px -12px rgba(10, 102, 194, 0.9); }
.social[data-brand="instagram"]:hover .social-icon, .social[data-brand="instagram"]:focus-visible .social-icon { background: linear-gradient(45deg, #F9A834, #EE2A7B 55%, #7B3FE4); box-shadow: 0 16px 34px -12px rgba(238, 42, 123, 0.85); }
.social[data-brand="whatsapp"]:hover .social-icon, .social[data-brand="whatsapp"]:focus-visible .social-icon { background: #25D366; box-shadow: 0 16px 34px -12px rgba(37, 211, 102, 0.85); }

/* 12 · Footer: a planet rises at the bottom of every page ================= */
.site-footer { --sky: clamp(170px, 19vw, 300px); overflow: hidden; padding-top: var(--sky); color: var(--text-dim); }
.horizon, .footer-body { translate: 0 calc((1 - var(--rise, 1)) * 110px); }
.horizon {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 calc(var(--sky) * 0.9)); mask-image: linear-gradient(to bottom, transparent, #000 calc(var(--sky) * 0.9));   /* no hard edge where the footer starts */
}
.horizon-planet {
  position: absolute; left: 50%; top: var(--sky); width: max(2600px, 250vw); aspect-ratio: 1; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(closest-side, #10143A 95.4%, #171D4E 95.4% 96.9%, #202868 96.9% 98.1%, #2D3789 98.1% 99%, #4859C6 99% 99.55%, #A9BDFF 99.55%);
  box-shadow: 0 0 0 2px rgba(255, 196, 160, 0.85), 0 -10px 34px rgba(255, 150, 110, 0.5), 0 -50px 150px rgba(242, 85, 47, 0.28), 0 -130px 280px rgba(124, 92, 255, 0.3);
}
.footer-body { position: relative; padding: clamp(2.6rem, 6vw, 5rem) var(--edge) 1.8rem; }
.wordmark {
  margin: 0 calc(var(--edge) * -0.5); white-space: nowrap; text-align: center;
  font-family: var(--font-display); font-weight: 800; font-size: 12.6vw; line-height: 0.84; letter-spacing: -0.06em;
  background: linear-gradient(180deg, rgba(205, 214, 255, 0.3), rgba(205, 214, 255, 0.02) 92%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wordmark.is-split { background: none; }
.wl { display: inline-block; background: linear-gradient(180deg, rgba(205, 214, 255, 0.3), rgba(205, 214, 255, 0.02) 92%); -webkit-background-clip: text; background-clip: text; translate: 0 70%; opacity: 0; transition: translate 1.2s var(--ease-out) calc(var(--li) * 40ms), opacity 1s var(--ease-out) calc(var(--li) * 40ms); }
.wordmark.split-in .wl { translate: none; opacity: 1; }
.footer-inner {
  display: grid; justify-items: center; gap: 1rem; max-width: var(--wrap); margin: clamp(2rem, 4vw, 3rem) auto 0; padding-top: 1.4rem;
  border-top: 1px solid var(--line); font-size: 0.86rem;
}
@media (min-width: 700px) {
  .footer-inner { grid-template-columns: 1fr auto 1fr; align-items: center; }
  .footer-copy { justify-self: start; }
  .back-to-top { justify-self: end; }
}
.footer-clock { display: inline-flex; align-items: center; gap: 0.6rem; font: 500 0.7rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.footer-clock[hidden] { display: none; }
.footer-clock time { color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.footer-clock::before { content: ""; width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--sun); box-shadow: 0 0 10px rgba(245, 196, 67, 0.8); }
.footer-clock.is-night::before { background: #9DB6FF; box-shadow: 0 0 10px rgba(157, 182, 255, 0.8); }
.back-to-top { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 600; color: var(--text); }
.back-to-top:hover { color: var(--coral-hi); }
.back-to-top-arrow {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line-strong);
  transition: transform 0.45s var(--ease-spring), background-color 0.3s, border-color 0.3s, color 0.3s;
}
.back-to-top:hover .back-to-top-arrow { transform: translateY(-4px); border-color: var(--coral-deep); background: var(--coral-deep); color: #fff; }

/* in-page links land with the section label just under the header */
#main > section[id]:not(.hero) { scroll-margin-top: calc(var(--header-h) + 2rem - var(--section-pad)); }

/* 13 · All projects: a staggered gallery with parallax pictures =========== */
.page-head { padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 5rem)); }
.page-title { max-width: 12ch; font-family: var(--font-display); font-weight: 700; font-size: clamp(3.2rem, 9vw, 8.4rem); line-height: 0.9; letter-spacing: -0.05em; }
.back-link {
  display: flex; width: fit-content; align-items: center; gap: 0.5rem; margin-bottom: 2.4rem; padding: 0.5rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass); font-size: 0.84rem; font-weight: 600; color: var(--text-dim);
  transition: color 0.25s, background-color 0.25s, transform 0.35s var(--ease-out);
}
.back-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.12); transform: translateX(-3px); }
.gallery { display: grid; gap: clamp(3rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.6rem); margin-top: clamp(3.5rem, 7vw, 6rem); }
@media (min-width: 800px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 9rem; }
  .gallery > li:nth-child(even) { transform: translateY(9rem); }
}
.tile { position: relative; display: grid; gap: 1.4rem; }
.tile-media {
  position: relative; overflow: hidden; aspect-ratio: 1200 / 786; border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--tint) 32%, var(--line)); background: var(--tint);
  transition: transform 0.8s var(--ease-out), box-shadow 0.8s var(--ease-out);
}
.tile-media img { position: absolute; left: 0; top: -4%; width: 100%; height: 108%; object-fit: cover; translate: 0 calc(var(--py, 0) * -3.5%); transition: scale 1.2s var(--ease-out); }
.tile:hover .tile-media { transform: translateY(-6px); box-shadow: 0 40px 80px -46px color-mix(in srgb, var(--tint) 70%, #000); }
.tile:hover .tile-media img { scale: 1.05; }
.tile-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem 1.2rem; align-items: baseline; }
.tile-index { grid-row: span 3; font: 500 0.78rem/1 var(--font-mono); letter-spacing: 0.08em; color: color-mix(in srgb, var(--tint) 70%, var(--text)); }
.tile-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: 1; letter-spacing: -0.04em; }
.tile-title a { background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0% 2px; padding-bottom: 0.06em; transition: background-size 0.5s var(--ease-out); }
.tile:hover .tile-title a, .tile-title a:focus-visible { background-size: 100% 2px; }
.tile-title a::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: var(--r-lg); }   /* the whole tile is the link */
.tile-tags { font: 500 0.7rem/1.4 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.tile-desc { max-width: 46ch; color: var(--text-dim); }

/* 14 · Case study ========================================================= */
.project-hero-inner { padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 5rem)); padding-bottom: clamp(3rem, 6vw, 5rem); }
.project-title { max-width: 14ch; margin: 0.2rem 0 1.6rem; font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 9vw, 8.2rem); line-height: 0.9; letter-spacing: -0.05em; text-wrap: balance; }
.project-summary { max-width: 56ch; font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--text-dim); }
.project-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.4rem 2rem; max-width: 900px; margin-top: 2.6rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.project-meta dt { margin-bottom: 0.45rem; font: 500 0.68rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.project-meta dd { font-weight: 600; }
/* the cover opens up to full size as you scroll into it */
.project-cover {
  margin-top: clamp(2.6rem, 5vw, 4rem); overflow: hidden; border-radius: 30px; border: 1px solid var(--line-strong);
  box-shadow: 0 50px 90px -46px rgba(0, 0, 0, 0.9), 0 0 90px -40px rgba(75, 115, 255, 0.4);
  transform-origin: 50% 0; scale: calc(0.93 + 0.07 * var(--open, 1));
}
.project-cover img { width: 100%; height: auto; }
.project-block-alt { border-block: 1px solid var(--line); background: rgba(255, 255, 255, 0.022); }
.project-block-head { max-width: 62ch; margin-bottom: clamp(2.6rem, 5vw, 4rem); }
.project-block .section-title { max-width: 20ch; font-size: clamp(2.2rem, 4.6vw, 4.2rem); }
.project-text { margin-top: 1.3rem; font-size: 1.14rem; line-height: 1.65; }
.project-points { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.project-points li { position: relative; padding-left: 1.7rem; font-weight: 600; }
.project-points li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--coral); box-shadow: 0 0 10px rgba(242, 85, 47, 0.7); }
.project-steps { display: grid; gap: 0.9rem; margin-top: 1.5rem; counter-reset: step; }
.project-steps li { display: flex; align-items: baseline; gap: 1rem; font-weight: 600; counter-increment: step; }
.project-steps li::before {
  content: counter(step); flex: none; display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--text); color: var(--ink); font: 600 0.85rem/1 var(--font-mono);
}
.project-note { max-width: 62ch; margin-top: 1.8rem; padding: 1rem 1.3rem; border-radius: 14px; border: 1px solid var(--line); border-left: 3px solid var(--coral); background: rgba(20, 24, 50, 0.78); }
.shot { min-width: 0; }
.shot-media { overflow: hidden; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--space-2); }
.shot-media img, .shot-media video { width: 100%; height: auto; }
/* pictures open up out of a mask when they arrive */
.shot[data-reveal] { opacity: 1; translate: none; }
.shot[data-reveal] .shot-media { clip-path: inset(10% 6% 10% 6% round var(--r-md)); transition: clip-path 1.4s var(--ease-out) var(--reveal-delay, 0s); }
.shot[data-reveal] .shot-media :is(img, video) { scale: 1.12; transition: scale 1.8s var(--ease-out) var(--reveal-delay, 0s); }
.shot[data-reveal].is-visible .shot-media { clip-path: inset(0 round var(--r-md)); }
.shot[data-reveal].is-visible .shot-media :is(img, video) { scale: 1; }
.shot figcaption { margin-top: 1rem; font-size: 0.9rem; color: var(--text-dim); }
.shot-stack { display: grid; gap: clamp(2rem, 4vw, 3rem); }
.shot-pair { display: grid; gap: clamp(1.4rem, 3vw, 2.2rem); }
@media (min-width: 800px) { .shot-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shot-scroll .scroll-frame { max-height: min(78vh, 720px); overflow-y: auto; overscroll-behavior: contain; background: #fff; }
.shot-scroll .scroll-frame:focus-visible { outline-offset: -3px; }
.project-duo { display: grid; gap: 2.4rem; align-items: center; margin-top: 1rem; }
@media (min-width: 900px) { .project-duo { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 4rem; } }
.shot-portrait { width: 100%; max-width: 340px; }

/* any case-study picture opens large */
.zoom { position: relative; display: block; width: 100%; border-radius: inherit; cursor: zoom-in; }
.zoom::after {
  content: ""; position: absolute; top: 0.9rem; right: 0.9rem; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  background: rgba(8, 10, 20, 0.66) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F3F0E8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E") center / 1rem no-repeat;
  opacity: 0; transform: scale(0.8); transition: opacity 0.3s, transform 0.5s var(--ease-spring);
}
.zoom:hover::after, .zoom:focus-visible::after { opacity: 1; transform: none; }
.zoom:focus-visible { outline-offset: -4px; }
@media (hover: none) { .zoom::after { width: 2.2rem; height: 2.2rem; opacity: 0.85; transform: none; } }

/* next project: a peek at its cover, which straightens up when you point at the link */
.next-project { padding: 0 var(--edge) clamp(2rem, 5vw, 4rem); }
.next-project .section-inner {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.8rem; min-height: clamp(260px, 30vw, 360px);
  max-width: var(--wrap); overflow: hidden; isolation: isolate; padding: clamp(2.4rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem);
  border-radius: 40px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, rgba(34, 38, 78, 0.86), rgba(15, 17, 38, 0.86));
}
.next-project .section-inner::before {
  content: ""; position: absolute; z-index: -1; right: -10%; bottom: -120%; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 10%, rgba(255, 150, 110, 0.45), rgba(242, 85, 47, 0.16) 30%, transparent 62%);
}
.next-link { display: flex; align-items: baseline; gap: 1rem; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 6vw, 4.8rem); line-height: 1; letter-spacing: -0.04em; transition: color 0.3s; }
.next-link:hover { color: var(--coral-hi); }
.next-link > span:last-child { transition: transform 0.35s var(--ease-out); }
.next-link:hover > span:last-child { transform: translateX(8px); }
.next-thumb {
  position: absolute; top: 50%; right: clamp(1.5rem, 5vw, 4rem); width: min(38%, 400px); aspect-ratio: 1200 / 786; overflow: hidden;
  border-radius: 20px; border: 1px solid var(--line-strong); background: var(--space-2); box-shadow: 0 40px 70px -36px rgba(0, 0, 0, 0.9);
  transform: translateY(-46%) rotate(3.5deg) scale(0.94); transition: transform 0.7s var(--ease-spring), box-shadow 0.5s;
}
.next-thumb img { width: 100%; height: 100%; object-fit: cover; }
.next-link:hover .next-thumb, .next-link:focus-visible .next-thumb { transform: translateY(-50%) rotate(0deg) scale(1); box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.95), 0 0 80px -30px rgba(242, 85, 47, 0.5); }
@media (min-width: 760px) { .next-project .section-inner > div:first-child { max-width: calc(100% - min(38%, 400px) - 2.5rem); } }
@media (max-width: 759.98px) {
  .next-link { flex-wrap: wrap; }
  .next-thumb { position: relative; top: auto; right: auto; flex-basis: 100%; width: 100%; margin-bottom: 0.9rem; transform: none; }
  .next-link:hover .next-thumb, .next-link:focus-visible .next-thumb { transform: none; }
}

/* 15 · Lightbox =========================================================== */
.lightbox {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; overflow: hidden; border: 0;
  padding: clamp(4.2rem, 7vh, 5rem) clamp(1rem, 6vw, 5.5rem) clamp(1.2rem, 4vh, 2.5rem); background: transparent; color: var(--text);
  touch-action: pan-y pinch-zoom;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(5, 6, 14, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.lb-figure { display: grid; justify-items: center; gap: 1rem; min-height: 0; max-height: 100%; }
.lb-img { max-width: 100%; max-height: calc(100dvh - 11rem); width: auto; height: auto; object-fit: contain; border-radius: 16px; box-shadow: 0 50px 120px -40px #000; cursor: zoom-out; }
.lb-cap { max-width: 62ch; text-align: center; font-size: 0.92rem; color: var(--text-dim); }
.lb-btn {
  position: fixed; z-index: 2; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--glass); color: var(--text);
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, translate 0.35s var(--ease-out);
}
.lb-btn svg { width: 1.15rem; height: 1.15rem; }
.lb-btn:hover { border-color: var(--text); background: var(--text); color: var(--ink); }
.lb-btn[hidden] { display: none; }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev, .lb-next { top: 50%; margin-top: -1.5rem; }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-prev:hover { translate: -3px 0; }
.lb-next:hover { translate: 3px 0; }
.lb-count { position: fixed; top: 1.9rem; left: 1.4rem; font: 500 0.72rem/1 var(--font-mono); letter-spacing: 0.14em; color: var(--text-dim); }
.lightbox.is-swapping .lb-img { animation: lb-swap 0.4s var(--ease-out); }
.lightbox.no-vt[open] .lb-figure { animation: lb-swap 0.35s var(--ease-out); }
@keyframes lb-swap { from { opacity: 0; transform: scale(0.97); } }
html.lb-open { overflow: hidden; }
@media (max-width: 600px) {
  .lb-prev, .lb-next { top: auto; bottom: 1rem; margin-top: 0; }
  .lb-img { max-height: calc(100dvh - 13rem); }
}

/* 16 · 404 ================================================================ */
.lost { display: grid; align-items: center; min-height: 100vh; min-height: 100svh; }
.lost-inner { padding-top: 7rem; text-align: center; }
.lost .eyebrow { justify-content: center; }
.lost-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(3.2rem, 11vw, 7.5rem); line-height: 0.95; letter-spacing: -0.05em; }
.lost-sub { max-width: 44ch; margin: 1.5rem auto 2.4rem; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-dim); }
.lost-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; }

/* 17 · Page transitions =================================================== */
/* the project picture you click grows into the case study's cover (names are given in js/main.js, only during a transition) */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 0.7s; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
::view-transition-group(root) { animation-duration: 0.4s; }
::view-transition-group(lb-img) { animation-duration: 0.5s; }

/* 18 · Reduced motion & no-script ========================================= */
@media (scripting: none) {
  [data-reveal], .hero-wait [data-reveal] { opacity: 1 !important; translate: none !important; }
  .reveal-word > span { opacity: 1 !important; transform: none !important; animation: none !important; }
  [data-reveal].eyebrow::before { transform: none; }
  .orrery-map { display: block; }
  .about-bio strong { background-size: 100% 100%; }
  .nav-link.active { background: rgba(255, 255, 255, 0.1); }
  .shot[data-reveal] .shot-media { clip-path: none; }
  .shot[data-reveal] .shot-media :is(img, video) { scale: 1; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.2s !important; }
  [data-reveal] { translate: none; }
  .reveal-word { overflow: visible; }
  .reveal-word > span, .sw > span { opacity: 1; transform: none; translate: none; }
  html.has-3d:not(.hero-landed) .site-header { opacity: 1; transform: none; }
  .tq-w { opacity: 1; }
  .panel { scale: 1; }
  .panel::after { opacity: 0; }
  .horizon, .footer-body { translate: none; }
  .wl { translate: none; opacity: 1; }
  .project-cover { scale: 1; }
  .shot[data-reveal] .shot-media { clip-path: none; }
  .shot[data-reveal] .shot-media :is(img, video) { scale: 1; }
  .tile-media img { translate: none; }
}
