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

html[data-theme="dark"]{
  --bg:#080e0c;
  --bg-surface:#0c1410;
  --bg-card:#111d18;
  --bg-elevated:#16261e;
  --teal:#2db484;
  --teal-dim:#1a8c64;
  --teal-glow:rgba(45,180,132,0.12);
  --amber:#f59e0b;
  --amber-glow:rgba(245,158,11,0.08);
  --text:#eef2ef;
  --text-secondary:rgba(220,235,228,0.72);
  --text-muted:rgba(220,235,228,0.42);
  --border:rgba(255,255,255,0.11);
  --border-subtle:rgba(255,255,255,0.07);
  --red:#f87171;
  --green:#4ade80;
  --blue:#38bdf8;
}

html[data-theme="light"]{
  --bg:#f3f6f4;
  --bg-surface:#edf3ef;
  --bg-card:#e6ede9;
  --bg-elevated:#dde7e1;
  --teal:#1a8c64;
  --teal-dim:#166a4d;
  --teal-glow:rgba(26,140,100,0.12);
  --amber:#d97706;
  --amber-glow:rgba(217,119,6,0.08);
  --text:#0d1f18;
  --text-secondary:rgba(13,31,24,0.72);
  --text-muted:rgba(13,31,24,0.42);
  --border:rgba(0,0,0,0.12);
  --border-subtle:rgba(0,0,0,0.07);
  --red:#dc2626;
  --green:#16a34a;
  --blue:#2563eb;
}

:root {
  --font-heading: 'Archivo', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  cursor:none;
  transition:background .4s,color .4s;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--teal); color: var(--bg); }

#cursor-wrap{position:fixed;z-index:9999;pointer-events:none;transform:translate(-2px,-2px);}
#cursor-wrap svg{width:20px;height:20px;display:block;}
html[data-theme="dark"] .cur-path{stroke:#eef2ef;fill:#080e0c;}
html[data-theme="light"] .cur-path{stroke:#0d1f18;fill:#f3f6f4;}
#cursor-you{position:absolute;top:-2px;left:18px;background:var(--teal);color:#fff;font-size:9px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;padding:3px 8px;border-radius:100px;white-space:nowrap;transition:background .4s,opacity .2s;}
#dot-canvas{position:fixed;inset:0;pointer-events:none;z-index:0;}
.orb{position:fixed;pointer-events:none;z-index:0;border-radius:50%;}
.orb1{top:-80px;right:-60px;width:400px;height:400px;background:radial-gradient(circle,rgba(45,180,132,.08) 0%,transparent 70%);}
.orb2{top:60%;left:5%;width:300px;height:300px;background:radial-gradient(circle,rgba(45,180,132,.05) 0%,transparent 70%);}
html[data-theme="light"] .orb1{background:radial-gradient(circle,rgba(26,140,100,.06) 0%,transparent 70%);}
html[data-theme="light"] .orb2{background:radial-gradient(circle,rgba(26,140,100,.04) 0%,transparent 70%);}

body > :not(#cursor-wrap):not(#dot-canvas):not(.orb):not([data-partial-src]){position:relative;z-index:1;}
#cursor-wrap,#dot-canvas,.orb{position:fixed;}

/* Utility */
.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
.section { padding: clamp(80px, 12vh, 160px) 0; }

/* Fade-in animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================ */
/* HERO */
/* ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--teal-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--amber-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--teal);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.hero-badge span { width: 6px; height: 6px; background: var(--teal); border-radius: 50%; }
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.hero h1 .accent { color: var(--teal); }
.hero-sub {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 48px;
  line-height: 1.6;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}
.hero-meta-item {
  display: flex;
  flex-direction: column;
}
.hero-meta-item .value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.hero-meta-item .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Scroll indicator */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: float 2s ease-in-out infinite;
}
.scroll-hint .line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--teal), transparent);
}
@keyframes float {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================ */
/* SECTION HEADERS */
/* ============================================ */
.section-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.section-lead {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 700px;
  line-height: 1.7;
}

/* ============================================ */
/* DIVIDER */
/* ============================================ */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 0;
}

/* ============================================ */
/* PROBLEM SECTION */
/* ============================================ */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.3s, transform 0.3s;
}
.problem-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
}
.problem-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
}
.problem-card:nth-child(1) .icon { background: rgba(248,113,113,0.12); color: var(--red); }
.problem-card:nth-child(2) .icon { background: var(--amber-glow); color: var(--amber); }
.problem-card:nth-child(3) .icon { background: rgba(56,189,248,0.12); color: var(--blue); }
.problem-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.problem-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65; }

