/* =========================================================
   PORTFOLIO — style.css
   Palette: ice #A0BDDB + ink #080813 (tints only, see DESIGN.md)
   ========================================================= */

:root {
  --ice-50:  #EEF3F9;
  --ice-100: #DCE7F2;
  --ice:     #A0BDDB;
  --ice-400: #7E9FC2;
  --ice-600: #4F6E92;
  --ink-700: #1A1A2E;
  --ink-800: #10101E;
  --ink:     #080813;

  --f-display: "Sina Display", "Arial Narrow", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 64px);
  --radius: clamp(20px, 3vw, 44px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.76, 0, .24, 1);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ice-50);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-loading { overflow: hidden; }
.no-js body.is-loading { overflow: visible; }
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
::selection { background: var(--ice); color: var(--ink); }

:focus-visible { outline: 2px solid var(--ice); outline-offset: 4px; border-radius: 4px; }
[data-bg="ice"] :focus-visible { outline-color: var(--ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: 12px; left: 12px; z-index: 2000;
  padding: 10px 16px; background: var(--ice); color: var(--ink);
  font-family: var(--f-mono); font-size: 12px; border-radius: 999px;
  transform: translateY(-200%); transition: transform .3s var(--ease);
}
.skip:focus { transform: none; }
.svg-defs { position: absolute; pointer-events: none; }

/* ---------- Shared atoms ---------- */
.label {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.serif {
  font-family: var(--f-display);
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: max(1.5px, .022em) var(--ice-600);
  paint-order: stroke fill;
}

.btn-pill {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ice-50);
  font-weight: 700; font-size: 14px; letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color .5s var(--ease);
}
.btn-pill::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ice);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform .5s var(--ease);
}
.btn-pill:hover { color: var(--ink); }
.btn-pill:hover::before { transform: none; }
.btn-pill--ice { background: var(--ice); color: var(--ink); }
.btn-pill--ice::before { background: var(--ice-50); }
.btn-pill__text { display: inline-block; pointer-events: none; }

.pill {
  display: inline-flex; align-items: center;
  padding: 9px 18px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  white-space: nowrap;
}

/* Image placeholders — swap with <img> inside the figure */
.ph {
  position: relative;
  overflow: hidden;
  background: var(--ice-100);
  isolation: isolate;
}
.ph::before {
  content: "";
  position: absolute; inset: -8%;
  z-index: -1;
  background:
    radial-gradient(90% 70% at 28% 22%, rgba(238,243,249,.85) 0%, rgba(238,243,249,0) 55%),
    radial-gradient(70% 60% at 80% 85%, rgba(8,8,19,.55) 0%, rgba(8,8,19,0) 60%),
    linear-gradient(155deg, var(--ice) 0%, var(--ice-400) 42%, var(--ice-600) 72%, var(--ink-700) 100%);
  transition: transform 1.1s var(--ease);
}
.ph::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  background-image: var(--grain);
  opacity: .22;
  pointer-events: none;
}
.ph > img, .ph > video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 1.1s var(--ease);
}
.ph__cap {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em;
  color: var(--ice-50);
  text-shadow: 0 1px 8px rgba(8,8,19,.35);
}
.ph > img ~ .ph__cap { display: none; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--ink);
  color: var(--ice-50);
  display: grid; place-items: center;
  /* safety net if JS never runs */
  animation: preloader-failsafe 0s linear 8s forwards;
}
.no-js .preloader { display: none; }
@keyframes preloader-failsafe { to { visibility: hidden; opacity: 0; } }
.preloader__count {
  position: absolute; right: var(--gutter); bottom: 2vh;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(5rem, 22vw, 22rem);
  line-height: .85;
  color: var(--ice);
  font-variant-numeric: tabular-nums;
}
.preloader__name {
  display: flex; overflow: hidden;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(2rem, 6vw, 5.5rem);
  line-height: 1;
}
.preloader__char { display: inline-block; transform: translateY(110%); }
.preloader__label {
  position: absolute; left: var(--gutter); top: 28px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em;
  color: var(--ice);
}
.preloader__curtain {
  position: absolute; inset: 0;
  background: var(--ice);
  transform: translateY(100%);
}

