/* ==========================================================================
   Hozefa — site
   Shared by every page: tokens, base, the liquid-glass nav, the footer with the
   falling name, the cursor bubble. Page styles live in home.css, upgrad.css, …
   ========================================================================== */

:root {
  --bg: #FFFFFF;
  --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;

  /* Type after xhulia.com: one sans does the work, the serif is kept for the voice.
     serif (Light 200) — only where Hozefa speaks: the hero statement and section titles. Italic for its one word.
     sans 400          — everything you read or navigate: nav, greeting, labels, lines, index, footer.
     sans 500          — things you press or grab: buttons, pills, the email link, the cursor bubble.
     sans 600, tight   — things you scan and choose: project headlines, the active index row.
     sans 700          — facts called out inside a sentence (<b>).
     sans 900, tight   — the falling name in the footer: the sign-off, as big and solid as the type gets.
     PP Editorial New is licensed; Fraunces (Light, sharp) stands in. Geist is free. */
  --font-serif: "PP Editorial New", "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --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-sans);
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0;
  -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 15px/1 var(--font-sans);
  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; }

/* ==========================================================================
   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: 400 15px/1 var(--font-sans);
  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: url(#liquid-glass) blur(12px) saturate(185%) brightness(1.04);
}

.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: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.48)); }

.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; }

/* ==========================================================================
   Project intro and button — label · headline · one line · View case
   (the homepage showcase and every case study use them)
   ========================================================================== */
.project {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 660px;
}

.project__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 400 15px/1.3 var(--font-sans);
  letter-spacing: 0;
  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: 600 clamp(28px, min(3.3vw, 5.8vh), 50px)/1.1 var(--font-sans);
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.project__title em {
  font-style: normal;
  font-weight: inherit;
  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: 16px;
  line-height: 1.45;
  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-sans);
  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); }

/* ==========================================================================
   Pages with chapters: fixed chrome height, section nav, quiet text link
   ========================================================================== */
:root { --chrome: calc(var(--nav-top) + var(--nav-h) + 58px); }   /* site nav + section nav */

/* quiet text link with an arrow — the second action beside a button */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 6px;
  font: 500 15px/1 var(--font-sans);
  letter-spacing: -0.005em;
  color: var(--ink);
}
.text-link svg { width: 15px; height: 15px; transition: transform 0.45s var(--ease-out); }
.text-link:hover svg { transform: translate(2px, 2px); }
.text-link span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.45s var(--ease-out); padding-bottom: 2px; }
.text-link:hover span { background-size: 100% 1px; }

/* Section nav — a case study's chapters, a smaller liquid-glass pill under the site nav (bottom edge on phones).
   Markup: nav.subnav[data-subnav][data-glass] > .glass, .subnav__title, .subnav__sep,
   ol.subnav__list > a.subnav__link (+ .subnav__sub), .subnav__lens, .subnav__progress */
.subnav {
  position: fixed;
  z-index: 49;
  left: 50%;
  top: calc(var(--nav-top) + var(--nav-h) + 10px + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 4px 0 6px;
  border-radius: 999px;
  isolation: isolate;
  font: 400 14px/1 var(--font-sans);
  letter-spacing: -0.005em;
  translate: -50% -10px;
  opacity: 0;
  visibility: hidden;
  transition: translate 0.6s var(--ease-out), opacity 0.4s var(--ease-out), visibility 0s linear 0.6s;
}
.subnav.is-shown { translate: -50% 0; opacity: 1; visibility: visible; transition-delay: 0s; }
/* never wider than the screen: when a long chapter shows its part, the list scrolls to keep it in view */
.subnav { max-width: calc(100vw - 24px); }
.subnav__list { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.subnav__list::-webkit-scrollbar { display: none; }
.subnav .glass { box-shadow: 0 0 0 0.5px rgba(15, 15, 13, 0.1), 0 14px 30px -16px rgba(30, 26, 12, 0.32), 0 3px 10px -6px rgba(30, 26, 12, 0.14); }
.subnav .glass__tint { background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.42)); }

.subnav__title {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.subnav__title .live { width: 7px; height: 7px; }
.subnav__title:not(.is-live)::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.subnav__sep { flex: none; width: 1px; height: 16px; margin: 0 4px 0 2px; background: var(--line-strong, rgba(15, 15, 13, 0.14)); }

.subnav__list { position: relative; display: flex; align-items: center; gap: 2px; }
.subnav__link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 0.35s var(--ease-out);
}
.subnav__link:hover,
.subnav__link[aria-current] { color: var(--ink); }
.subnav__link[aria-current] { font-weight: 500; }
/* a chapter with parts shows the part you're in, sliding out beside its label */
.subnav__sub {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  vertical-align: bottom;
  color: var(--ink-2);
  font-weight: 400;
  transition: max-width 0.6s var(--ease-out), opacity 0.4s var(--ease-out);
}
.subnav__sub::before { content: "·"; padding: 0 6px; color: var(--ink-3); }
.subnav__link.has-sub .subnav__sub { max-width: 10em; opacity: 1; }
.subnav__lens {
  position: absolute;
  z-index: 0;
  left: 0;
  top: 0;
  width: 0;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 0.5px rgba(15, 15, 13, 0.08), 0 4px 12px -4px rgba(15, 15, 13, 0.18), inset 0 1px 0 #fff;
  opacity: 0;
  pointer-events: none;
  transition: translate 0.6s var(--ease-out), width 0.6s var(--ease-out), opacity 0.3s;
}
/* reading progress along the pill's lower rim */
.subnav__progress {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 1.5px;
  border-radius: 2px;
  overflow: hidden;
  pointer-events: none;
}
.subnav__progress i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }


