/* ============================================================
   KHALED — PORTFOLIO
   Liquid chrome / acid lime / editorial type
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --ink: #050506;
  --ink-2: #08080a;
  --ink-3: #0c0c0f;
  --paper: #ecece7;
  --paper-dim: #c9c9c3;
  --muted: #8b8b86;
  --muted-2: #7c7c75;
  --line: rgba(236, 236, 231, 0.1);
  --line-strong: rgba(236, 236, 231, 0.2);
  --acid: #c6ff3d;
  --acid-soft: rgba(198, 255, 61, 0.14);
  --violet: #8b7bff;
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --pad: clamp(20px, 4.5vw, 72px);
  --max: 1600px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.77, 0, 0.175, 1);
  --header-h: 88px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

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

[hidden] {
  display: none !important;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--acid);
  color: var(--ink);
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: var(--ink);
}
::-webkit-scrollbar-thumb {
  background: #26261f;
  border-radius: 99px;
  border: 2px solid var(--ink);
}
::-webkit-scrollbar-thumb:hover {
  background: #3d3d31;
}

/* ---------- Helpers ---------- */
.mono-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10001;
  padding: 10px 16px;
  background: var(--acid);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
}

.grain {
  position: fixed;
  /* -8% gives the texture a little bleed without a 4x-viewport layer. */
  inset: -8%;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  /* Static: at 5.5% opacity the drift was invisible, but the animated
     full-viewport layer still cost paint/compositing on every step. */
  animation: none;
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 9500;
  pointer-events: none;
  background: transparent;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

/* ---------- Custom cursor ---------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9800;
  pointer-events: none;
  width: 0;
  height: 0;
  opacity: 0;
}
html.has-cursor .cursor {
  opacity: 1;
}
.cursor-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(236, 236, 231, 0.55);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease), height 0.35s var(--ease),
    background-color 0.35s var(--ease), border-color 0.35s var(--ease),
    opacity 0.3s ease;
  will-change: transform;
}
.cursor::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acid);
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cursor-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.25s ease, transform 0.35s var(--ease);
}
.cursor.is-hover .cursor-ring {
  width: 64px;
  height: 64px;
  background: var(--acid);
  border-color: var(--acid);
}
.cursor.is-hover::after {
  opacity: 0;
}
.cursor.is-hover .cursor-label {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.cursor.is-down .cursor-ring {
  width: 30px;
  height: 30px;
}

@media (hover: hover) and (pointer: fine) {
  html.has-cursor,
  html.has-cursor * {
    cursor: none !important;
  }
}

/* A native <dialog> paints in the browser's top layer, above the custom
   cursor element. Restore a real cursor while a case study is open, and
   hide the custom one so the two cannot double up during the fade. */
html.has-cursor .case-dialog[open],
html.has-cursor .case-dialog[open] * {
  cursor: auto !important;
}
html.has-cursor .case-dialog[open] a,
html.has-cursor .case-dialog[open] button,
html.has-cursor .case-dialog[open] [role="button"] {
  cursor: pointer !important;
}
html.has-cursor:has(.case-dialog[open]) .cursor {
  opacity: 0;
}

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pad);
  will-change: transform;
}
.loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 50% 40%, rgba(198, 255, 61, 0.07), transparent 70%);
  pointer-events: none;
}
.loader-grid {
  position: relative;
  width: 100%;
  max-width: var(--max);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
}
.loader-mark {
  font-size: clamp(5rem, 18vw, 16rem);
  line-height: 0.8;
  font-weight: 500;
  letter-spacing: -0.06em;
  display: flex;
  align-items: flex-start;
  color: var(--paper);
}
.loader-mark span {
  color: var(--acid);
  font-size: 0.42em;
  margin-top: 0.12em;
}
.loader-info {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.loader-count {
  font-size: 13px;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.loader-track {
  width: 100%;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.loader-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: left center;
}
.loader-foot {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  height: var(--header-h);
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: transform 0.55s var(--ease), background-color 0.4s ease,
    border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
/* No backdrop blur: a full-width backdrop-filter forces the browser to
   re-read + blur everything underneath on every scroll/canvas frame. */
.site-header.is-scrolled {
  background: rgba(5, 5, 6, 0.88);
  border-bottom-color: var(--line);
}
.site-header.is-hidden {
  transform: translateY(-105%);
}

.brand {
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}
.brand-dot {
  color: var(--acid);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 40px);
  margin-left: auto;
}
.nav-desktop a {
  position: relative;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-dim);
  padding: 6px 0;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  transition: color 0.3s ease;
}
.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.4s var(--ease);
}
.nav-desktop a:hover {
  color: var(--paper);
}
.nav-desktop a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}
.nav-desktop a[aria-current="page"] {
  color: var(--paper);
}
.nav-desktop a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left center;
}
.nav-index {
  font-size: 8px;
  color: var(--muted-2);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: clamp(12px, 2vw, 32px);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 0 rgba(198, 255, 61, 0.5);
  animation: pulse 2.6s ease-out infinite;
  flex: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(198, 255, 61, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(198, 255, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(198, 255, 61, 0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 11px 18px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease);
  will-change: transform;
}
.btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  transition: transform 0.35s var(--ease);
}
.btn:hover {
  background: var(--acid);
  color: var(--ink);
  border-color: var(--acid);
}
.btn:hover svg {
  transform: translate(2px, -2px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  position: relative;
  flex: none;
}
.menu-toggle span {
  position: absolute;
  left: 50%;
  width: 16px;
  height: 1px;
  background: var(--paper);
  transform: translateX(-50%);
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 23px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 20px; transform: translateX(-50%) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 20px; transform: translateX(-50%) rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 7500;
  background: var(--ink-2);
  padding: calc(var(--header-h) + 30px) var(--pad) 40px;
  display: flex;
  flex-direction: column;
  transform: translateY(-101%);
  visibility: hidden;
  transition: transform 0.75s var(--ease-inout), visibility 0.75s;
}
.menu::after {
  content: "";
  position: absolute;
  right: -20%;
  bottom: -30%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(198, 255, 61, 0.09), transparent 65%);
  pointer-events: none;
}
.menu.is-open {
  transform: translateY(0);
  visibility: visible;
}
.menu-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
  z-index: 1;
}
.menu-nav {
  display: flex;
  flex-direction: column;
}
.menu-nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-size: clamp(2.4rem, 10vw, 4rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  transition: color 0.3s ease, padding-left 0.4s var(--ease);
}
.menu-nav a span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted-2);
}
.menu-nav a:hover {
  color: var(--acid);
  padding-left: 10px;
}
.menu-foot {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.menu-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.menu-mail {
  font-size: clamp(1.4rem, 5vw, 2rem);
  letter-spacing: -0.02em;
  color: var(--acid);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
  pointer-events: none;
}
html.webgl-ready #scene {
  opacity: 1;
}