/* ---------- Overlays ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 1500;
  pointer-events: none;
  display: none;
}
.has-cursor .cursor { display: block; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.has-cursor input, .has-cursor textarea { cursor: text; }
.cursor__dot, .cursor__ring {
  position: fixed; top: 0; left: 0;
  border-radius: 50%;
  will-change: transform;
}
.cursor__dot {
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  background: var(--ice);
  box-shadow: 0 0 0 1.5px var(--ink);
}
.cursor__ring {
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  display: grid; place-items: center;
}
.cursor__ring::before {
  content: ""; position: absolute; inset: 0;
  border: 1.5px solid var(--ice-400);
  border-radius: 50%;
  transition: transform .5s var(--ease), background-color .4s var(--ease), border-color .4s var(--ease);
}
.cursor__label {
  position: relative;
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .14em;
  color: var(--ink);
  opacity: 0; transform: scale(.4);
  transition: opacity .3s var(--ease), transform .5s var(--ease);
}
.cursor.is-hover .cursor__ring::before { transform: scale(1.6); background-color: rgba(160,189,219,.18); }
.cursor.is-view .cursor__ring::before { transform: scale(2.4); background-color: var(--ice); border-color: var(--ice); }
.cursor.is-view .cursor__label { opacity: 1; transform: none; }
.cursor.is-view .cursor__dot { opacity: 0; }
.cursor.is-hidden { opacity: 0; }

.progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 950;
  height: 2px; pointer-events: none;
}
.progress__bar {
  height: 100%; background: var(--ice);
  transform-origin: 0 50%; transform: scaleX(0);
}

.grain {
  position: fixed; top: -20%; left: -20%; z-index: 900;
  width: 140%; height: 140%;
  pointer-events: none;
  opacity: .06;
  background-image: var(--grain);
  will-change: transform;
  animation: grain 1.2s steps(4) infinite;
}
.grain svg { display: none; }
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-5%, 4%); }
  50% { transform: translate(4%, -6%); }
  75% { transform: translate(-3%, 7%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  display: flex; align-items: center; gap: clamp(16px, 3vw, 48px);
  padding: 18px var(--gutter);
  color: var(--ice-50);
  transition: transform .6s var(--ease), color .4s var(--ease);
}
.nav.is-light { color: var(--ink); }
.nav.is-light .nav__cta { background: var(--ink); color: var(--ice-50); }
.nav.is-light .nav__cta:hover { color: var(--ink); }
.menu-open .nav.is-light { color: var(--ice-50); }
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo { display: flex; align-items: center; gap: 10px; }
.nav__star { width: 22px; height: 22px; color: currentColor; transition: transform .8s var(--ease); }
.nav__logo:hover .nav__star { transform: rotate(180deg) scale(1.15); }
.nav__mark { font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em; font-size: 22px; }
.nav__links { display: flex; gap: clamp(12px, 2vw, 32px); margin-left: auto; }
.nav__link {
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .14em;
  white-space: nowrap;
  opacity: .85; transition: opacity .3s;
}
.nav__link:hover { opacity: 1; }
.nav__clock {
  display: flex; gap: 8px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
}
.nav__clock-label { opacity: .55; }
.nav__cta { background: var(--ice-50); color: var(--ink); padding: 11px 20px; font-size: 13px; }
.nav__cta::before { background: var(--ice); }
/* ---- Mobile menu button: spinning star + rolling label ---- */
.nav__burger {
  display: none;
  align-items: center; gap: 10px;
  height: 44px; margin-left: auto;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .16em;
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.burger__icon { position: relative; width: 16px; height: 16px; flex: none; }
.burger__icon svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.burger__star {
  fill: currentColor;
  animation: burger-spin 7s linear infinite;
  transition: transform .6s var(--ease), opacity .3s;
}
.nav__burger:hover .burger__star, .nav__burger:focus-visible .burger__star { animation-duration: 1.6s; }
.burger__x path {
  fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round;
  stroke-dasharray: 18; stroke-dashoffset: 18;
  transition: stroke-dashoffset .45s var(--ease);
}
.burger__label { display: block; height: 1.25em; line-height: 1.25em; overflow: hidden; }
.burger__label-track { display: flex; flex-direction: column; transition: transform .6s var(--ease); }
@keyframes burger-spin { to { transform: rotate(360deg); } }

.menu-open .nav__burger { background: var(--ice); color: var(--ink); border-color: var(--ice); }
.menu-open .burger__star { animation-play-state: paused; transform: rotate(180deg) scale(0); opacity: 0; }
.menu-open .burger__x path { stroke-dashoffset: 0; }
.menu-open .burger__x path:last-child { transition-delay: .12s; }
.menu-open .burger__label-track { transform: translateY(-50%); }

/* ---- Menu overlay: two colour layers sweep down, then the content rises ---- */
.menu {
  position: fixed; inset: 0; z-index: 790;
  color: var(--ice-50);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 104px var(--gutter) 32px;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 1.1s;
}
.menu.is-open { visibility: visible; pointer-events: auto; transition: visibility 0s; }
.menu__layer {
  position: absolute; inset: 0; z-index: -1;
  transform: translateY(-101%);
  transition: transform .75s var(--ease-in-out);
}
.menu__layer--ice { background: var(--ice); transition-delay: .2s; }   /* closing: leaves last */
.menu__layer--ink { background: var(--ink); transition-delay: 0s; }
.menu.is-open .menu__layer { transform: none; }
.menu.is-open .menu__layer--ice { transition-delay: 0s; }              /* opening: ice first… */
.menu.is-open .menu__layer--ink { transition-delay: .14s; }            /* …then ink over it */

.menu__star {
  position: absolute; z-index: -1;
  right: -38vw; bottom: -22vh;
  width: 115vw; height: auto;
  fill: none; stroke: var(--ice); stroke-width: .06;
  opacity: 0;
  transform: scale(.6) rotate(-40deg);
  transition: opacity .6s var(--ease), transform 1.4s var(--ease);
}
.menu.is-open .menu__star { opacity: .22; transform: scale(1) rotate(0deg); transition-delay: .35s; }
.menu.is-open .menu__star path { animation: menu-star-spin 40s linear infinite; transform-origin: 12px 12px; }
@keyframes menu-star-spin { to { transform: rotate(360deg); } }

.menu__label {
  color: var(--ice); margin-bottom: 18px;
  opacity: 0; transform: translateY(10px);
  transition: opacity .4s, transform .6s var(--ease);
}
.menu.is-open .menu__label { opacity: 1; transform: none; transition-delay: .45s; }
.menu__nav { display: flex; flex-direction: column; margin-bottom: auto; }
.menu__link {
  position: relative;
  display: flex; align-items: flex-start; justify-content: space-between;
  overflow: hidden;
  padding: 4px 0;
}
.menu__link::after {               /* divider draws in from the left */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: rgba(160,189,219,.25);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .9s var(--ease);
}
.menu.is-open .menu__link::after { transform: scaleX(1); }
.menu__link-inner {
  display: block;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(3rem, 15vw, 6.5rem);
  line-height: 1.02;
  transform: translateY(105%) rotate(4deg);
  transform-origin: 0 100%;
  transition: transform .8s var(--ease), color .35s, -webkit-text-stroke-color .35s;
  -webkit-text-stroke: 1.5px transparent;
}
.menu__link:hover .menu__link-inner, .menu__link:focus-visible .menu__link-inner {
  color: transparent; -webkit-text-stroke-color: var(--ice);
}
.menu__index {
  font-family: var(--f-mono); font-size: 11px; color: var(--ice); padding-top: 14px;
  opacity: 0; transition: opacity .5s;
}
.menu.is-open .menu__link-inner { transform: none; }
.menu.is-open .menu__index { opacity: 1; }
.menu.is-open .menu__link:nth-child(1) .menu__link-inner, .menu.is-open .menu__link:nth-child(1)::after { transition-delay: .42s; }
.menu.is-open .menu__link:nth-child(2) .menu__link-inner, .menu.is-open .menu__link:nth-child(2)::after { transition-delay: .49s; }
.menu.is-open .menu__link:nth-child(3) .menu__link-inner, .menu.is-open .menu__link:nth-child(3)::after { transition-delay: .56s; }
.menu.is-open .menu__link:nth-child(4) .menu__link-inner, .menu.is-open .menu__link:nth-child(4)::after { transition-delay: .63s; }
.menu.is-open .menu__link:nth-child(5) .menu__link-inner, .menu.is-open .menu__link:nth-child(5)::after { transition-delay: .70s; }
.menu.is-open .menu__index { transition-delay: .8s; }
.menu__foot {
  display: flex; flex-direction: column; gap: 14px; margin-top: 28px;
  opacity: 0; transform: translateY(16px);
  transition: opacity .4s, transform .7s var(--ease);
}
.menu.is-open .menu__foot { opacity: 1; transform: none; transition-delay: .8s; }
.menu__mail { font-size: 18px; font-weight: 700; }
.menu__socials { display: flex; flex-wrap: wrap; gap: 14px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; color: var(--ice); }
.menu__socials a, .menu__mail { min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- Sections (shared) ---------- */
section, .footer { position: relative; }
[data-bg="ink"] { background: var(--ink); color: var(--ice-50); }
[data-bg="ice"] { background: var(--ice-50); color: var(--ink); }

/* ---------- Hero ----------
   Grid: [ stage: word + (portrait | echoes) ]
         [ intro | meta | scroll button      ]
   Nothing is absolutely positioned across rows, so text can't collide. */
.hero {
  --hero-size: min(19.6vw, 26vh);
  height: 100vh; height: 100svh;
  min-height: 580px;
  padding: 92px var(--gutter) calc(var(--radius) + 28px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "stage stage stage" "intro meta btn";
  column-gap: clamp(24px, 4vw, 72px);
  row-gap: clamp(16px, 2.5vh, 32px);
  align-items: end;
  overflow: hidden;
  z-index: 1;
}
.hero__graffiti {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
  opacity: .06;
  will-change: transform, opacity;
  contain: strict;
}
.hero__graffiti svg { width: 120%; max-width: none; height: auto; }
.hero__graffiti-text {
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: 440px;
  fill: var(--ice);
}
.hero__stage {
  grid-area: stage;
  align-self: stretch;
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  will-change: transform;
}
.hero__title {
  position: relative; z-index: 3;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: var(--hero-size);
  line-height: .86;
  color: var(--ice-50);
  text-align: center;
  white-space: nowrap;
}
.hero__word { display: block; }
.hero__word .char { display: inline-block; will-change: transform; }
.hero__word .char--space { width: .25em; }
.hero__middle { position: relative; min-height: 0; container-type: size; }
.hero__echoes {
  position: absolute; inset: 0 0 0 38%;
  z-index: 1;
  padding-top: 2.4vh;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: min(calc(var(--hero-size) * .62), 13cqw, 43cqh);
  line-height: 1.04;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
}
.hero__echo {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px var(--ice);
  will-change: transform;
}
.hero__echo[data-echo="1"] { opacity: .5; }
.hero__echo[data-echo="2"] { opacity: .2; }

.hero__portrait-wrap {
  position: absolute; z-index: 2;
  left: 5%; top: 6%;
  height: 90%;
  max-width: 32%;
  aspect-ratio: 4 / 5;
}
.hero__portrait { width: 100%; height: 100%; border-radius: 6px; }
.hero__portrait-wrap::before {
  content: ""; position: absolute; inset: -12px 12px 12px -12px;
  border: 1.5px solid var(--ice);
  border-radius: 6px;
  z-index: -1;
}
.badge {
  position: absolute;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--ice);
  color: var(--ink);
  font-weight: 700; font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(8,8,19,.35);
  touch-action: none;
  cursor: grab;
}
.badge:active { cursor: grabbing; }
.badge:nth-of-type(1) { left: -12%; top: -8%; rotate: -8deg; }
.badge:nth-of-type(2) { right: -22%; bottom: -6%; rotate: 5deg; background: var(--ice-50); }
.badge__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 0 rgba(8,8,19,.5);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(8,8,19,.45); }
  80%, 100% { box-shadow: 0 0 0 10px rgba(8,8,19,0); }
}

