/* ============================================================
   CORTIFICIAL — design system
   futuristic black · cyan→violet spectrum · Space Grotesk
   ============================================================ */

@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/SpaceGrotesk.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono.woff2') format('woff2');
  font-weight: 400 500;
  font-display: swap;
}

:root {
  --bg: #04040a;
  --bg-2: #090914;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #eceef6;
  --muted: #878a9c;
  --cyan: #00e5ff;
  --violet: #8b5cf6;
  --magenta: #ff2e88;
  --grad: linear-gradient(92deg, var(--cyan), var(--violet));
  --grad-soft: linear-gradient(92deg, rgba(0, 229, 255, 0.16), rgba(139, 92, 246, 0.16));
  --font-display: 'Space Grotesk', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --header-h: 76px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection { background: var(--cyan); color: #04040a; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg, canvas { display: block; max-width: 100%; }

/* fine dot-grid backdrop */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
  z-index: 0;
}

/* film grain */
.noise {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 200;
  animation: grain 8s steps(10) infinite;
  opacity: 0.55;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ---------- custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  border-radius: 50%;
  z-index: 300;
  transform: translate(-50%, -50%);
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--cyan);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(0, 229, 255, 0.5);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out),
    border-color 0.25s, background 0.25s;
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  border-color: rgba(139, 92, 246, 0.9);
  background: rgba(139, 92, 246, 0.08);
}
.cursor-ring.is-hover-text::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--cyan);
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}
body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 150;
}

/* ---------- preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.preloader .logo-mark { width: 84px; height: 84px; }
.preloader-count {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--muted);
}
.preloader-bar {
  width: 180px;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.preloader-bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.logo-mark { width: 38px; height: 38px; flex: none; transition: transform 0.7s var(--ease-out); }
.logo:hover .logo-mark { transform: rotate(120deg); }
.logo-mark circle { animation: node-pulse 3s ease-in-out infinite; transform-origin: center; }
.logo-mark circle:nth-of-type(2n) { animation-delay: 0.7s; }
.logo-mark circle:nth-of-type(3n) { animation-delay: 1.4s; }
@keyframes node-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.preloader .lm-arc {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: arc-draw 1.3s var(--ease-out) forwards;
}
@keyframes arc-draw { to { stroke-dashoffset: 0; } }
.logo-word {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  background: linear-gradient(92deg, #fff, #b9bdd3);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-word em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 128; /* above .mobile-menu so logo + burger stay reachable */
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(4, 4, 10, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav-desktop {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}
.nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.4s var(--ease-out);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav-link .idx { color: var(--cyan); margin-right: 6px; font-size: 10px; }

.btn-private {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.btn-private .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.btn-private:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.18);
  background: rgba(0, 229, 255, 0.06);
}

/* burger */
.burger {
  display: none;
  background: none;
  border: 0;
  width: 44px; height: 44px;
  position: relative;
  z-index: 130;
}
.burger span {
  position: absolute;
  left: 10px;
  width: 24px; height: 2px;
  background: var(--text);
  transition: transform 0.35s var(--ease-out), top 0.35s var(--ease-out), opacity 0.3s;
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 28px; }
.burger.is-open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 125;
  background: rgba(4, 4, 10, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 32px;
  gap: 8px;
  clip-path: circle(0 at calc(100% - 42px) 38px);
  transition: clip-path 0.7s var(--ease-out);
  visibility: hidden;
}
.mobile-menu.is-open {
  clip-path: circle(150% at calc(100% - 42px) 38px);
  visibility: visible;
}
.mobile-menu a {
  font-size: clamp(32px, 9vw, 52px);
  font-weight: 600;
  letter-spacing: -0.02em;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.mobile-menu a .idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
}
.mobile-menu .mobile-meta {
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

/* ---------- layout ---------- */
.wrap {
  width: min(1320px, 100% - clamp(40px, 8vw, 112px));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}
section { position: relative; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--grad);
}

.section-head { margin-bottom: clamp(40px, 6vw, 80px); }
.section-title {
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-top: 18px;
}
.section-title .outline {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.35);
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--header-h);
  overflow: hidden;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 30vh;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: 1;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; }
