/* ============================================================
   Suleman Malghani — portfolio
   Dark, typographic, motion-first portfolio
   ============================================================ */

:root {
  --bg: #0b0b0d;
  --bg-soft: #121215;
  --ink: #eceae5;
  --muted: #8d8d96;
  --accent: #d9ff4b;
  --accent-dim: rgba(217, 255, 75, 0.55);
  --line: rgba(236, 234, 229, 0.1);
  --line-soft: rgba(236, 234, 229, 0.06);

  --font-display: 'Syne', sans-serif;
  --font-serif: 'Instrument Serif', serif;
  --font-body: 'Space Grotesk', sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pad-x: clamp(1.25rem, 4vw, 4rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }
img, canvas { display: block; max-width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a30; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a42; }

/* ---------- Film grain ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

html.js .preloader { display: flex; }

.preloader-panel { position: absolute; inset: 0; }
.panel-dark { background: var(--bg); z-index: 1; }
.panel-accent { background: var(--accent); z-index: 0; }

.preloader-content { position: relative; z-index: 2; text-align: center; }

.preloader-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 3vw, 2.2rem);
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  white-space: nowrap;
  overflow: hidden;
}

.preloader-tag {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--muted);
  margin-top: 0.6rem;
  overflow: hidden;
}

.pl-line { display: inline-block; }

.preloader-count {
  position: absolute;
  right: clamp(1.5rem, 4vw, 3.5rem);
  bottom: clamp(1.25rem, 3.5vw, 2.5rem);
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.03em;
}

/* ---------- Custom cursor ---------- */
.cursor { display: none; }

@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 300;
    pointer-events: none;
  }

  .cursor-dot {
    position: fixed;
    top: -3px;
    left: -3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
  }

  .cursor-ring {
    position: fixed;
    top: -22px;
    left: -22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(236, 234, 229, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
  }

  .cursor.is-active .cursor-ring {
    background: var(--accent);
    border-color: var(--accent);
  }

  .cursor-label {
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--bg);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .cursor.is-active .cursor-label { opacity: 1; transform: scale(1); }

  html.js body { cursor: none; }
  html.js a, html.js button { cursor: none; }
}

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad-x);
  transition: transform 0.5s var(--ease-out), background-color 0.4s ease;
}

.site-nav.nav-hidden { transform: translateY(-110%); }

.site-nav.nav-scrolled {
  background: rgba(11, 11, 13, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

/* While the menu overlay is open, the nav floats above it cleanly */
body.menu-open .site-nav {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  transform: none !important;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  text-transform: lowercase;
  position: relative;
  z-index: 130;
}

.logo sup { color: var(--accent); font-size: 0.6em; margin-left: 2px; }

.nav-links { display: flex; gap: 2.2rem; }

.nav-link {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}

.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-right { display: flex; align-items: center; gap: 1.5rem; }

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 255, 75, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(217, 255, 75, 0); }
}

/* Burger */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 44px;
  height: 44px;
  align-items: center;
  position: relative;
  z-index: 130;
}

.menu-btn-line {
  display: block;
  width: 26px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.4s var(--ease-out), opacity 0.3s;
}

.menu-btn.is-open .menu-btn-line:nth-child(1) { transform: translateY(4.25px) rotate(45deg); }
.menu-btn.is-open .menu-btn-line:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }

/* ---------- Mobile menu overlay ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem var(--pad-x) 3rem;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.7s var(--ease-out), visibility 0s 0.7s;
}

.menu-overlay.is-open {
  clip-path: inset(0 0 0% 0);
  visibility: visible;
  transition: clip-path 0.7s var(--ease-out), visibility 0s 0s;
}

.menu-nav { display: flex; flex-direction: column; gap: 0.4rem; }

.menu-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 10vw, 4.5rem);
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.55s ease, transform 0.55s var(--ease-out), color 0.3s ease;
}

.menu-link:hover, .menu-link:active { color: var(--accent); }

.menu-overlay.is-open .menu-link { opacity: 1; transform: translateY(0); }
.menu-overlay.is-open .menu-link:nth-child(1) { transition-delay: 0.18s; }
.menu-overlay.is-open .menu-link:nth-child(2) { transition-delay: 0.26s; }
.menu-overlay.is-open .menu-link:nth-child(3) { transition-delay: 0.34s; }
.menu-overlay.is-open .menu-link:nth-child(4) { transition-delay: 0.42s; }

.menu-index {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.menu-foot {
  margin-top: 4rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease 0.5s, transform 0.5s var(--ease-out) 0.5s;
}

.menu-overlay.is-open .menu-foot { opacity: 1; transform: translateY(0); }

.menu-mail {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.menu-meta {
  margin-top: 0.9rem;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem var(--pad-x) 8.5rem;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  top: -25vmax;
  right: -18vmax;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 255, 75, 0.07) 0%, transparent 65%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 2; }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(1.5rem, 4vh, 3rem);
}

.hero-eyebrow::before {
  content: '';
  width: 38px;
  height: 1px;
  background: var(--accent);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 9.5vw, 11rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  user-select: none;
}

.hero-line { display: block; overflow: hidden; padding: 0.04em 0; white-space: nowrap; }
.hero-line-2 { margin-left: clamp(1.5rem, 6vw, 6rem); }

.hero-title .outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
}

.split-chars .char { display: inline-block; }

.hero-tagline {
  margin-top: clamp(1.6rem, 4vh, 3rem);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  color: var(--ink);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.55ch;
}

.rotator {
  display: inline-block;
  overflow: hidden;
  height: 1.32em;
  vertical-align: bottom;
}

.rotator-inner { display: flex; flex-direction: column; }

.rotator-word {
  display: block;
  height: 1.32em;
  color: var(--accent);
  white-space: nowrap;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: clamp(1.8rem, 4.5vh, 3rem);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border-radius: 99px;
  padding: 0.95rem 1.6rem;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -8px rgba(217, 255, 75, 0.45);
}

.hero-cta-arrow { transition: transform 0.35s var(--ease-out); }
.hero-cta:hover .hero-cta-arrow { transform: translateX(5px); }

.hero-cta-ghost {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s ease;
}

.hero-cta-ghost::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.hero-cta-ghost:hover { color: var(--ink); }
.hero-cta-ghost:hover::after { transform: scaleX(1); transform-origin: left; }

.hero-note {
  position: absolute;
  right: 0;
  bottom: -3.5rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: right;
  line-height: 1.5;
}

.hero-meta {
  position: absolute;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: 2.2rem;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.hero-meta-item {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.7;
}

.hero-meta-item.right { text-align: right; }

.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.35; transform: scaleY(0.85); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.3rem 0;
  overflow: hidden;
  position: relative;
  z-index: 2;
  background: var(--bg);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.6rem;
  width: max-content;
  will-change: transform;
}

.marquee-item {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--ink);
}

.marquee-item:nth-child(4n + 3) {
  color: transparent;
  -webkit-text-stroke: 1px var(--muted);
}

.marquee-star { color: var(--accent); font-size: 1rem; }

/* ---------- Sections (shared) ---------- */
.section { padding: clamp(6rem, 14vh, 10rem) var(--pad-x); position: relative; }

.section-head { margin-bottom: clamp(3rem, 7vh, 5.5rem); }

.section-label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}

.section-label::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6.5vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.split-words .word { display: inline-block; }
.split-words .word-mask { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; margin-bottom: -0.08em; }

/* ---------- About / Manifesto ---------- */
.manifesto {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.45rem, 3.4vw, 2.8rem);
  line-height: 1.32;
  letter-spacing: -0.01em;
  max-width: 56rem;
}

.manifesto .word { display: inline-block; }