.sparkle { position: absolute; color: var(--ice); pointer-events: none; z-index: 4; will-change: transform; }
.sparkle--1 { width: 40px; left: 1%; top: 52%; }
.sparkle--2 { width: 24px; right: 1.5%; top: 1%; color: var(--ice-50); }
.sparkle--3 { width: 30px; right: 3%; top: 70%; }

.hero__intro {
  grid-area: intro;
  position: relative; z-index: 3;
  max-width: 440px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ice-100);
}
.hero__role {
  margin-top: 10px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ice);
}
.hero__meta {
  grid-area: meta;
  position: relative; z-index: 3;
  display: flex; flex-direction: column; gap: 8px;
  padding-bottom: 4px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em;
  color: var(--ice);
  text-align: right;
  white-space: nowrap;
}
.scroll-btn {
  grid-area: btn;
  position: relative; z-index: 3;
  width: 116px; height: 116px;
  border-radius: 50%;
  background: var(--ice);
  color: var(--ink);
  display: grid; place-items: center;
}
.scroll-btn__ring {
  position: absolute; inset: 6px;
  width: calc(100% - 12px); height: calc(100% - 12px);
  animation: spin 14s linear infinite;
}
.scroll-btn__ring text {
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .2em;
  fill: var(--ink);
}
.scroll-btn__arrow { font-size: 22px; transition: translate .5s var(--ease); }
.scroll-btn:hover .scroll-btn__arrow { translate: 0 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Tapes ---------- */
.tapes {
  z-index: 2;
  height: clamp(220px, 30vw, 380px);
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-top: calc(var(--radius) * -1);
}
.tape {
  position: absolute; left: -10vw; width: 120vw;
  top: 50%;
  padding: 14px 0;
  border-block: 2px solid var(--ink);
  overflow: hidden;
}
.tape--ice { background: var(--ice); color: var(--ink); transform: translateY(-80%) rotate(-4deg); }
.tape--ink { background: var(--ink); color: var(--ice); border-color: var(--ink); transform: translateY(-10%) rotate(3deg); }
.tape__track { display: flex; width: max-content; will-change: transform; }
.tape__inner { display: flex; align-items: center; flex-shrink: 0; }
.tape__item {
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1.4rem, 2.6vw, 2.4rem);
  text-transform: uppercase;
  line-height: 1;
  padding: 0 .55em;
  white-space: nowrap;
}
.tape__sep { font-size: clamp(1rem, 1.8vw, 1.6rem); }

/* ---------- About ----------
   Left column: title, statement, facts. Right column: photo stretched to
   the same height, so there is no dead space. Tags span the full width. */
.about {
  z-index: 2;
  padding: clamp(60px, 8vw, 120px) var(--gutter) clamp(64px, 8vw, 120px);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 20px;
  row-gap: clamp(20px, 2.6vw, 36px);
  overflow: hidden;
}
.about__label { grid-column: 1 / -1; color: var(--ice-600); }
.about__title {
  grid-column: 1 / 9; grid-row: 2;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(3.4rem, 8.4vw, 9rem);
  line-height: .9;
  text-transform: uppercase;
}
.about__title .serif { -webkit-text-stroke-color: var(--ice-600); padding-right: .12em; }
.about__statement {
  grid-column: 1 / 9; grid-row: 3;
  font-size: clamp(1.15rem, 1.75vw, 1.8rem);
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -.01em;
}
.about__statement .word { display: inline-block; }
.about__photo {
  grid-column: 9 / 13; grid-row: 2 / 5;
  align-self: stretch;
  min-height: 340px;
  border-radius: 10px;
  rotate: 2deg;
}
.stats { grid-column: 1 / 9; grid-row: 4; align-self: end; display: flex; flex-wrap: wrap; gap: 12px; }
.stat {
  display: inline-flex; flex-direction: column; gap: 4px;
  padding: 12px 18px 14px;
  border-radius: 6px;
  background: var(--ink); color: var(--ice-50);
}
.stat:nth-child(2) { background: var(--ice); color: var(--ink); rotate: -2deg; }
.stat:nth-child(3) { background: transparent; color: var(--ink); border: 2px solid var(--ink); rotate: 1.5deg; }
.stat__num { font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em; font-size: clamp(1.5rem, 2.4vw, 2.4rem); line-height: 1; text-transform: uppercase; white-space: nowrap; }
.stat__label { font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.tags {
  grid-column: 1 / -1; grid-row: 5;
  position: relative;
  display: flex; flex-wrap: wrap; align-content: flex-start;
  gap: 14px 10px;
  margin-top: 34px;
}
.tags__hint { position: absolute; left: 0; top: -30px; color: var(--ice-600); }
.tag {
  position: relative;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ice-50);
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1rem, 1.35vw, 1.3rem);
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  touch-action: none;
  cursor: grab;
  transition: box-shadow .3s;
}
.tag:active { cursor: grabbing; box-shadow: 0 12px 30px rgba(8,8,19,.25); z-index: 5; }
.tag:nth-of-type(5n+1) { background: var(--ice); rotate: -7deg; }
.tag:nth-of-type(5n+2) { background: var(--ink); color: var(--ice-50); rotate: 5deg; }
.tag:nth-of-type(5n+3) { background: var(--ice-100); rotate: 3deg; }
.tag:nth-of-type(5n+4) { background: var(--ice-400); rotate: -4deg; }
.tag:nth-of-type(5n)   { background: var(--ice-50); rotate: 8deg; }
.sparkle--a1 { width: 40px; right: 2%; top: 4%; color: var(--ice-400); }
.sparkle--a2 { width: 24px; left: 64%; top: 7%; color: var(--ink); }