.hero-tag {
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.4vw, 13px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(20px, 3vw, 36px);
}
.hero-tag .blink {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse-dot 1.6s infinite;
}
.hero-title {
  font-size: clamp(52px, 10.5vw, 152px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; will-change: transform; }
.hero-title .thin {
  font-weight: 300;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(236, 238, 246, 0.75);
}
.hero-sub {
  margin-top: clamp(24px, 4vw, 44px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 64px);
  align-items: flex-end;
  justify-content: space-between;
}
.hero-desc {
  max-width: 460px;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 18px);
}
.hero-desc strong { color: var(--text); font-weight: 500; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 30px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  transition: color 0.35s, border-color 0.35s;
  background: none;
  color: var(--text);
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-out);
  z-index: -1;
  border-radius: inherit;
}
.btn:hover { color: #04040a; border-color: transparent; }
.btn:hover::before { transform: translateY(0); }
.btn .arrow { transition: transform 0.35s var(--ease-out); }
.btn:hover .arrow { transform: translate(4px, -4px); }
.btn--solid {
  background: var(--grad);
  color: #04040a;
  border-color: transparent;
  font-weight: 500;
}
.btn--solid::before { background: #fff; }

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hero-scroll .wheel {
  width: 1px; height: 44px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}
.hero-scroll .wheel::after {
  content: '';
  position: absolute;
  top: -30%;
  left: 0;
  width: 100%; height: 30%;
  background: var(--cyan);
  animation: scroll-hint 1.8s var(--ease-out) infinite;
}
@keyframes scroll-hint {
  to { top: 130%; }
}

/* ---------- marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  padding: 18px 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.015);
  display: flex;
}
.marquee-track {
  display: flex;
  flex: none;
  gap: 0;
  animation: marquee 28s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  flex: none;
  font-size: clamp(16px, 2.4vw, 24px);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0 28px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 56px;
}
.marquee-track span::after {
  content: '◆';
  font-size: 10px;
  color: var(--cyan);
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- work ---------- */
.section-pad { padding: clamp(90px, 12vw, 160px) 0; }

.work-grid {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
}
.work-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(22px, 3.5vw, 44px);
  background: var(--surface);
  transition: border-color 0.4s, background 0.4s, box-shadow 0.4s;
  overflow: hidden;
}
.work-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  box-shadow: 0 24px 80px -32px rgba(0, 229, 255, 0.12);
}
.work-card:nth-child(even) .work-visual { order: -1; }
.work-visual {
  border-radius: 12px;
  aspect-ratio: 16 / 10.5;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease-out);
  background: var(--bg-2);
}
.work-card:hover .work-visual { transform: scale(1.02); }
.work-info .work-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.2em;
}
.work-info h3 {
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 12px 0 14px;
}
.work-info p { color: var(--muted); max-width: 42ch; font-size: 15px; }
.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 26px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 6px 13px;
  background: rgba(255, 255, 255, 0.02);
}
.work-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.work-link .arrow { color: var(--cyan); transition: transform 0.35s var(--ease-out); }
.work-link:hover .arrow { transform: translateX(6px); }

/* --- mock UI art inside work visuals --- */
.mock {
  position: absolute;
  inset: 0;
  padding: 10%;
  display: grid;
  place-items: center;
}
.mock-window {
  width: 100%;
  border-radius: 10px;
  background: rgba(10, 10, 22, 0.9);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.mock-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.mock-bar i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}
.mock-bar i:first-child { background: var(--magenta); }
.mock-bar i:nth-child(2) { background: var(--cyan); }
.mock-body { padding: 14px; display: grid; gap: 10px; }
.mock-row { display: flex; gap: 10px; align-items: center; }
.skel {
  border-radius: 6px;
  background: linear-gradient(100deg, rgba(255,255,255,.06) 30%, rgba(255,255,255,.14) 50%, rgba(255,255,255,.06) 70%);
  background-size: 300% 100%;
  animation: shimmer 2.4s infinite;
}
@keyframes shimmer { to { background-position: -300% 0; } }
.skel.round { border-radius: 50%; flex: none; }
.mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
}
.mock-chart i {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: var(--grad);
  opacity: 0.75;
  animation: bar-bounce 3s ease-in-out infinite;
}
.mock-chart i:nth-child(2n) { animation-delay: 0.4s; }
.mock-chart i:nth-child(3n) { animation-delay: 0.8s; }
@keyframes bar-bounce {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.65); }
  transform-origin: bottom;
}
.mock-chart i { transform-origin: bottom; }
.work-visual .glow {
  position: absolute;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  pointer-events: none;
}
.glow--cyan { background: var(--cyan); top: -25%; right: -15%; }
.glow--violet { background: var(--violet); bottom: -25%; left: -15%; }
.glow--magenta { background: var(--magenta); top: -20%; left: -15%; }

/* ---------- capabilities ---------- */
.cap-rows { border-top: 1px solid var(--line); }
.cap-row {
  display: grid;
  grid-template-columns: 80px 1fr 1.2fr auto;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(24px, 3.4vw, 40px) 8px;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding-left 0.4s var(--ease-out);
}
.cap-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-soft);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.cap-row:hover { padding-left: 24px; }
.cap-row:hover::before { opacity: 1; }
.cap-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.cap-row h3 {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.cap-row p { color: var(--muted); font-size: 15px; max-width: 52ch; }
.cap-arrow {
  width: 48px; height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--cyan);
  transition: transform 0.4s var(--ease-out), background 0.4s, color 0.4s;
  flex: none;
}
.cap-row:hover .cap-arrow {
  transform: rotate(45deg);
  background: var(--grad);
  color: #04040a;
  border-color: transparent;
}

