/* ==========================================================================
   Hozefa — homepage
   Light theme · liquid-glass nav · person-first hero · work sheet with a pinned,
   scroll-driven showcase (Google's agent flow first)
   ========================================================================== */

:root {
  --bg: #F6F5F1;
  --bg-2: #ECEAE4;
  --sheet: #FFFFFF;
  --ink: #0F0F0D;
  --ink-2: #5A5952;
  --ink-3: #A9A69E;
  --line: rgba(15, 15, 13, 0.1);

  --accent: #0B57D0;           /* switches with the active project */
  --tint: #D3E3FD;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Work Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(20px, 4.4vw, 64px);
  --nav-top: clamp(12px, 2.2vh, 20px);
  --nav-h: 52px;
  --peek: clamp(56px, 8.5vh, 84px);  /* how much of the work sheet shows under the hero */
  --seg: 85svh;                      /* scroll distance per showcase unit */

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed;
  left: 16px; top: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font: 500 14px/1 var(--font-display);
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus { transform: none; }

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

/* ==========================================================================
   Dot intro loader
   ========================================================================== */
.loader { display: none; }

.show-loader { overflow: hidden; }
.show-loader .loader {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
}

.loader__field { position: absolute; left: 50%; top: 50%; }

.loader__dot {
  position: absolute;
  left: 0; top: 0;
  width: var(--d, 12px);
  height: var(--d, 12px);
  margin: calc(var(--d, 12px) / -2) 0 0 calc(var(--d, 12px) / -2);
  border-radius: 50%;
  background: var(--ink);
  will-change: transform;
}

/* ==========================================================================
   Floating liquid-glass navigation
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  position: absolute;
  top: calc(var(--nav-top) + env(safe-area-inset-top, 0px));
  left: 50%;
  translate: -50% 0;
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 6px;
  border-radius: 999px;
  isolation: isolate;
  font: 500 14px/1 var(--font-display);
  letter-spacing: -0.005em;
}

/* Glass: refraction (backdrop) → tint → specular rim */
.glass {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  overflow: hidden;
  box-shadow:
    0 0 0 0.5px rgba(15, 15, 13, 0.1),
    0 18px 40px -18px rgba(30, 26, 12, 0.38),
    0 4px 12px -6px rgba(30, 26, 12, 0.16);
  transform: translateZ(0);
}

.glass__refraction,
.glass__tint,
.glass__shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.glass__refraction {
  -webkit-backdrop-filter: blur(10px) saturate(190%) brightness(1.05);
  backdrop-filter: blur(10px) saturate(190%) brightness(1.05);
}

/* Chromium: true refraction through an SVG displacement map generated for the nav's exact shape.
   A clear body with a strong lens at the rim — what's behind visibly bends as it passes under. */
.has-refraction .glass__refraction {
  backdrop-filter: url(#liquid-glass) blur(2.2px) saturate(190%) brightness(1.06);
}
.has-refraction .nav.is-open .glass__refraction {
  backdrop-filter: blur(16px) saturate(185%);
}

.glass__tint {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.14) 55%, rgba(255, 255, 255, 0.26) 100%);
}
.nav.is-open .glass__tint { background: rgba(255, 255, 255, 0.6); }

.glass__shine {
  background:
    radial-gradient(220px 70px at var(--mx, 22%) var(--my, -10%), rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 42%);
  box-shadow:
    inset 0 1.5px 0.5px rgba(255, 255, 255, 1),
    inset 0 -1.5px 1px rgba(255, 255, 255, 0.75),
    inset 1.5px 0 1px rgba(255, 255, 255, 0.5),
    inset -1.5px 0 1px rgba(255, 255, 255, 0.5),
    inset 0 0 0 0.5px rgba(15, 15, 13, 0.08),
    inset 0 -8px 16px -10px rgba(15, 15, 13, 0.14),
    inset 0 10px 18px -12px rgba(255, 255, 255, 0.9);
}

/* labels stay crisp on clear glass */
.nav__link,
.nav__brand { text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 2px rgba(255, 255, 255, 0.8); }

.glass__shine::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(125deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.15) 32%,
    rgba(255, 255, 255, 0) 50%,
    rgba(255, 255, 255, 0.2) 70%,
    rgba(255, 255, 255, 0.85) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.nav__brand,
.nav__toggle { display: none; }

.nav__drawer { display: contents; }

.nav__menu {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  white-space: nowrap;
  color: var(--ink);
}
.nav__link:focus-visible { outline-offset: -2px; }

.nav__sep {
  width: 1px;
  height: 16px;
  margin: 0 5px;
  background: rgba(15, 15, 13, 0.14);
}