/* ---------- Work ---------- */
.work {
  z-index: 2;
  padding: 0 var(--gutter) clamp(80px, 12vw, 180px);
}
.work__head {
  display: flex; justify-content: space-between;
  color: var(--ice-600);
  border-top: 1.5px solid var(--ink);
  padding-top: 16px;
}
.work__title {
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(3.6rem, 13vw, 13rem);
  line-height: .86;
  margin: 18px 0 24px;
}
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(48px, 6vw, 80px); }
.filter {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .14em;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
.filter:hover { background: var(--ice); }
.filter.is-active { background: var(--ink); color: var(--ice-50); }

.card { position: relative; perspective: 1200px; }
.card__link { display: block; height: 100%; }
.card__inner {
  position: relative;
  height: 100%;
  background: var(--ice-100);
  border-radius: 0 16px 16px 16px;
  padding: 12px;
  transition: background-color .5s var(--ease);
}
.card:hover .card__inner { background: var(--ice); }
.card__tab {
  position: absolute; left: 0; bottom: 100%;
  padding: 8px 18px 6px 14px;
  background: inherit;
  border-radius: 12px 12px 0 0;
  font-family: var(--f-mono); font-size: 10px; font-weight: 500; letter-spacing: .14em;
  color: var(--ice-600);
}
.card__tab::after {
  content: ""; position: absolute; left: 100%; bottom: 0;
  width: 14px; height: 14px;
  background: radial-gradient(circle at 100% 0, transparent 14px, var(--ice-100) 14.5px);
  transition: background .5s var(--ease);
}
.card:hover .card__tab::after { background: radial-gradient(circle at 100% 0, transparent 14px, var(--ice) 14.5px); }
.card__media { aspect-ratio: 4 / 5; border-radius: 8px; }
.card:hover .ph::before, .card:hover .ph > img { transform: scale(1.08); }
.card__body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 16px 6px 6px;
}
.card__meta { grid-column: 1 / -1; font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; color: var(--ice-600); }
.card__title { font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em; font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.05; }
.card__cat {
  display: inline-flex; align-items: center; gap: 6px; align-self: center;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
}
.card__desc { grid-column: 1 / -1; font-size: 14px; color: var(--ink-700); max-width: 40ch; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; border: 1.5px solid var(--ink); }
.dot--web { background: var(--ink); }
.dot--brand { background: var(--ice-400); }
.dot--motion { background: var(--ice-50); }

.card--featured { margin-bottom: clamp(56px, 7vw, 96px); }
.card--featured .card__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(16px, 3vw, 48px);
  padding: 14px;
}
.card--featured .card__media { aspect-ratio: 16 / 10; }
.card--featured .card__body { align-content: end; padding: 12px 12px 18px; }
.card--featured .card__title { font-size: clamp(2.6rem, 6vw, 6rem); line-height: .9; }
.card--featured .card__desc { font-size: 17px; margin-top: 10px; }
.work__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(56px, 5vw, 72px) clamp(16px, 2vw, 28px);
}
.card.is-filtered { display: none; }

/* ---------- Case file (overlay opened from the work cards) ---------- */
.card__open {
  grid-column: 1 / -1;
  display: inline-flex; justify-self: start;
  margin-top: 10px;
  font-family: var(--f-mono); font-weight: 500; letter-spacing: .14em;
  color: var(--ice-600);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0% 1.5px no-repeat;
  padding-bottom: 3px;
  transition: background-size .6s var(--ease), color .4s var(--ease);
}
.card:hover .card__open, .card__link:focus-visible .card__open { background-size: 100% 1.5px; color: var(--ink); }

.casefile {
  position: fixed; inset: 0; z-index: 1200;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: clamp(16px, 3vh, 36px) var(--gutter);
  color: var(--ice-50);
  overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; pointer-events: none;
}
.casefile.is-open, .casefile:has(.case:target) { visibility: visible; pointer-events: auto; }
.casefile__bg {
  position: fixed; inset: 0; z-index: -1;
  background: var(--ink);
}
.casefile__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: var(--grain); opacity: .12;
}
.casefile__bar {
  display: flex; align-items: center; gap: clamp(14px, 2vw, 32px);
  color: var(--ice);
}
.casefile__progress { position: relative; flex: 1; height: 1.5px; background: rgba(160,189,219,.22); overflow: hidden; }
.casefile__progress-bar { position: absolute; inset: 0; background: var(--ice); transform-origin: 0 50%; transform: scaleX(.25); transition: transform .9s var(--ease); }
.casefile__close {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 8px 0 18px;
  border: 1.5px solid rgba(160,189,219,.4); border-radius: 999px;
  font-family: var(--f-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: .14em;
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.casefile__x {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ice); color: var(--ink);
  transition: transform .6s var(--ease);
}
.casefile__close:hover { background: var(--ice); color: var(--ink); border-color: var(--ice); }
.casefile__close:hover .casefile__x { transform: rotate(90deg); background: var(--ink); color: var(--ice); }

.casefile__stage { display: grid; align-items: center; padding-block: clamp(20px, 4vh, 56px); }
.case {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 80px);
  align-items: center;
  visibility: hidden;
}
.case.is-active, .case:target { visibility: visible; }
.case__media { aspect-ratio: 4 / 3; border-radius: 14px; max-height: 68vh; width: 100%; }
.case__num {
  display: block;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(3.4rem, min(7vw, 13vh), 10rem); line-height: .9;
  color: transparent;
  -webkit-text-stroke: 1.4px var(--ice);
  margin-bottom: clamp(8px, 1.6vh, 20px);
}
.case__title {
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(2.2rem, min(4.2vw, 7.6vh), 6.4rem); line-height: .92;
  text-transform: uppercase;
}
.case__title .char { display: inline-block; }
.case__title .word { overflow: hidden; display: inline-block; vertical-align: top; padding-bottom: .06em; }
.case__text { margin: clamp(14px, 2.4vh, 28px) 0; color: var(--ice-100); max-width: 46ch; }
.case__facts { display: grid; font-family: var(--f-mono); letter-spacing: .1em; color: var(--ice); margin-bottom: 18px; }
.case__facts li { padding: 9px 0; border-top: 1px solid rgba(160,189,219,.2); }
.case__facts li:last-child { border-bottom: 1px solid rgba(160,189,219,.2); }
.case__link {
  display: inline-block; padding-block: 12px;
  font-family: var(--f-mono); font-weight: 500; letter-spacing: .14em;
  border-bottom: 1px solid var(--ice);
}