.stats {
  margin-top: clamp(4rem, 9vh, 7rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.stat {
  padding: 2.2rem 1.5rem 0 0;
  border-right: 1px solid var(--line-soft);
}

.stat:last-child { border-right: none; }
.stat:not(:first-child) { padding-left: 1.5rem; }

.stat-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-suffix { color: var(--accent); font-size: 0.55em; vertical-align: super; margin-left: 0.1em; }

.stat-label {
  margin-top: 0.8rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- Work ---------- */
.projects { display: flex; flex-direction: column; gap: clamp(5rem, 12vh, 9rem); }

.project {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.project:nth-child(even) .project-visual { order: 2; }

.project-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-soft);
}

.visual-art {
  position: absolute;
  inset: -12% 0;
  transition: transform 1.1s var(--ease-out);
  will-change: transform;
}

.project:hover .visual-art { transform: scale(1.045); }

/* Real project screenshots: a browser-window crop rising from the card's bottom edge */
a.project-visual { display: block; }

.art-shot {
  background:
    radial-gradient(ellipse at 50% 110%, rgba(217, 255, 75, 0.14), transparent 60%),
    var(--bg-soft);
}

.visual-shot {
  position: absolute;
  top: 17%;
  left: 7%;
  width: 86%;
  height: auto;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(236, 234, 229, 0.08);
}

.art-index {
  position: absolute;
  bottom: 4%;
  left: 5%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, 11vw, 10rem);
  line-height: 1;
  color: rgba(236, 234, 229, 0.08);
  letter-spacing: -0.04em;
  user-select: none;
}

/* Art 1 — Lumen: lime aurora on deep green-black */
.art-1 {
  background:
    radial-gradient(85% 65% at 72% 18%, rgba(217, 255, 75, 0.5) 0%, transparent 58%),
    radial-gradient(70% 70% at 18% 85%, rgba(38, 84, 58, 0.95) 0%, transparent 65%),
    radial-gradient(45% 45% at 45% 50%, rgba(120, 160, 60, 0.25) 0%, transparent 70%),
    #0c110b;
}

.shape-ring {
  position: absolute;
  top: 22%;
  left: 14%;
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid rgba(236, 234, 229, 0.4);
  transition: transform 1.1s var(--ease-out);
}

.shape-ring::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

.project:hover .shape-ring { transform: rotate(90deg) scale(1.08); }

/* Art 2 — Aether: indigo waves */
.art-2 {
  background:
    radial-gradient(75% 60% at 28% 30%, rgba(99, 86, 235, 0.65) 0%, transparent 60%),
    radial-gradient(60% 60% at 80% 75%, rgba(40, 35, 120, 0.85) 0%, transparent 65%),
    radial-gradient(40% 35% at 70% 25%, rgba(190, 180, 255, 0.28) 0%, transparent 70%),
    #0b0a16;
}

.shape-orbits {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(236, 234, 229, 0.28);
}

.shape-orbits::before, .shape-orbits::after {
  content: '';
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  border: 1px solid rgba(236, 234, 229, 0.22);
}

.shape-orbits::after { inset: 34%; border-color: rgba(217, 255, 75, 0.5); }

.project:hover .shape-orbits { animation: spinSlow 14s linear infinite; }

/* Platform logo on a light app-icon tile, centred in the orbit rings */
.art-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 22%;
  background: #f4f3ef;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6), 0 0 40px rgba(99, 86, 235, 0.45);
}

.art-logo img { width: 66%; height: auto; }

@keyframes spinSlow {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Art 3 — Forma: warm paper & architectural grid */
.art-3 {
  background:
    linear-gradient(150deg, #ddd6c7 0%, #c4baa6 55%, #a89d86 100%);
}

.art-3 .art-index { color: rgba(11, 11, 13, 0.1); }

.shape-grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(11, 11, 13, 0.12) 0 1px, transparent 1px 25%),
    repeating-linear-gradient(0deg, rgba(11, 11, 13, 0.12) 0 1px, transparent 1px 33.4%);
  transition: opacity 0.8s ease;
}

.shape-grid::after {
  content: '';
  position: absolute;
  top: 33.4%;
  left: 50%;
  width: 25%;
  height: 33.3%;
  background: #0b0b0d;
  transition: transform 0.9s var(--ease-out);
}

.project:hover .shape-grid::after { transform: translateX(-100%); }

/* Art 4 — Pulse: coral heartbeat on charcoal */
.art-4 {
  background:
    radial-gradient(70% 55% at 70% 70%, rgba(255, 93, 73, 0.55) 0%, transparent 60%),
    radial-gradient(50% 50% at 25% 25%, rgba(120, 30, 30, 0.6) 0%, transparent 65%),
    #120c0c;
}

.shape-pulse {
  position: absolute;
  top: 30%;
  left: 24%;
  width: 18%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 93, 73, 0.9);
}

.shape-pulse::before, .shape-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 93, 73, 0.7);
  animation: ripple 2.6s ease-out infinite;
}

.shape-pulse::after { animation-delay: 1.3s; }

@keyframes ripple {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(2.6); opacity: 0; }
}

/* Project info */
.project-num {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.3rem;
}

.project-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.3rem;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 42ch;
  margin-bottom: 1.8rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.1rem;
}

.project-tags li {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.38rem 0.85rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding-bottom: 4px;
}

.project-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.project-link:hover::after { transform: scaleX(1); transform-origin: left; }

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 2rem;
}

.project-link-muted { color: var(--muted); transition: color 0.3s ease; }
.project-link-muted:hover { color: var(--ink); }

.link-arrow { transition: transform 0.35s var(--ease-out); }
.project-link:hover .link-arrow { transform: translateX(5px); }

/* ---------- Services ---------- */
.service-list { border-top: 1px solid var(--line); }

.service-row {
  position: relative;
  display: grid;
  grid-template-columns: 4rem 1.1fr 1fr 3rem;
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(1.8rem, 4vh, 2.8rem) 0.5rem;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.service-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s var(--ease-out);
  z-index: 0;
}

.service-row:hover::before { transform: scaleY(1); transform-origin: top; }

.service-row > * { position: relative; z-index: 1; transition: color 0.35s ease; }

.service-index {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--accent);
}

.service-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.45rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.service-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 46ch;
}

