/* =====================================================================
   NOVA WEAVER — fully responsive (PERFORMANCE OPTIMIZED)
   ===================================================================== */

/* ---------------------------------------------------------------
   1. TOKENS
   --------------------------------------------------------------- */
:root {
  --lav-50:  #FBFAFF;
  --lav-100: #F4F0FF;
  --lav-200: #EAE2FF;
  --lav-300: #C8B6FF;
  --lav-400: #B89CFF;
  --violet:  #6C4AB6;
  --violet-deep: #462F80;
  --ink:     #1B1436;
  --ink-soft: #4A4266;
  --silver:  #C6C9D8;

  --bg: var(--lav-50);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-line: rgba(255, 255, 255, 0.75);
  --edge: rgba(108, 74, 182, 0.14);
  --edge-soft: rgba(108, 74, 182, 0.08);

  --blur: 16px;
  --shadow-sm: 0 8px 24px -14px rgba(70, 47, 128, 0.35);
  --shadow-md: 0 24px 60px -32px rgba(70, 47, 128, 0.45);
  --shadow-lg: 0 46px 120px -50px rgba(70, 47, 128, 0.55);
  --holo: linear-gradient(115deg, #C8B6FF 0%, #E6DCFF 22%, #FFFFFF 38%, #D9F0FF 52%, #C8B6FF 68%, #F0E7FF 84%, #B89CFF 100%);
  --holo-text: linear-gradient(115deg, #6C4AB6 0%, #B89CFF 24%, #8A6AD0 42%, #C8B6FF 58%, #6C4AB6 78%, #9A7FE0 100%);

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", "Space Grotesk", system-ui, sans-serif;
  --font-accent: "Instrument Serif", Georgia, serif;

  --step--1: clamp(0.75rem, 0.71rem + 0.2vw, 0.88rem);
  --step-0:  clamp(0.94rem, 0.9rem + 0.2vw, 1.06rem);
  --step-1:  clamp(1.08rem, 0.98rem + 0.5vw, 1.35rem);
  --step-2:  clamp(1.35rem, 1.1rem + 1.2vw, 2.1rem);
  --step-3:  clamp(1.75rem, 1.2rem + 3vw, 3.6rem);
  --step-4:  clamp(2.1rem, 1.1rem + 5.6vw, 6.4rem);

  --gutter: clamp(1rem, 4vw, 5rem);
  --section-y: clamp(4rem, 10vh, 11rem);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-xl: 40px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-soft: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-glass: cubic-bezier(0.32, 0.72, 0, 1);

  --nav-h: 76px;
}

@media (max-width: 860px) { :root { --nav-h: 64px; } }
@media (max-width: 480px) { :root { --nav-h: 64px; } }

@property --flip {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* ---------------------------------------------------------------
   2. BASE
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-loading,
body.no-scroll { overflow: hidden; }

img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }

button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 4px;
  border-radius: 6px;
}

::selection { background: var(--lav-300); color: var(--violet-deep); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 0.7rem 1.2rem;
  background: var(--violet);
  color: #fff;
  border-radius: 999px;
  font-size: var(--step--1);
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus-visible { transform: translateY(0); }

.display {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: var(--ink);
}
.display-sm {
  font-size: var(--step-3);
  line-height: 1;
  letter-spacing: -0.04em;
}
.display em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.01em;
  background: linear-gradient(100deg, var(--violet) 0%, var(--lav-400) 55%, var(--violet-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}

.center { text-align: center; margin-inline: auto; }

.section {
  position: relative;
  padding: var(--section-y) var(--gutter);
  max-width: 1440px;
  margin-inline: auto;
  content-visibility: auto;
  contain-intrinsic-size: auto 800px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.6rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.section-sub {
  color: var(--ink-soft);
  font-size: var(--step-0);
  max-width: 46ch;
  margin-top: 1.1rem;
}

.hint-touch { display: none; }
@media (hover: none), (pointer: coarse) {
  .hint-pointer { display: none; }
  .hint-touch { display: inline; }
}

kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 0.1em 0.45em;
  border: 1px solid var(--edge);
  border-bottom-width: 2px;
  border-radius: 7px;
  background: var(--glass-strong);
  font-family: var(--font-display);
  font-size: 0.78em;
  text-align: center;
  color: var(--violet);
}

/* ---------------------------------------------------------------
   3. AMBIENT ENVIRONMENT (lighter)
   --------------------------------------------------------------- */
.environment {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, #FFFFFF 0%, rgba(255,255,255,0) 55%),
    radial-gradient(90% 60% at 100% 100%, rgba(200,182,255,0.28) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #FCFBFF 0%, #F6F2FF 45%, #FAF8FF 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.42;
  transform: translate3d(0, 0, 0);
}
.blob-1 {
  width: 32vw; height: 32vw;
  top: -8vw; left: -6vw;
  background: radial-gradient(circle at 35% 35%, rgba(200,182,255,0.9), rgba(200,182,255,0) 70%);
  animation: drift-a 34s var(--ease-soft) infinite alternate;
}
.blob-2 {
  width: 26vw; height: 26vw;
  top: 30vh; right: -8vw;
  background: radial-gradient(circle at 60% 40%, rgba(184,156,255,0.75), rgba(184,156,255,0) 70%);
  animation: drift-b 40s var(--ease-soft) infinite alternate;
}
.blob-3 {
  width: 30vw; height: 30vw;
  bottom: -12vw; left: 20vw;
  background: radial-gradient(circle at 50% 50%, rgba(108,74,182,0.22), rgba(108,74,182,0) 70%);
  animation: drift-c 46s var(--ease-soft) infinite alternate;
}
.blob-4 { display: none; }

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: 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='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  pointer-events: none;
}

@keyframes drift-a { from{transform:translate3d(0,0,0) scale(1)} to{transform:translate3d(4vw,5vh,0) scale(1.08)} }
@keyframes drift-b { from{transform:translate3d(0,0,0) scale(1.03)} to{transform:translate3d(-5vw,-4vh,0) scale(0.94)} }
@keyframes drift-c { from{transform:translate3d(0,0,0) scale(0.96)} to{transform:translate3d(4vw,-5vh,0) scale(1.06)} }

/* ---------------------------------------------------------------
   4. CURSOR / PROGRESS / CURTAIN
   --------------------------------------------------------------- */
.cursor {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cursor.is-live { opacity: 1; }

.cursor-dot, .cursor-halo, .cursor-hand {
  position: absolute;
  top: 0; left: 0;
  pointer-events: none;
  will-change: transform;
}

.cursor-dot { display: none; }

.cursor-halo {
  border-radius: 50%;
  transform: translate3d(-50%, -50%, 0);
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(184,156,255,0.4) 0%, rgba(184,156,255,0.12) 38%, rgba(184,156,255,0) 70%);
  filter: blur(4px);
  transition: width 0.4s var(--ease-out), height 0.4s var(--ease-out);
}
.cursor.is-hover .cursor-halo { width: 300px; height: 300px; }

/* AI cursor: a sparkle core with an electron on an orbit, echoing the
   atom in the logo. Centred on the pointer so it sits inside the halo. */
.cursor-hand {
  top: -3px;
  left: -16px;
  width: 42px;
  height: 42px;
  transform: translate3d(0, 0, 0);
  z-index: 2;
  /* A tight dark shadow gives the glyph an edge against the near-white
     page; the wide violet ones are the glow. */
  filter:
    drop-shadow(0 1px 1.5px rgba(27, 20, 54, 0.45))
    drop-shadow(0 0 8px rgba(184, 156, 255, 0.85))
    drop-shadow(0 0 16px rgba(108, 74, 182, 0.5));
}
.cursor-hand svg {
  width: 100%;
  height: 100%;
  display: block;
  /* An <svg> clips to its viewBox by default, which lopped off the
     electron as the orbit swung it past the edge. */
  overflow: visible;
  transform: scale(1);
  transform-origin: 50% 50%;
  transition: transform 0.28s var(--ease-elastic);
}
.cursor.is-hover .cursor-hand svg { transform: scale(1.18); }

/* The AI core in the palm: a steady pulse, with a ring pinging out of
   it — reads as "thinking" rather than a plain pointer. */
.cursor-core {
  transform-box: view-box;
  transform-origin: 19.7px 26px;
  animation: cursor-core-pulse 1.9s var(--ease-soft) infinite;
}
.cursor-core-ring {
  transform-box: view-box;
  transform-origin: 19.7px 26px;
  animation: cursor-core-ping 2.4s var(--ease-out) infinite;
}
.cursor.is-hover .cursor-core { animation-duration: 0.9s; }
.cursor.is-hover .cursor-core-ring { animation-duration: 1.2s; }

@keyframes cursor-core-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.95; }
  50%      { transform: scale(0.78); opacity: 0.6; }
}
@keyframes cursor-core-ping {
  0%   { transform: scale(0.6); opacity: 0.6; }
  70%  { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

body.has-custom-cursor:not(.is-loading),
body.has-custom-cursor:not(.is-loading) * { cursor: none !important; }

.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 140;
  pointer-events: none;
  background: rgba(108, 74, 182, 0.07);
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--holo);
  background-size: 300% 100%;
  box-shadow: 0 0 14px rgba(184,156,255,0.9);
  will-change: transform;
}


@keyframes holo-pan { from{background-position:0% 50%} to{background-position:250% 50%} }

/* ---------------------------------------------------------------
   5. NAVIGATION — lighter glass
   --------------------------------------------------------------- */
.nav-shell {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 120;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 62px;
  width: min(1280px, calc(100vw - 2 * var(--gutter)));
  padding: 0 0.65rem 0 1.1rem;
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;

  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 20px 60px -26px rgba(70, 47, 128, 0.24),
    0 6px 20px -8px rgba(70, 47, 128, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);

  transition:
    width 0.7s var(--ease-glass),
    height 0.6s var(--ease-glass),
    padding 0.7s var(--ease-glass),
    background 0.5s var(--ease-glass),
    box-shadow 0.5s var(--ease-glass),
    border-color 0.5s var(--ease-glass);
}

.nav-shell.is-collapsed {
  height: 54px;
  width: 112px;
  padding: 0;
  background: rgba(255, 255, 255, 0.55);
}

.island-glass {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 150% at 15% -20%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, 0.06) 100%);
}
.nav-shell.is-collapsed .island-glass { opacity: 0.35; }