.casefile__foot { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.casefile__nav {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 44px; text-align: left;
  color: var(--ice);
  transition: color .4s var(--ease);
}
.casefile__nav:hover { color: var(--ice-50); }
.casefile__arrow {
  display: grid; place-items: center;
  width: clamp(44px, 4vw, 64px); aspect-ratio: 1; border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: clamp(16px, 1.4vw, 22px);
  transition: transform .6s var(--ease), background-color .4s var(--ease), color .4s var(--ease);
}
.casefile__nav--prev:hover .casefile__arrow { transform: translateX(-6px); }
.casefile__nav--next:hover .casefile__arrow { transform: translateX(6px); background: var(--ice); color: var(--ink); }
.casefile__next-text { display: grid; justify-items: end; gap: 4px; text-align: right; }
.casefile__next-title {
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1.4rem, min(2.4vw, 4.4vh), 3.4rem); line-height: 1;
  color: var(--ice-50);
}
body.casefile-open { overflow: hidden; }
body.casefile-open .cursor__label { visibility: hidden; }

@media (max-width: 900px), (max-aspect-ratio: 4/5) {
  .casefile__stage { align-items: start; }
  .case { grid-template-columns: 1fr; gap: 20px; }
  .case__media { aspect-ratio: 16 / 10; }
  .casefile__nav--prev .label { display: none; }
  .casefile__foot { padding-top: 12px; }
}
@media (max-width: 600px) {
  .casefile__close > span:first-child { display: none; }
  .casefile__close { padding: 0 6px; border: 0; }
  .casefile__progress { display: none; }
  .casefile__bar { justify-content: space-between; }
}

/* ---------- Services ---------- */
.services {
  z-index: 2;
  padding: clamp(80px, 10vw, 140px) var(--gutter);
  border-radius: var(--radius) var(--radius) 0 0;
  margin-top: calc(var(--radius) * -1);
}
.services__label { color: var(--ice); margin-bottom: 24px; }
.services__lines { border-bottom: 1.5px solid rgba(160,189,219,.25); }
.service-line {
  position: relative;
  display: grid;
  grid-template-columns: 70px 1fr minmax(200px, 340px);
  align-items: center;
  gap: 20px;
  border-top: 1.5px solid rgba(160,189,219,.25);
  padding: 6px 0;
  overflow: hidden;
}
.service-line::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--ice);
  transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform .6s var(--ease);
}
.service-line > * { position: relative; z-index: 1; transition: color .5s var(--ease); }
.service-line__index { font-family: var(--f-mono); font-size: 12px; color: var(--ice); }
.service-line__word {
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(4rem, 13vw, 13rem);
  line-height: .95;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ice-50);
  transition: color .5s var(--ease), -webkit-text-stroke-color .5s var(--ease), translate .7s var(--ease);
}
.service-line__desc {
  font-size: 15px; color: var(--ice-100);
  opacity: .5;
  transition: opacity .5s var(--ease), color .5s var(--ease);
}
.service-line:hover::before, .service-line.is-active::before { transform: scaleY(1); transform-origin: 50% 0; }
.service-line:hover .service-line__word, .service-line.is-active .service-line__word { color: var(--ink); -webkit-text-stroke-color: var(--ink); translate: 2vw 0; }
.service-line:hover .service-line__index, .service-line:hover .service-line__desc { color: var(--ink); opacity: 1; }
.services__follower {
  position: fixed; top: 0; left: 0; z-index: 600;
  width: clamp(180px, 18vw, 280px);
  aspect-ratio: 4 / 5;
  pointer-events: none;
  opacity: 0; scale: .6;
  transition: opacity .4s var(--ease), scale .6s var(--ease);
}
.services__follower.is-visible { opacity: 1; scale: 1; }
.services__follower-item {
  position: absolute; inset: 0;
  border-radius: 10px;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.services__follower-item.is-current { opacity: 1; }
.services__list {
  display: flex; flex-wrap: wrap; row-gap: 10px;
  margin-top: clamp(40px, 5vw, 64px);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ice);
}
.services__list li:not(:last-child)::after { content: "✦"; margin: 0 16px; color: var(--ice-600); }

/* ---------- Resume ---------- */
.resume {
  z-index: 2;
  padding: clamp(80px, 10vw, 140px) var(--gutter);
  border-radius: var(--radius) var(--radius) 0 0;
  margin-top: calc(var(--radius) * -1);
  overflow: hidden;
}
.resume__echo {
  position: absolute; left: 0; right: 0; top: clamp(60px, 8vw, 120px);
  pointer-events: none;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(5rem, 15vw, 16rem);
  line-height: .9;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ice-400);
  opacity: .5;
}
.resume__echo-row { will-change: transform; }
.resume__echo-row--rev { margin-left: -40vw; }
.resume__label { position: relative; color: var(--ice-600); }
.resume__title {
  position: relative;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(5rem, 15vw, 16rem); line-height: .9;
  margin: 10px 0 20px;
}
.resume > .btn-pill { position: relative; margin-bottom: clamp(56px, 7vw, 96px); }
.resume__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(48px, 6vw, 110px);
}
.resume__h {
  font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1;
  margin-bottom: 28px;
}
.resume__h:not(:first-child) { margin-top: 64px; }
.timeline { position: relative; padding-left: 48px; display: grid; gap: 34px; }
.timeline__line {
  position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px;
  background: rgba(8,8,19,.12);
}
.timeline__line-fill { position: absolute; inset: 0; background: var(--ink); transform-origin: 50% 0; transform: scaleY(0); }
.timeline__item { position: relative; display: grid; gap: 2px; }
.timeline__star {
  position: absolute; left: -48px; top: 2px;
  width: 24px; height: 24px;
  color: var(--ice-600);
  background: var(--ice-50);
}
.timeline__date { font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em; font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1.1; }
.timeline__role { font-size: 18px; font-weight: 700; }
.timeline__org { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ice-600); }
.timeline__text { font-size: 15px; color: var(--ink-700); margin-top: 6px; max-width: 46ch; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 7px 12px;
  border-radius: 4px;
  background: var(--ice-100);
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
}
.chip:nth-child(3n+1) { background: var(--ink); color: var(--ice-50); }
.chip:nth-child(3n+2) { background: var(--ice); }