/* The droplet that glides to the hovered item */
.nav__lens {
  position: absolute;
  z-index: 0;
  left: 0;
  top: 6px;
  width: 64px;
  height: calc(100% - 12px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.28));
  -webkit-backdrop-filter: blur(4px) saturate(160%);
  backdrop-filter: blur(4px) saturate(160%);
  box-shadow:
    0 1px 2px rgba(15, 15, 13, 0.08),
    0 8px 18px -8px rgba(15, 15, 13, 0.26),
    inset 0 1px 0.5px rgba(255, 255, 255, 1),
    inset 0 -1px 1px rgba(255, 255, 255, 0.6),
    inset 0 0 0 0.5px rgba(15, 15, 13, 0.06);
  pointer-events: none;
  opacity: 0;
  transform-origin: 50% 50%;
}
.js .nav__lens { opacity: 1; }

/* ==========================================================================
   Hero — the person, first
   ========================================================================== */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
}
.motion .hero {
  position: sticky;
  top: 0;
  z-index: 0;
  overflow: clip;
}

.hero__stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(var(--nav-top) + var(--nav-h) + 20px) var(--gutter) calc(var(--peek) + 72px);
  transform-origin: 50% 30%;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: clamp(18px, 3vh, 30px);
  max-width: 1120px;
  text-align: center;
  margin-top: -3vh;
}

.hero__title {
  display: grid;
  justify-items: center;
  gap: clamp(16px, 2.8vh, 28px);
  font-weight: inherit;
}

.hero__hello {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font: 500 clamp(17px, 1.45vw, 21px)/1 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--ink-2);
}
.hero__name { color: var(--ink); }

.hero__statement {
  display: block;
  max-width: 17ch;
  font: 400 clamp(42px, min(7.3vw, 12.5vh), 112px)/0.95 var(--font-serif);
  letter-spacing: -0.022em;
  color: var(--ink);
  text-wrap: balance;
}
.hero__statement em {
  font-style: italic;
  color: var(--accent);
  transition: color 0.9s var(--ease-out);
}
.hero__statement .line { padding-bottom: 0.08em; margin-bottom: -0.08em; }

.hero__sub {
  font: 400 clamp(15px, 1.2vw, 18px)/1.5 var(--font-body);
  color: var(--ink-2);
}
.hero__sub b { font-weight: 500; color: var(--ink); }

/* label printed on the sheet's lip — visible in the peek, scrolls away with it */
.work__cue {
  position: absolute;
  top: calc(var(--peek) / 2);
  left: 50%;
  z-index: 3;
  translate: -50% -50%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-2);
}
.work__cue-years { color: var(--ink-3); }

/* ---------- Hozefa, illustrated: the first fold's pointer ---------- */
.me {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: clamp(66px, 5.8vw, 96px);
  pointer-events: none;
  will-change: transform;
}
.motion .me { visibility: hidden; }
.me__img {
  width: 100%;
  height: auto;
  transform-origin: 50% 12%;
  filter: drop-shadow(0 16px 18px rgba(30, 26, 12, 0.22));
}
.has-me .hero { cursor: none; }
.has-me .hero .pill { cursor: none; }
:root:not(.motion) .me { position: static; order: -1; margin-bottom: -12px; }