/* Sheen sweep — animates `transform` (compositor-only) instead of
   `background-position` (forces a repaint every frame forever on a
   fixed, always-visible header — a steady drain on mobile). */
.island-sheen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
  mix-blend-mode: screen;
}
.island-sheen::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 220%;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.45) 46%, rgba(255,255,255,0.04) 54%, transparent 70%);
  will-change: transform;
  animation: island-sheen 8s ease infinite;
}
.nav-shell.is-collapsed .island-sheen { opacity: 0.35; }
@keyframes island-sheen { 0%{transform:translateX(-35%)} 100%{transform:translateX(35%)} }

.island-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s var(--ease-glass);
}
.nav-shell.is-collapsed .island-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.island-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.35s ease 0.18s;
}
.nav-shell.is-collapsed .island-row {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  flex-shrink: 0;
}

.curtain {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #FCFBFF 0%, #F0EAFF 100%);
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}
.curtain.is-done { opacity: 0; visibility: hidden; }

.curtain-inner { display: grid; justify-items: center; gap: 1.4rem; }

.curtain-mark {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  background: var(--holo-text);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.curtain-bar {
  display: block;
  width: min(220px, 50vw);
  height: 2px;
  background: rgba(108,74,182,0.12);
  overflow: hidden;
  border-radius: 999px;
}
.curtain-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--lav-300), var(--violet));
  transition: width 0.4s var(--ease-out);
}
.curtain-note {
  font-size: var(--step--1);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* assets/logo.png is a real cut-out (transparent background), so it
   needs no blend trick — it sits cleanly on the glass. The violet
   drop-shadow matches the lift the rest of the UI has. */
.brand-mark img,
.island-mark img,
.footer-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* The orbit rings are very pale lavender and wash out against the
     white glass, so lift saturation/contrast before the shadow. */
  filter: saturate(1.45) contrast(1.12)
          drop-shadow(0 3px 8px rgba(108, 74, 182, 0.3));
}
.brand-text { font-size: 0.98rem; white-space: nowrap; }
.brand-text em { font-family: var(--font-accent); font-style: italic; color: var(--violet); }

.nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.nav-list { position: relative; display: flex; align-items: center; gap: 0.15rem; }
.nav-link {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.3s var(--ease-out);
}
.nav-link:hover { color: var(--violet); }
.nav-link.is-active { color: var(--violet-deep); }

.nav-indicator {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 20px -12px rgba(70,47,128,0.7), inset 0 0 0 1px rgba(255,255,255,0.85), inset 0 1px 0 rgba(255,255,255,1);
  opacity: 0;
  will-change: transform, width;
  transition: transform 0.45s var(--ease-elastic), width 0.45s var(--ease-elastic), opacity 0.3s ease;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.74rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.pulse {
  position: relative;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ED6A4;
  animation: pulse 2.4s var(--ease-soft) infinite;
}
@keyframes pulse {
  0%{box-shadow:0 0 0 0 rgba(78,214,164,0.55)}
  70%{box-shadow:0 0 0 9px rgba(78,214,164,0)}
  100%{box-shadow:0 0 0 0 rgba(78,214,164,0)}
}

.menu-toggle {
  display: none;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(108, 74, 182, 0.14);
  background: rgba(255, 255, 255, 0.85);
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.menu-toggle:hover,
.menu-toggle:active {
  background: #fff;
  border-color: rgba(108, 74, 182, 0.24);
  box-shadow: 0 6px 18px -8px rgba(70, 47, 128, 0.35);
}
.menu-toggle-line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.4s var(--ease-elastic);
}
.menu-toggle-line:nth-child(1) { transform: translate(-50%, calc(-50% - 4.5px)); }
.menu-toggle-line:nth-child(2) { transform: translate(-50%, calc(-50% + 4.5px)); }
.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(2) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* ---------------------------------------------------------------
   6. MOBILE MENU OVERLAY
   --------------------------------------------------------------- */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: calc(var(--nav-h) + 1.5rem) var(--gutter) 2.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;

  background:
    radial-gradient(120% 70% at 15% 0%, rgba(200, 182, 255, 0.55) 0%, rgba(200, 182, 255, 0) 55%),
    radial-gradient(100% 60% at 95% 100%, rgba(184, 156, 255, 0.5) 0%, rgba(184, 156, 255, 0) 60%),
    linear-gradient(165deg, #FBFAFF 0%, #F4F0FF 42%, #EAE2FF 100%);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s var(--ease-out);
}

body.menu-open .mobile-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.6;
}
.mobile-menu-glow-1 {
  width: 50vw; height: 50vw;
  top: -14vw; left: -12vw;
  background: radial-gradient(circle at 40% 40%, rgba(200,182,255,0.9), rgba(200,182,255,0) 70%);
}
.mobile-menu-glow-2 {
  width: 42vw; height: 42vw;
  bottom: -14vw; right: -10vw;
  background: radial-gradient(circle at 60% 40%, rgba(184,156,255,0.85), rgba(184,156,255,0) 70%);
}

.mobile-menu-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  display: grid;
  gap: 1.4rem;
  padding-top: 0.5rem;
}

.mobile-menu-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease 0.06s, transform 0.4s var(--ease-out) 0.06s;
}
.mobile-menu-eyebrow i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(108,74,182,0.28), transparent);
}
body.menu-open .mobile-menu-eyebrow {
  opacity: 1;
  transform: none;
}

.mobile-menu-list {
  display: grid;
  gap: 0.7rem;
}