.langs { display: grid; gap: 22px; }
.lang { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.lang__name { font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em; font-size: 1.6rem; line-height: 1; text-transform: uppercase; }
.lang__level { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; color: var(--ice-600); align-self: end; }
.lang__bar { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--ice-100); overflow: hidden; }
.lang__fill { display: block; height: 100%; width: 100%; background: var(--ink); border-radius: inherit; transform-origin: 0 50%; transform: scaleX(var(--lvl)); }

.awards { display: grid; border-top: 1.5px solid var(--ink); }
.award {
  display: grid; grid-template-columns: 74px 1fr auto; align-items: baseline; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(8,8,19,.14);
}
.award__year { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; color: var(--ice-600); }
.award__name { font-weight: 700; font-size: 17px; }
.award__note { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; color: var(--ice-600); white-space: nowrap; }
@media (max-width: 600px) { .award { grid-template-columns: 64px 1fr; } .award__note { grid-column: 2; } }
.hobbies { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.hobby {
  display: grid; justify-items: center; gap: 10px;
  padding: 20px 8px;
  border-radius: 16px;
  background: var(--ice-100);
  text-align: center;
}
.hobby__icon { width: 34px; height: 34px; }
.hobby__name { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Manifesto ("How I work") ----------
   Text lives on the dark sky; the mountains are their own band below it,
   so the two never overlap. */
.manifesto {
  z-index: 2;
  overflow: hidden;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-800) 35%, var(--ink-700) 62%, var(--ice-600) 100%);
  border-radius: var(--radius) var(--radius) 0 0;
  margin-top: calc(var(--radius) * -1);
  padding-top: clamp(90px, 11vw, 160px);
}
.manifesto__inner { position: relative; z-index: 2; padding: 0 var(--gutter); }
.manifesto__label { color: var(--ice); margin-bottom: clamp(20px, 3vw, 36px); }
.principles { border-bottom: 1px solid rgba(160,189,219,.18); }
.principle {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(220px, 360px);
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(12px, 1.6vw, 22px) 0;
  border-top: 1px solid rgba(160,189,219,.18);
}
.principle__num { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; color: var(--ice); }
.principle__line {
  overflow: hidden;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(2.4rem, 6vw, 6.4rem);
  line-height: .95;
  color: var(--ice-50);
}
.principle__line-inner { display: inline-block; }
.principle__text { font-size: 15px; line-height: 1.55; color: var(--ice-100); }
.manifesto .sparkle { color: var(--ice-50); opacity: .7; z-index: 1; }
.sparkle--m1 { width: 14px; left: 8%;  top: 6%; }
.sparkle--m2 { width: 22px; right: 12%; top: 9%; color: var(--ice); }
.sparkle--m3 { width: 10px; left: 46%; top: 4%; }
.sparkle--m4 { width: 12px; right: 4%; top: 38%; }
.sparkle--m5 { width: 16px; left: 3%; top: 44%; color: var(--ice); }
.mountains {
  position: relative;
  height: clamp(220px, 30vw, 460px);
  margin-top: clamp(28px, 4vw, 64px);
  pointer-events: none;
}
.ridge {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  will-change: transform;
}
.ridge--1 { fill: var(--ice-100); }
.ridge__snow { fill: var(--ice-50); }
.ridge--2 { fill: var(--ice); }
.ridge--3 { fill: var(--ice-600); }
.ridge--4 { fill: var(--ink); }
.manifesto__notes {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(14px, 2vw, 28px); z-index: 3;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
}
.manifesto__note { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; color: var(--ice); }

/* ---------- Contact ----------
   Sized to fit one laptop screen: one-line title, compact form, and a
   visual that stretches to match the form's height. */
.contact {
  z-index: 2;
  padding: clamp(56px, 9vh, 104px) var(--gutter) clamp(40px, 6vh, 80px);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  column-gap: clamp(32px, 5vw, 88px);
  row-gap: clamp(18px, 3.2vh, 36px);
}
.contact__label { grid-column: 1 / -1; color: var(--ice); }
.contact__title {
  grid-column: 1 / -1;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(2.8rem, 6.6vw, 7.6rem);
  line-height: .9;
  text-transform: uppercase;
  white-space: nowrap;
}
.contact__title .serif { -webkit-text-stroke-color: var(--ice); }
.form {
  display: grid; gap: 14px;
  padding: clamp(18px, 2.4vw, 32px);
  border-radius: 20px;
  background: var(--ink-800);
  border: 1.5px solid rgba(160,189,219,.18);
}
.form__field { display: grid; gap: 4px; }
.form__label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; color: var(--ice); }
.form__input {
  width: 100%;
  padding: 8px 0;
  background: transparent;
  border: 0; border-bottom: 1.5px solid rgba(160,189,219,.3);
  border-radius: 0;
  font-size: 17px;
  color: var(--ice-50);
  resize: vertical;
  transition: border-color .4s var(--ease);
}
.form__input:focus { outline: none; border-bottom-color: var(--ice); }
.form__input:focus-visible { outline: none; }
.form__input.is-invalid { border-bottom-color: var(--ice-400); border-bottom-style: dashed; }
.form__submit { justify-self: start; margin-top: 4px; }
.form__status { min-height: 1.2em; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; color: var(--ice); }
.form.is-sent .form__field, .form.is-sent .form__submit { opacity: .35; pointer-events: none; }
.contact__side { display: flex; flex-direction: column; gap: clamp(14px, 2.2vh, 24px); min-height: 0; }
.copy-email { text-align: left; display: grid; gap: 8px; }
.copy-email__text {
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1.6rem, 2.9vw, 3rem);
  line-height: 1;
  word-break: break-all;
  background: linear-gradient(var(--ice), var(--ice)) 0 100% / 0 2px no-repeat;
  transition: background-size .6s var(--ease);
  padding-bottom: 6px;
}
.copy-email:hover .copy-email__text { background-size: 100% 2px; }
.copy-email__hint { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; color: var(--ice); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.social { color: var(--ice-50); transition: background-color .3s, color .3s; }
.social:hover { background: var(--ice); color: var(--ink); border-color: var(--ice); }
.contact__visual {
  flex: 1 1 auto;
  min-height: 180px;
  border-radius: 14px;
  background: var(--ice-100);
}

/* ---------- Footer ---------- */
.footer {
  z-index: 3;
  padding: 40px var(--gutter) 28px;
  border-top: 1.5px solid rgba(160,189,219,.18);
  overflow: hidden;
}
.footer__name {
  width: max-content;
  margin: 0 auto;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: 15.4vw;
  line-height: .82;
  white-space: nowrap;
  color: var(--ice);
  text-align: center;
}
.footer__name { pointer-events: none; } /* decorative; must never cover the row below */
.footer__name .char { display: inline-block; }
.footer__row { position: relative; z-index: 1; }
.footer__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em;
  color: var(--ice-100);
}
.footer__code { display: flex; align-items: center; gap: 10px; }
.barcode {
  width: 120px; height: 30px;
  background: repeating-linear-gradient(90deg,
    var(--ice-50) 0 2px, transparent 2px 4px,
    var(--ice-50) 4px 5px, transparent 5px 8px,
    var(--ice-50) 8px 11px, transparent 11px 12px,
    var(--ice-50) 12px 13px, transparent 13px 17px);
}
.barcode__num { font-size: 10px; }
.to-top {
  padding: 10px 18px;
  border: 1.5px solid var(--ice);
  border-radius: 999px;
  color: var(--ice);
  transition: background-color .3s, color .3s;
}
.to-top:hover { background: var(--ice); color: var(--ink); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .nav__clock { display: none; }
  .work__grid { grid-template-columns: repeat(2, 1fr); }
  .about__title, .about__statement, .stats { grid-column: 1 / 8; }
  .about__photo { grid-column: 8 / 13; }
}