.hero-fallback {
  position: absolute;
  top: 50%;
  right: 6%;
  width: min(46vw, 620px);
  aspect-ratio: 1;
  transform: translateY(-56%);
  z-index: 0;
  pointer-events: none;
  display: none;
}
html.no-webgl .hero-fallback {
  display: block;
}
html.webgl-ready .hero-fallback {
  display: none;
}

/* The no-WebGL fallback is a complete orbital scene, not a still image:
   a bobbing chrome orb, three tilted rings with travelling dots, and a
   star field. Only transform/opacity animate, so it stays cheap even
   when Chrome is compositing without GPU acceleration. */
.fallback-stars {
  position: absolute;
  inset: -34%;
  border-radius: 50%;
  opacity: 0.5;
  background-image:
    radial-gradient(1.3px 1.3px at 12% 24%, rgba(236, 236, 231, 0.95), transparent),
    radial-gradient(1px 1px at 68% 12%, rgba(236, 236, 231, 0.7), transparent),
    radial-gradient(1.6px 1.6px at 84% 64%, rgba(198, 255, 61, 0.8), transparent),
    radial-gradient(1px 1px at 32% 78%, rgba(236, 236, 231, 0.6), transparent),
    radial-gradient(1.2px 1.2px at 52% 46%, rgba(139, 123, 255, 0.7), transparent),
    radial-gradient(1px 1px at 8% 88%, rgba(236, 236, 231, 0.5), transparent);
  background-size: 190px 190px;
}
.fallback-orb {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  opacity: 0.82;
  background:
    radial-gradient(circle at 33% 29%, #f8faf2 0%, #c8d1c4 7%, #6a726b 18%, #1c211d 38%, #090b09 54%, #161b12 62%, #c6ff3d 68%, #7d952f 72%, #141a10 80%, #050605 92%);
  box-shadow:
    0 0 90px rgba(198, 255, 61, 0.14),
    0 40px 90px rgba(0, 0, 0, 0.55),
    inset -24px -30px 70px rgba(0, 0, 0, 0.7);
  animation: fallback-orb-bob 9s ease-in-out infinite alternate;
  will-change: transform;
}
.fallback-orb::before {
  content: "";
  position: absolute;
  inset: 6% 12% 46% 10%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 46% 42%, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.18) 32%, transparent 68%);
  transform: rotate(-16deg);
}
.fallback-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 66% 60%, transparent 54%, rgba(198, 255, 61, 0.42) 63%, rgba(198, 255, 61, 0.06) 71%, transparent 77%);
  transform: rotate(-8deg);
}
.fallback-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(236, 236, 231, 0.16);
  border-radius: 50%;
  animation: fallback-orbit-spin 24s linear infinite;
  will-change: transform;
}
.fallback-orbit i {
  position: absolute;
  left: 50%;
  top: -3px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(198, 255, 61, 0.9);
}
.fallback-orbit--a {
  --tilt: 73deg;
  --yaw: 16deg;
  width: 92%;
  border-color: rgba(240, 244, 232, 0.22);
  animation-duration: 21s;
}
.fallback-orbit--a i {
  background: #f0f4e8;
  box-shadow: 0 0 8px rgba(240, 244, 232, 0.8);
}
.fallback-orbit--b {
  --tilt: 64deg;
  --yaw: -26deg;
  width: 124%;
  border-color: rgba(198, 255, 61, 0.26);
  animation-duration: 30s;
  animation-direction: reverse;
}
.fallback-orbit--c {
  --tilt: 79deg;
  --yaw: 7deg;
  width: 156%;
  border-color: rgba(139, 123, 255, 0.2);
  animation-duration: 41s;
  animation-delay: -12s;
}
.fallback-orbit--c i {
  background: #8b7bff;
  box-shadow: 0 0 10px rgba(139, 123, 255, 0.9);
}
@keyframes fallback-orb-bob {
  from { transform: translateY(-6px) scale(0.985); }
  to { transform: translateY(10px) scale(1.015); }
}
@keyframes fallback-orbit-spin {
  from { transform: translate(-50%, -50%) rotateY(var(--yaw)) rotateX(var(--tilt)) rotateZ(0deg); }
  to { transform: translate(-50%, -50%) rotateY(var(--yaw)) rotateX(var(--tilt)) rotateZ(360deg); }
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(70% 60% at 78% 44%, transparent 18%, rgba(5, 5, 6, 0.28) 100%),
    linear-gradient(to right, rgba(5, 5, 6, 0.94) 0%, rgba(5, 5, 6, 0.6) 38%, rgba(5, 5, 6, 0.12) 64%, transparent 80%),
    linear-gradient(to top, rgba(5, 5, 6, 0.94) 0%, transparent 32%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + clamp(20px, 4vw, 48px)) var(--pad) clamp(28px, 4vw, 46px);
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

.hero-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-dim);
}
.eyebrow-dot {
  width: 5px;
  height: 5px;
  background: var(--acid);
  border-radius: 50%;
}
.hero-meta-top {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.meta-slash {
  color: var(--muted-2);
}

.hero-title {
  font-size: clamp(3.1rem, min(11.2vw, 15.5vh), 11.5rem);
  line-height: 0.83;
  letter-spacing: -0.055em;
  font-weight: 500;
  text-transform: uppercase;
  margin: clamp(24px, 4vh, 60px) 0;
  position: relative;
}
.hero-title .line {
  display: block;
  overflow: hidden;
  padding-right: 0.06em;
  margin-right: -0.06em;
}
.hero-title .line-inner {
  display: inline-block;
  will-change: transform;
}
.hero-title .line-outline .line-inner {
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 236, 231, 0.44);
  padding-left: 0.02em;
}
.hero-title .line-serif {
  font-family: var(--serif);
  font-style: italic;
  text-transform: none;
  font-size: 1.03em;
  letter-spacing: -0.02em;
  color: var(--acid);
  line-height: 0.9;
  padding-top: 0.06em;
}
.hero-title .line-serif .line-inner {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.08em;
}
.hero-title-mark {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.17em;
  color: var(--paper);
  margin-top: 0.35em;
  display: inline-block;
  animation: spin-slow 14s linear infinite;
}
@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}
.hero-lead {
  max-width: 400px;
  font-size: clamp(0.86rem, 1.05vw, 0.98rem);
  line-height: 1.65;
  color: var(--muted);
  font-weight: 300;
}
.hero-side {
  display: flex;
  align-items: flex-end;
  gap: clamp(28px, 4vw, 64px);
}
.hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-dim);
}
.hero-scroll-ring {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.hero-scroll-ring svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--acid);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: nudge 2.4s var(--ease) infinite;
}
.hero-scroll:hover .hero-scroll-ring {
  background: rgba(198, 255, 61, 0.08);
  border-color: rgba(198, 255, 61, 0.4);
}
@keyframes nudge {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(3px); }
}
.hero-coords {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  text-align: right;
}