.mobile-menu-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  min-height: 62px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: linear-gradient(150deg, rgba(255,255,255,0.88) 0%, rgba(244,240,255,0.7) 55%, rgba(200,182,255,0.45) 100%);
  box-shadow:
    0 18px 40px -22px rgba(70, 47, 128, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 4.6vw, 1.28rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;

  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

body.menu-open .mobile-menu-link {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.4s ease calc(0.1s + var(--i, 0) * 0.05s),
    transform 0.4s var(--ease-out) calc(0.1s + var(--i, 0) * 0.05s),
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.mobile-menu-link:hover,
.mobile-menu-link:focus-visible,
.mobile-menu-link:active {
  background: linear-gradient(150deg, rgba(255,255,255,1) 0%, rgba(244,240,255,0.9) 55%, rgba(200,182,255,0.6) 100%);
  box-shadow:
    0 22px 46px -22px rgba(108, 74, 182, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  outline: none;
}

.mm-label {
  font-size: inherit;
  letter-spacing: inherit;
  line-height: 1.1;
}
.mm-arrow {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--holo);
  background-size: 220% 100%;
  color: var(--violet-deep);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7), 0 6px 16px -8px rgba(108,74,182,0.7);
  flex-shrink: 0;
  transition: transform 0.35s var(--ease-elastic);
}
.mm-arrow svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.mobile-menu-link:hover .mm-arrow,
.mobile-menu-link:active .mm-arrow {
  transform: translate(2px, -2px);
}

.mobile-menu-foot {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
  padding-top: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease 0.4s, transform 0.4s var(--ease-out) 0.4s;
}
body.menu-open .mobile-menu-foot {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------
   7. BUTTONS
   --------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 48px;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s var(--ease-elastic), box-shadow 0.3s var(--ease-out), color 0.3s ease;
}
.btn svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.35s var(--ease-elastic);
}
.btn:hover svg { transform: translate(3px, -3px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--violet) 0%, #8464CF 45%, var(--lav-400) 100%);
  box-shadow: 0 20px 44px -22px rgba(108,74,182,0.9), inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--holo);
  background-size: 220% 100%;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}
.btn-primary:hover { color: var(--violet-deep); }
.btn-primary:hover::before { opacity: 1; }

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--edge);
  background: rgba(255,255,255,0.5);
}
.btn-ghost:hover { color: var(--violet-deep); border-color: var(--lav-300); box-shadow: var(--shadow-sm); }

.round-btn {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid var(--edge);
  background: rgba(255,255,255,0.7);
  color: var(--violet-deep);
  transition: transform 0.3s var(--ease-elastic), box-shadow 0.3s ease, background 0.3s ease;
}
.round-btn svg {
  width: 19px; height: 19px;
  fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.round-btn:hover { background: #fff; box-shadow: var(--shadow-md); }
.round-btn:disabled { opacity: 0.34; cursor: not-allowed; }
.round-btn:disabled:hover { transform: none; box-shadow: none; }

/* ---------------------------------------------------------------
   8. HERO
   --------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--nav-h) + 4vh) var(--gutter) 8rem;
  overflow: hidden;
  isolation: isolate;
}

.hero-canvas, .hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
}
.hero-fallback {
  background:
    radial-gradient(38% 38% at 50% 46%, rgba(255,255,255,0.92) 0%, rgba(200,182,255,0.42) 45%, rgba(200,182,255,0) 72%),
    radial-gradient(22% 22% at 50% 46%, rgba(184,156,255,0.55) 0%, rgba(184,156,255,0) 70%);
  opacity: 1;
  transition: opacity 0.9s var(--ease-out);
}
body.webgl-ready .hero-fallback { opacity: 0; }

.hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  text-align: center;
  max-width: min(100%, 64rem);
  pointer-events: none;
}
.hero-copy > * { pointer-events: auto; }
.hero-copy .display { max-width: 100%; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--edge-soft);
  background: rgba(255,255,255,0.55);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
.eyebrow .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--lav-400); }

.hero-role {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--step-0);
  color: var(--ink-soft);
  white-space: nowrap;
}
.hero-role i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--lav-400);
  box-shadow: 0 0 12px rgba(184,156,255,0.9);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 0.6rem;
}

.hero-meta {
  position: absolute;
  left: var(--gutter);
  bottom: 3.2rem;
  display: grid;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero-hint { opacity: 0.55; font-size: 0.64rem; }

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: 3.2rem;
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  color: var(--ink-soft);
}
.scroll-cue-text {
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.scroll-cue-rail {
  position: relative;
  width: 1px; height: 64px;
  background: linear-gradient(180deg, rgba(108,74,182,0.06), rgba(108,74,182,0.22));
  overflow: hidden;
}
.scroll-cue-rail i {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 26px;
  background: linear-gradient(180deg, transparent, var(--violet));
  animation: cue 2.4s var(--ease-soft) infinite;
}
@keyframes cue {
  0%{transform:translateY(-100%);opacity:0}
  35%{opacity:1}
  100%{transform:translateY(260%);opacity:0}
}

/* ---------------------------------------------------------------
   9. ABOUT
   --------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.about-lead .display { margin-bottom: 2rem; }
.about-copy {
  display: grid;
  gap: 1.1rem;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: var(--step-1);
  line-height: 1.6;
}

.about-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3.2rem);
  margin-top: 2.8rem;
  padding-top: 2rem;
  border-top: 1px solid var(--edge-soft);
}
.about-stats dt {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.about-stats dd {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--violet-deep);
}
.about-stats dd::after {
  content: "+";
  color: var(--lav-400);
  font-size: 0.6em;
  vertical-align: super;
  margin-left: 0.08em;
}

.about-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(560px, 74vw);
  perspective: 1200px;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.profile-card {
  position: relative;
  width: min(330px, 68vw);
  aspect-ratio: 3 / 4;
  transform-style: preserve-3d;
  transition: --flip 0.7s var(--ease-out);
  animation: float-card 12s var(--ease-soft) infinite alternate;
  cursor: pointer;
  will-change: transform;
}
.profile-card:hover { animation-play-state: paused; }
.profile-card.is-flipped { --flip: 180deg; }

.profile-flip-hint {
  position: absolute;
  right: 1.8rem; bottom: 1.9rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 10px rgba(10,6,26,0.4);
  opacity: 0.75;
  transition: opacity 0.3s ease;
}
.profile-flip-hint::after {
  content: "";
  width: 14px; height: 14px;
  border: 1px solid currentColor;
  border-radius: 4px;
  transform: rotate(18deg);
  transition: transform 0.5s var(--ease-glass);
}
.profile-card:hover .profile-flip-hint { opacity: 1; }
.profile-card:hover .profile-flip-hint::after { transform: rotate(198deg); }
.profile-card.is-flipped .profile-flip-hint::after { transform: rotate(378deg); }

.profile-face {
  position: absolute;
  inset: 0;
  display: grid;
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.profile-front {
  padding: 0;
  display: block;
  background: #fff;
}

.profile-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--lav-200) 0%, var(--lav-300) 100%);
  isolation: isolate;
}
.profile-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 1s var(--ease-out);
}
.profile-card:hover .profile-photo img { transform: scale(1.05); }
/* Scrim so the caption stays legible sitting on top of the photo. */
.profile-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(10,6,26,0) 0%, rgba(10,6,26,0.62) 100%);
  pointer-events: none;
}

.profile-meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  display: grid;
  gap: 0.35rem;
  padding: 1.15rem 1.35rem 1.4rem;
  padding-right: 4.5rem;
  text-align: left;
}

.profile-role {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  font-size: var(--step-0);
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-transform: none;
  color: #fff;
  text-shadow: 0 2px 12px rgba(10,6,26,0.4);
}

.profile-corner {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.85);
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--violet-deep);
  box-shadow: 0 4px 12px -4px rgba(70,47,128,0.35);
  z-index: 2;
}

