/* ─── Design tokens ───────────────────────────────── */
:root {
  --bg:        #0A0A0F;
  --surface:   #12121A;
  --surface-2: #1A1A26;
  --border:    #1E1E2E;
  --border-2:  #2A2A3E;
  --text:      #E2E8F0;
  --muted:     #64748B;
  --muted-2:   #94A3B8;

  --blue:   #4F8EF7;
  --teal:   #2DD4BF;
  --green:  #22C55E;
  --amber:  #F59E0B;
  --purple: #A78BFA;
  --red:    #F87171;

  --blue-dim:   rgba(79,142,247,.12);
  --teal-dim:   rgba(45,212,191,.12);
  --green-dim:  rgba(34,197,94,.12);
  --amber-dim:  rgba(245,158,11,.12);
  --purple-dim: rgba(167,139,250,.12);

  --radius-card: 12px;
  --radius-el:   8px;
  --radius-pill: 999px;

  --max-w: 1100px;
  --section-gap: 80px;
}

/* ─── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ─── Layout helpers ─────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: var(--section-gap) 0; }

/* ─── Typography ─────────────────────────────────── */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.25; }
h3 { font-size: 1.125rem; font-weight: 600; }
.muted { color: var(--muted-2); }

/* ─── Navigation ─────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
}
.nav-logo span { color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted-2);
  padding: 6px 12px;
  border-radius: var(--radius-el);
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--text); }
.btn-nav {
  font-size: .875rem;
  font-weight: 600;
  color: var(--blue);
  padding: 6px 16px;
  border: 1px solid rgba(79,142,247,.35);
  border-radius: var(--radius-el);
  transition: background .2s, border-color .2s;
}
.btn-nav:hover { background: var(--blue-dim); border-color: var(--blue); }

/* ─── Left-rail scroll dots (landing only) ─────── */
.scroll-dots {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 50;
}
.scroll-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border-2);
  transition: background .3s, transform .3s;
  cursor: pointer;
}
.scroll-dot.active {
  background: var(--blue);
  transform: scale(1.4);
}
@media (max-width: 900px) { .scroll-dots { display: none; } }

/* ─── Hero ───────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 60px;
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 64px;
  width: 100%;
}
.hero-text { flex: 1; max-width: 600px; }
.hero-eyebrow { margin-bottom: 20px; }
.hero-headline {
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text) 60%, var(--blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subline {
  font-size: 1.125rem;
  color: var(--muted-2);
  max-width: 580px;
  margin-bottom: 40px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: .9375rem;
  border-radius: var(--radius-el);
  transition: opacity .2s, transform .2s;
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--border-2);
  color: var(--muted-2);
  font-weight: 500;
  font-size: .9375rem;
  border-radius: var(--radius-el);
  transition: border-color .2s, color .2s, background .2s;
}
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .8rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(6px); } }
.scroll-hint svg { opacity: .4; }

/* ─── Hero photo ─────────────────────────────────── */
.hero-photo-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-photo {
  display: block;
  width: 280px;
  height: 360px;
  object-fit: cover;
  object-position: center 8%;
  mask-image: radial-gradient(ellipse 78% 88% at 50% 32%, black 45%, transparent 88%);
  -webkit-mask-image: radial-gradient(ellipse 78% 88% at 50% 32%, black 45%, transparent 88%);
}

/* ─── Testimonials ───────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.tcard-quote {
  font-size: .9375rem;
  color: var(--muted-2);
  line-height: 1.75;
  font-style: italic;
  flex: 1;
}
.tcard-name {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text);
}
.tcard-role {
  font-size: .8125rem;
  color: var(--muted);
  margin-top: 3px;
}

/* ─── Three paths ────────────────────────────────── */
.paths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.path-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  transition: border-color .2s, background .2s, transform .2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.path-card:hover {
  border-color: var(--blue);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.path-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.path-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
}
.path-title { font-size: 1.0625rem; font-weight: 600; }
.path-desc { font-size: .875rem; color: var(--muted-2); }
.path-arrow { margin-top: auto; color: var(--blue); font-size: .875rem; font-weight: 500; }

/* ─── Featured work ─────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}
.section-link { font-size: .875rem; color: var(--blue); }
.section-link:hover { text-decoration: underline; }
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ─── Node cards (shared: featured + explorer grid) */
.node-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s, background .2s, transform .2s;
  cursor: pointer;
  position: relative;
}
.node-card:hover {
  border-color: var(--border-2);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.node-card.coming-soon { opacity: .55; }
.node-card.highlighted { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.node-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.node-card-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.node-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}
.node-desc {
  font-size: .875rem;
  color: var(--muted-2);
  line-height: 1.55;
}
.node-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.tag {
  font-size: .75rem;
  color: var(--muted);
  background: var(--border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}
.node-date { font-size: .75rem; color: var(--muted); }
.node-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--blue);
  margin-top: auto;
}
.node-link:hover { text-decoration: underline; }
.lock-icon { font-size: .875rem; color: var(--muted); margin-top: auto; }