/* Ticker */
.ticker {
  position: relative;
  z-index: 3;
  overflow: hidden;
  background: var(--acid);
  color: var(--ink);
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 38s linear infinite;
  will-change: transform;
}
.ticker-group {
  display: flex;
  align-items: center;
  flex: none;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding: 16px 26px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ticker-item svg {
  width: 11px;
  height: 11px;
  flex: none;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.marquee:hover .ticker-track {
  animation-play-state: paused;
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 4;
  padding: clamp(80px, 10vw, 150px) var(--pad);
  background: var(--ink);
  width: 100%;
}
.section > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}
.section.work,
.section.experience {
  background: var(--ink-2);
}

.section-head {
  display: grid;
  grid-template-columns: 40px auto 1fr auto;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  margin-bottom: clamp(44px, 6vw, 84px);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.section-index,
.section-label,
.section-note {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.section-index {
  color: var(--acid);
}
.section-label {
  color: var(--paper);
}
.section-note {
  color: var(--muted-2);
  text-align: right;
}
.section-rule {
  display: block;
  height: 1px;
  background: var(--line);
  transform-origin: left;
}

.display {
  font-size: clamp(2.9rem, 7.6vw, 7.6rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
  font-weight: 500;
  text-wrap: balance;
}
.display em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--acid);
  letter-spacing: -0.02em;
}
.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.04em;
  margin-bottom: -0.04em;
}
.line-body {
  display: block;
  will-change: transform;
}

.work-intro,
.expertise-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.6fr);
  align-items: end;
  gap: clamp(24px, 5vw, 90px);
  margin-bottom: clamp(48px, 6vw, 90px);
}
.work-intro-copy,
.expertise-intro > p {
  max-width: 400px;
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 300;
  padding-bottom: 6px;
}

/* ---------- Work / project rows ---------- */
.project-list {
  border-top: 1px solid var(--line);
}
.project {
  position: relative;
  border-bottom: 1px solid var(--line);
}
.project-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1.05fr) minmax(0, 0.95fr) auto 76px 40px;
  align-items: center;
  gap: clamp(12px, 2.4vw, 40px);
  width: 100%;
  text-align: left;
  padding: clamp(20px, 2.6vw, 34px) 0;
  position: relative;
  z-index: 1;
}
.project-row::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--pad) * -0.5);
  background: linear-gradient(90deg, rgba(198, 255, 61, 0.055), transparent 70%);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}
.project:hover .project-row::before,
.project-row:focus-visible::before {
  opacity: 1;
}
.project-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  transition: color 0.3s ease;
}
.project-title {
  font-size: clamp(1.9rem, 4.2vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 500;
  transition: transform 0.6s var(--ease), color 0.35s ease;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.project-title .title-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent, var(--acid));
  opacity: 0;
  transform: scale(0);
  transition: transform 0.4s var(--ease), opacity 0.3s ease;
  flex: none;
}
.project:hover .project-title {
  transform: translateX(10px);
}
.project:hover .project-title .title-dot {
  opacity: 1;
  transform: scale(1);
}
.project-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  color: var(--muted);
  transition: color 0.35s ease;
  min-width: 0;
}
.project:hover .project-sub {
  color: var(--paper-dim);
}
.project-stack {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 250px;
}
.project-stack span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 5px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.project-year {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted-2);
  letter-spacing: 0.08em;
}
.project-cta {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  justify-self: end;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease),
    transform 0.5s var(--ease);
}
.project-cta svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  transition: transform 0.4s var(--ease);
}
.project:hover .project-cta {
  background: var(--accent, var(--acid));
  border-color: var(--accent, var(--acid));
  color: var(--ink);
  transform: rotate(45deg);
}
.project:hover .project-cta svg {
  transform: rotate(-45deg);
}