.profile-shine {
  position: absolute;
  inset: -40%;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,0.85) 50%, transparent 58%);
  transform: translateX(-30%);
  transition: transform 0.8s var(--ease-out);
  pointer-events: none;
}
.profile-card:hover .profile-shine { transform: translateX(30%); }

.profile-back {
  transform: rotateY(180deg);
  place-items: center;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.4);
  background: linear-gradient(150deg, var(--violet-deep), var(--violet) 60%, var(--lav-400));
  box-shadow: var(--shadow-lg);
}
.profile-quote {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--step-2);
  line-height: 1.25;
  color: #fff;
}

.float-word {
  position: absolute;
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(0.95rem, 2.4vw, 1.5rem);
  color: var(--violet);
  opacity: 0.75;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--edge-soft);
  background: rgba(255,255,255,0.6);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.float-word-1 { top: 8%; left: 2%; animation: float-y 9s var(--ease-soft) infinite alternate; }
.float-word-2 { bottom: 14%; right: 0%; animation: float-y 11s var(--ease-soft) -1.5s infinite alternate-reverse; }
.float-word-3 { bottom: 4%; left: 12%; animation: float-y 8s var(--ease-soft) -3s infinite alternate; }

.about-ring {
  position: absolute;
  width: min(420px, 90%);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px dashed rgba(108,74,182,0.18);
  animation: spin 60s linear infinite;
  pointer-events: none;
}
.about-ring-2 {
  width: min(520px, 96%);
  border-style: solid;
  border-color: rgba(200,182,255,0.4);
  animation-duration: 90s;
  animation-direction: reverse;
}

@keyframes float-card {
  from { transform: translateY(-8px) rotateX(calc(3deg + var(--rx,0deg))) rotateY(calc(-5deg + var(--ry,0deg) + var(--flip,0deg))); }
  to   { transform: translateY(8px)  rotateX(calc(-2deg + var(--rx,0deg))) rotateY(calc(5deg + var(--ry,0deg) + var(--flip,0deg))); }
}
@keyframes float-y { from{transform:translateY(-6px)} to{transform:translateY(6px)} }
@keyframes spin { from{transform:rotate(0)} to{transform:rotate(360deg)} }

/* ---------------------------------------------------------------
   10. SELECTED WORK
   --------------------------------------------------------------- */
.work { max-width: none; padding-inline: 0; content-visibility: visible; }
.work-head {
  position: relative;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.work-hint { margin-top: 1.1rem; font-size: var(--step--1); color: var(--ink-soft); }
.work-nav {
  position: absolute;
  right: var(--gutter);
  bottom: 0;
  display: flex;
  gap: 0.7rem;
}

.gallery {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding: 3rem 0 4rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  contain: layout paint;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery.is-dragging { cursor: grabbing; scroll-snap-type: none; }

.gallery-track {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 3rem);
  /* Half the card width — keeps the active card centred in the ring.
     Must stay in sync with .project width below. */
  padding-inline: max(var(--gutter), calc(50vw - min(21rem, 38vw)));
  width: max-content;
  /* No perspective here, deliberately. This track is max-content wide
     — tens of thousands of px across all the cards — so a
     perspective-origin of 50% landed at the centre of the *whole
     track*, thousands of px off-screen. Every card then sheared
     toward a vanishing point the viewer could never see, which is
     what piled the cards on top of each other. Each card carries its
     own perspective() in its transform instead (see .project-card),
     which is self-contained and cannot drift off-screen. */
}

.project {
  flex: 0 0 auto;
  width: min(42rem, 76vw);
  scroll-snap-align: center;
  /* No content-visibility here on purpose: the cards flanking the
     active one are part of the ring and must always be painted. With
     it on, a card rotating back into view could pop in blank. */
}

.project-card {
  --p: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(0.9rem, 1.8vw, 1.6rem);
  padding: clamp(0.85rem, 1.2vw, 1.1rem);
  border-radius: var(--radius-xl);
  /* Glassmorphism: the frosted pane (and its edge) live on ::before
     below, not here. backdrop-filter directly on this element risks
     Chromium flattening its transform. The border has to live down
     there too — a z-index:-1 pseudo paints over its host's border. */
  border: 0;
  background: transparent;
  box-shadow: var(--shadow-md);
  /* Ring curve: cards to either side swing back around a circle. Kept
     moderate and level (no downward dip) so a card coming back around
     reads as a clean card rather than a skewed sliver. */
  transform:
    perspective(1100px)
    rotateY(calc(var(--p) * -28deg + var(--ry, 0deg)))
    translateZ(calc(var(--p) * var(--p) * -120px))
    scale(calc(1 - (var(--p) * var(--p)) * 0.08));
  opacity: calc(1 - (var(--p) * var(--p)) * 0.42);
  transition: box-shadow 0.4s var(--ease-out), opacity 0.4s var(--ease-out);
  /* Flat on purpose: with preserve-3d the media/body/::before each got
     their own place in 3D space and could intersect the card next
     door, which is half of why the content bled together. */
  transform-style: flat;
}

/* The frosted pane: translucent tint over a blurred backdrop, so a
   card rotating around behind this one genuinely reads through it. */
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(150deg, rgba(255,255,255,0.88) 0%, rgba(246,242,255,0.82) 60%, rgba(214,201,255,0.76) 100%);
  pointer-events: none;
}
/* Live blur only on the cards actually on screen (class is toggled in
   script.js). With 3 looped copies of every card there are ~39 panes
   in the DOM, and blurring them all was the single heaviest thing on
   the page. */
.project-card.is-near::before {
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.project-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--lav-200);
}
.project-media img {
  width: 100%;
  height: 100%;
  /* Sized against the smaller card - 34vw made the media taller than
     the card is wide on big screens. */
  min-height: clamp(165px, 18vw, 280px);
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.7s var(--ease-out);
}
.project-card:hover .project-media img { transform: scale(1.06); }

a.project-media {
  display: block;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
a.project-media:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 4px;
  border-radius: var(--radius-lg);
}
a.project-media:hover img,
a.project-media:focus-visible img {
  transform: scale(1.06);
}

.project-gloss {
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgba(255,255,255,0) 35%, rgba(255,255,255,0.45) 48%, rgba(255,255,255,0) 62%);
  opacity: 0;
  transform: translateX(-24%);
  transition: opacity 0.35s ease, transform 0.8s var(--ease-out);
  pointer-events: none;
}
.project-card:hover .project-gloss { opacity: 1; transform: translateX(24%); }

.project-body {
  display: grid;
  align-content: center;
  gap: 0.7rem;
  padding: clamp(0.85rem, 1.4vw, 1.3rem) clamp(0.6rem, 1vw, 1rem);
}
.project-cat {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--violet);
}
.project-title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.project-desc { color: var(--ink-soft); font-size: var(--step--1); max-width: 32ch; }
.tech-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.2rem; }
.tech-list li {
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--edge-soft);
  background: rgba(255,255,255,0.55);
  font-size: 0.7rem;
  color: var(--ink-soft);
}

.project-open {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  justify-self: start;
  margin-top: 0.7rem;
  padding: 0.75rem 1.35rem;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(255,255,255,0.65);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet-deep);
  transition: background 0.3s var(--ease-out), box-shadow 0.3s ease, color 0.3s ease;
}
.project-open svg {
  width: 14px; height: 14px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.35s var(--ease-elastic);
}
.project-open:hover { background: var(--violet); border-color: var(--violet); color: #fff; }
.project-open:hover svg { transform: translate(3px, -3px); }

.gallery-rail {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  height: 2px;
  width: calc(100% - 2 * var(--gutter));
  border-radius: 999px;
  background: rgba(108,74,182,0.08);
  overflow: hidden;
}
.gallery-rail span {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 28%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lav-300), var(--violet));
  transition: transform 0.2s var(--ease-out);
  will-change: transform;
}

/* case study overlay ----------------------------------------- */
.case-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 3vw, 2.5rem);
}
.case-overlay[hidden] { display: none; }