/* ============================================ */
/* ROLE / PROCESS */
/* ============================================ */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 48px;
  background: var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
}
.process-step {
  background: var(--bg-card);
  padding: 32px 24px;
  text-align: center;
  transition: background 0.3s;
}
.process-step:hover { background: var(--bg-elevated); }
.process-step .num {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 12px;
}
.process-step .step-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.process-step .step-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
@media (max-width: 768px) {
  .process-steps { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================ */
/* TOOLS */
/* ============================================ */
.tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.2s;
}
.tool-chip:hover { border-color: var(--teal); }
.tool-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ============================================ */
/* DESIGN SYSTEM */
/* ============================================ */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.color-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.color-swatch {
  height: 100px;
}
.color-info {
  padding: 14px 16px;
  background: var(--bg-card);
}
.color-info .color-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
}
.color-info .color-hex {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Typography specimen */
.type-specimen {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.type-row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.type-label {
  flex-shrink: 0;
  width: 140px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.type-sample { flex: 1; }
.type-sample.heading { font-family: var(--font-heading); font-weight: 800; font-size: 2rem; letter-spacing: -0.02em; }
.type-sample.body { font-family: var(--font-body); font-size: 1rem; color: var(--text-secondary); }
.type-sample.mono { font-family: var(--font-mono); font-size: 0.9rem; color: var(--teal); }

/* ============================================ */
/* SCREENSHOT SHOWCASE */
/* ============================================ */
.screenshot-grid {
  display: grid;
  gap: 24px;
  margin-top: 48px;
}
.screenshot-grid.two-col { grid-template-columns: 1fr 1fr; }
.screenshot-grid.full { grid-template-columns: 1fr; }
@media (max-width: 768px) {
  .screenshot-grid.two-col { grid-template-columns: 1fr; }
}
.screenshot-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  transition: border-color 0.3s;
}
.screenshot-card:hover { border-color: var(--border); }
.screenshot-card img {
  width: 100%;
  display: block;
}
.screenshot-card .placeholder-img {
  width: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.placeholder-img .ph-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
}
.screenshot-label {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.screenshot-label .name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
}
.screenshot-label .tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--teal);
  padding: 3px 10px;
  background: var(--teal-glow);
  border-radius: 100px;
}

/* ============================================ */
/* WORKFLOW DEEP DIVES */
/* ============================================ */
.workflow-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 48px;
  padding: 48px 0;
  border-bottom: 1px solid var(--border-subtle);
}
@media (max-width: 768px) {
  .workflow-block { grid-template-columns: 1fr; gap: 32px; }
}
.workflow-block:last-child { border-bottom: none; }
.workflow-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.workflow-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}
.workflow-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* Flow diagram */
.flow-visual {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px;
}
.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.flow-step {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}
.flow-step .flow-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
  position: relative;
}
.flow-step:not(:last-child) .flow-dot::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 4px;
  width: 2px;
  height: 28px;
  background: var(--border);
}
.flow-step .flow-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.flow-step .flow-text strong { color: var(--text); }

/* ============================================ */
/* TECH ARCHITECTURE */
/* ============================================ */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.tech-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.3s;
}
.tech-card:hover { border-color: var(--border); }
.tech-card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}
.tech-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.tech-card .tech-tag {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--teal);
  padding: 3px 10px;
  background: var(--teal-glow);
  border-radius: 100px;
}

/* ============================================ */
/* STACK TABLE */
/* ============================================ */
.stack-table {
  margin-top: 40px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.stack-table th, .stack-table td {
  padding: 16px 24px;
  text-align: left;
  font-size: 0.9rem;
}
.stack-table th {
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.stack-table td {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
}
.stack-table td:first-child {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--teal);
}

/* ============================================ */
/* METRICS ROW */
/* ============================================ */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 48px;
}
@media (max-width: 600px) { .metrics-row { grid-template-columns: repeat(2, 1fr); } }
.metric {
  background: var(--bg-card);
  padding: 32px 24px;
  text-align: center;
}
.metric .metric-value {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
}
.metric .metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 8px;
}

/* ============================================ */
/* LESSONS / REFLECTION */
/* ============================================ */
.reflection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
}
@media (max-width: 768px) { .reflection-grid { grid-template-columns: 1fr; } }
.reflection-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px;
}
.reflection-card .ref-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.reflection-card:first-child .ref-label { color: var(--amber); }
.reflection-card:last-child .ref-label { color: var(--teal); }
.reflection-card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 12px;
}
.reflection-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65; }

/* ============================================ */
/* CTA / FOOTER */
/* ============================================ */
.cta-section {
  text-align: center;
  padding: clamp(100px, 15vh, 200px) 0;
}
.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.cta-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 40px;
}
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--teal);
  color: var(--bg);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.cta-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--teal-glow);
}

.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}
.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Placeholder callout */
.placeholder-callout {
  margin-top: 24px;
  padding: 20px 24px;
  background: rgba(245,158,11,0.06);
  border: 1px dashed var(--amber);
  border-radius: 12px;
  font-size: 0.85rem;
  color: var(--amber);
  line-height: 1.6;
}