/* ---------- Physical pills ---------- */
.pills {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.pill {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 18px 0 20px;
  border-radius: 999px;
  background: var(--c);
  color: var(--ink);
  font: 500 14px/1 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow:
    inset 0 0 0 1px rgba(15, 15, 13, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 12px 26px -16px rgba(30, 26, 12, 0.5);
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  visibility: hidden;
  will-change: transform;
}
.pill:active { cursor: grabbing; }
.pill svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pill--chip {
  width: 48px;
  padding: 0;
  justify-content: center;
}
.pill--chip svg { width: 18px; height: 18px; }
.pills.is-live .pill { visibility: visible; }
.hero.is-dragging { user-select: none; -webkit-user-select: none; }

/* physics unavailable: a calm row above the work sheet instead */
.pills.is-static {
  inset: auto auto calc(var(--peek) + 24px) 50%;
  translate: -50% 0;
  width: min(880px, 92vw);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.pills.is-static .pill { position: static; visibility: visible; cursor: default; }

/* ==========================================================================
   The work sheet
   ========================================================================== */
.work {
  position: relative;
  z-index: 1;
  background: var(--sheet);
  border-radius: 36px 36px 0 0;
  box-shadow:
    0 -1px 0 rgba(15, 15, 13, 0.05),
    0 -36px 70px -46px rgba(30, 26, 12, 0.42);
}
.motion .work { margin-top: calc(var(--peek) * -1); }

/* ---------- Static layout (no JS, reduced motion, or libraries unavailable) ---------- */
:root:not(.motion) .hero { height: auto; min-height: 100svh; }
:root:not(.motion) .hero__stage {
  position: relative;
  inset: auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding-bottom: 72px;
}
:root:not(.motion) .hero__inner { margin-top: 0; }
:root:not(.motion) .pills {
  position: static;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 820px;
}
:root:not(.motion) .pill { position: static; visibility: visible; cursor: default; }

:root:not(.motion) .work__pin {
  padding: clamp(48px, 9vh, 96px) var(--gutter) clamp(56px, 10vh, 120px);
}

:root:not(.motion) .work__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 28px;
  max-width: 1320px;
  margin: 0 auto;
}

:root:not(.motion) .details,
:root:not(.motion) .stage { display: contents; }

:root:not(.motion) .index,
:root:not(.motion) .stage__glows,
:root:not(.motion) .stage__link,
:root:not(.motion) .stage__hint { display: none; }

:root:not(.motion) .project:nth-of-type(1) { order: 1; }
:root:not(.motion) .comp:nth-of-type(1)    { order: 2; }
:root:not(.motion) .project:nth-of-type(2) { order: 3; }
:root:not(.motion) .comp:nth-of-type(2)    { order: 4; }
:root:not(.motion) .project:nth-of-type(3) { order: 5; }
:root:not(.motion) .comp:nth-of-type(3)    { order: 6; }
:root:not(.motion) .project:nth-of-type(4) { order: 7; }
:root:not(.motion) .comp:nth-of-type(4)    { order: 8; }
:root:not(.motion) .project:nth-of-type(5) { order: 9; }
:root:not(.motion) .comp:nth-of-type(5)    { order: 10; }
:root:not(.motion) .project:nth-of-type(6) { order: 11; }
:root:not(.motion) .comp:nth-of-type(6)    { order: 12; }

:root:not(.motion) .comp {
  position: relative;
  width: min(100%, calc(58vh * var(--w) / var(--h)));
  aspect-ratio: var(--w) / var(--h);
  justify-self: center;
  margin-bottom: 48px;
}

@media (min-width: 900px) {
  :root:not(.motion) .work__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    column-gap: 6vw;
    row-gap: clamp(80px, 13vh, 150px);
    align-items: center;
  }
  :root:not(.motion) .project { grid-column: 1; }
  :root:not(.motion) .comp { grid-column: 2; margin: 0; }
  :root:not(.motion) .project:nth-of-type(1), :root:not(.motion) .comp:nth-of-type(1) { grid-row: 1; }
  :root:not(.motion) .project:nth-of-type(2), :root:not(.motion) .comp:nth-of-type(2) { grid-row: 2; }
  :root:not(.motion) .project:nth-of-type(3), :root:not(.motion) .comp:nth-of-type(3) { grid-row: 3; }
  :root:not(.motion) .project:nth-of-type(4), :root:not(.motion) .comp:nth-of-type(4) { grid-row: 4; }
  :root:not(.motion) .project:nth-of-type(5), :root:not(.motion) .comp:nth-of-type(5) { grid-row: 5; }
  :root:not(.motion) .project:nth-of-type(6), :root:not(.motion) .comp:nth-of-type(6) { grid-row: 6; }
}

/* ---------- Pinned showcase (motion) ---------- */
.motion .work { height: calc(100svh + var(--steps) * var(--seg)); }

.motion .work__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: clip;
}

.motion .work__grid {
  height: 100%;
  max-width: 1680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas:
    "detail stage"
    "index  stage";
  column-gap: clamp(28px, 5vw, 96px);
  padding:
    calc(var(--nav-top) + var(--nav-h) + clamp(22px, 5vh, 56px))
    var(--gutter)
    clamp(20px, 4.4vh, 44px);
}

.motion .details {
  grid-area: detail;
  display: grid;
  align-items: center;
  min-height: 0;
  padding: clamp(16px, 3vh, 32px) 0;
}
.motion .project { grid-area: 1 / 1; }

.motion .index { grid-area: index; }

.motion .stage {
  grid-area: stage;
  position: relative;
  min-height: 0;
  container-type: size;
  --fit: 0.94;
}

/* Each composition is scaled as one unit (devices keep their exact designed placement) to fill the stage */
.motion .comp {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  --uc: min(calc(var(--fit) * 100cqh / var(--h)), calc(var(--fit) * 100cqw / var(--w)));
  width: calc(var(--w) * var(--uc));
  height: calc(var(--h) * var(--uc));
}

/* Before the script takes over, show only the first project (no flash of stacked content) */
.motion .work:not(.is-ready) .project:not(:first-child),
.motion .work:not(.is-ready) .comp:not(:first-of-type) { visibility: hidden; }
.motion .glow:not(:first-child) { opacity: 0; }

/* Pre-hide what the entrance choreography reveals */
.motion:not(.is-intro) .nav,
.motion:not(.is-intro) .hero__stage,
.motion:not(.is-intro) .work { opacity: 0; }