.case-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 20, 54, 0.34);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.case-overlay.is-open .case-backdrop { opacity: 1; }

.case-panel {
  position: relative;
  width: min(1060px, 100%);
  max-height: 92svh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.4rem, 4vw, 3.6rem);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-line);
  background: linear-gradient(160deg, rgba(255,255,255,0.94) 0%, rgba(246,242,255,0.9) 55%, rgba(234,226,255,0.92) 100%);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  transition: opacity 0.45s var(--ease-out), transform 0.5s var(--ease-out);
  scrollbar-width: thin;
  scrollbar-color: var(--lav-300) transparent;
}
.case-overlay.is-open .case-panel { opacity: 1; transform: none; }

.case-close {
  position: sticky;
  top: 0;
  float: right;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--edge);
  background: rgba(255,255,255,0.85);
  color: var(--violet-deep);
  z-index: 3;
  transition: background 0.3s ease, color 0.3s ease;
}
.case-close svg {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round;
}
.case-close:hover { background: var(--violet); color: #fff; }

.case-cat {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--violet);
}
.case-cat span { color: var(--ink-soft); }
.case-title { margin: 0.9rem 0 1rem; }
.case-lead {
  max-width: 48ch;
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--step-2);
  line-height: 1.3;
  color: var(--ink-soft);
}
.case-image {
  width: 100%;
  margin: clamp(1.4rem, 4vw, 2.8rem) 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1.2rem, 3vw, 2.4rem);
}
.case-grid h3 {
  margin-bottom: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--violet);
}
.case-grid p { color: var(--ink-soft); }

.case-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  margin-top: clamp(1.6rem, 4vw, 2.8rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--edge-soft);
}
.case-facts dt {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}
.case-facts dd {
  font-family: var(--font-display);
  font-size: var(--step-0);
  color: var(--violet-deep);
}

/* ---------------------------------------------------------------
   11. SKILLS CONSTELLATION
   --------------------------------------------------------------- */
.skills { text-align: center; content-visibility: auto; contain-intrinsic-size: auto 700px; }
.skills .section-label { display: inline-flex; }
.skills .section-sub { margin-inline: auto; }

.constellation {
  position: relative;
  margin-top: clamp(2rem, 6vw, 4rem);
  height: clamp(460px, 62vh, 640px);
  perspective: 1100px;
  text-align: center;
}
.constellation-lines {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
}
.constellation-lines line {
  stroke: rgba(108, 74, 182, 0.28);
  stroke-width: 1;
  stroke-dasharray: 3 7;
  transition: stroke 0.35s ease, stroke-width 0.3s ease;
}
.constellation-lines line.is-lit {
  stroke: rgba(184, 156, 255, 0.85);
  stroke-width: 1.4;
}

.skill-list { position: absolute; inset: 0; }
.skill-list li { position: absolute; inset: 0; pointer-events: none; }

.skill {
  position: absolute;
  top: var(--y);
  left: var(--x);
  pointer-events: auto;
  display: grid;
  gap: 0.35rem;
  width: max-content;
  max-width: 16rem;
  box-sizing: border-box;
  padding: 0.85rem 1.25rem;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: rgba(252, 250, 255, 0.94);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.85);
  text-align: center;
  transform: translate(-50%, -50%) scale(var(--s, 1));
  transform-origin: 50% 50%;
  transition: border-radius 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), background 0.3s ease, padding 0.35s var(--ease-out);
  animation: skill-float 14s var(--ease-soft) var(--d, 0s) infinite alternate;
  will-change: transform;
}
.skill-name {
  font-family: var(--font-display);
  font-size: var(--step-0);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-align: center;
  color: var(--ink);
  transition: color 0.3s ease;
}
.skill-note {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 0;
  width: 0;
  max-width: 100%;
  min-width: 0;
  max-height: 0;
  overflow: hidden;
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  opacity: 0;
  transition: width 0.4s var(--ease-out), max-height 0.4s var(--ease-out), opacity 0.35s ease;
}
.skill:hover,
.skill:focus-visible,
.skill.is-active {
  z-index: 5;
  border-radius: var(--radius);
  padding: 1.05rem 1.35rem 1.15rem;
  background: rgba(255,255,255,0.98);
  border-color: var(--lav-300);
  box-shadow: 0 26px 60px -26px rgba(108,74,182,0.7), 0 0 44px rgba(184,156,255,0.55), inset 0 1px 0 rgba(255,255,255,0.95);
  animation-play-state: paused;
}
.skill:hover .skill-name,
.skill:focus-visible .skill-name,
.skill.is-active .skill-name { color: var(--violet-deep); }
.skill:hover .skill-note,
.skill:focus-visible .skill-note,
.skill.is-active .skill-note {
  -webkit-line-clamp: 3;
  width: 100%;
  max-height: 4.6em;
  opacity: 1;
}

@keyframes skill-float {
  0%   { transform: translate(-50%, -50%) scale(var(--s,1)) translate3d(0, 0, 0); }
  50%  { transform: translate(-50%, -50%) scale(var(--s,1)) translate3d(8px, -12px, 24px); }
  100% { transform: translate(-50%, -50%) scale(var(--s,1)) translate3d(-6px, 10px, -16px); }
}

/* ---------------------------------------------------------------
   12. EXPERIENCE TIMELINE
   --------------------------------------------------------------- */
.timeline {
  position: relative;
  margin-top: clamp(2rem, 6vw, 4rem);
  padding-left: clamp(1.75rem, 5vw, 4rem);
  perspective: 1000px;
}
.timeline-line {
  position: absolute;
  top: 0; bottom: 0;
  left: clamp(0.5rem, 1.6vw, 1.3rem);
  width: 2px;
  border-radius: 999px;
  background: rgba(108,74,182,0.1);
  overflow: hidden;
}
.timeline-line span {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  transform: scaleY(0);
  transform-origin: 50% 0;
  background: linear-gradient(180deg, var(--lav-300), var(--violet) 55%, var(--violet-deep));
  box-shadow: 0 0 18px rgba(184,156,255,0.95);
  transition: transform 0.2s linear;
  will-change: transform;
}

.tl-item {
  position: relative;
  padding-bottom: clamp(1.4rem, 3.5vw, 2.6rem);
}
.tl-item:last-child { padding-bottom: 0; }

.tl-node {
  position: absolute;
  left: calc(clamp(0.5rem, 1.6vw, 1.3rem) - clamp(1.75rem, 5vw, 4rem) + 1px);
  top: 2.3rem;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--lav-300);
  transform: translateX(-50%);
  transition: border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), transform 0.4s var(--ease-elastic);
}
.tl-item.is-visible .tl-node {
  border-color: var(--violet);
  box-shadow: 0 0 0 5px rgba(184,156,255,0.22), 0 0 22px rgba(184,156,255,0.9);
  transform: translateX(-50%) scale(1.12);
}

.tl-card {
  position: relative;
  padding: clamp(1.25rem, 2.6vw, 2.1rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-line);
  background: linear-gradient(140deg, rgba(255,255,255,0.75) 0%, rgba(246,242,255,0.55) 100%);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.85);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: box-shadow 0.4s var(--ease-out), border-color 0.3s ease;
}
.tl-card:hover { border-color: var(--lav-300); box-shadow: var(--shadow-lg), 0 0 40px rgba(184,156,255,0.32); }
.tl-year {
  display: inline-block;
  margin-bottom: 0.7rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--violet);
}
.tl-card h3 {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.tl-card p { margin-top: 0.6rem; max-width: 54ch; color: var(--ink-soft); }
.tl-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.1rem; }
.tl-tags li {
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: rgba(200,182,255,0.24);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--violet-deep);
}