.work-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 36px;
  font-size: 0.82rem;
  color: var(--muted);
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--paper);
  font-size: 0.85rem;
  padding-bottom: 3px;
  position: relative;
  width: fit-content;
}
.link-arrow::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.link-arrow:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.link-arrow span {
  color: var(--acid);
  transition: transform 0.35s var(--ease);
}
.link-arrow:hover span {
  transform: translate(2px, -2px);
}

/* Floating project preview */
.cursor-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 7000;
  width: 330px;
  height: 225px;
  margin-left: -165px;
  margin-top: -112px;
  border-radius: 3px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.86) rotate(-4deg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(236, 236, 231, 0.14);
  will-change: transform;
}
.cursor-preview .art {
  width: 100%;
  height: 100%;
}
@media (hover: none), (pointer: coarse), (max-width: 900px) {
  .cursor-preview { display: none; }
}

/* ---------- Procedural project art ---------- */
.art {
  --a1: #c6ff3d;
  --a2: #8b7bff;
  position: relative;
  overflow: hidden;
  background: #0a0a0c;
  isolation: isolate;
}
.art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 3;
  mix-blend-mode: overlay;
}
.art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 4;
}

.art-1 {
  background:
    radial-gradient(circle at 72% 30%, rgba(198, 255, 61, 0.95) 0%, rgba(198, 255, 61, 0.4) 9%, transparent 30%),
    radial-gradient(circle at 30% 78%, rgba(139, 123, 255, 0.55) 0%, transparent 42%),
    conic-gradient(from 200deg at 55% 45%, #0a0a0c, #171b12, #0a0a0c 45%, #131313 70%, #0a0a0c);
}
.art-1 .art-orb {
  position: absolute;
  width: 46%;
  aspect-ratio: 1;
  left: 26%;
  top: 28%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #ffffff 0%, #dfe7d8 9%, #6a736c 24%, #161916 50%, #20251c 60%, #b8e84b 78%, #3d4a1e 88%);
  box-shadow: 0 0 70px rgba(198, 255, 61, 0.25);
  filter: contrast(1.08);
  z-index: 2;
}
.art-1 .art-ring {
  position: absolute;
  inset: 12% 18%;
  border: 1px solid rgba(198, 255, 61, 0.35);
  border-radius: 50%;
  transform: rotate(-24deg) scaleY(0.58);
  z-index: 2;
}
.art-1 .art-tag {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 5;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--acid);
}

.art-2 {
  background:
    radial-gradient(ellipse at 28% 24%, #ffffff 0%, #e7ecd9 5%, #9aa39a 16%, #2b2f2b 38%, transparent 60%),
    radial-gradient(ellipse at 72% 76%, #8b7bff 0%, #4b3f8f 22%, transparent 52%),
    conic-gradient(from 40deg at 50% 50%, #0b0b0d, #1a1c18, #0b0b0d 40%, #24211f 65%, #0b0b0d);
}
.art-2 .art-blob {
  position: absolute;
  left: 20%;
  top: 14%;
  width: 60%;
  height: 72%;
  border-radius: 48% 52% 42% 58% / 55% 42% 58% 45%;
  background:
    radial-gradient(circle at 30% 22%, #ffffff 0%, #f3f6ec 6%, #9ea79c 18%, #3a3f3a 38%, #101210 55%, #23291c 68%, #a8d83d 80%, #3a451f 92%);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
  z-index: 2;
  transform: rotate(-12deg);
}
.art-2 .art-ring {
  position: absolute;
  left: 10%;
  top: 38%;
  width: 80%;
  height: 30%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transform: rotate(-8deg);
  z-index: 3;
}
.art-2 .art-tag {
  position: absolute;
  right: 18px;
  top: 16px;
  z-index: 5;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: #cfc9ff;
}

.art-3 {
  background:
    radial-gradient(circle at 22% 22%, rgba(90, 209, 255, 0.28), transparent 45%),
    radial-gradient(circle at 70% 80%, rgba(198, 255, 61, 0.16), transparent 40%),
    #060a10;
}
.art-3 .art-contours {
  position: absolute;
  inset: -20%;
  background: repeating-radial-gradient(circle at 42% 48%, transparent 0 22px, rgba(90, 209, 255, 0.16) 22px 23px, transparent 23px 46px);
  z-index: 1;
  mask-image: radial-gradient(circle at 42% 48%, black, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 42% 48%, black, transparent 72%);
}
.art-3 .art-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(90, 209, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 209, 255, 0.16) 1px, transparent 1px);
  background-size: 42px 42px;
  transform: perspective(400px) rotateX(58deg) scale(1.6);
  transform-origin: center 70%;
  mask-image: linear-gradient(to top, black, transparent 75%);
  -webkit-mask-image: linear-gradient(to top, black, transparent 75%);
  z-index: 2;
}
.art-3 .art-pin {
  position: absolute;
  left: 63%;
  top: 38%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 6px rgba(198, 255, 61, 0.15), 0 0 30px rgba(198, 255, 61, 0.7);
  z-index: 4;
}
.art-3 .art-tag {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 5;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: #8fdcff;
}

.art-4 {
  background:
    linear-gradient(135deg, #ff7a59 0%, #ffb38a 34%, #efe9dc 34%, #efe9dc 58%, #12120f 58%, #12120f 100%);
}
.art-4 .art-shape {
  position: absolute;
  width: 34%;
  aspect-ratio: 1;
  left: 12%;
  top: 16%;
  border: 1px solid rgba(18, 18, 15, 0.6);
  border-radius: 50%;
  z-index: 2;
}
.art-4 .art-shape:nth-child(2) {
  left: auto;
  right: 14%;
  top: auto;
  bottom: 14%;
  border-radius: 0;
  width: 26%;
  border-color: rgba(198, 255, 61, 0.7);
  transform: rotate(12deg);
}
.art-4 .art-tag {
  position: absolute;
  right: 18px;
  top: 16px;
  z-index: 5;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: #12120f;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(36px, 7vw, 110px);
  align-items: start;
}
.statement {
  font-size: clamp(1.55rem, 3.15vw, 3rem);
  line-height: 1.22;
  letter-spacing: -0.028em;
  font-weight: 400;
  max-width: 950px;
  text-wrap: pretty;
}
.statement .w {
  display: inline-block;
  /* 0.42 keeps the resting words above the 3:1 contrast minimum for
     large text while still reading as "unlit" before the scroll reveal. */
  opacity: 0.42;
  transition: opacity 0.2s linear;
}
.statement .w.is-lit {
  opacity: 1;
}
.about-aside {
  padding-top: 8px;
}
.about-body {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--muted);
  font-weight: 300;
}
.now {
  margin: 34px 0 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.now-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.now-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 0.82rem;
  color: var(--paper-dim);
  line-height: 1.5;
}
.now-list li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--acid);
  flex: none;
  transform: translateY(-2px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: clamp(50px, 7vw, 100px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line);
}
.stat {
  background: var(--ink);
  padding: clamp(24px, 3.4vw, 46px) clamp(14px, 2.4vw, 38px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-value {
  font-size: clamp(2.8rem, 5.4vw, 5.4rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.stat-value span {
  color: var(--acid);
}
.stat-value .stat-num {
  color: var(--paper);
}
.stat-value--text {
  font-size: clamp(1.9rem, 3.6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.stat-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 180px;
  line-height: 1.7;
}

.testimonial {
  margin-top: clamp(60px, 8vw, 120px);
  position: relative;
  max-width: 1000px;
  padding-left: clamp(0px, 5vw, 84px);
}
.quote-mark {
  position: absolute;
  left: 0;
  top: -0.24em;
  font-family: var(--serif);
  font-size: clamp(6rem, 10vw, 10rem);
  line-height: 1;
  color: var(--acid);
  opacity: 0.9;
}
.testimonial blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.8vw, 2.5rem);
  line-height: 1.28;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}
.quote-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}
.quote-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--acid);
  background: rgba(198, 255, 61, 0.05);
  flex: none;
}
.quote-meta strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
}
.quote-meta span span {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- Expertise ---------- */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.cap-card {
  position: relative;
  background: var(--ink);
  padding: clamp(26px, 3.4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 290px;
  overflow: hidden;
  transition: background-color 0.5s var(--ease);
}
.cap-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.cap-card:hover {
  background: #0a0b08;
}
.cap-card:hover::after {
  transform: scaleX(1);
}
.cap-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.cap-icon {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--acid);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.cap-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cap-card:hover .cap-icon {
  background: var(--acid);
  color: var(--ink);
}
.cap-index {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted-2);
  letter-spacing: 0.1em;
}
.cap-title {
  font-size: clamp(1.2rem, 1.9vw, 1.65rem);
  letter-spacing: -0.025em;
  font-weight: 500;
  margin-top: auto;
}
.cap-body {
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 300;
  max-width: 460px;
}
.cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.cap-tags span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
}