/* ---------- Avatar (hat breaks out of the disc) ---------- */
.avatar {
  --size: clamp(60px, 5.2vw, 78px);
  --r: calc(var(--size) / 2);
  position: relative;
  flex: none;
  width: var(--size);
  height: var(--size);
  margin-top: calc(var(--size) * 0.3);
}
.avatar--hero { --size: clamp(50px, 4.4vw, 64px); }

.avatar__disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--tint);
  transition: background-color 0.9s var(--ease-out);
}

.avatar__img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: auto;
  height: 130%;
  max-width: none;
  translate: -50% 0;
  transform-origin: 50% 100%;
  -webkit-mask:
    radial-gradient(circle at 50% calc(100% - var(--r)), #000 calc(var(--r) - 0.5px), transparent var(--r)),
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--r)) no-repeat;
  mask:
    radial-gradient(circle at 50% calc(100% - var(--r)), #000 calc(var(--r) - 0.5px), transparent var(--r)),
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--r)) no-repeat;
  transition: rotate 0.6s var(--ease-out);
}
.avatar:hover .avatar__img { rotate: -8deg; }

/* ---------- Project text ---------- */
.project {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 660px;
}

.project__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 12px/1.2 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.project__label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transition: background-color 0.9s var(--ease-out);
}
.project--star .project__label::before { display: none; }

.live {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1E8E3E;
  animation: live 1.8s infinite;
}
@keyframes live {
  0% { box-shadow: 0 0 0 0 rgba(30, 142, 62, 0.45); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(30, 142, 62, 0); }
}

.project__title {
  margin-top: clamp(12px, 2vh, 20px);
  font: 500 clamp(30px, min(3.5vw, 6.2vh), 60px)/1.02 var(--font-display);
  letter-spacing: -0.032em;
  text-wrap: balance;
}
.project__title em {
  font: italic 400 1.12em/0.9 var(--font-serif);
  letter-spacing: -0.01em;
  color: var(--accent);
}
.project__title .line { padding-bottom: 0.06em; margin-bottom: -0.06em; } /* keep descenders inside the mask */

.project__line {
  margin-top: clamp(12px, 2vh, 18px);
  max-width: 42ch;
  font-size: clamp(15px, 1.1vw, 17px);
  color: var(--ink-2);
}

/* ---------- Pill button ---------- */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  margin-top: clamp(18px, 3.4vh, 30px);
  padding: 0 18px 0 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  font: 500 15px/1 var(--font-display);
  letter-spacing: -0.005em;
  color: var(--ink);
  transition: color 0.45s var(--ease-out), border-color 0.45s var(--ease-out);
}
.btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: var(--accent);
  transform: translateY(102%);
  transition: transform 0.55s var(--ease-out), background-color 0.9s var(--ease-out);
}
.btn__arrow { width: 16px; height: 16px; transition: transform 0.55s var(--ease-out); }
.btn:hover { color: #fff; border-color: var(--accent); }
.btn:hover::before { transform: none; }
.btn:hover .btn__arrow { transform: translate(2px, -2px); }

/* ---------- Project index ---------- */
.index {
  width: 100%;
  max-width: 660px;
  border-top: 1px solid var(--line);
}

.index__item {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  height: clamp(30px, 4.2vh, 40px);
  border-bottom: 1px solid var(--line);
  font: 500 14px/1 var(--font-display);
  color: var(--ink-3);
  transition: color 0.45s var(--ease-out);
}
.index__item:hover,
.index__item.is-active { color: var(--ink); }
.index__item:focus-visible { outline-offset: 2px; }

.index__num,
.index__year { font-size: 12px; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; }

.index__name { display: flex; align-items: center; gap: 10px; }
.index__name::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.5s var(--ease-out), background-color 0.9s var(--ease-out);
}
.index__item.is-active .index__name::after { transform: scale(1); }

.index__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  background: var(--ink);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

/* ---------- Stage, compositions, devices ---------- */
.stage__glows {
  position: absolute;
  inset: -12% -10%;
  pointer-events: none;
}

.glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(closest-side, var(--glow) 0%, color-mix(in srgb, var(--glow) 45%, transparent) 50%, transparent 100%);
}

.comp { margin: 0; }

.device {
  position: absolute;
  left: var(--l);
  top: var(--t);
  width: var(--dw);
  height: var(--dh);
}

.device__inner { width: 100%; height: 100%; }

.device img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}