.service-arrow {
  font-size: 1.5rem;
  justify-self: end;
  transform: translateX(-10px) rotate(-45deg);
  opacity: 0;
  transition: transform 0.45s var(--ease-out), opacity 0.35s ease, color 0.35s ease;
}

.service-row:hover .service-index,
.service-row:hover .service-title,
.service-row:hover .service-desc,
.service-row:hover .service-arrow { color: var(--bg); }

.service-row:hover .service-arrow { transform: translateX(0) rotate(0deg); opacity: 1; }

/* ---------- Process ---------- */
.process-list { border-top: 1px solid var(--line); }

.process-row {
  display: grid;
  grid-template-columns: 6rem 1fr auto;
  align-items: start;
  gap: clamp(1rem, 3vw, 3rem);
  padding: 2.1rem 0.5rem;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease-out), background-color 0.4s ease;
}

.process-row:hover { padding-left: 1.4rem; background: rgba(236, 234, 229, 0.025); }

.process-num {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent);
  font-size: 1.15rem;
  line-height: 1.4;
}

.process-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.process-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 56ch;
}

.process-tag {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.35rem 0.85rem;
  margin-top: 0.3rem;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.process-row:hover .process-tag { color: var(--accent); border-color: var(--accent-dim); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(70% 60% at 50% 115%, rgba(217, 255, 75, 0.07) 0%, transparent 70%),
    var(--bg);
  position: relative;
  overflow: hidden;
}

.footer-inner { padding: clamp(6rem, 14vh, 9rem) var(--pad-x) 2.5rem; }

.footer-kicker {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.6rem;
}

.footer-kicker::before { content: ''; width: 30px; height: 1px; background: var(--accent); }

.footer-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 1.9rem);
  color: var(--muted);
  margin-bottom: 1rem;
}

.footer-cta { display: inline-block; }

.footer-cta-text {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 9.6vw, 11rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
  transition: color 0.5s ease, -webkit-text-stroke-color 0.5s ease;
}

.footer-cta:hover .footer-cta-text {
  color: var(--accent);
  -webkit-text-stroke-color: var(--accent);
}

.footer-grid {
  margin-top: clamp(4rem, 9vh, 6.5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line-soft);
}

.footer-col { display: flex; flex-direction: column; gap: 0.55rem; align-items: flex-start; }

.footer-col-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.footer-link {
  font-size: 0.92rem;
  color: var(--ink);
  position: relative;
  width: fit-content;
  transition: color 0.3s ease;
}

.footer-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}

.footer-link:hover { color: var(--accent); }
.footer-link:hover::after { transform: scaleX(1); transform-origin: left; }

.footer-text { font-size: 0.92rem; color: var(--ink); }
.local-time { color: var(--accent); font-variant-numeric: tabular-nums; }

.footer-bottom {
  margin-top: 4.5rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.back-top {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.back-top:hover { color: var(--accent); }

/* ---------- No-anim fallback (GSAP failed to load) ---------- */
body.no-anim .preloader { display: none !important; }
html.js body.no-anim { cursor: auto; }
body.no-anim .cursor { display: none !important; }
body.no-anim .marquee-track { animation: marqueeFallback 28s linear infinite; }

@keyframes marqueeFallback {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .stat-label { font-size: 0.72rem; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .nav-status { display: none; }

  .project { grid-template-columns: 1fr; gap: 1.8rem; align-items: start; }
  .project:nth-child(even) .project-visual { order: 0; }

  .service-row { grid-template-columns: 2.6rem 1fr 2rem; grid-template-rows: auto auto; }
  .service-desc { grid-column: 2; grid-row: 2; margin-top: 0.4rem; font-size: 0.82rem; }

  .stats { grid-template-columns: 1fr 1fr; border-top: none; }
  .stat { border-top: 1px solid var(--line); padding-left: 0 !important; }
  .stat:nth-child(even) { padding-left: 1.5rem !important; }
  .stat:nth-child(2n) { border-right: none; }
  .stat:last-child { grid-column: 1 / -1; border-right: none; }

  .hero-note { display: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Short viewports: the absolutely-positioned hero note collides with the meta bar */
@media (max-height: 760px) {
  .hero-note { display: none; }
}

@media (max-width: 560px) {
  .hero { padding-bottom: 9rem; }
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
  .hero-meta .scroll-hint { display: none; }
  .hero-meta-item.right { text-align: left; }

  .process-row { grid-template-columns: 2.6rem 1fr; gap: 0.9rem; padding: 1.6rem 0.25rem; }
  .process-tag { grid-column: 2; justify-self: start; margin-top: 0.9rem; }
  .process-num { font-size: 0.95rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  /* Distinguish the action from the copy lines around it */
  .footer-bottom .back-top {
    order: -1;
    color: var(--ink);
    border-bottom: 1px solid var(--accent-dim);
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