.stack-block {
  margin-top: clamp(48px, 6vw, 84px);
}
.stack-head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.stack-hint {
  color: var(--muted-2);
}
.stack-marquee {
  overflow: hidden;
  padding: 4px 0;
}
.stack-marquee.reverse .ticker-track {
  animation-direction: reverse;
  animation-duration: 46s;
}
.stack-track {
  animation-duration: 52s;
  gap: 0;
}
.stack-track .ticker-group {
  gap: 10px;
  padding-right: 10px;
}
.stack-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--paper-dim);
  white-space: nowrap;
  transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}
.stack-pill::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted-2);
  transition: background-color 0.3s ease;
}
.stack-pill:hover {
  border-color: var(--acid);
  color: var(--paper);
  background: rgba(198, 255, 61, 0.04);
}
.stack-pill:hover::before {
  background: var(--acid);
}

/* ---------- Experience ---------- */
.experience-intro {
  margin-bottom: clamp(34px, 5vw, 70px);
}
.exp-list {
  border-top: 1px solid var(--line);
}
.exp-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1.1fr) minmax(0, 1.3fr) 100px;
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(26px, 3.4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding-left 0.5s var(--ease);
}
.exp-row::before {
  content: "";
  position: absolute;
  left: calc(var(--pad) * -1);
  right: calc(var(--pad) * -1);
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(198, 255, 61, 0.04), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.exp-row:hover::before {
  opacity: 1;
}
.exp-row:hover {
  padding-left: 12px;
}
.exp-period {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 8px;
}
.exp-role {
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  letter-spacing: -0.03em;
  font-weight: 500;
  line-height: 1.2;
  transition: color 0.3s ease;
}
.exp-row:hover .exp-role {
  color: var(--acid);
}
.exp-company {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  color: var(--muted);
  margin-top: 6px;
}
.exp-copy {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 300;
  max-width: 480px;
}
.exp-tags {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.exp-tags span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
}

/* ---------- Contact ---------- */
.contact {
  position: relative;
  z-index: 4;
  background: transparent;
  padding: clamp(90px, 12vw, 170px) var(--pad) clamp(52px, 7vw, 90px);
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    95% 85% at 58% 42%,
    rgba(5, 5, 6, 0.28) 0%,
    rgba(5, 5, 6, 0.72) 52%,
    rgba(5, 5, 6, 0.96) 82%
  );
}
.contact-glow {
  position: absolute;
  width: 90vw;
  height: 90vw;
  max-width: 1100px;
  max-height: 1100px;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  /* The gradient is already soft; a 1100px blur filter only cost memory. */
  background: radial-gradient(circle, rgba(198, 255, 61, 0.13), rgba(139, 123, 255, 0.06) 42%, transparent 66%);
  pointer-events: none;
  z-index: 0;
}
.contact-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 72svh;
}
.contact-head {
  width: 100%;
}
/* The chrome sits on the right at rest — keep this head free of light text. */
.contact .section-note {
  display: none;
}
.contact-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: clamp(20px, 4vw, 50px) 0 22px;
}
.contact-title {
  font-size: clamp(2.9rem, 9vw, 9.2rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  font-weight: 500;
  text-transform: none;
}
.contact-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}
.contact-line > span {
  display: block;
  will-change: transform;
}
.contact-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--acid);
  letter-spacing: -0.03em;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-top: clamp(34px, 5vw, 64px);
}
.mail-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(1.15rem, 2.3vw, 2rem);
  letter-spacing: -0.02em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.4s ease, color 0.3s ease;
  word-break: break-word;
}
.mail-link svg {
  width: clamp(16px, 2vw, 22px);
  height: clamp(16px, 2vw, 22px);
  fill: none;
  stroke: var(--acid);
  stroke-width: 1.3;
  transition: transform 0.4s var(--ease);
  flex: none;
}
.mail-link:hover {
  border-color: var(--acid);
  color: var(--acid);
}
.mail-link:hover svg {
  transform: translate(4px, -4px);
}
.copy-btn {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}
.copy-btn:hover {
  border-color: var(--acid);
  color: var(--acid);
}
.copy-btn.is-copied {
  background: var(--acid);
  border-color: var(--acid);
  color: var(--ink);
}
.contact-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-top: auto;
  padding-top: clamp(50px, 8vw, 110px);
}
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
}
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-dim);
  padding: 4px 0;
  position: relative;
  transition: color 0.3s ease;
}
.socials a span.social-handle {
  color: var(--muted-2);
  font-size: 9px;
  text-transform: none;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}