/* ---------------------------------------------------------------
   13. SERVICES
   --------------------------------------------------------------- */
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2vw, 1.6rem);
  margin-top: clamp(2rem, 6vw, 4rem);
  perspective: 1200px;
}
@media (min-width: 640px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.85rem;
  min-height: 240px;
  padding: clamp(1.4rem, 2.6vw, 2.1rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-line);
  background: linear-gradient(150deg, rgba(255,255,255,0.72) 0%, rgba(246,242,255,0.5) 55%, rgba(200,182,255,0.26) 100%);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.9);
  overflow: hidden;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: box-shadow 0.4s var(--ease-out), border-color 0.3s ease;
}
.service-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--holo);
  background-size: 250% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.service-card:hover { box-shadow: var(--shadow-lg), 0 0 46px rgba(184,156,255,0.34); }
.service-card:hover::before { opacity: 1; }

.service-icon {
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  margin-bottom: 0.4rem;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(255,255,255,0.9), rgba(200,182,255,0.42));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 14px 30px -18px rgba(108,74,182,0.9);
  transition: transform 0.5s var(--ease-elastic);
}
.service-icon svg {
  width: 28px; height: 28px;
  fill: none; stroke: var(--violet);
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}
.service-card:hover .service-icon { transform: rotate(-6deg) scale(1.06); }

.service-card h3 {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.service-card p {
  max-width: 32ch;
  color: var(--ink-soft);
  font-size: var(--step--1);
  line-height: 1.6;
}

/* ---------------------------------------------------------------
   14. TESTIMONIALS
   --------------------------------------------------------------- */
.testimonials { text-align: center; }
.testimonials .section-label { display: inline-flex; }

.carousel {
  position: relative;
  margin-top: clamp(2rem, 6vw, 4rem);
  perspective: 1400px;
  overflow-x: clip;
  overflow-y: visible;
}
.carousel-track {
  position: relative;
  height: clamp(300px, 40vw, 360px);
  transform-style: preserve-3d;
}
@media (max-width: 640px) {
  .carousel-track { height: 320px; }
}
@media (max-width: 480px) {
  .carousel-track { height: 360px; }
}

.quote-card {
  position: absolute;
  top: 50%; left: 50%;
  width: min(660px, 88vw);
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-line);
  background: linear-gradient(150deg, rgba(255,255,255,0.82) 0%, rgba(246,242,255,0.58) 60%, rgba(200,182,255,0.3) 100%);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.9);
  transform: translate(-50%, -50%) translate3d(var(--tx, 0), 0, var(--tz, 0)) rotateY(var(--ry, 0deg)) scale(var(--sc, 1));
  opacity: var(--op, 1);
  transition: transform 0.6s var(--ease-out), opacity 0.5s var(--ease-out);
  will-change: transform, opacity;
}
.quote-card[aria-hidden="true"] { pointer-events: none; }
.quote-card blockquote p {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--step-2);
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.quote-card footer {
  display: grid;
  gap: 0.2rem;
  margin-top: 1.6rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--edge-soft);
}
.quote-card cite {
  font-family: var(--font-display);
  font-style: normal;
  font-size: var(--step-0);
  font-weight: 500;
  color: var(--violet-deep);
}
.quote-card footer span {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: clamp(1.5rem, 3vw, 2.2rem);
}
.carousel-dots { display: flex; gap: 0.55rem; }
.carousel-dots button {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(108,74,182,0.2);
  transition: width 0.4s var(--ease-elastic), background 0.3s ease;
}
.carousel-dots button[aria-selected="true"] {
  width: 30px;
  border-radius: 999px;
  background: var(--violet);
  box-shadow: 0 0 16px rgba(184,156,255,0.9);
}

/* ---------------------------------------------------------------
   15. CONTACT
   --------------------------------------------------------------- */
.contact {
  position: relative;
  max-width: none;
  overflow: hidden;
  isolation: isolate;
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}
.contact-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
}
/* Phones skip the WebGL contact scene (script.js) — this static
   gradient stands in for it so the section isn't left flat. */
@media (max-width: 860px), (pointer: coarse) {
  .contact {
    background:
      radial-gradient(60% 55% at 78% 20%, rgba(200,182,255,0.5) 0%, rgba(200,182,255,0) 70%),
      radial-gradient(55% 50% at 15% 85%, rgba(184,156,255,0.4) 0%, rgba(184,156,255,0) 72%);
  }
}
.contact-inner {
  position: relative;
  max-width: 1440px;
  margin-inline: auto;
  text-align: center;
}
.contact .section-label { display: inline-flex; }
.contact .display { max-width: 100%; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  margin-top: clamp(2.4rem, 6vw, 4.5rem);
  text-align: left;
}

.contact-form {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.4rem, 3vw, 2.6rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-line);
  background: rgba(255,255,255,0.72);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.9);
}
.field { display: grid; gap: 0.45rem; }
.field label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.95rem 1.1rem;
  min-height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--edge-soft);
  background: rgba(255,255,255,0.7);
  color: var(--ink);
  font-size: var(--step-0);
  resize: vertical;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(74,66,102,0.45); }
.field input:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--lav-300);
  box-shadow: 0 0 0 4px rgba(200,182,255,0.28);
}
.field.has-error input,
.field.has-error textarea {
  border-color: #E0709A;
  box-shadow: 0 0 0 4px rgba(224,112,154,0.14);
}
.field-error {
  min-height: 1rem;
  font-size: 0.74rem;
  color: #C2456F;
}

.btn-send { justify-self: start; margin-top: 0.4rem; }
.form-status { min-height: 1.3rem; font-size: var(--step--1); color: var(--violet-deep); }
.form-status.is-success { color: #2F9A78; }

.contact-side { display: grid; align-content: start; gap: 1.3rem; }
.contact-note { max-width: 34ch; color: var(--ink-soft); }
.contact-mail {
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: var(--step-1);
  letter-spacing: -0.03em;
  color: var(--violet-deep);
  border-bottom: 1px solid var(--edge);
  padding-bottom: 0.35rem;
  justify-self: start;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.contact-mail:hover { color: var(--violet); border-color: var(--lav-400); }

.socials { display: grid; gap: 0.15rem; margin-top: 0.4rem; }
.socials a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 17rem;
  padding: 0.75rem 1.1rem;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  transition: background 0.3s var(--ease-out), color 0.3s ease, border-color 0.3s ease;
}
.socials a span { color: var(--lav-400); transition: transform 0.35s var(--ease-elastic); }
.socials a:hover {
  background: rgba(255,255,255,0.7);
  border-color: var(--edge-soft);
  color: var(--violet-deep);
}
.socials a:hover span { transform: translate(3px, -3px); }

.contact-availability {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------
   16. FOOTER
   --------------------------------------------------------------- */
.footer-logo {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  opacity: 0.92;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1440px;
  margin-inline: auto;
  padding: 2rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--edge-soft);
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.2rem;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--edge-soft);
  background: rgba(255,255,255,0.55);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet-deep);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.to-top svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.35s var(--ease-elastic);
}
.to-top:hover { background: #fff; box-shadow: var(--shadow-sm); }
.to-top:hover svg { transform: translateY(-3px); }

/* ---------------------------------------------------------------
   17. MOTION PRIMITIVES
   --------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s var(--ease-out) var(--delay, 0s),
    transform 0.8s var(--ease-out) var(--delay, 0s);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

.line { display: block; overflow: hidden; }
.word {
  display: inline-block;
  transform: translateY(105%) rotate(4deg);
  opacity: 0;
  transition:
    transform 0.85s var(--ease-out) var(--wd, 0s),
    opacity 0.6s ease var(--wd, 0s);
}
[data-split].is-visible .word { transform: none; opacity: 1; }

/* ===============================================================
   18. RESPONSIVE
   =============================================================== */

@media (max-width: 1180px) {
  .availability { display: none; }
}

@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-stage { order: -1; min-height: min(420px, 78vw); }
  .about-copy { font-size: var(--step-0); }

  .contact-grid { grid-template-columns: 1fr; }
  .contact-side { max-width: 34rem; }

  .project-card { grid-template-columns: 1fr; }
  .project-media img { min-height: clamp(200px, 44vw, 320px); }
  .work-nav { position: static; margin-top: 1.4rem; }
}