/* ─── Badges ─────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}
.badge-project  { background: var(--blue-dim);   color: var(--blue); }
.badge-blog     { background: var(--purple-dim);  color: var(--purple); }
.badge-learning { background: var(--teal-dim);    color: var(--teal); }
.badge-testimonial { background: var(--amber-dim); color: var(--amber); }

.badge-shipped      { background: var(--green-dim);  color: var(--green); }
.badge-in-progress  { background: var(--amber-dim);  color: var(--amber); }
.badge-learning-st  { background: var(--teal-dim);   color: var(--teal); }
.badge-coming-soon  { background: var(--border);     color: var(--muted); }

/* ─── Footer ─────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-name { font-weight: 600; font-size: .9375rem; }
.footer-links { display: flex; align-items: center; gap: 16px; }
.footer-link {
  font-size: .875rem;
  color: var(--muted-2);
  transition: color .2s;
}
.footer-link:hover { color: var(--text); }

/* ─── Explorer page ─────────────────────────────── */
.explorer-header {
  padding: 100px 0 32px;
}
.explorer-title { margin-bottom: 8px; }
.explorer-subtitle { color: var(--muted-2); font-size: 1rem; margin-bottom: 20px; }

/* ─── Persona selector ───────────────────────────── */
.persona-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.persona-label {
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  white-space: nowrap;
}
.persona-pill {
  font-size: .875rem;
  font-weight: 500;
  padding: 7px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-2);
  color: var(--muted-2);
  background: transparent;
  transition: border-color .2s, color .2s, background .2s;
}
.persona-pill:hover { border-color: var(--blue); color: var(--blue); }
.persona-pill.active {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-dim);
  font-weight: 600;
}

/* ─── "Demonstrates" line on node cards ─────────── */
.node-proves {
  font-size: .75rem;
  color: var(--teal);
  font-style: italic;
  line-height: 1.4;
}
.panel-proves {
  font-size: .875rem;
  color: var(--teal);
  font-style: italic;
  line-height: 1.5;
}

.explorer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-right: 4px;
}
.filter-pill {
  font-size: .8125rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-2);
  color: var(--muted-2);
  background: transparent;
  transition: border-color .2s, color .2s, background .2s;
}
.filter-pill:hover { border-color: var(--blue); color: var(--blue); }
.filter-pill.active { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }

.view-toggle {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-el);
  overflow: hidden;
}
.toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--muted-2);
  transition: color .2s, background .2s;
}
.toggle-btn.active { color: var(--text); background: var(--surface-2); }
.toggle-btn svg { width: 14px; height: 14px; }

/* ─── Grid view ─────────────────────────────────── */
.nodes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ─── Graph view ─────────────────────────────────── */
.graph-container {
  position: relative;
  width: 100%;
  height: 600px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: none;
}
.graph-container.active { display: block; }

.graph-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--surface);
  z-index: 10;
  transition: opacity .3s;
}
.graph-spinner.hidden { opacity: 0; pointer-events: none; }
.spinner-ring {
  width: 36px; height: 36px;
  border: 3px solid var(--border-2);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-text { font-size: .8125rem; color: var(--muted); }

#graph-svg { width: 100%; height: 100%; }
.graph-tooltip {
  position: absolute;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-el);
  padding: 8px 12px;
  font-size: .8125rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 20;
  max-width: 200px;
}
.graph-tooltip.visible { opacity: 1; }
.graph-tooltip-title { font-weight: 600; margin-bottom: 3px; }
.graph-tooltip-type { font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; }

/* ─── Detail panel ───────────────────────────────── */
.panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.panel-backdrop.active { opacity: 1; pointer-events: all; }

.detail-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 400px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 201;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.detail-panel.open { transform: translateX(0); }
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.panel-close {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-el);
  color: var(--muted-2);
  flex-shrink: 0;
  transition: background .2s, color .2s;
}
.panel-close:hover { background: var(--border); color: var(--text); }
.panel-body { padding: 24px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
.panel-title { font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.panel-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.panel-meta { font-size: .8125rem; color: var(--muted); }
.panel-desc { font-size: .9375rem; color: var(--muted-2); line-height: 1.65; }
.panel-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.panel-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: .875rem;
  border-radius: var(--radius-el);
  width: fit-content;
  transition: opacity .2s;
}
.panel-action:hover { opacity: .85; }
.panel-section-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.connected-nodes { display: flex; flex-direction: column; gap: 8px; }
.connected-node-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-el);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.connected-node-card:hover { border-color: var(--blue); background: var(--blue-dim); }
.connected-node-title { font-size: .875rem; font-weight: 500; }

/* Testimonial panel layout */
.panel-quote {
  font-size: 1.125rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.65;
  border-left: 3px solid var(--amber);
  padding-left: 16px;
}
.panel-quotee { font-size: .875rem; color: var(--muted-2); }
.panel-quotee strong { color: var(--text); }

/* ─── Fade-up animation ─────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  .paths-grid,
  .featured-grid,
  .nodes-grid { grid-template-columns: repeat(2, 1fr); }
  .view-toggle { display: none; }
}
@media (max-width: 600px) {
  .paths-grid,
  .featured-grid,
  .nodes-grid { grid-template-columns: 1fr; }
  .detail-panel { width: 100%; border-left: none; border-top: 1px solid var(--border); }
  .explorer-controls { flex-direction: column; align-items: flex-start; }
  .section-header { flex-direction: column; gap: 8px; }
}
