/* ──────────────────────────────────────────
   THE STACK — LIGHT THEME
────────────────────────────────────────── */

* {
  box-sizing: border-box;
}

:root {
  --emerald: #00b67a;
  --violet: #7c6cff;
  --coral: #ff6b6b;
  --amber: #ff9f43;

  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface2: #f1f4f9;

  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #64748b;

  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── SELECTION ── */
::selection {
  background: rgba(0, 182, 122, 0.15);
  color: var(--text);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #eef2f7;
}

::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.15);
  border-radius: 999px;
}

/* ── NAVBAR ── */
#navbar {
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px);
  border-bottom-color: var(--border);
}

.nav-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
}

/* ── HERO GLOWS ── */
.hero-glow-a {
  background: radial-gradient(circle,
      rgba(0, 182, 122, 0.12) 0%,
      transparent 70%);
  top: -120px;
  left: -200px;
  filter: blur(20px);
}

.hero-glow-b {
  background: radial-gradient(circle,
      rgba(124, 108, 255, 0.1) 0%,
      transparent 70%);
  bottom: -120px;
  right: -100px;
  filter: blur(20px);
}

/* ── HERO TAGS ── */
.stack-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.8);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.stack-tag:hover,
.stack-tag.active {
  border-color: rgba(0,182,122,0.25);
  background: rgba(0,182,122,0.08);
  color: var(--emerald);
  transform: translateY(-1px);
}

/* ── STAT BOX ── */
.stat-box {
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--border);
  padding: 28px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.stat-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-val {
  font-family: 'Epilogue', sans-serif;
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
  color: var(--text);
}

.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── MARQUEE ── */
.marquee-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ── SECTION EYEBROW ── */
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 20px;
}

.section-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--emerald);
}

/* ── LAYER ROWS ── */
.layer-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0 32px;
  align-items: start;

  padding: 34px 38px;

  background: rgba(255,255,255,0.75);
  border: 1px solid var(--border);

  backdrop-filter: blur(16px);

  position: relative;
  overflow: hidden;

  transition: all 0.3s ease;
}

.layer-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-color);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.35s ease;
}

.layer-row:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.layer-row:hover::before {
  transform: scaleY(1);
}

.layer-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.1em;
  padding-top: 4px;
}

.layer-name {
  font-family: 'Epilogue', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.layer-desc {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-soft);
  max-width: 620px;
}

.layer-pills {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

@media (max-width: 768px) {
  .layer-row {
    grid-template-columns: 40px 1fr;
    gap: 0 18px;
  }

  .layer-pills {
    display: none;
  }
}

/* ── PILLS ── */
.pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}

.pill-green {
  background: rgba(0,182,122,0.08);
  color: var(--emerald);
}

.pill-violet {
  background: rgba(124,108,255,0.08);
  color: var(--violet);
}

.pill-coral {
  background: rgba(255,107,107,0.08);
  color: var(--coral);
}

.pill-amber {
  background: rgba(255,159,67,0.1);
  color: var(--amber);
}

/* ── TABLES / DIST ── */
.dist-row,
.table-row-hover {
  background: rgba(255,255,255,0.75);
  transition: all 0.2s ease;
}

.dist-row:hover,
.table-row-hover:hover {
  background: rgba(255,255,255,1);
}

.dist-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
}

.dist-mode {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.dist-desc {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: var(--text-soft);
}

/* ── FILTER BUTTONS ── */
.filter-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;

  padding: 9px 16px;

  border-radius: 999px;
  border: 1px solid var(--border);

  background: rgba(255,255,255,0.7);
  color: var(--text-muted);

  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: white;
  color: var(--text);
}

.filter-btn.active {
  background: rgba(0,182,122,0.08);
  border-color: rgba(0,182,122,0.2);
  color: var(--emerald);
}

/* ── TOOL CARDS ── */
.tool-card,
.principle-card,
.path-card {
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);

  transition: all 0.3s ease;
}

.tool-card {
  padding: 38px;
  overflow: hidden;
  position: relative;
}

.tool-card:hover,
.principle-card:hover,
.path-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.tool-glow {
  position: absolute;
  border-radius: 50%;
  width: 200px;
  height: 200px;
  top: -60px;
  right: -60px;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.tool-card:hover .tool-glow {
  opacity: 1;
}

.glow-green {
  background: radial-gradient(circle,
      rgba(0,182,122,0.12),
      transparent 70%);
}

.glow-violet {
  background: radial-gradient(circle,
      rgba(124,108,255,0.12),
      transparent 70%);
}

.glow-coral {
  background: radial-gradient(circle,
      rgba(255,107,107,0.12),
      transparent 70%);
}

.glow-amber {
  background: radial-gradient(circle,
      rgba(255,159,67,0.12),
      transparent 70%);
}

.tool-icon {
  font-size: 28px;
  margin-bottom: 18px;
}

.tool-features {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-features li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-soft);

  display: flex;
  gap: 10px;
}

.tool-features li::before {
  content: '→';
  color: var(--emerald);
}

/* ── CODE BLOCK ── */
.code-block {
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,0.08);

  padding: 26px 30px;

  border-radius: 20px;

  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.9;

  overflow-x: auto;
}

.code-comment {
  color: #94a3b8;
}

.code-kw {
  color: #7c3aed;
}

.code-fn {
  color: #2563eb;
}

.code-str {
  color: #059669;
}

.code-num {
  color: #dc2626;
}

/* ── PATHS ── */
.path-letter {
  font-family: 'Epilogue', sans-serif;
  font-weight: 900;
  font-size: 160px;
  opacity: 0.03;

  position: absolute;
  top: -30px;
  right: 20px;

  color: var(--text);
}

.path-list {
  list-style: none;
  padding: 0;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.path-list li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-soft);

  display: flex;
  gap: 10px;
}

.path-list li::before {
  content: '◈';
  color: var(--violet);
}

/* ── TABLES ── */
.table-head {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;

  color: #64748b;

  padding: 16px 20px;
}

.table-cell {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 14px;
  line-height: 1.7;

  color: var(--text-soft);

  padding: 16px 20px;
}

/* ── PRINCIPLES ── */
.principle-card {
  padding: 38px;
}

.principle-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--emerald);
  margin-bottom: 14px;
}

/* ── ORGANISM TAGS ── */
.organism-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;

  padding: 9px 14px;

  border-radius: 999px;
  border: 1px solid var(--border);

  background: rgba(255,255,255,0.8);

  color: var(--text-soft);

  display: inline-flex;
  align-items: center;
  gap: 8px;

  transition: all 0.2s ease;
}

.organism-tag:hover {
  border-color: rgba(0,182,122,0.2);
  transform: translateY(-1px);
}

.organism-role {
  color: var(--emerald);
  font-size: 10px;
}

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeUp {
  animation: fadeUp 0.8s ease both;
}

/* ── REMOVE DARK CYBER EFFECTS ── */
#scanline {
  display: none;
}

/* ── CANVAS ── */
#gridCanvas {
  opacity: 0.35;
  filter: saturate(0.7);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .tool-card,
  .principle-card,
  .path-card {
    padding: 28px;
  }

  .code-block {
    font-size: 11px;
  }
}