@media (max-width: 819px) {
  :root { --chrome: calc(var(--nav-top) + var(--nav-h)); }
  /* the section nav moves to the bottom edge, within thumb reach */
  .subnav {
    top: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 24px);
    padding: 0 4px;
    translate: -50% 12px;
  }
  .subnav__title, .subnav__sep { display: none; }
  .subnav__list { overflow-x: auto; scrollbar-width: none; }
  .subnav__list::-webkit-scrollbar { display: none; }
  .subnav__link { padding: 0 11px; }
  .subnav.is-shown .subnav__link.has-sub .subnav__sub { max-width: 9.5em; }
}
@media (prefers-reduced-motion: reduce) { .subnav { transition: none; } }

/* Bottom-docked section nav (all sizes) — the page's one persistent control while the site nav rests.
   It leads with a Menu button that brings the site nav back on purpose. */
.subnav--bottom {
  top: auto;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  max-width: calc(100vw - 24px);
  padding: 0 4px;
  translate: -50% 14px;
}
.subnav--bottom.is-shown { translate: -50% 0; }
.subnav--bottom .subnav__list { overflow-x: auto; scrollbar-width: none; }
.subnav--bottom .subnav__list::-webkit-scrollbar { display: none; }
.subnav--bottom .subnav__progress { top: 0; bottom: auto; }
.subnav__menu {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-right: 2px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  transition: transform 0.4s var(--ease-out), background-color 0.3s;
}
.subnav__menu:hover { transform: scale(1.06); }
.subnav__menu:active { transform: scale(0.94); }
.subnav__menu svg { width: 15px; height: 15px; }
.subnav--bottom .subnav__title { padding-left: 8px; }
@media (max-width: 819px) {
  .subnav--bottom { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}

/* Resting site nav (html.nav-autohide): it slips away while you read down the story, and comes back
   when you ask for it — a deliberate scroll up, the pointer at the top edge, keyboard focus, or the
   section nav's Menu button. It stays in the tab order, so focusing it brings it back. */
.nav-autohide .nav { transition: transform 0.7s var(--ease-out), opacity 0.45s var(--ease-out); }
.nav-autohide .site-header.is-resting .nav {
  transform: translateY(calc(-100% - var(--nav-top) - 18px));
  opacity: 0;
}
.nav-autohide .site-header.is-resting .nav * { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .nav-autohide .nav { transition: opacity 0.2s; } .nav-autohide .site-header.is-resting .nav { transform: none; } }

/* Over a dark scene the glass frosts up, so the navs stay legible (pages toggle html.is-dark-scene) */
.is-dark-scene .glass__tint { background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.66)); transition: background 0.6s; }

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

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font: 400 13px/1.4 var(--font-sans); letter-spacing: 0;
  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: 900 clamp(120px, 24vw, 400px)/0.76 var(--font-sans);
  letter-spacing: -0.06em;
  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-sans);
  letter-spacing: 0;
  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__label { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
/* "View case" is a lens of liquid glass (site.js builds its refraction); the label reads in ink on it */
.cursor { isolation: isolate; }
.cursor__glass { display: none; }
.cursor[data-variant="view"] { background: transparent; color: var(--ink); }
.cursor[data-variant="view"] .cursor__glass { display: block; }
.cursor[data-variant="view"] .cursor__label { font-weight: 500; text-shadow: 0 0 10px rgba(255, 255, 255, 0.95), 0 0 2px rgba(255, 255, 255, 0.9); }
.cursor__glass {
  box-shadow:
    0 0 0 0.5px rgba(15, 15, 13, 0.12),
    0 22px 44px -18px rgba(30, 26, 12, 0.42),
    0 6px 14px -8px rgba(30, 26, 12, 0.2);
}
.cursor__glass .glass__tint { background: radial-gradient(closest-side, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.5) 52%, rgba(255, 255, 255, 0.14) 88%, rgba(255, 255, 255, 0.22) 100%); transition: background 0.3s; }   /* frosted where the label sits, clear at the rim where the light bends */
.cursor__glass .glass__shine {
  background:
    radial-gradient(60px 34px at var(--mx, 34%) var(--my, -6%), rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%),
    radial-gradient(70px 40px at 70% 112%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 70%);
  transition: background-position 0.4s;
}
.cursor.is-pressed .cursor__glass .glass__tint { background: radial-gradient(closest-side, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.7) 52%, rgba(255, 255, 255, 0.34) 88%, rgba(255, 255, 255, 0.4) 100%); }
/* outside Chromium the lens frosts instead of bending */
:root:not(.has-refraction) .cursor__glass .glass__refraction { -webkit-backdrop-filter: blur(8px) saturate(180%) brightness(1.05); backdrop-filter: blur(8px) saturate(180%) brightness(1.05); }
.cursor__label svg { width: 14px; height: 14px; }
/* grab-able things (hero pills, footer letters): a dark pill with an open hand, after xhulia.com */
.cursor[data-variant="drag"] {
  width: auto;
  height: auto;
  padding: 15px 22px;
  border-radius: 999px;
  background: var(--ink);
  font-size: 15px;
}
.cursor[data-variant="drag"] .cursor__label { gap: 10px; }
.cursor[data-variant="drag"] .cursor__label svg { width: 16px; height: 16px; }