/* ===============================================================
   MOBILE — island header stays, same design language as desktop
   =============================================================== */
@media (max-width: 860px) {

  /* --- Island shell: same pill, just narrower + shorter --- */
  .nav-shell {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 2 * var(--gutter));
    height: 54px;
    padding: 0 0.45rem;
    border-radius: 999px;
    display: flex;
    overflow: hidden;
    z-index: 10000;
  }

  /* Collapsed = a clean round tap target, not a squashed oval. */
  .nav-shell.is-collapsed {
    height: 52px;
    width: 52px;
    padding: 0;
  }

  /* Island visuals — glass + sheen stay; the collapsed pill shows the
     logo (the whole pill is the tap target to expand it again). */
  .island-glass,
  .island-sheen { display: block; }
  .island-mark {
    width: 36px;
    height: 36px;
  }

  /* Row: hamburger on the left, brand name true-centered in the pill
     (a same-width spacer balances the hamburger's column). */
  .island-row {
    display: grid;
    grid-template-columns: 38px 1fr 38px;
    align-items: center;
    width: 100%;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.35s ease 0.18s;
  }
  /* Collapsed: hide the row, only the M.C island mark shows — same
     behaviour as desktop, tap the pill to bring the row back. */
  .nav-shell.is-collapsed .island-row {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
  }
  .nav-shell.is-collapsed { cursor: pointer; }

  /* Hamburger — circular, compact, sits inside the island */
  .menu-toggle {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(108, 74, 182, 0.08);
    box-shadow: none;
    flex-shrink: 0;
  }
  .menu-toggle:hover,
  .menu-toggle:active {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(108, 74, 182, 0.18);
    box-shadow: 0 4px 14px -8px rgba(70, 47, 128, 0.25);
  }
  .menu-toggle-line {
    width: 15px;
    height: 1.8px;
  }
  .menu-toggle-line:nth-child(1) { transform: translate(-50%, calc(-50% - 3.5px)); }
  .menu-toggle-line:nth-child(2) { transform: translate(-50%, calc(-50% + 3.5px)); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
  }
  .menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(2) {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  /* Hide desktop nav links + availability inside the island */
  .nav { display: none; }
  .availability { display: none; }

  /* Brand: no square mark on mobile — just the name, centered in the
     pill between the hamburger and the edge, styled to read as tappable. */
  .brand {
    grid-column: 2;
    justify-self: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    transition: background 0.25s var(--ease-glass), transform 0.2s var(--ease-glass);
  }
  .brand:active { transform: scale(0.96); background: rgba(255,255,255,0.35); }
  .brand-mark { display: grid; width: 32px; height: 32px; }
  .brand-text {
    font-size: 0.94rem;
    position: relative;
  }
  .brand-text::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -3px;
    height: 1px;
    background: currentColor;
    color: var(--violet);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s var(--ease-glass);
  }
  .brand:active .brand-text::after { transform: scaleX(1); }

  /* Mobile menu overlay appears behind the island */
  .mobile-menu { display: block; z-index: 9999; }

  /* When the menu is open, let the menu gradient show through the glass.
     The island keeps its glass + sheen + toggle so it still reads as an island. */
  body.menu-open .nav-shell {
    background: rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow:
      0 20px 60px -26px rgba(70, 47, 128, 0.3),
      0 6px 20px -8px rgba(70, 47, 128, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.95);
  }

  /* ---------- Page-level responsive tweaks ---------- */
  .hero { padding: calc(var(--nav-h) + 5vh) var(--gutter) 7rem; }
  .hero-copy { gap: 1.2rem; max-width: 100%; }
  .hero-meta { display: none; }
  .scroll-cue {
    left: 50%; right: auto;
    transform: translateX(-50%);
    bottom: 1.75rem;
  }
  .scroll-cue-text { writing-mode: horizontal-tb; letter-spacing: 0.22em; }
  .scroll-cue-rail { height: 40px; }
  .eyebrow { font-size: 0.68rem; padding: 0.4rem 0.9rem; }
  .hero-role { font-size: var(--step--1); gap: 0.55rem; }

  .project { width: 76vw; }
  .gallery-track { padding-inline: 12vw; }
  .project-card {
    transform:
      perspective(800px)
      rotateY(calc(var(--p) * -20deg))
      translateZ(calc(var(--p) * var(--p) * -70px))
      scale(calc(1 - (var(--p) * var(--p)) * 0.07));
    opacity: calc(1 - (var(--p) * var(--p)) * 0.45);
  }

  .constellation { height: auto; min-height: 0; perspective: none; }
  .constellation-lines { display: none; }
  .skill-list {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 0.7rem;
    text-align: center;
  }
  .skill-list li { position: static; inset: auto; pointer-events: auto; }
  .skill {
    position: static;
    width: 100%;
    max-width: 100%;
    transform: none;
    animation: none;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    box-sizing: border-box;
  }
  .skill-note {
    -webkit-line-clamp: 4;
    width: auto;
    max-width: 100%;
    max-height: 6em;
    opacity: 1;
  }
  .skill-name { white-space: normal; }

  .float-word-1 { top: 2%; }
  .float-word-3 { display: none; }

  .tl-node { top: 2rem; }

  /* Mobile: kill expensive blobs & grain */
  .blob { display: none; }
  .grain { opacity: 0.14; }
}

@media (max-width: 640px) {
  .display { line-height: 0.98; }
  .display-sm { line-height: 1.05; }

  .section { padding: clamp(3rem, 8vh, 5rem) var(--gutter); }

  .hero { padding: calc(var(--nav-h) + 4vh) var(--gutter) 6rem; }
  .eyebrow { white-space: normal; text-align: center; line-height: 1.5; }
  .hero-role { white-space: normal; }
  .hero-actions { width: 100%; gap: 0.6rem; }
  .hero-actions .btn { flex: 1 1 100%; }

  .about-stats { gap: 1.2rem 1.8rem; margin-top: 2rem; padding-top: 1.6rem; }
  .about-stats dd { font-size: var(--step-1); }
  .about-stage { min-height: 360px; }
  .profile-card { width: min(280px, 76vw); }
  .float-word { font-size: 0.85rem; padding: 0.3rem 0.7rem; }
  .float-word-2 { bottom: 8%; }

  .gallery { padding: 2rem 0 3rem; }
  .gallery-track { gap: 0.8rem; padding-inline: 10vw; }
  .project { width: 80vw; }
  .project-card { padding: 0.85rem; border-radius: var(--radius-lg); }
  .project-card.is-near::before {
    backdrop-filter: blur(11px) saturate(140%);
    -webkit-backdrop-filter: blur(11px) saturate(140%);
  }
  .project-title { font-size: var(--step-1); }
  .project-media { border-radius: var(--radius); }
  .project-body { padding: 0.85rem 0.5rem 0.5rem; }

  .timeline { padding-left: 1.5rem; }
  .timeline-line { left: 0.4rem; }
  .tl-node { left: -1.1rem; }
  .tl-card { padding: 1.1rem; border-radius: var(--radius); }

  .service-card { min-height: 200px; padding: 1.35rem; }
  .service-icon { width: 52px; height: 52px; border-radius: 16px; }
  .service-icon svg { width: 24px; height: 24px; }

  .quote-card { padding: 1.4rem; border-radius: var(--radius); }
  .quote-card blockquote p { font-size: var(--step-1); line-height: 1.4; }
  .quote-card footer { margin-top: 1.2rem; padding-top: 1rem; }

  .contact-form { padding: 1.25rem; border-radius: var(--radius); }
  .contact-mail { font-size: var(--step-0); }
  .socials a { max-width: 100%; }

  .footer {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    padding: 1.75rem var(--gutter) 2.25rem;
  }

  .mobile-menu { padding: calc(var(--nav-h) + 1rem) var(--gutter) 2rem; }
  .mobile-menu-inner { gap: 1.1rem; }
  .mobile-menu-link { padding: 0.95rem 1.05rem; min-height: 58px; }
  .mm-arrow { width: 34px; height: 34px; }

  .profile-meta { padding: 1rem 1.15rem 1.25rem; padding-right: 4rem; }
}