/* Short desktop screens: trim the bottom row so the word keeps its room */
@media (min-width: 901px) and (min-aspect-ratio: 4/5) and (max-height: 720px) {
  .hero { padding-top: 84px; padding-bottom: calc(var(--radius) + 18px); }
  .hero__intro p:first-child { display: none; }
  .scroll-btn { width: 96px; height: 96px; }
  .scroll-btn__ring text { font-size: 12px; }
}

@media (max-width: 900px), (max-aspect-ratio: 4/5) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: inline-flex; }

  .hero { display: flex; flex-direction: column; align-items: stretch; height: auto; min-height: 100svh; padding-top: 96px; }
  .hero__intro { order: 1; }
  .hero__meta { order: 2; }
  .scroll-btn { order: 3; }
  .hero__stage { display: block; }
  .hero__title { --hero-size: 21vw; }
  .hero__middle { display: flex; flex-direction: column; container-type: normal; }
  .hero__echoes { position: relative; inset: auto; order: -1; padding: 6px 0 0 18%; font-size: 12.5vw; }
  .hero__portrait-wrap { position: relative; left: auto; top: auto; height: auto; max-width: none; width: min(62vw, 300px); margin: 24px auto 0; }
  .badge:nth-of-type(1) { left: -12%; top: 14%; }
  .badge:nth-of-type(2) { right: -14%; bottom: 8%; }
  .sparkle--1 { top: 46%; }
  .sparkle--3 { top: 84%; }
  .hero__intro { margin-top: 40px; }
  .hero__meta { text-align: left; margin-top: 24px; }
  .scroll-btn { align-self: flex-end; margin-top: 28px; width: 104px; height: 104px; }

  .about { grid-template-columns: 1fr; }
  .about__title, .about__statement, .stats, .about__photo, .tags, .about__label { grid-column: 1 / -1; grid-row: auto; }
  .about__photo { width: min(80%, 420px); justify-self: end; aspect-ratio: 4 / 5; min-height: 0; }
  .principle { grid-template-columns: 36px 1fr; }
  .principle__text { grid-column: 2; }
  .manifesto__notes { justify-content: flex-start; }
  .contact__title { white-space: normal; }
  .contact__visual { flex: none; aspect-ratio: 4 / 3; }
  .sparkle--a1 { top: 2.5%; right: 8%; width: 34px; }
  .services__list li:not(:last-child)::after { margin: 0 10px; }
  .sparkle--a2 { display: none; }

  .card--featured .card__inner { grid-template-columns: 1fr; }


  .service-line { grid-template-columns: 40px 1fr; }
  .service-line__desc { grid-column: 2; opacity: 1; padding-bottom: 14px; }
  .services__follower { display: none; }

  .resume__grid { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .contact__label, .contact__title { grid-column: 1; }
}

@media (max-width: 600px) {
  .work__grid { grid-template-columns: 1fr; }
  .hobbies { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 12px 20px 10px; }
  .hero__intro { font-size: 14px; }
  .hero__meta { white-space: normal; }
  .footer__row { justify-content: flex-start; }
}

/* =========================================================
   Responsive system (from the viewport audit)
   1. Fluid tokens  2. Desktop scaling  3. Stacked layout (phones,
   portrait tablets)  4. Small phones  5. Phone landscape.
   Rule of thumb: display sizes are clamp(min, min(Xvw, ~1.78·Xvh), max)
   so 1366×768 stays the reference and big screens keep growing.
   ========================================================= */
:root {
  --fs-label: clamp(11px, calc(.32vw + .3vh + 4px), 15px);
  --fs-body:  clamp(15px, calc(.5vw + .45vh + 4px), 21px);
  --fs-lead:  clamp(17px, calc(.6vw + .6vh + 4px), 26px);
  --fs-mega:  clamp(3.6rem, min(13vw, 24vh), 22rem);
  --fs-giant: clamp(5rem, min(15vw, 27vh), 24rem);
  --section-pad: clamp(72px, 18vh, 260px);
}

/* ---- text that used to be fixed px ---- */
.label, .nav__link, .nav__clock, .hero__meta, .hero__role, .card__meta, .card__cat, .card__tab,
.case__facts, .service-line__index, .principle__num, .form__label, .chip,
.copy-email__hint, .manifesto__note, .timeline__org, .lang__level, .award__year, .award__note,
.services__list, .stat__label, .footer__row, .case__link, .card__open { font-size: var(--fs-label); }
.hero__intro, .service-line__desc, .principle__text, .case__text, .timeline__text, .card__desc { font-size: var(--fs-body); }
.timeline__role, .award__name, .form__input { font-size: var(--fs-lead); }

/* ---- display sizes keep growing past 1600px ---- */
.work__title, .service-line__word { font-size: var(--fs-mega); }
.resume__title, .resume__echo { font-size: var(--fs-giant); }
.about__title     { font-size: clamp(3.4rem, min(8.4vw, 15vh), 14rem); }
.about__statement { font-size: clamp(1.15rem, calc(1.2vw + 1vh), 2.6rem); }
.stat__num        { font-size: clamp(1.5rem, min(2.4vw, 4.4vh), 3.6rem); }
.tag              { font-size: clamp(1rem, min(1.35vw, 2.4vh), 1.9rem); }
.principle__line  { font-size: clamp(2.4rem, min(6.4vw, 11.5vh), 10rem); }
.resume__h        { font-size: clamp(2.4rem, min(4vw, 7vh), 5.5rem); }
.timeline__date   { font-size: clamp(1.4rem, min(2vw, 3.6vh), 2.8rem); }
.card__title      { font-size: clamp(1.5rem, min(2.2vw, 4vh), 3.2rem); }
.card--featured .card__title { font-size: clamp(2.6rem, min(6vw, 10.5vh), 9rem); }
.contact__title   { font-size: clamp(2.8rem, min(6.6vw, 12vh), 11rem); }
.copy-email__text { font-size: clamp(1.6rem, min(2.9vw, 5.2vh), 4.4rem); }
.tape__item       { font-size: clamp(1.4rem, min(2.6vw, 4.6vh), 4rem); }
.tape__sep        { font-size: .66em; }

