:root {
  /* Light is the site's default appearance regardless of OS preference -
     dark is opt-in only, applied below via [data-theme='dark']. */
  color-scheme: light;
  --bg: #faf9fb;
  --bg-alt: rgba(241, 240, 244, 0.62);
  --surface: rgba(10, 12, 20, 0.03);
  --border: rgba(10, 12, 20, 0.09);
  --text-primary: #12141b;
  --text-muted: #666f80;
  --accent: #0091b3;
  --accent-glow: rgba(0, 145, 179, 0.14);
  --signal: #6c4fe0;
  --danger: #d1435c;
  --header-bg: rgba(250, 249, 251, 0.82);
  --overlay-bg: rgba(250, 249, 251, 0.97);
  --white: #12141b;
  --nav-height: 82px;
  --nav-height-mobile: 72px;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #070707;
  --bg-alt: rgba(16, 16, 16, 0.62);
  --surface: rgba(255, 255, 255, 0.035);
  --border: rgba(255, 255, 255, 0.09);
  --text-primary: #f2f2f3;
  --text-muted: #8c8f95;
  --accent: #4fd8ff;
  --accent-glow: rgba(79, 216, 255, 0.18);
  --signal: #8b6bff;
  --danger: #ff8f8f;
  --header-bg: rgba(5, 5, 5, 0.82);
  --overlay-bg: rgba(5, 5, 5, 0.97);
  --white: #ffffff;
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #faf9fb;
  --bg-alt: rgba(241, 240, 244, 0.62);
  --surface: rgba(10, 12, 20, 0.03);
  --border: rgba(10, 12, 20, 0.09);
  --text-primary: #12141b;
  --text-muted: #666f80;
  --accent: #0091b3;
  --accent-glow: rgba(0, 145, 179, 0.14);
  --signal: #6c4fe0;
  --danger: #d1435c;
  --header-bg: rgba(250, 249, 251, 0.82);
  --overlay-bg: rgba(250, 249, 251, 0.97);
  --white: #12141b;
}

body {
  transition: background 0.5s ease, color 0.5s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Hanken Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1280px, calc(100% - 3rem));
  margin-inline: auto;
}

.section {
  padding: 6rem 0;
  position: relative;
}

.section-alt {
  background: var(--bg-alt);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-heading {
  margin-bottom: 2rem;
}

.section-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-title {
  margin: 0.25rem 0 0;
  font-family: 'Surgena', sans-serif;
  font-size: clamp(2.8rem, 8vw, 6.4rem);
  letter-spacing: 0.03em;
  line-height: 0.95;
  text-transform: lowercase;
}

.section-kicker {
  max-width: 640px;
  color: var(--text-muted);
  margin-top: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
  transition: background 0.5s ease, border-color 0.5s ease;
}

.nav-wrap {
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: 'Michroma', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.08em;
  position: relative;
  display: inline-flex;
  align-items: center;
}

.logo::after {
  content: '';
  width: 1.25rem;
  height: 0.16rem;
  background: var(--accent);
  margin-left: 0.4rem;
}

.nav-links {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
}

.nav-link {
  position: relative;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.45rem;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  transition: all 0.3s ease;
}

.nav-cta:hover,
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  box-shadow: 0 0 0 1px var(--accent), 0 12px 28px var(--accent-glow);
}

.btn-outline {
  border-color: var(--border);
  color: var(--white);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--white);
  background: transparent;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--overlay-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transform: translateY(-100%);
  transition: transform 0.45s ease, background 0.5s ease;
}

.mobile-menu.open {
  transform: translateY(0);
}