/* ---------- stack / chips ---------- */
.stack-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}
.stack-cloud .tag { font-size: 11px; padding: 9px 18px; transition: border-color .3s, color .3s, box-shadow .3s; }
.stack-cloud .tag:hover {
  border-color: var(--cyan);
  color: var(--text);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

/* ---------- about / stats ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.about-copy p {
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.65;
  color: var(--muted);
}
.about-copy p + p { margin-top: 20px; }
.about-copy strong { color: var(--text); font-weight: 500; }
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.stat {
  background: var(--bg);
  padding: clamp(24px, 3vw, 40px);
}
.stat b {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  line-height: 1.1;
}
.stat span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- timeline ---------- */
.timeline {
  margin-top: clamp(48px, 6vw, 80px);
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, var(--cyan), var(--violet), transparent);
}
.tl-item { position: relative; padding-bottom: 36px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
}
.tl-item time {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--cyan);
}
.tl-item h4 { font-size: 19px; font-weight: 600; margin: 6px 0 4px; }
.tl-item p { color: var(--muted); font-size: 14px; max-width: 56ch; }

/* ---------- contact ---------- */
.contact { text-align: center; }
.contact-mail {
  display: inline-block;
  margin-top: 24px;
  font-size: clamp(28px, 6.5vw, 88px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  position: relative;
  background: linear-gradient(92deg, #fff, #b9bdd3);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: filter 0.3s;
}
.contact-mail::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.6s var(--ease-out);
}
.contact-mail:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.contact-socials {
  margin-top: clamp(32px, 5vw, 56px);
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(40px, 6vw, 72px) 0 32px;
  position: relative;
  overflow: hidden;
}
.footer-word {
  font-size: clamp(48px, 12vw, 190px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.14);
  user-select: none;
  white-space: nowrap;
}
.footer-row {
  margin-top: clamp(28px, 4vw, 48px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-row a:hover { color: var(--cyan); }

/* ---------- reveal helpers ---------- */
[data-reveal] { opacity: 0; transform: translateY(48px); }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ============================================================
   CASE STUDY PAGES
   ============================================================ */
.case-hero {
  padding: calc(var(--header-h) + clamp(56px, 9vw, 120px)) 0 clamp(48px, 7vw, 90px);
  position: relative;
  overflow: hidden;
}
.case-hero .bg-glow {
  position: absolute;
  top: -20%; right: -10%;
  width: 55vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.16;
  pointer-events: none;
}
.case-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 20px;
  display: block;
}
.case-title {
  font-size: clamp(44px, 8.5vw, 120px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-transform: uppercase;
}
.case-lede {
  margin-top: 26px;
  font-size: clamp(17px, 2vw, 22px);
  color: var(--muted);
  max-width: 62ch;
}
.case-meta {
  margin-top: clamp(36px, 5vw, 60px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.case-meta > div {
  padding: 20px 20px 20px 0;
  border-bottom: 1px solid var(--line);
}
.case-meta dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.case-meta dd { font-size: 15px; }

.case-band {
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  padding: clamp(40px, 6vw, 80px) 0;
}
.case-band .work-visual { aspect-ratio: 21/9; }
.case-band .glow { width: 34%; opacity: 0.22; filter: blur(110px); }
.case-section { padding: clamp(56px, 8vw, 110px) 0; }
.case-cols {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(28px, 5vw, 80px);
}
.case-cols h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
.case-cols .body p {
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.75;
}
.case-cols .body p + p { margin-top: 18px; }
.case-cols .body strong { color: var(--text); font-weight: 500; }
.case-list { list-style: none; margin-top: 20px; display: grid; gap: 12px; }
.case-list li {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 15px;
  color: var(--muted);
  display: flex;
  gap: 14px;
}
.case-list li::before { content: '▸'; color: var(--cyan); }
.case-next {
  border-top: 1px solid var(--line);
  padding: clamp(56px, 8vw, 100px) 0;
  text-align: center;
}
.case-next .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.case-next a {
  display: block;
  margin-top: 16px;
  font-size: clamp(36px, 7vw, 96px);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  transition: letter-spacing 0.5s var(--ease-out), color 0.4s;
}
.case-next a:hover { letter-spacing: 0.01em; color: var(--cyan); }

/* ============================================================
   AUTH (login / register)
   ============================================================ */
.auth-page {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-side {
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 4vw, 56px);
  background: var(--bg-2);
}
#auth-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.auth-side > * { position: relative; z-index: 1; }
.auth-side-title {
  font-size: clamp(32px, 3.6vw, 54px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  max-width: 12ch;
}
.auth-side-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  display: grid;
  gap: 6px;
}
.auth-main {
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 64px);
  padding-top: calc(var(--header-h) + 20px);
}
.auth-card { width: min(420px, 100%); }
.auth-tabs {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 4px;
  margin-bottom: 32px;
  background: var(--surface);
}
.auth-tab {
  flex: 1;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 11px;
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.3s, background 0.3s;
}
.auth-tab.is-active {
  background: var(--grad);
  color: #04040a;
  font-weight: 500;
}
.field { margin-bottom: 18px; position: relative; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.field input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
}
.auth-msg {
  min-height: 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  margin: 4px 0 14px;
}
.auth-msg.err { color: var(--magenta); }
.auth-msg.ok { color: var(--cyan); }
.auth-submit { width: 100%; justify-content: center; }
.auth-hint {
  margin-top: 26px;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}
.auth-hint b { color: var(--cyan); font-weight: 500; }

/* ============================================================
   DASHBOARD (private area)
   ============================================================ */
.dash {
  padding: calc(var(--header-h) + clamp(32px, 5vw, 56px)) 0 clamp(56px, 7vw, 96px);
}
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.dash-head h1 {
  font-size: clamp(34px, 5.5vw, 68px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.dash-clock {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-align: right;
}
.dash-clock b {
  display: block;
  font-size: 26px;
  color: var(--text);
  letter-spacing: 0.06em;
}
.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.widget {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s, box-shadow 0.35s;
}
.widget:hover {
  border-color: var(--line-strong);
  box-shadow: 0 20px 60px -30px rgba(0, 229, 255, 0.15);
}
.widget h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.w-4 { grid-column: span 4; }
.w-6 { grid-column: span 6; }
.w-8 { grid-column: span 8; }
.w-12 { grid-column: span 12; }
.widget .big {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.widget .sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.spark {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 72px;
  margin-top: 18px;
}
.spark i {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: var(--grad);
  opacity: 0.8;
  transform-origin: bottom;
  transform: scaleY(0);
}
.vault-list { display: grid; gap: 10px; }
.vault-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 14px;
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}
.vault-item:hover { border-color: var(--cyan); transform: translateX(6px); }
.vault-item .ic {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--grad-soft);
  color: var(--cyan);
  font-size: 14px;
  flex: none;
}
.vault-item .meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.notes-area {
  width: 100%;
  min-height: 170px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  padding: 14px;
  resize: vertical;
  outline: none;
  transition: border-color 0.3s;
}
.notes-area:focus { border-color: var(--cyan); }
.notes-status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 10px;
  text-transform: uppercase;
}
.session-rows { display: grid; gap: 0; font-size: 13.5px; }
.session-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}
.session-rows span { color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.session-rows b { font-weight: 500; font-family: var(--font-mono); font-size: 12px; }
.btn-logout {
  border-color: rgba(255, 46, 136, 0.5);
}
.btn-logout:hover { border-color: transparent; }
.btn-logout::before { background: linear-gradient(92deg, var(--magenta), var(--violet)); }

/* ============================================================
   LAB PAGE
   ============================================================ */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.lab-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.35s, transform 0.35s var(--ease-out);
}
.lab-card:hover { border-color: var(--line-strong); transform: translateY(-6px); }
.lab-view {
  aspect-ratio: 16/9;
  background: var(--bg-2);
  position: relative;
  border-bottom: 1px solid var(--line);
}
.lab-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lab-card .pad { padding: 20px 22px; }
.lab-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.lab-card p { color: var(--muted); font-size: 13.5px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .cap-row { grid-template-columns: 48px 1fr auto; }
  .cap-row p { grid-column: 2 / -1; }
  .case-meta { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav-desktop { display: none; }
  .burger { display: block; }
  .work-card { grid-template-columns: 1fr; }
  .work-card:nth-child(even) .work-visual { order: 0; }
  .about-grid { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { min-height: 34vh; border-right: 0; border-bottom: 1px solid var(--line); padding-top: calc(var(--header-h) + 16px); }
  .case-cols { grid-template-columns: 1fr; }
  .case-cols h2 { position: static; }
  .w-4, .w-6, .w-8 { grid-column: span 12; }
  .lab-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cap-row { grid-template-columns: 1fr auto; }
  .cap-num { display: none; }
  .cap-row p { grid-column: 1 / -1; }
  .stats { grid-template-columns: 1fr; }
  .hero-cta .btn { padding: 14px 22px; }
}

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