.motion .comp:not(.comp--sobi) .device img,
.motion .device .sheet {
  animation: float 7s var(--ease-in-out) infinite;
  animation-delay: calc(var(--k, 0) * -1.6s);
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

/* HDFC: the design-system sheet, with paper behind it */
.sheet {
  display: block;
  width: 100%;
  height: 100%;
  rotate: var(--tilt, 0deg);
  border-radius: 12px;
  background: #FBFBF9;
  box-shadow: 0 0 0 1px rgba(15, 15, 13, 0.06), 0 26px 50px -30px rgba(15, 15, 13, 0.4);
}
.comp--doc .device:not(.device--sheet) img {
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(15, 15, 13, 0.06), 0 34px 64px -34px rgba(15, 15, 13, 0.5);
}

.stage__link {
  position: absolute;
  inset: 0;
  z-index: 5;
}
.has-cursor .stage__link { cursor: none; }

.stage__hint {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 11px/1 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  pointer-events: none;
}
.stage__hint-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  animation: hint 1.8s var(--ease-in-out) infinite;
}
@keyframes hint {
  0% { translate: 0 -5px; opacity: 0; }
  35% { opacity: 1; }
  100% { translate: 0 7px; opacity: 0; }
}

/* ==========================================================================
   Google · Sobi — "Two agents. One goal. Done." (scoped product styles)
   Designed at 700×660 (wide) or 360×480 (compact) and scaled to the stage as one unit.
   ========================================================================== */
.sobi {
  --ground: #F0F3FA;
  --surface: #FFFFFF;
  --s-ink: #1B1B1F;
  --s-ink-2: #44474E;
  --s-ink-3: #5E636E;
  --s-line: #DCE2EE;
  --blue: #0B57D0;
  --blue-2: #0842A0;
  --blue-soft: #D3E3FD;
  --sky: #C2E7FF;
  --ok: #1E8E3E;
  --busy: #E37400;
  --wait: #0B57D0;
  --card-shadow: 0 1px 2px rgba(60, 64, 67, 0.08), 0 22px 44px -26px rgba(30, 45, 90, 0.35);
  --f-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --f-body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease-s: cubic-bezier(0.2, 0.7, 0.1, 1);

  position: absolute;
  left: 0;
  top: 0;
  width: 700px;
  height: 690px;
  transform: scale(var(--sobi-s, 1));
  transform-origin: 0 0;
  border-radius: 34px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(90% 60% at 50% 0%, #FFFFFF 0%, rgba(255, 255, 255, 0) 72%),
    linear-gradient(180deg, #F5F7FC 0%, var(--ground) 100%);
  box-shadow: inset 0 0 0 1px rgba(11, 87, 208, 0.07), 0 50px 90px -60px rgba(11, 40, 120, 0.55);
  font: 400 14px/1.4 var(--f-body);
  color: var(--s-ink);
  text-align: left;
}
.sobi p, .sobi ul, .sobi ol { margin: 0; padding: 0; list-style: none; }

.sobi .how-arc { position: absolute; left: 0; top: 0; z-index: 0; overflow: visible; pointer-events: none; }
.sobi .how-arc path { fill: none; stroke: var(--blue); stroke-width: 1.5; stroke-dasharray: 3 7; stroke-linecap: round; opacity: 0.45; }

.sobi .acard {
  position: absolute;
  top: 66px;
  z-index: 1;
  width: 252px;
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  animation: sobi-float 6s ease-in-out infinite;
}
.sobi .acard.left { left: 30px; transform: perspective(900px) rotateY(10deg); }
.sobi .acard.right { right: 30px; transform: perspective(900px) rotateY(-10deg); animation-delay: -3s; }
.sobi .ac-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sobi .ac-av { width: 60px; height: 60px; border-radius: 50%; animation: sobi-bob 4s ease-in-out infinite; }
.sobi .acard.talk .ac-av { animation: sobi-talk 0.5s ease-in-out infinite; }
.sobi .acard.cheer .ac-av { animation: sobi-cheer 0.6s ease-in-out infinite; }
.sobi .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--s-line);
  font: 500 12px/1 var(--f-body);
  color: var(--s-ink-2);
  white-space: nowrap;
}
.sobi .badge svg { width: 13px; height: 13px; }
.sobi .ac-name { font: 500 19px/1.2 var(--f-body); }
.sobi .d { font-size: 14px; color: var(--s-ink-2); }
.sobi .st { display: inline-flex; align-items: center; gap: 7px; font: 600 13px/1.2 var(--f-body); color: var(--s-ink); }
.sobi .st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--busy); animation: sobi-pulse 1.8s infinite; }
.sobi .st[data-s="idle"]::before { background: #C4C7CF; animation: none; }
.sobi .st[data-s="wait"]::before { background: var(--wait); }
.sobi .st[data-s="done"]::before { background: var(--ok); animation: none; }

.sobi .how-center { position: absolute; left: 86px; right: 86px; top: 272px; height: 330px; z-index: 2; }
.sobi .hs {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-44%) scale(0.96);
  transition: opacity 0.45s, transform 0.7s var(--ease-s), visibility 0s 0.7s;
}
.sobi .hs.is-on {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%);
  transition: opacity 0.45s 0.08s, transform 0.7s var(--ease-s) 0.08s, visibility 0s;
}
.sobi .hs-k { display: flex; align-items: center; gap: 8px; font: 600 12px/1 var(--f-body); letter-spacing: 0.04em; color: var(--s-ink-3); }
.sobi .hs-t { font: 400 30px/1.15 var(--f-display); letter-spacing: -0.005em; text-wrap: balance; }
.sobi .hs-as { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--s-ink-2); }
.sobi .hs ul { display: grid; gap: 6px; }
.sobi .hs li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: var(--ground); font-size: 14px; font-weight: 500; }
.sobi .hs li small { margin-left: auto; font-weight: 500; color: var(--s-ink-3); font-size: 12px; white-space: nowrap; }
.sobi .hs-x { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--ground); font-size: 14px; opacity: 0.35; transition: opacity 0.4s; }
.sobi .hs-x b { font: 600 12px/1.2 var(--f-body); color: var(--s-ink-3); }
.sobi .hs-x.on { opacity: 1; }
.sobi .ava { flex: none; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.sobi .pulse { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--wait); animation: sobi-pulse 1.8s infinite; }
.sobi .ap-q { font: 500 18px/1.25 var(--f-body); }
.sobi .ap .n { font-size: 13px; color: var(--s-ink-2); }
.sobi .opts { display: grid; gap: 4px; }
.sobi .opt { display: grid; grid-template-columns: 22px 1fr 16px; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; transition: background 0.3s; }
.sobi .opt svg { width: 18px; height: 18px; color: var(--s-ink-3); }
.sobi .opt b { display: block; font: 600 13.5px/1.2 var(--f-body); }
.sobi .opt span { display: block; font-size: 12px; color: var(--s-ink-3); line-height: 1.3; }
.sobi .opt .ck { opacity: 0; color: var(--blue); }
.sobi .opt.sel { background: var(--sky); }
.sobi .opt.sel .ck { opacity: 1; }
.sobi .ap-btns { display: flex; justify-content: flex-end; gap: 14px; align-items: center; }
.sobi .link { font: 600 14px/1.2 var(--f-body); color: var(--blue); }
.sobi .confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: 600 14px/1 var(--f-body);
  box-shadow: 0 10px 22px -12px rgba(11, 87, 208, 0.8);
  transition: background 0.3s;
}
.sobi .cf-b,
.sobi .is-approved .cf-a { display: none; }
.sobi .is-approved .cf-b { display: inline; }
.sobi .is-approved .confirm { background: var(--ok); }
.sobi .fake-cursor { position: absolute; left: 0; top: 0; z-index: 3; width: 22px; height: 22px; opacity: 0; pointer-events: none; transition: opacity 0.3s; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25)); }
.sobi .done-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; }
.sobi .done-ic svg { width: 22px; height: 22px; }
.sobi .hs-stats { font: 500 12px/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--s-ink-3); }