.mobile-menu a {
  font-family: 'Michroma', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero {
  min-height: calc(100vh - var(--nav-height));
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: none;
}

/* Plain left-aligned block again - .container (already on this element)
   handles the outer 1280px page-width centering the same way every other
   section uses, and the text column itself just sits at that box's left
   edge rather than trying to center a variable-width box on its own. */
.hero-inner {
  position: relative;
  z-index: 2;
  padding: 4rem 0;
}

.hero-line {
  font-family: 'Surgena', sans-serif;
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 0.92;
  text-transform: capitalize;
  margin: 0;
}

.hero-line span {
  display: block;
}

/* Eleven licensed display fonts for the hero "Art" style-morph, self-
   hosted from /fonts (not Google-served) - each is a single static weight,
   loaded once and reused across all three case variants of the same face. */
@font-face { font-family: 'Utopia'; src: url('./fonts/Utopia.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Achilo'; src: url('./fonts/Achilo.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'Caelvin'; src: url('./fonts/Caelvin.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'RoseAngel'; src: url('./fonts/RoseAngel.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'Urema'; src: url('./fonts/Urema.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Mantela'; src: url('./fonts/Mantela.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Magode'; src: url('./fonts/Magode.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Awaline'; src: url('./fonts/Awaline.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Megha'; src: url('./fonts/Megha.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'Surgena'; src: url('./fonts/Surgena.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'BlackSansa'; src: url('./fonts/BlackSansa.otf') format('opentype'); font-display: swap; }

/* "Art" in the markup stays literally "Art" - each of the 39 morph steps
   below supplies its own text-transform (uppercase/capitalize/lowercase)
   to get ART/Art/art, so this no longer forces a fixed casing itself.
   Sized to its own content horizontally (not a fixed width) so the
   bounce-dot sitting right after it stays as close as the text allows.
   Height is fixed, though: the fonts have wildly different internal
   line-height metrics, and as an inline-block this element's own box
   height feeds directly into the surrounding line box - left alone, that
   made the whole line (and everything below it: the dash rule, the
   paragraph, the button) nudge up and down as the font cycled. inline-
   flex with align-items:flex-end pins the text to the bottom of that
   fixed box rather than letting each font's own line-height center it
   differently, which is what was knocking "Art" out of alignment with
   "Into" and the bounce-dot after the height got locked - bottom-aligned
   sits close to the shared text baseline for essentially any Latin font.
   Color is the ordinary body-text color, same as every other word in the
   headline - only the typeface and casing change. */
.hero-line .brush-word {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  height: 1em;
  overflow: hidden;
  color: var(--text-primary);
  animation: art-style-morph 33s infinite;
}

/* The full stop after "Art", but alive: a small ball that bounces in place
   forever, sized and grounded to the text baseline like a real period would
   be. Squash-and-stretch plus eased (slow-out leaving the ground, slow-in
   arriving at the peak) timing per keyframe segment are what read as an
   actual bounce rather than a mechanical up-down slide - em-sized amplitude
   keeps its peak well under the cap-height of the surrounding letters.
   Color is neutral (matches body text) like every other punctuation mark
   on the page - only "Art" itself carries the style-morph. */
.hero-line .bounce-dot {
  display: inline-block;
  width: 0.12em;
  height: 0.12em;
  margin-left: 0.06em;
  border-radius: 50%;
  vertical-align: baseline;
  transform-origin: center bottom;
  background-color: var(--text-primary);
  animation: ball-bounce 1s infinite;
}

@keyframes ball-bounce {
  0% {
    transform: translateY(0) scaleX(1.32) scaleY(0.64);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  8% {
    transform: translateY(-0.08em) scaleX(0.88) scaleY(1.16);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  50% {
    transform: translateY(-0.58em) scaleX(1.04) scaleY(0.96);
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  92% {
    transform: translateY(-0.08em) scaleX(0.88) scaleY(1.16);
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  100% {
    transform: translateY(0) scaleX(1.32) scaleY(0.64);
  }
}

/* Eleven licensed display faces, each shown as ART / Art / art in turn -
   33 total steps, one per bounce, cycling over a 33s loop matched exactly
   to the ball's 1s period so a new face (or new casing of the current
   face) is live the instant each landing happens. Font-family and
   text-transform can't be interpolated, so the "ease into it" comes from
   opacity: it dips right at the swap and eases back up after, reusing the
   ball's own two curves (ease-out for the recovery, matching its launch
   off the ground; ease-in for the approach into the next dip, matching
   its fall) so the morph reads as timed by the same physical rhythm as
   the bounce itself, not a separate effect bolted on. */
@keyframes art-style-morph {
  0%  { opacity: 0.15; font-family: 'BlackSansa', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  0.606%  { opacity: 1; font-family: 'BlackSansa', sans-serif; text-transform: uppercase; }
  2.424%  { opacity: 1; font-family: 'BlackSansa', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  3.03%  { opacity: 0.15; font-family: 'Megha', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  3.636%  { opacity: 1; font-family: 'Megha', sans-serif; text-transform: uppercase; }
  5.455%  { opacity: 1; font-family: 'Megha', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  6.061%  { opacity: 0.15; font-family: 'Caelvin', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  6.667%  { opacity: 1; font-family: 'Caelvin', sans-serif; text-transform: uppercase; }
  8.485%  { opacity: 1; font-family: 'Caelvin', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  9.091%  { opacity: 0.15; font-family: 'Utopia', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  9.697%  { opacity: 1; font-family: 'Utopia', sans-serif; text-transform: uppercase; }
  11.515%  { opacity: 1; font-family: 'Utopia', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  12.121%  { opacity: 0.15; font-family: 'Magode', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  12.727%  { opacity: 1; font-family: 'Magode', sans-serif; text-transform: lowercase; }
  14.545%  { opacity: 1; font-family: 'Magode', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  15.152%  { opacity: 0.15; font-family: 'BlackSansa', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  15.758%  { opacity: 1; font-family: 'BlackSansa', sans-serif; text-transform: lowercase; }
  17.576%  { opacity: 1; font-family: 'BlackSansa', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  18.182%  { opacity: 0.15; font-family: 'Megha', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  18.788%  { opacity: 1; font-family: 'Megha', sans-serif; text-transform: lowercase; }
  20.606%  { opacity: 1; font-family: 'Megha', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  21.212%  { opacity: 0.15; font-family: 'Magode', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  21.818%  { opacity: 1; font-family: 'Magode', sans-serif; text-transform: capitalize; }
  23.636%  { opacity: 1; font-family: 'Magode', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  24.242%  { opacity: 0.15; font-family: 'BlackSansa', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  24.848%  { opacity: 1; font-family: 'BlackSansa', sans-serif; text-transform: capitalize; }
  26.667%  { opacity: 1; font-family: 'BlackSansa', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  27.273%  { opacity: 0.15; font-family: 'Urema', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  27.879%  { opacity: 1; font-family: 'Urema', sans-serif; text-transform: capitalize; }
  29.697%  { opacity: 1; font-family: 'Urema', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  30.303%  { opacity: 0.15; font-family: 'Achilo', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  30.909%  { opacity: 1; font-family: 'Achilo', sans-serif; text-transform: lowercase; }
  32.727%  { opacity: 1; font-family: 'Achilo', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  33.333%  { opacity: 0.15; font-family: 'Utopia', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  33.939%  { opacity: 1; font-family: 'Utopia', sans-serif; text-transform: capitalize; }
  35.758%  { opacity: 1; font-family: 'Utopia', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  36.364%  { opacity: 0.15; font-family: 'Achilo', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  36.97%  { opacity: 1; font-family: 'Achilo', sans-serif; text-transform: capitalize; }
  38.788%  { opacity: 1; font-family: 'Achilo', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  39.394%  { opacity: 0.15; font-family: 'Caelvin', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  40%  { opacity: 1; font-family: 'Caelvin', sans-serif; text-transform: capitalize; }
  41.818%  { opacity: 1; font-family: 'Caelvin', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  42.424%  { opacity: 0.15; font-family: 'RoseAngel', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  43.03%  { opacity: 1; font-family: 'RoseAngel', sans-serif; text-transform: capitalize; }
  44.848%  { opacity: 1; font-family: 'RoseAngel', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  45.455%  { opacity: 0.15; font-family: 'Mantela', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  46.061%  { opacity: 1; font-family: 'Mantela', sans-serif; text-transform: lowercase; }
  47.879%  { opacity: 1; font-family: 'Mantela', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  48.485%  { opacity: 0.15; font-family: 'Urema', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  49.091%  { opacity: 1; font-family: 'Urema', sans-serif; text-transform: uppercase; }
  50.909%  { opacity: 1; font-family: 'Urema', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  51.515%  { opacity: 0.15; font-family: 'Awaline', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  52.121%  { opacity: 1; font-family: 'Awaline', sans-serif; text-transform: uppercase; }
  53.939%  { opacity: 1; font-family: 'Awaline', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  54.545%  { opacity: 0.15; font-family: 'Surgena', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  55.152%  { opacity: 1; font-family: 'Surgena', sans-serif; text-transform: uppercase; }
  56.97%  { opacity: 1; font-family: 'Surgena', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  57.576%  { opacity: 0.15; font-family: 'Caelvin', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  58.182%  { opacity: 1; font-family: 'Caelvin', sans-serif; text-transform: lowercase; }
  60%  { opacity: 1; font-family: 'Caelvin', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  60.606%  { opacity: 0.15; font-family: 'Surgena', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  61.212%  { opacity: 1; font-family: 'Surgena', sans-serif; text-transform: capitalize; }
  63.03%  { opacity: 1; font-family: 'Surgena', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  63.636%  { opacity: 0.15; font-family: 'Megha', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  64.242%  { opacity: 1; font-family: 'Megha', sans-serif; text-transform: capitalize; }
  66.061%  { opacity: 1; font-family: 'Megha', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  66.667%  { opacity: 0.15; font-family: 'RoseAngel', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  67.273%  { opacity: 1; font-family: 'RoseAngel', sans-serif; text-transform: uppercase; }
  69.091%  { opacity: 1; font-family: 'RoseAngel', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  69.697%  { opacity: 0.15; font-family: 'Magode', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  70.303%  { opacity: 1; font-family: 'Magode', sans-serif; text-transform: uppercase; }
  72.121%  { opacity: 1; font-family: 'Magode', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  72.727%  { opacity: 0.15; font-family: 'Mantela', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  73.333%  { opacity: 1; font-family: 'Mantela', sans-serif; text-transform: uppercase; }
  75.152%  { opacity: 1; font-family: 'Mantela', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  75.758%  { opacity: 0.15; font-family: 'Awaline', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  76.364%  { opacity: 1; font-family: 'Awaline', sans-serif; text-transform: capitalize; }
  78.182%  { opacity: 1; font-family: 'Awaline', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  78.788%  { opacity: 0.15; font-family: 'Achilo', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  79.394%  { opacity: 1; font-family: 'Achilo', sans-serif; text-transform: uppercase; }
  81.212%  { opacity: 1; font-family: 'Achilo', sans-serif; text-transform: uppercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  81.818%  { opacity: 0.15; font-family: 'Urema', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  82.424%  { opacity: 1; font-family: 'Urema', sans-serif; text-transform: lowercase; }
  84.242%  { opacity: 1; font-family: 'Urema', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  84.848%  { opacity: 0.15; font-family: 'Utopia', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  85.455%  { opacity: 1; font-family: 'Utopia', sans-serif; text-transform: lowercase; }
  87.273%  { opacity: 1; font-family: 'Utopia', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  87.879%  { opacity: 0.15; font-family: 'Mantela', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  88.485%  { opacity: 1; font-family: 'Mantela', sans-serif; text-transform: capitalize; }
  90.303%  { opacity: 1; font-family: 'Mantela', sans-serif; text-transform: capitalize; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  90.909%  { opacity: 0.15; font-family: 'Surgena', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  91.515%  { opacity: 1; font-family: 'Surgena', sans-serif; text-transform: lowercase; }
  93.333%  { opacity: 1; font-family: 'Surgena', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  93.939%  { opacity: 0.15; font-family: 'RoseAngel', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  94.545%  { opacity: 1; font-family: 'RoseAngel', sans-serif; text-transform: lowercase; }
  96.364%  { opacity: 1; font-family: 'RoseAngel', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  96.97%  { opacity: 0.15; font-family: 'Awaline', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  97.576%  { opacity: 1; font-family: 'Awaline', sans-serif; text-transform: lowercase; }
  99.394%  { opacity: 1; font-family: 'Awaline', sans-serif; text-transform: lowercase; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  100% { opacity: 0.15; font-family: 'BlackSansa', sans-serif; text-transform: uppercase; }
}


@media (prefers-reduced-motion: reduce) {
  .hero-line .brush-word {
    animation: none;
    opacity: 1;
    font-family: 'Utopia', sans-serif;
  }
  .hero-line .bounce-dot {
    animation: none;
    transform: none;
  }
}

.hero-line .brush-icon {
  display: none;
}

.hero-copy {
  color: var(--text-muted);
  max-width: 540px;
  margin: 1.2rem 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-side {
  position: absolute;
  left: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.hero-side span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hero-side a {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.hero-side a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  display: grid;
  gap: 0.45rem;
  place-items: center;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.scroll-indicator i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--accent);
  animation: bounce-dot 1.4s infinite;
}

.about-grid,
.process-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.about-grid {
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.about-quote {
  border-top: 1px solid var(--border);
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  font-family: 'Hanken Grotesk', serif;
  font-style: italic;
  font-size: 1.25rem;
}

.cards-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.skill-card,
.update-card,
.faq-item,
.testimonial-card {
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
}

.skill-card {
  padding: 1.4rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

.skill-icon {
  font-size: 1.8rem;
  color: var(--accent);
}

.read-link,
.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.filter-btn {
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.filter-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.portfolio-grid {
  display: block;
}

.category-section {
  margin-bottom: 3.5rem;
}

.category-section.is-hidden {
  display: none;
}

.category-header {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.category-header .section-label {
  font-size: 1rem;
}

.category-title {
  margin: 0.1rem 0 0;
  font-family: 'Surgena', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.03em;
  text-transform: lowercase;
  line-height: 1;
}

.category-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  position: relative;
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 270px;
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.project-card img,
.project-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.project-card:hover img,
.project-card:hover video {
  transform: scale(1.08);
}

.project-overlay {
  position: absolute;
  inset: auto 0 0;
  background: rgba(0, 0, 0, 0.75);
  padding: 1.2rem;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.project-card:hover .project-overlay {
  transform: translateY(0);
}

.project-view {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 74px;
  height: 74px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  display: grid;
  place-items: center;
  letter-spacing: 0.12em;
  font-size: 0.62rem;
  text-transform: uppercase;
  opacity: 0;
  transition: all 0.35s ease;
}

.project-card:hover .project-view {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.project-card.is-hidden {
  opacity: 0.1;
  pointer-events: none;
}

.project-card-link {
  position: absolute;
  inset: 0;
  z-index: 4;
  cursor: pointer;
}

.stats-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  padding: 2.2rem 1rem;
  text-align: center;
  border-right: 1px solid var(--border);
}

.stat:last-child {
  border-right: 0;
}

.stat-value {
  font-family: 'Michroma', sans-serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.9;
  color: var(--accent);
}

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.process-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  position: relative;
}

.process-grid::before {
  content: '';
  position: absolute;
  left: 16%;
  right: 16%;
  top: 3.8rem;
  height: 1px;
  background: var(--border);
}

.process-item {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  padding: 1.4rem;
}

.process-no {
  font-family: 'Michroma', sans-serif;
  font-size: 4.4rem;
  color: var(--accent);
  line-height: 0.9;
  opacity: 0.8;
}

.cta-block {
  text-align: center;
  padding: 3rem 1rem;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.newsletter {
  margin-top: 1.4rem;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  max-width: 560px;
  margin-inline: auto;
}

.newsletter input,
.newsletter textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--accent);
  background: transparent;
  color: var(--white);
  padding: 0.75rem 0.25rem;
  font: inherit;
}

.newsletter textarea {
  border: 1px solid var(--accent);
  border-radius: 0.4rem;
  padding: 0.75rem;
  resize: vertical;
}

.newsletter input:focus,
.newsletter textarea:focus {
  outline: none;
}

.newsletter button {
  width: 100%;
}

.contact-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  opacity: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  pointer-events: none;
}

.form-feedback {
  width: 100%;
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
}

.form-feedback.is-success {
  color: var(--accent);
}

.form-feedback.is-error {
  color: var(--danger);
}

.testimonial-wrap {
  position: relative;
  overflow: hidden;
}

.testimonial-track {
  display: flex;
  transition: transform 0.4s ease;
}

.testimonial-card {
  min-width: 100%;
  padding: 2rem;
  text-align: center;
  position: relative;
}

.quote-mark {
  font-family: 'Hanken Grotesk', serif;
  font-size: 7rem;
  color: var(--accent);
  opacity: 0.25;
  line-height: 0.5;
}

.client-photo {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  margin: 1rem auto 0.8rem;
  object-fit: cover;
}

.testimonial-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.arrow-btn,
.dot {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--white);
}

.dots {
  display: flex;
  gap: 0.4rem;
}

.dot {
  width: 10px;
  height: 10px;
  padding: 0;
}

.dot.active,
.arrow-btn:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.faq-item button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--white);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  font-weight: 500;
}

.faq-icon {
  transition: transform 0.3s ease;
  font-size: 1.3rem;
  line-height: 1;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1rem;
  color: var(--text-muted);
}

.faq-item.open {
  border-color: var(--accent);
}

.faq-item.open .faq-content {
  max-height: 180px;
  padding: 0 1rem 1rem;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.updates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.update-card {
  overflow: hidden;
  transition: transform 0.3s ease;
}

.update-card:hover {
  transform: translateY(-6px);
}

.update-media {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.update-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.update-card:hover .update-media img {
  transform: scale(1.06);
}

.update-body {
  padding: 1rem;
}

.footer {
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 1.5rem;
}

.footer small,
.muted {
  color: var(--text-muted);
}

.socials {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.social {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.social:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.footer-bottom {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding: 1rem 0 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.has-custom-cursor,
.has-custom-cursor * {
  cursor: none !important;
}

.custom-cursor,
.custom-cursor-dot {
  position: fixed;
  left: 0;
  top: 0;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 200;
  opacity: 0;
  mix-blend-mode: difference;
  background: #fff;
}

.custom-cursor {
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1.3px solid #fff;
  transition: opacity 0.25s ease, width 0.4s cubic-bezier(0.16, 1, 0.3, 1), height 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-width 0.4s ease;
}

.custom-cursor-dot {
  width: 7px;
  height: 7px;
  transition: opacity 0.25s ease, width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cursor-visible .custom-cursor,
.cursor-visible .custom-cursor-dot {
  opacity: 1;
}

.cursor-hover .custom-cursor-dot {
  width: 0;
  height: 0;
  opacity: 0;
}

.cursor-hover .custom-cursor {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.12);
  border-width: 0;
}

/* ---------- grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 85;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* ---------- ambient gas trail ---------- */
/* Light is the site's hard default regardless of OS preference (see
   isLight() in chrome.js), so the base rule here matches light styling -
   an OS-preference media query would otherwise fight the JS default on a
   first visit where no data-theme attribute has been set yet. */
#gas-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.8;
}

:root[data-theme='dark'] #gas-canvas {
  mix-blend-mode: screen;
  opacity: 1;
}

/* ---------- theme + sound toggles ---------- */
.theme-switch {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  position: relative;
  padding: 3px;
  flex: none;
  transition: border-color 0.5s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-switch-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--signal));
  display: block;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-switch.is-light .theme-switch-thumb {
  transform: translateX(20px);
}

.sound-toggle {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--white);
  display: grid;
  place-items: center;
  transition: border-color 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sound-toggle:hover {
  border-color: var(--accent);
}

.sound-toggle svg {
  width: 18px;
  height: 18px;
}

.sound-toggle .icon-off {
  display: none;
}

.sound-toggle.is-muted .icon-on {
  display: none;
}

.sound-toggle.is-muted .icon-off {
  display: block;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.dash-rule {
  width: 130px;
  height: 0;
  border-top: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  margin: 1.6rem 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  background: rgba(0, 0, 0, 0.9);
  display: grid;
  place-items: center;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-frame {
  width: min(900px, calc(100% - 2rem));
  aspect-ratio: 16/9;
}

.lightbox-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.lightbox-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--white);
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, background 0.5s ease;
}

.page-loader.is-active {
  opacity: 1;
  pointer-events: auto;
}

.page-loader.is-instant {
  transition: background 0.5s ease;
}

.detail-hero,
.detail-layout {
  display: grid;
  gap: 1.2rem;
}

.detail-hero {
  min-height: 54vh;
  align-items: end;
  background: var(--bg-alt);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-bottom: 1px solid var(--border);
}

.detail-visual {
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.detail-media {
  display: block;
  width: 100%;
  max-width: 100%;
}

.detail-media-iframe {
  border: 0;
  min-height: clamp(320px, 58vh, 760px);
}

.detail-media-video {
  background: var(--bg);
  max-height: min(80vh, 860px);
}

.detail-media-image {
  height: auto;
}

.detail-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag-pill {
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.detail-layout {
  grid-template-columns: 1fr 0.9fr;
}

.masonry {
  display: grid;
  gap: 0.8rem;
}

.nav-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 2rem;
}

.pager-link {
  border: 1px solid var(--border);
  padding: 1rem;
  display: grid;
  gap: 0.4rem;
  transition: border-color 0.3s ease;
}

.pager-link:hover {
  border-color: var(--accent);
}

@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

@keyframes bounce-dot {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}


@media (max-width: 1024px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-grid,
  .category-grid,
  .updates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-side {
    left: 0.8rem;
  }

  .detail-media-iframe {
    min-height: clamp(280px, 50vh, 560px);
  }
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .stat:nth-child(odd) {
    border-right: 1px solid var(--border);
  }

  .stat:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-grid::before {
    display: none;
  }

}

@media (max-width: 768px) {
  .custom-cursor,
  .custom-cursor-dot {
    display: none;
  }

  .section {
    padding: 4rem 0;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .hero {
    min-height: calc(100vh - var(--nav-height-mobile));
  }

  .about-grid,
  .process-grid,
  .faq-grid,
  .stats-grid,
  .portfolio-grid,
  .category-grid,
  .updates-grid,
  .nav-pager {
    grid-template-columns: 1fr;
  }

  .process-grid::before,
  .hero-side {
    display: none;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .stat:last-child {
    border-bottom: 0;
  }

  .detail-media-iframe {
    min-height: clamp(220px, 42vh, 420px);
  }
}

@media (max-width: 600px) {
  .section {
    padding: 3.5rem 0;
  }

  .hero-inner {
    padding: 3rem 0;
  }

  .hero-line {
    font-size: clamp(2.6rem, 11vw, 4.6rem);
  }

  .section-title {
    font-size: clamp(2.3rem, 9vw, 3.6rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .nav-wrap {
    min-height: var(--nav-height-mobile);
  }

  .mobile-menu a {
    font-size: 1.6rem;
  }

  .project-card {
    min-height: 220px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@supports (height: 100svh) {
  .hero {
    min-height: calc(100svh - var(--nav-height));
  }

  @media (max-width: 768px) {
    .hero {
      min-height: calc(100svh - var(--nav-height-mobile));
    }
  }
}

@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body {
    cursor: none;
  }
}

@media (hover: none) {
  .project-overlay {
    transform: translateY(0);
  }

  .project-view {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 480px) {
  .container {
    width: min(1200px, calc(100% - 3.5rem));
  }
}

/* ================= Portfolio shelf (PS4-style focused browsing) ================= */
.filters {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.filter-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 0;
  padding: 0 0 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  position: relative;
  transition: color 0.3s ease;
}

.filter-btn::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  border-bottom: 1.5px dashed var(--accent);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.filter-btn.active {
  background: transparent;
  color: var(--text-primary);
  border-color: transparent;
}

.filter-btn.active::after {
  opacity: 1;
  transform: translateY(0);
}

.shelf-wrap {
  position: relative;
  margin-top: 2rem;
}

.shelf {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.5rem 0.25rem 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  perspective: 1200px;
}

.shelf::-webkit-scrollbar {
  height: 6px;
}

.shelf::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
}

.tile {
  scroll-snap-align: start;
  flex: none;
  width: 220px;
  height: 220px;
  border-radius: 20px;
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  position: relative;
  display: block;
  overflow: hidden;
  color: var(--text-primary);
  text-align: left;
  transform: scale(0.82);
  opacity: 1;
  will-change: transform, opacity;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.55s ease, border-color 0.55s ease, background-color 0.5s ease;
}

.tile.is-active {
  transform: scale(1.14);
  opacity: 1;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  z-index: 2;
}

.tile-media {
  position: absolute;
  inset: 0;
}

.tile-media img,
.tile-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.tile.is-active .tile-media img,
.tile.is-active .tile-media video {
  transform: scale(1.06);
}

.tile-scrim {
  position: absolute;
  inset: 0;
}

.tile-body {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.2rem;
  color: #f5f6fa;
}

.tile-num {
  position: absolute;
  top: 14px;
  left: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: rgba(245, 246, 250, 0.75);
  letter-spacing: 0.08em;
  transition: opacity 0.55s ease;
}

.tile-glyph {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 20px;
  height: 20px;
  color: rgba(245, 246, 250, 0.75);
  opacity: 0.75;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
  transition: color 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.55s ease;
}

.tile.is-active .tile-glyph {
  color: var(--accent);
  opacity: 1;
}

.tile-name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.tile-badge {
  position: absolute;
  top: 12px;
  right: 44px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
}

.indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin: 0.4rem auto 0;
  position: relative;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px var(--accent-glow);
}

.indicator::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  height: 30px;
  border-left: 1.5px dashed color-mix(in srgb, var(--accent) 40%, transparent);
  transform: translateX(-50%);
}

.info-panel {
  padding-top: 2.2rem;
  min-height: 150px;
}

.info-inner {
  max-width: 640px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.info-fade {
  opacity: 0;
  transform: translateY(10px);
}

.info-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.info-title {
  font-family: 'Surgena', sans-serif;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  text-transform: lowercase;
  letter-spacing: 0;
}

.info-desc {
  margin-top: 0.7rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 58ch;
}

.info-tools {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.info-tag {
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .tile {
    width: 170px;
    height: 170px;
  }
  .tile.is-active {
    transform: scale(1.08);
  }
}