/* ==========================================================================
   Responsive (site chrome)
   ========================================================================== */
@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-sans);
    letter-spacing: -0.03em;
    text-transform: none;
  }

  .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 15px/1 var(--font-sans); letter-spacing: 0; text-transform: none;
  }
  .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);
    height: 46px;
    font: 400 17px/1 var(--font-sans);
    letter-spacing: -0.01em; text-transform: none;
  }
  .nav__sep,
  .nav__lens { display: none; }
  /* the page you're on: a weight up and a dot in the page's accent */
  .nav__link[aria-current] { font-weight: 600; gap: 10px; }
  .nav__link[aria-current]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

  /* 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; }
}

/* footer stacks on phones and portrait tablets */
@media (max-width: 819px), (max-width: 1100px) and (orientation: portrait) {
  .footer__sitemap { margin-left: 0; }
}

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

/* ==========================================================================
   Dark pages (html.theme-dark) — a case study told on black keeps the same chrome, inverted:
   smoked glass with a cool rim, light ink, and the footer and falling name on black too.
   The falling name reads --ink from the root, so it turns light on its own.
   ========================================================================== */
.theme-dark {
  --bg: #000000;
  --bg-2: #1D1D1F;
  --sheet: #000000;
  --ink: #F5F5F7;
  --ink-2: #A1A1A6;
  --ink-3: #6E6E73;
  --line: rgba(255, 255, 255, 0.12);
  color-scheme: dark;
}
.theme-dark .glass {
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.1),
    0 18px 40px -18px rgba(0, 0, 0, 0.8),
    0 4px 12px -6px rgba(0, 0, 0, 0.6);
}
.theme-dark .glass__tint {
  background: linear-gradient(180deg, rgba(38, 38, 42, 0.62) 0%, rgba(22, 22, 26, 0.5) 55%, rgba(30, 30, 34, 0.58) 100%);
}
.theme-dark .nav.is-open .glass__tint { background: rgba(22, 22, 24, 0.88); }
.theme-dark .glass__shine {
  background:
    radial-gradient(220px 70px at var(--mx, 22%) var(--my, -10%), rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 42%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.1),
    inset 0 -8px 16px -10px rgba(0, 0, 0, 0.5);
}
.theme-dark .glass__shine::after {
  background: linear-gradient(125deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(255, 255, 255, 0.1) 22%,
    rgba(255, 255, 255, 0) 45%,
    rgba(255, 255, 255, 0) 62%,
    rgba(255, 255, 255, 0.12) 84%,
    rgba(255, 255, 255, 0.4) 100%);
}
.theme-dark .nav__link,
.theme-dark .nav__brand { text-shadow: 0 0 10px rgba(0, 0, 0, 0.7), 0 0 2px rgba(0, 0, 0, 0.6); }
.theme-dark .nav__sep { background: rgba(255, 255, 255, 0.16); }
.theme-dark .nav__lens {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.07));
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
}
.theme-dark .subnav .glass {
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 14px 30px -16px rgba(0, 0, 0, 0.8), 0 3px 10px -6px rgba(0, 0, 0, 0.5);
}
.theme-dark .subnav .glass__tint { background: linear-gradient(180deg, rgba(34, 34, 38, 0.74), rgba(20, 20, 24, 0.66)); }
.theme-dark .subnav__sep { background: rgba(255, 255, 255, 0.16); }
.theme-dark .subnav__lens {
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 2px 10px rgba(0, 0, 0, 0.3);
}
.theme-dark .cursor[data-variant="drag"] { color: #000; }
.theme-dark .btn:hover { color: #fff; }
@media (max-width: 819px) {
  .theme-dark .nav__toggle {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
  }
}

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