:root {
  color-scheme: dark;
  --bg: #060606;
  --panel: rgba(255,255,255,0.08);
  --text: #f7f7f2;
  --muted: #b7b2a8;
  --accent: #f4a261;
  --pointer-x: 0;
  --pointer-y: 0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at calc(50% + 8vw) calc(20% + 2vh), rgba(144,224,239,0.14), transparent 24%),
              radial-gradient(circle at top left, rgba(244,162,97,0.2), transparent 30%),
              linear-gradient(130deg, rgba(255,255,255,0.03), transparent 45%);
  pointer-events: none;
  z-index: 0;
  transition: background 0.35s ease;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(255,255,255,0.03) 24%, transparent 50%);
  transform: translate(calc(var(--pointer-x) * 12px), calc(var(--pointer-y) * 8px));
  opacity: 0.28;
  z-index: 0;
}

#root {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: transparent;
}

.canvas-shell {
  position: fixed;
  inset: 0;
  z-index: 0;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.scroller {
  position: relative;
  z-index: 1;
}

.scroller-spacer {
  height: 2200vh;
}

.vignette,
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.vignette {
  background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.45) 100%);
}

.grain {
  opacity: 0.09;
  background-image: radial-gradient(circle, rgba(255,255,255,0.8) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 3;
  padding: 28px 34px 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.08);
}

.status {
  color: var(--muted);
}

.progress-track {
  position: absolute;
  top: 0;
  right: 12px;
  width: 3px;
  height: 100%;
  background: rgba(255,255,255,0.12);
}

.progress-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--accent), #ffffff);
  border-radius: 999px;
  transition: height 0.2s ease;
}

.section-nav {
  position: absolute;
  left: 34px;
  bottom: 160px;
  pointer-events: auto;
}

.section-label {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
}

.section-label b {
  color: var(--accent);
}

.hint {
  position: absolute;
  left: 34px;
  bottom: 110px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-size: 0.8rem;
}

.line {
  width: 72px;
  height: 1px;
  background: rgba(255,255,255,0.32);
}

.hero-copy {
  max-width: 650px;
  margin-top: auto;
  margin-bottom: 70px;
  pointer-events: auto;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(3rem, 6vw, 5.7rem);
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-shadow: 0 10px 40px rgba(0,0,0,0.35);
}

.hero-copy p {
  margin: 0 0 24px;
  max-width: 560px;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--muted);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.16);
  transition: transform 0.25s ease, background 0.25s ease;
}

.cta:hover {
  transform: translateY(-2px) scale(1.01);
  background: rgba(255,255,255,0.18);
  box-shadow: 0 16px 36px rgba(0,0,0,0.22);
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.loader.done {
  opacity: 0;
  visibility: hidden;
}

.loader .word {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.loader .pct {
  position: absolute;
  bottom: 32px;
  right: 34px;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.content-stack {
  position: relative;
  z-index: 4;
  padding: 0 34px 120px;
  background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(6,6,6,0.95));
}

.panel {
  position: relative;
  padding: 56px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(244,162,97,0.06), transparent 55%);
  pointer-events: none;
  opacity: 0.8;
}

.panel-copy {
  max-width: 760px;
}

.panel-copy h2 {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  margin: 0 0 14px;
  line-height: 1.06;
}

.panel-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.stat-card,
.project-card {
  padding: 20px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 45px rgba(0,0,0,0.2);
}

.stat-card strong {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.stat-card span {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.chip-list span {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 0.92rem;
}

.project-intro {
  max-width: 720px;
  margin-bottom: 28px;
}

.project-intro h2 {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  margin: 0 0 12px;
}

.project-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.project-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 18px;
}

.project-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  overflow: hidden;
  position: relative;
}

.project-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(244,162,97,0.4);
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
  background: linear-gradient(135deg, rgba(255,255,255,0.09), rgba(244,162,97,0.12));
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.08) 40%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
  pointer-events: none;
}

.project-card:hover::after {
  transform: translateX(100%);
}

.project-visual {
  height: 100px;
  border-radius: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.visual-one {
  background: linear-gradient(135deg, rgba(244,162,97,0.85), rgba(255,255,255,0.16)),
              radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3), transparent 30%);
}

.visual-two {
  background: linear-gradient(135deg, rgba(144,224,239,0.75), rgba(255,255,255,0.12)),
              radial-gradient(circle at 70% 30%, rgba(255,255,255,0.3), transparent 25%);
}

.visual-three {
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(244,162,97,0.45)),
              radial-gradient(circle at 50% 20%, rgba(255,255,255,0.24), transparent 22%);
}

.project-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.project-card .meta {
  margin-top: 16px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.feature-card {
  background: linear-gradient(135deg, rgba(244,162,97,0.18), rgba(255,255,255,0.06));
}

.cta.secondary {
  margin-top: 22px;
  background: rgba(244,162,97,0.16);
  border-color: rgba(244,162,97,0.24);
}

.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-copy {
    margin-bottom: 40px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .overlay { padding: 20px 20px 24px; }
  .progress-track { right: 6px; }
  .section-nav { left: 20px; bottom: 154px; }
  .hint { left: 20px; bottom: 116px; }
  .hero-copy { margin-bottom: 28px; }
  .hero-copy h1 { font-size: clamp(2.2rem, 10vw, 2.8rem); }
  .hero-copy p { font-size: 0.95rem; }
  .content-stack { padding: 0 20px 100px; }
  .project-grid { grid-template-columns: 1fr; }
  .panel { padding: 44px 0; }
  .stats-grid { gap: 12px; }
  .stat-card, .project-card { padding: 16px; }
}