@media (max-width: 480px) {
  :root { --gutter: 1rem; }

  /* Keep brand text visible inside the island — slightly smaller */
  .brand-text { font-size: 0.85rem; }
  .brand-mark { width: 28px; height: 28px; border-radius: 9px; font-size: 0.64rem; }
  .menu-toggle { width: 36px; height: 36px; }

  .btn { padding: 0.85rem 1.3rem; font-size: 0.72rem; letter-spacing: 0.05em; }
  .btn svg { width: 14px; height: 14px; }

  .round-btn { width: 46px; height: 46px; }
  .round-btn svg { width: 17px; height: 17px; }

  .section-label { font-size: 0.68rem; letter-spacing: 0.18em; }

  .about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1rem; }
  .about-stats dt { font-size: 0.62rem; letter-spacing: 0.14em; }

  .profile-card { width: min(250px, 82vw); }
  .profile-flip-hint { right: 1.2rem; bottom: 1.3rem; font-size: 0.58rem; }
  .profile-meta { padding: 0.95rem 1rem 1.15rem; padding-right: 3.4rem; }
  .profile-corner { top: 0.75rem; right: 0.75rem; padding: 0.22rem 0.6rem; font-size: 0.6rem; }

  .project { width: 86vw; }
  .gallery-track { padding-inline: 7vw; }
  .project-cat { font-size: 0.64rem; letter-spacing: 0.18em; }
  .tech-list li { font-size: 0.64rem; padding: 0.28rem 0.65rem; }

  .skill-list { grid-template-columns: 1fr; }
  .skill { padding: 0.9rem 1.1rem; }

  .service-grid { gap: 0.85rem; }
  .service-card { min-height: 0; }

  .quote-card { width: 92vw; }
  .quote-card blockquote p { font-size: var(--step-0); }

  .socials a { padding: 0.7rem 1rem; font-size: var(--step--1); }

  .mobile-menu-link {
    font-size: 1.05rem;
    padding: 0.9rem 1rem;
    min-height: 56px;
    gap: 0.85rem;
  }
  .mm-arrow { width: 32px; height: 32px; }
  .mm-arrow svg { width: 13px; height: 13px; }
}

@media (max-width: 380px) {
  .display { letter-spacing: -0.05em; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .about-stats { grid-template-columns: 1fr; gap: 1rem; }
  .tech-list { display: none; }

  .mobile-menu-link { font-size: 0.98rem; padding: 0.85rem 0.9rem; min-height: 52px; }
}

@media (hover: none) {
  .cursor { display: none; }
  .project-card:hover .project-gloss { opacity: 0; }
  .project-card:hover .project-media img { transform: scale(1.02); }
}

/* ---------------------------------------------------------------
   19. REDUCED MOTION / PRINT
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .blob, .grain, .island-sheen { animation: none !important; }
  .grain { opacity: 0.12; }
  .cursor { display: none; }
  .scroll-cue-rail i { display: none; }
  [data-reveal], .word { opacity: 1 !important; transform: none !important; }
  .profile-card, .skill, .float-word, .about-ring { animation: none !important; }
  .cursor-core, .cursor-core-ring { animation: none !important; }
  .project-card { transform: none !important; opacity: 1 !important; }
  .quote-card { transition: none; }
  .nav-shell { transition: none; }
  .mobile-menu-link,
  .mobile-menu-eyebrow,
  .mobile-menu-foot { opacity: 1 !important; transform: none !important; }
}

@media print {
  .environment, .cursor, .scroll-progress, .curtain, .nav-shell,
  .mobile-menu, .hero-canvas, .contact-canvas, .scroll-cue, .work-nav, .to-top {
    display: none !important;
  }
  body { background: #fff; }
  .project-card, .quote-card { transform: none !important; opacity: 1 !important; box-shadow: none; }
  .gallery { overflow: visible; }
  .gallery-track { flex-wrap: wrap; width: auto; }
}

/* ============ VIDEOS (one horizontal auto-moving row) ============ */
.videos {
  max-width: none;
  padding-inline: 0;
  background: transparent;
  color: var(--ink);
}
.videos-inner {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.videos-pill {
  display: inline-block;
  padding: 0.45rem 1rem;
  border: 1px solid var(--edge);
  background: rgba(255,255,255,0.55);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.videos .display { color: var(--ink); }
.videos-lead {
  max-width: 56ch;
  color: var(--ink-soft);
  line-height: 1.5;
}
.videos-strip {
  overflow: hidden;
  margin-top: 2rem;
  padding-inline: var(--gutter);
}
.videos-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  transition: transform 0.6s ease;
}
.video-card {
  position: relative;
  flex: 0 0 clamp(220px, 24vw, 280px);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(255,255,255,0.88) 0%, rgba(246,242,255,0.82) 60%, rgba(214,201,255,0.76) 100%);
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow: var(--shadow-md);
}
.video-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--violet-deep);
  box-shadow: var(--shadow-md);
  font-size: 1.4rem;
  cursor: pointer;
}
.videos-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
.videos-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--edge);
  background: rgba(255,255,255,0.7);
  color: var(--violet-deep);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

/* ============ VIDEO EDITING & MOTION GRAPHICS ============ */
.editing-lead {
  max-width: 60ch;
  margin-top: 1rem;
  font-size: var(--step-0);
  color: var(--ink-soft);
  line-height: 1.6;
}
.editing-group {
  display: grid;
  gap: 1.1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.editing-panel {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
  align-items: center;
  padding: 1.1rem 1.3rem;
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(255,255,255,0.8) 0%, rgba(244,240,255,0.66) 60%, rgba(214,201,255,0.45) 100%);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
}
.editing-badge { grid-row: span 2; }
.editing-panel h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--ink);
}
.editing-panel p {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
  line-height: 1.5;
}
.editing-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 1024px) {
  .editing-panel { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.1fr); column-gap: 1.4rem; }
  .editing-badge { grid-row: span 2; }
  .editing-chips { grid-column: 3; grid-row: 1 / span 2; margin: 0; justify-content: flex-end; }
}
.editing-chips li {
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(255,255,255,0.7);
  font-size: 0.74rem;
  color: var(--violet-deep);
  white-space: nowrap;
}
.editing-badge {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.editing-badge svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.editing-badge-cut { background: linear-gradient(135deg, #6C4AB6, #B89CFF); }
.editing-badge-motion { background: linear-gradient(135deg, #8A6AD0, #E58BD6); }
.editing-badge-ai { background: linear-gradient(135deg, #5B7BEA, #B89CFF); }
.editing-badge-film { background: linear-gradient(135deg, #462F80, #C66BD6); }

.reel-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.reel-card { min-width: 0; }
.reel-media {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(255,255,255,0.88) 0%, rgba(246,242,255,0.82) 60%, rgba(214,201,255,0.76) 100%);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.reel-card:hover .reel-media { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.reel-thumb, .reel-media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.reel-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--violet-deep);
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}
.reel-play:hover, .reel-play:focus-visible { transform: translate(-50%, -50%) scale(1.08); background: #fff; }
.reel-title {
  margin-top: 0.55rem;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reel-tag {
  margin-top: 0.1rem;
  font-size: 0.72rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 959px) {
  .reel-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, 40%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    padding-bottom: 0.5rem;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
  }
  .reel-card { scroll-snap-align: start; }
}

/* Cutline product link in the header */
.nav-link.nav-cutline {
  background: linear-gradient(115deg, #6C4AB6 0%, #B89CFF 45%, #8A6AD0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600;
}
.nav-link.nav-cutline::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; vertical-align: 2px;
  border-radius: 50%; background: #B89CFF; box-shadow: 0 0 0 3px rgba(184,156,255,.25);
}