.sobi .packet {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--s-ink);
  font: 600 13px/1 var(--f-body);
  white-space: nowrap;
  box-shadow: 0 14px 26px -12px rgba(15, 20, 55, 0.5), inset 0 0 0 1px var(--s-line);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.sobi .how-rail { position: absolute; left: 30px; right: 30px; bottom: 22px; z-index: 3; display: grid; gap: 12px; justify-items: center; }
.sobi .how-rail ol { display: flex; gap: 2px; justify-content: center; }
.sobi .hr-step { display: inline-flex; padding: 6px 9px; border-radius: 999px; font: 500 12px/1 var(--f-body); color: var(--s-ink-3); white-space: nowrap; transition: color 0.3s, background 0.3s; }
.sobi .hr-step .n { font-family: var(--f-mono); margin-right: 5px; opacity: 0.7; }
.sobi .hr-step.is-on { color: var(--blue-2); background: var(--blue-soft); }
.sobi .hr-bar { width: min(560px, 100%); height: 3px; border-radius: 3px; background: var(--s-line); overflow: hidden; }
.sobi .hr-bar i { display: block; width: 100%; height: 100%; background: var(--blue); transform-origin: left; transform: scaleX(0); }

/* compact (phones): agents side by side, plan below, active step label only */
.sobi.is-compact { width: 360px; height: 480px; border-radius: 26px; font-size: 13px; }
.sobi.is-compact .acard { top: 48px; width: 160px; padding: 10px; gap: 6px; border-radius: 18px; }
.sobi.is-compact .acard.left { left: 12px; }
.sobi.is-compact .acard.right { right: 12px; }
.sobi.is-compact .ac-av { width: 44px; height: 44px; }
.sobi.is-compact .d,
.sobi.is-compact .badge,
.sobi.is-compact .ap .n,
.sobi.is-compact .opt span { display: none; }
.sobi.is-compact .ac-name { font-size: 13px; }
.sobi.is-compact .st { font-size: 11.5px; }
.sobi.is-compact .how-center { left: 12px; right: 12px; top: 172px; height: 248px; }
.sobi.is-compact .hs { top: 0; padding: 14px; gap: 10px; transform: translateY(10px) scale(0.97); }
.sobi.is-compact .hs.is-on { transform: none; }
.sobi.is-compact .hs-t { font-size: 23px; }
.sobi.is-compact .hs li { padding: 7px 8px; font-size: 12.5px; }
.sobi.is-compact .ap-q { font-size: 15px; }
.sobi.is-compact .opt { padding: 7px 8px; }
.sobi.is-compact .packet { font-size: 11px; padding: 5px 10px 5px 5px; }
.sobi.is-compact .how-rail { left: 12px; right: 12px; bottom: 12px; gap: 8px; }
.sobi.is-compact .hr-step { padding: 5px 7px; font-size: 11px; }
.sobi.is-compact .hr-step:not(.is-on) .l { display: none; }