.socials a::before {
  content: "↗";
  color: var(--acid);
  font-size: 11px;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}
.socials a:hover {
  color: var(--acid);
}
.socials a:hover::before {
  opacity: 1;
  transform: translate(0, 0);
}
.socials a:hover span.social-handle {
  color: var(--muted);
}
.contact-note {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  text-align: right;
  line-height: 1.8;
}

/* ---------- Contact form ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: stretch;
}
.contact-lead {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.contact-layout .contact-title {
  font-size: clamp(2.8rem, 7.2vw, 7.6rem);
}
.contact-layout .contact-actions {
  margin-top: clamp(28px, 4vw, 48px);
}
.contact-layout .contact-foot {
  margin-top: auto;
  padding-top: clamp(40px, 6vw, 80px);
}

.contact-form {
  position: relative;
  align-self: start;
  width: 100%;
  padding: clamp(20px, 2.2vw, 30px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(198, 255, 61, 0.055), transparent 55%),
    linear-gradient(180deg, rgba(236, 236, 231, 0.045), rgba(236, 236, 231, 0.012)),
    rgba(5, 5, 6, 0.55);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.contact-form::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(198, 255, 61, 0.65), transparent);
}
.form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.form-heading .mono-label {
  color: var(--paper);
}
.form-timing {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}
.form-timing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(198, 255, 61, 0.8);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-row--single {
  grid-template-columns: 1fr;
}
.form-row + .form-row,
.form-row + .field,
.field + .form-consent {
  margin-top: 12px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.field > span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 5, 6, 0.55);
  color: var(--paper);
  font: inherit;
  font-size: 14px;
  padding: 12px 13px;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
}
.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--line-strong);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--acid);
  background: rgba(5, 5, 6, 0.85);
  box-shadow: 0 0 0 3px rgba(198, 255, 61, 0.1);
}
.field textarea {
  resize: vertical;
  min-height: 108px;
  line-height: 1.55;
}
.field-phone {
  margin-top: 12px;
}
.field > span em {
  font-style: normal;
  color: var(--muted-2);
  text-transform: none;
  letter-spacing: 0.02em;
}
.field select {
  appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.field select option {
  background: var(--ink-2);
  color: var(--paper);
}
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}
.form-consent input {
  flex: none;
  margin-top: 2px;
  accent-color: var(--acid);
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.form-submit {
  padding: 13px 20px;
  font-size: 10px;
}
.btn-acid {
  background: var(--acid);
  border-color: var(--acid);
  color: var(--ink);
}
.btn-acid:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}
.btn-whatsapp {
  color: var(--paper-dim);
  border-color: rgba(37, 211, 102, 0.3);
}
.btn-whatsapp svg {
  width: 13px;
  height: 13px;
  fill: #25d366;
  stroke: none;
}
.btn-whatsapp .wa-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.12);
  box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.22);
}
.btn-whatsapp:hover {
  background: rgba(37, 211, 102, 0.1);
  border-color: rgba(37, 211, 102, 0.55);
  color: #66e68d;
}
.btn-whatsapp:hover .wa-icon {
  background: rgba(37, 211, 102, 0.2);
  box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.45);
}
.btn-whatsapp:hover svg {
  transform: none;
}
.form-submit[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.form-feedback {
  min-height: 1.1em;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--acid);
}
.form-feedback.is-error {
  color: #ff8b7a;
}
.form-fineprint {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted-2);
}
.form-honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form.is-sent .form-fields {
  display: none;
}
.form-success {
  padding: clamp(28px, 5vw, 54px) 8px;
  text-align: center;
}
.success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--acid);
  color: var(--ink);
  font-size: 22px;
  font-weight: 600;
  box-shadow: 0 0 36px rgba(198, 255, 61, 0.28);
}
.form-success h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.form-success h3:focus {
  outline: none;
}
.form-success p {
  max-width: 360px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}
.success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px 9px 10px;
  border: 1px solid rgba(37, 211, 102, 0.28);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-dim);
  transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}
.wa-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.whatsapp-link .wa-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.12);
  box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.22);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.whatsapp-link svg {
  width: 14px;
  height: 14px;
  fill: #25d366;
}
.whatsapp-link:hover {
  border-color: rgba(37, 211, 102, 0.6);
  background: rgba(37, 211, 102, 0.08);
  color: #66e68d;
}
.whatsapp-link:hover .wa-icon {
  background: rgba(37, 211, 102, 0.2);
  box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.45);
}

@media (max-width: 1024px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .contact-form {
    max-width: 680px;
    margin-inline: auto;
  }
  .contact-layout .contact-title {
    font-size: clamp(2.9rem, 9vw, 7rem);
  }
  .contact-layout .contact-foot {
    padding-top: 36px;
  }
}
@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .form-row + .form-row,
  .form-row + .field,
  .field + .form-consent {
    margin-top: 12px;
  }
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .contact-form {
    border-radius: 16px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 4;
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  padding: clamp(50px, 7vw, 90px) var(--pad) 24px;
  overflow: hidden;
}
.footer-top {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: clamp(40px, 6vw, 70px);
}
.footer-brand .brand {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
}
.footer-brand p {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 280px;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  gap: clamp(40px, 7vw, 110px);
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col .mono-label {
  margin-bottom: 8px;
}
.footer-col a {
  font-size: 0.82rem;
  color: var(--paper-dim);
  transition: color 0.3s ease, transform 0.3s var(--ease);
  width: fit-content;
}
.footer-col a:hover {
  color: var(--acid);
  transform: translateX(4px);
}
.footer-col #footer-socials {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-wordmark {
  max-width: var(--max);
  margin: 0 auto;
  font-size: clamp(4.5rem, 21vw, 21rem);
  line-height: 0.72;
  letter-spacing: -0.06em;
  font-weight: 500;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 236, 231, 0.16);
  user-select: none;
  pointer-events: none;
  transform: translateY(0.08em);
}
.footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 26px;
  padding-top: 22px;
  margin-top: clamp(20px, 3vw, 36px);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.footer-clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.back-top {
  color: var(--paper-dim);
  transition: color 0.3s ease;
}
.back-top:hover {
  color: var(--acid);
}
.local-inbox-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--acid);
  transition: color 0.3s ease;
}
.local-inbox-link::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px rgba(198, 255, 61, 0.6);
}
.local-inbox-link:hover {
  color: var(--paper);
}
.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--muted);
  transition: color 0.3s ease;
}
.motion-toggle:hover {
  color: var(--paper);
}
.motion-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 12px rgba(198, 255, 61, 0.55);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.motion-toggle[aria-pressed="false"] .motion-dot {
  background: var(--muted-2);
  box-shadow: none;
}

/* ---------- Case dialog ---------- */
.case-dialog {
  position: fixed;
  inset: 0;
  z-index: 9600;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(5, 5, 6, 0.9);
  color: var(--paper);
  overflow: hidden;
}
.case-dialog::backdrop {
  background: rgba(5, 5, 6, 0.9);
}
.case-dialog[open] {
  display: block;
  animation: dialog-in 0.4s var(--ease);
}
@keyframes dialog-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.case-panel {
  position: absolute;
  inset: 0;
  background: var(--ink-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.case-close {
  position: absolute;
  top: clamp(16px, 2.5vw, 30px);
  right: clamp(16px, 2.5vw, 30px);
  z-index: 10;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(5, 5, 6, 0.86);
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ease);
}
.case-close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 1px;
  background: var(--paper);
}
.case-close span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.case-close span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }
.case-close:hover {
  background: var(--acid);
  border-color: var(--acid);
  transform: rotate(90deg);
}
.case-close:hover span {
  background: var(--ink);
}
.case-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(60px, 8vw, 100px) clamp(20px, 7vw, 110px) 70px;
  height: 100%;
}
.case-top {
  display: flex;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto clamp(24px, 4vw, 44px);
  color: var(--acid);
}
.case-title {
  max-width: 1100px;
  margin: 0 auto;
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-weight: 500;
}
.case-subtitle {
  max-width: 1100px;
  margin: 12px auto 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  color: var(--muted);
}
.case-art {
  max-width: 1100px;
  margin: clamp(28px, 4vw, 52px) auto;
  height: clamp(220px, 38vw, 460px);
  border: 1px solid var(--line);
}
.case-art .art {
  width: 100%;
  height: 100%;
}
.case-meta {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.case-meta > div {
  background: var(--ink-2);
  padding: 22px 24px;
}
.case-meta dt {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 8px;
}
.case-meta dd {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--paper-dim);
}
.case-body {
  max-width: 1100px;
  margin: clamp(38px, 5vw, 64px) auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 56px);
}
.case-block p {
  margin-top: 14px;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--muted);
  font-weight: 300;
  text-wrap: pretty;
}
.case-foot {
  max-width: 1100px;
  margin: clamp(48px, 6vw, 80px) auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Noscript ---------- */
.noscript {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10002;
  padding: 16px var(--pad);
  background: var(--acid);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.noscript a {
  text-decoration: underline;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1240px) {
  .status {
    display: none;
  }
  .project-row {
    grid-template-columns: 44px minmax(0, 1.1fr) minmax(0, 0.9fr) auto 64px 38px;
  }
}

@media (max-width: 1024px) {
  .project-row {
    grid-template-columns: 38px minmax(0, 1.1fr) minmax(0, 0.9fr) 70px 36px;
  }
  .project-stack {
    display: none;
  }
  .about-grid {
    grid-template-columns: 1fr 0.7fr;
    gap: 48px;
  }
  .exp-row {
    grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.2fr);
  }
  .exp-tags {
    display: none;
  }
  .case-body {
    grid-template-columns: 1fr 1fr;
  }
  .case-body .case-block:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 76px;
  }
  .nav-desktop,
  .header-right .btn {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .header-right {
    margin-left: auto;
  }
  .hero-vignette {
    background:
      radial-gradient(92% 27% at 50% 42%, rgba(5, 5, 6, 0.72) 0%, rgba(5, 5, 6, 0.42) 58%, transparent 100%),
      radial-gradient(95% 70% at 58% 42%, rgba(5, 5, 6, 0.2) 0%, rgba(5, 5, 6, 0.58) 52%, rgba(5, 5, 6, 0.9) 86%),
      linear-gradient(to top, rgba(5, 5, 6, 0.96) 0%, rgba(5, 5, 6, 0.25) 42%, transparent 70%);
  }
  .hero-title .line-outline .line-inner {
    -webkit-text-stroke-color: rgba(236, 236, 231, 0.68);
  }
  .hero-fallback {
    right: -12%;
    width: 80vw;
    opacity: 0.5;
  }
  .hero-title {
    font-size: clamp(3.4rem, 14.5vw, 8rem);
  }
  .hero-side .hero-coords {
    display: none;
  }
  .hero-lead {
    max-width: 330px;
  }
  .about-grid,
  .work-intro,
  .expertise-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }
  .statement {
    font-size: clamp(1.6rem, 5vw, 2.6rem);
  }
  .about-aside {
    max-width: 520px;
  }
  .cap-grid {
    grid-template-columns: 1fr;
  }
  .cap-card {
    min-height: 250px;
  }
  .testimonial {
    padding-left: 0;
    padding-top: 46px;
  }
  .quote-mark {
    top: -0.3em;
    font-size: 5rem;
  }
  .exp-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .exp-period {
    padding-top: 0;
  }
  .exp-copy {
    max-width: none;
  }
  .contact-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }
  .contact-note {
    text-align: left;
  }
  .footer-top {
    flex-direction: column;
    gap: 40px;
  }
  .footer-links {
    width: 100%;
    justify-content: space-between;
  }
  .footer-built {
    display: none;
  }
  .case-meta {
    grid-template-columns: 1fr;
  }
  .case-body {
    grid-template-columns: 1fr;
  }
  .case-body .case-block:last-child {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  :root {
    --pad: 18px;
  }
  .hero {
    min-height: 100svh;
  }
  .hero-inner {
    padding-top: calc(var(--header-h) + 22px);
    padding-bottom: 24px;
  }
  .hero-meta-top {
    display: none;
  }
  .hero-title {
    font-size: clamp(3.1rem, 16.5vw, 5.6rem);
    margin: 22px 0;
    line-height: 0.86;
  }
  .hero-title .line-serif {
    font-size: 0.96em;
  }
  .hero-title-mark {
    font-size: 0.13em;
  }
  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }
  .hero-lead {
    font-size: 0.82rem;
    max-width: 290px;
  }
  .hero-side {
    width: 100%;
  }
  .hero-scroll-ring {
    width: 42px;
    height: 42px;
  }
  .ticker-item {
    padding: 13px 20px;
    font-size: 9px;
  }
  .section {
    padding-top: 76px;
    padding-bottom: 76px;
  }
  .section-head {
    grid-template-columns: 30px 1fr auto;
    row-gap: 8px;
  }
  .section-rule {
    display: none;
  }
  .section-note {
    grid-column: 3;
    font-size: 8px;
  }
  .work-intro .display br {
    display: none;
  }
  .display {
    font-size: clamp(2.6rem, 12vw, 4.6rem);
  }
  .project-row {
    grid-template-columns: 28px minmax(0, 1fr) 34px;
    gap: 12px;
    padding: 22px 0;
  }
  .project-sub {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.95rem;
  }
  .project-num {
    grid-row: span 2;
    align-self: start;
    padding-top: 8px;
  }
  .project-year {
    display: none;
  }
  .project-cta {
    grid-column: 3;
    grid-row: 2;
    align-self: center;
    width: 32px;
    height: 32px;
  }
  .project-title {
    grid-column: 2 / 4;
    font-size: clamp(1.5rem, 7.2vw, 2.6rem);
    overflow-wrap: anywhere;
  }
  .work-foot {
    justify-content: flex-start;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .stat {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 4px;
  }
  .stat--text {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .stat-value {
    font-size: clamp(3rem, 14vw, 4.4rem);
  }
  .stat-label {
    text-align: right;
    max-width: 150px;
  }
  .cap-card {
    padding: 24px;
    min-height: 230px;
  }
  .exp-row:hover {
    padding-left: 0;
  }
  .contact {
    padding-top: 84px;
  }
  .contact-title {
    font-size: clamp(2.7rem, 14vw, 4.4rem);
  }
  .contact-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .contact-note {
    display: none;
  }
  .socials {
    gap: 8px 20px;
  }
  .footer-wordmark {
    font-size: 22vw;
  }
  .footer-bottom {
    font-size: 8px;
  }
  .back-top {
    width: 100%;
  }
  .case-scroll {
    padding: 70px 18px 50px;
  }
  .case-title {
    font-size: 3.4rem;
  }
  .case-meta > div {
    padding: 18px;
  }
}

@media (max-width: 380px) {
  .hero-title {
    font-size: 3rem;
  }
  .hero-lead {
    max-width: 250px;
  }
  .contact-title {
    font-size: 2.55rem;
  }
}

/* ---------- Motion paused (footer toggle) ---------- */
html.motion-off *,
html.motion-off *::before,
html.motion-off *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}
html.motion-off .ticker-track,
html.motion-off .stack-track {
  animation: none !important;
}
html.motion-off .hero-title .line-inner,
html.motion-off .contact-line > span {
  transform: none !important;
}
html.motion-off .statement .w {
  opacity: 1 !important;
}
html.motion-off .cursor {
  display: none;
}

/* ---------- Low quality (auto-degrade or ?quality=low) ---------- */
html[data-quality="low"] .contact-glow {
  display: none;
}