/* side columns grow with the viewport instead of stopping at 340/360px */
.service-line   { grid-template-columns: clamp(40px, 4vw, 90px) 1fr minmax(220px, 26vw); }
.principle      { grid-template-columns: clamp(40px, 4vw, 90px) minmax(0, 1fr) minmax(240px, 24vw); }
.timeline__text { max-width: 56ch; }


/* ---- hero scales on big screens ---- */
.hero__echoes { font-size: min(calc(var(--hero-size) * .9), 12.5cqw, 43cqh); }
.hero__intro  { max-width: clamp(440px, 30vw, 760px); }
.scroll-btn   { width: clamp(96px, min(9vw, 15vh), 180px); height: auto; aspect-ratio: 1; }
.scroll-btn__arrow { font-size: clamp(22px, 1.6vw, 34px); }
.badge        { font-size: clamp(14px, calc(.4vw + .4vh + 5px), 20px); padding: .8em 1.3em; }
.nav          { padding-block: clamp(18px, 2.2vh, 32px); }
.nav__mark    { font-size: clamp(22px, 1.6vw, 34px); }
.nav__star    { width: clamp(22px, 1.6vw, 32px); height: auto; aspect-ratio: 1; }
.nav__cta     { font-size: clamp(13px, calc(.4vw + .4vh + 4px), 18px); padding: .85em 1.5em; }
/* sized by width + aspect ratio so it never stretches into a strip */
.hero__portrait-wrap { height: auto; max-width: none; width: min(32cqw, 72cqh); aspect-ratio: 4 / 5; }

/* ---- section rhythm tied to height ---- */
.tapes     { height: clamp(200px, min(26vw, 40vh), 520px); }
.about     { padding: calc(var(--section-pad) * .7) var(--gutter) var(--section-pad); }
.services, .resume { padding-block: var(--section-pad); }
.work      { padding-bottom: var(--section-pad); }
.manifesto { padding-top: var(--section-pad); }
.contact   { padding-block: clamp(56px, 9vh, 140px) clamp(40px, 6vh, 110px); }
.mountains { height: clamp(220px, min(30vw, 50vh), 900px); }
.tags      { gap: clamp(14px, 1.4vh, 22px) clamp(10px, .8vw, 16px); }
.work__grid { gap: clamp(56px, 7vh, 110px) clamp(16px, 2vw, 40px); }

/* ---- tap targets ---- */
.filter, .social, .to-top, .pill { min-height: 44px; }
.nav__logo  { min-height: 44px; }
.skip { min-height: 44px; display: inline-flex; align-items: center; }

/* =========================================================
   Stacked layout: phones and portrait tablets
   ========================================================= */
@media (max-width: 900px), (max-aspect-ratio: 4/5) {
  :root { --section-pad: clamp(56px, 9vh, 96px); }

  /* hero = one screen: word, echoes, portrait, intro, then meta + button side by side */
  .hero {
    display: grid; grid-template-columns: 1fr auto;
    grid-template-areas: "stage stage" "intro intro" "meta btn";
    align-items: end; row-gap: 20px; min-height: 100svh; height: auto;
  }
  .hero__stage { grid-area: stage; }
  .hero__intro { grid-area: intro; margin-top: 8px; max-width: none; }
  .hero__meta  { grid-area: meta; margin-top: 0; text-align: left; }
  .scroll-btn  { grid-area: btn; margin: 0; width: 84px; height: 84px; }
  .hero__echoes { font-size: 12.5vw; }
  .hero__portrait-wrap { width: min(62vw, 300px, 30svh); height: auto; margin: 16px auto 0; }
  .badge { font-size: 12px; padding: 8px 13px; }
  .badge:nth-of-type(1) { left: -10%; top: -5%; }
  .badge:nth-of-type(2) { right: -12%; bottom: -5%; }

  /* services: full-width words, index tucked top-right */
  .service-line { grid-template-columns: 1fr; gap: 4px; padding: 14px 0; }
  .service-line__index { position: absolute; right: 0; top: 18px; }
  .service-line__word { font-size: clamp(4rem, 27vw, 9rem); line-height: .9; }
  .service-line__desc { grid-column: 1; }
  .services__list { gap: 8px; }
  .services__list li::after { content: none !important; }
  .services__list li { border: 1px solid rgba(160,189,219,.3); border-radius: 999px; padding: 8px 12px; }

  .principle { grid-template-columns: 36px 1fr; }


  /* contact: big title, the email first, form after */
  .contact__title { font-size: clamp(3.2rem, 17vw, 6rem); }
  .contact__side { order: -1; }
  .contact__label { order: -3; }
  .contact__title { order: -2; }
  .copy-email__text { font-size: clamp(1.6rem, 7.4vw, 2.4rem); word-break: normal; overflow-wrap: anywhere; }
  .contact__visual { flex: none; aspect-ratio: 16 / 10; }
}

/* portrait tablets: use the extra width */
@media (min-width: 600px) and (max-width: 900px), (min-width: 600px) and (max-aspect-ratio: 4/5) {
  .work__grid { grid-template-columns: repeat(2, 1fr); }
  .contact__visual { aspect-ratio: 16 / 9; }
}

/* =========================================================
   Small phones
   ========================================================= */
@media (max-width: 600px) {
  .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat:nth-child(4) { grid-column: span 2; }
  .stat__num { font-size: clamp(1.4rem, 7vw, 2rem); }

  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; }
  .card__cat { grid-column: 1 / -1; grid-row: 2; }
  .card--featured .card__title { font-size: clamp(2.6rem, 13vw, 4rem); line-height: .92; }
  .card__title { font-size: clamp(1.6rem, 8vw, 2.2rem); }

  .resume__title { font-size: 27vw; }

  .principle { grid-template-columns: 1fr; gap: 6px; }
  .principle__text { grid-column: 1; }
  .principle__line { font-size: clamp(2.4rem, 11vw, 3.6rem); }
  .mountains { height: clamp(260px, 80vw, 360px); }
  .manifesto__notes { bottom: 10px; display: grid; gap: 2px; }
  .manifesto__note:first-child { display: none; }
  .sparkle--m4, .sparkle--m5 { display: none; }
}

/* =========================================================
   Phone landscape (short screens)
   ========================================================= */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: 100svh; padding-top: 72px; }
  .hero__title { --hero-size: min(15vw, 34vh); }
  .hero__middle { flex-direction: row; align-items: flex-end; gap: 24px; }
  .hero__portrait-wrap { width: min(28vw, 48vh); margin: 12px 0 0; }
  .hero__echoes { order: 1; padding: 0; font-size: min(9vw, 18vh); align-self: center; }
  .scroll-btn { display: none; }
  .hero { grid-template-areas: "stage stage" "intro meta"; }
  .about__photo { width: min(45%, 300px); }
  .menu { padding-top: 76px; overflow-y: auto; }
  .menu__link-inner { font-size: min(15vw, 12vh); }
  .menu__foot { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .about__title, .work__title, .resume__title, .contact__title { font-size: min(13vw, 24vh); }
  .service-line__word { font-size: min(18vw, 30vh); }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .grain { animation: none; }
  .preloader { display: none; }
}