@keyframes sobi-float { 50% { translate: 0 -6px; } }
@keyframes sobi-bob { 50% { transform: translateY(-4px); } }
@keyframes sobi-talk { 50% { transform: translateY(-6px) rotate(-3deg); } }
@keyframes sobi-cheer { 50% { transform: translateY(-12px) scale(1.06); } }
@keyframes sobi-pulse {
  0% { box-shadow: 0 0 0 0 rgba(30, 142, 62, 0.45); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(30, 142, 62, 0); }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  position: relative;
  z-index: 1;
  padding: clamp(96px, 16vh, 180px) var(--gutter) 0;
  background: var(--sheet);
  overflow: hidden;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(48px, 8vw, 140px);
  max-width: 1180px;
}

.footer__title {
  font: 500 clamp(30px, 3.2vw, 46px)/1.04 var(--font-display);
  letter-spacing: -0.03em;
}

.footer__line {
  margin-top: 14px;
  max-width: 36ch;
  font-size: 17px;
  color: var(--ink-2);
}

.signup {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin-top: 28px;
}

.signup__input {
  flex: 1;
  min-width: 0;
  height: 58px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: var(--bg-2);
  font: 400 16px/1 var(--font-body);
  color: var(--ink);
  transition: border-color 0.3s, background-color 0.3s;
}
.signup__input::placeholder { color: #8D8B83; }
.signup__input:focus { outline: none; border-color: var(--ink); background: #fff; }

.signup__submit {
  flex: none;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  transition: background-color 0.3s, transform 0.4s var(--ease-out);
}
.signup__submit svg { width: 22px; height: 22px; transition: transform 0.45s var(--ease-out); }
.signup__submit:hover svg { transform: translateX(3px); }
.signup__submit:active { transform: scale(0.96); }

.signup__status {
  min-height: 1.5em;
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-2);
}

.footer__mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding-bottom: 4px;
  border-bottom: 1.5px solid currentColor;
  font: 500 clamp(18px, 1.6vw, 22px)/1.2 var(--font-display);
  letter-spacing: -0.01em;
}
.footer__mail svg { width: 16px; height: 16px; transition: transform 0.45s var(--ease-out); }
.footer__mail:hover svg { transform: translate(2px, -2px); }

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 40px;
  margin-top: clamp(64px, 11vh, 120px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font: 500 14px/1 var(--font-display);
  color: var(--ink-2);
}
.footer__social,
.footer__sitemap { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.footer__sitemap { margin-left: auto; }
.footer__bar a { transition: color 0.3s; }
.footer__bar a:hover { color: var(--ink); }

/* ---------- Falling name ---------- */
.drop {
  position: relative;
  height: clamp(200px, 31vw, 480px);
  margin: clamp(28px, 5vh, 56px) calc(var(--gutter) * -1) 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  touch-action: pan-y;
}

.drop__char {
  font: 600 clamp(110px, 22vw, 350px)/0.76 var(--font-display);
  letter-spacing: -0.04em;
  color: var(--ink);
  user-select: none;
}

.drop.is-physics .drop__char { visibility: hidden; position: absolute; }

.drop__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.has-cursor .drop__canvas { cursor: none; }

/* ==========================================================================
   Cursor bubble
   ========================================================================== */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font: 500 13px/1 var(--font-display);
  letter-spacing: 0.01em;
  pointer-events: none;
  visibility: hidden;
  transition: background-color 0.9s var(--ease-out), width 0.4s var(--ease-out), height 0.4s var(--ease-out);
}
.cursor[data-variant="drag"] { width: 84px; height: 84px; background: var(--ink); }
.cursor__label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cursor__label svg { width: 14px; height: 14px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) and (min-width: 820px) {
  .nav__link { padding: 0 10px; }
}

/* Mobile nav: glass capsule that expands into a sheet */
@media (max-width: 819px) {
  .nav {
    left: 12px;
    right: 12px;
    translate: none;
    height: auto;
    min-height: var(--nav-h);
    flex-wrap: wrap;
    padding: 0 6px 0 20px;
    border-radius: 26px;
  }

  .nav__brand {
    display: flex;
    align-items: center;
    height: var(--nav-h);
    font: 600 17px/1 var(--font-display);
    letter-spacing: -0.02em;
  }

  .nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    margin-left: auto;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 1px 2px rgba(15, 15, 13, 0.08), inset 0 0 0 0.5px rgba(255, 255, 255, 0.9);
    font: 500 14px/1 var(--font-display);
  }
  .nav__toggle-icon { position: relative; width: 14px; height: 8px; }
  .nav__toggle-icon i {
    position: absolute;
    left: 0; right: 0;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.5s var(--ease-out), top 0.5s var(--ease-out);
  }
  .nav__toggle-icon i:first-child { top: 0; }
  .nav__toggle-icon i:last-child { top: 6.5px; }
  .nav.is-open .nav__toggle-icon i { top: 3.25px; }
  .nav.is-open .nav__toggle-icon i:first-child { transform: rotate(45deg); }
  .nav.is-open .nav__toggle-icon i:last-child { transform: rotate(-45deg); }

  .nav__drawer {
    display: grid;
    flex-basis: 100%;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.6s var(--ease-out);
  }
  .nav.is-open .nav__drawer { grid-template-rows: 1fr; }

  .nav__menu {
    min-height: 0;
    overflow: hidden;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-right: 14px;
    visibility: hidden;
    transition: visibility 0s linear 0.6s, padding 0.6s var(--ease-out);
  }
  .nav.is-open .nav__menu { visibility: visible; transition-delay: 0s; padding-bottom: 14px; }

  .nav__link {
    height: 50px;
    padding: 0;
    border-radius: 0;
    border-top: 1px solid var(--line);
    font: 500 22px/1 var(--font-display);
    letter-spacing: -0.02em;
  }
  .nav__sep,
  .nav__lens { display: none; }

  /* without JavaScript the sheet can't toggle, so show the links */
  .no-js .nav__toggle { display: none; }
  .no-js .nav__drawer { grid-template-rows: 1fr; }
  .no-js .nav__menu { visibility: visible; padding-bottom: 14px; }

  /* hero */
  .hero__hello { gap: 10px; font-size: 16px; }
  .avatar--hero { --size: 44px; }
  .hero__statement { max-width: 12ch; font-size: clamp(40px, 11.4vw, 64px); }
  .hero__sub { max-width: 30ch; }
  .pill { height: 36px; gap: 7px; padding: 0 12px 0 14px; font-size: 11.5px; }
  .pill svg { width: 13px; height: 13px; }
  .pill--chip { width: 36px; padding: 0; }
  .pill--chip svg { width: 15px; height: 15px; }
  .pill[data-wide] { display: none; }
  .work { border-radius: 26px 26px 0 0; }
}

/* Single-column showcase: phones and portrait tablets */
@media (max-width: 819px), (max-width: 1100px) and (orientation: portrait) {
  .motion .work__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto auto;
    grid-template-areas: "stage" "detail" "index";
    row-gap: clamp(10px, 2vh, 20px);
    padding:
      calc(var(--nav-top) + var(--nav-h) + clamp(14px, 3vh, 28px))
      var(--gutter)
      max(16px, env(safe-area-inset-bottom, 0px));
  }
  .motion .stage { --fit: 0.98; }
  .motion .details { padding: 0; align-items: end; }
  .stage__hint { display: none !important; }

  .project { max-width: 640px; }
  .project__title { margin-top: 10px; font-size: clamp(24px, 6.8vw, 40px); }
  .project__line { margin-top: 8px; font-size: 14.5px; }
  .btn { height: 42px; margin-top: 14px; font-size: 14px; }

  /* index collapses into story-style progress segments */
  .motion .index { display: flex; gap: 6px; max-width: none; border: 0; }
  .motion .index li { flex: 1; }
  .motion .index__item { display: block; height: 22px; border: 0; }
  .motion .index__item::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 10px;
    height: 2px;
    border-radius: 2px;
    background: var(--line);
  }
  .motion .index__bar { top: 10px; bottom: auto; height: 2px; border-radius: 2px; }
  .motion .index__num,
  .motion .index__name,
  .motion .index__year {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__sitemap { margin-left: 0; }
}

@media (max-width: 819px) and (max-height: 700px) {
  .motion .project__line { display: none; }
}

/* short screens: a smaller, single-layer pile so the statement stays clear */
@media (max-height: 760px) {
  .pill { height: 38px; gap: 8px; padding: 0 14px 0 16px; font-size: 12px; }
  .pill svg { width: 14px; height: 14px; }
  .pill--chip { width: 38px; padding: 0; }
  .pill[data-wide] { display: none; }
}

@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
