/* ===== CUSTOM PROPERTIES ===== */
:root {
  --bg: #070a0f;
  --surface: #0d1117;
  --surface-2: #13181f;
  --surface-3: #1c2128;
  --border: rgba(255, 255, 255, 0.06);
  --border-a: rgba(86, 182, 194, 0.22);
  --c0: #56b6c2;
  --c1: #61afef;
  --grad: linear-gradient(135deg, #56b6c2, #61afef);
  --text-1: #e6edf3;
  --text-2: #8b949e;
  --text-3: #3d4450;
  --green: #98c379;
  --red: #e06c75;
  --yellow: #e5c07b;
  --r: 10px;
  --rl: 16px;
  --max: 1100px;
  --gap: 76px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text-1); font-family: 'Outfit', system-ui, sans-serif; line-height: 1.65; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ===== NOISE ===== */
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 999; opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; line-height: 1.08; }
h1 { font-size: clamp(2.8rem, 6.5vw, 5.5rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 700; letter-spacing: -0.025em; }
h3 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; font-weight: 700; }
code {
  font-family: 'Geist Mono', monospace; font-size: 0.86em;
  color: var(--c0); background: rgba(86,182,194,0.08); padding: 2px 6px; border-radius: 4px;
}

/* ===== UTILITIES ===== */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--gap) 0; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-label {
  font-family: 'Geist Mono', monospace; font-size: 0.68rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--c0); margin-bottom: 18px;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--grad); color: #070a0f;
  padding: 13px 28px; border-radius: var(--r);
  font-weight: 600; font-size: 0.95rem; white-space: nowrap;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { opacity: 0.87; transform: translateY(-2px); box-shadow: 0 10px 36px rgba(86,182,194,0.22); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--text-2); padding: 13px 28px; border-radius: var(--r);
  font-weight: 500; font-size: 0.95rem; white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: var(--border-a); color: var(--text-1); background: rgba(86,182,194,0.05); }

/* ===== REVEAL ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.18s; }
.reveal-d3 { transition-delay: 0.28s; }
.reveal-d4 { transition-delay: 0.38s; }
.reveal-d5 { transition-delay: 0.52s; }

/* ===== NAV ===== */
#nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background 0.3s, border-bottom 0.3s, backdrop-filter 0.3s; }
#nav.scrolled { background: rgba(7,10,15,0.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: var(--max); margin: 0 auto; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: 'Geist Mono', monospace; font-size: 1.15rem; font-weight: 500; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a:not(.btn-primary) { color: var(--text-2); font-size: 0.88rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:not(.btn-primary):hover { color: var(--text-1); }
.lang-switcher { display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 3px; gap: 2px; }
.lang-btn { background: none; border: none; padding: 3px 10px; border-radius: 16px; font-size: 0.74rem; font-weight: 600; color: var(--text-3); cursor: pointer; transition: background 0.2s, color 0.2s; letter-spacing: 0.06em; font-family: 'Geist Mono', monospace; }
.lang-btn.lang-active { background: var(--surface-3); color: var(--text-1); }
.lang-btn:hover:not(.lang-active) { color: var(--text-2); }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-2); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 120px 0 80px; overflow: hidden;
}
.hero-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 600px; height: 500px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(86,182,194,0.13) 0%, rgba(97,175,239,0.05) 45%, transparent 70%);
}
/* Desktop: badge+h1 top-left, body+ctas bottom-left, orbit spans right column */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: auto auto;
  column-gap: 56px;
  row-gap: 0;
  align-items: start;
}
.hero-top {
  grid-column: 1; grid-row: 1;
  display: flex; flex-direction: column; align-items: flex-start;
}
.hero-bottom {
  grid-column: 1; grid-row: 2;
  display: flex; flex-direction: column; align-items: flex-start;
}
.hero-orbit-wrap {
  grid-column: 2; grid-row: 1 / 3; /* span both rows */
}
.badge {
  display: inline-block; border: 1px solid rgba(86,182,194,0.28); background: rgba(86,182,194,0.07);
  color: var(--c0); padding: 6px 18px; border-radius: 100px;
  font-family: 'Geist Mono', monospace; font-size: 0.73rem; letter-spacing: 0.04em; margin-bottom: 22px;
}
.hero-top h1 { font-size: clamp(2.2rem, 3.6vw, 4rem); margin-bottom: 18px; }
.hero-sub { max-width: 480px; margin: 0 0 26px; color: var(--text-2); font-size: 1rem; line-height: 1.72; }

.install-block {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 13px 18px; margin-bottom: 20px;
  max-width: 100%; overflow-x: auto;
}
.install-cmd { font-family: 'Geist Mono', monospace; font-size: 0.88rem; color: var(--text-1); background: none; padding: 0; }
.copy-btn { color: var(--text-3); display: flex; align-items: center; transition: color 0.2s; }
.copy-btn:hover { color: var(--c0); }
.copy-btn.copied { color: var(--green); }

.hero-ctas { display: flex; gap: 12px; justify-content: flex-start; flex-wrap: wrap; }

/* ===== ORBIT VISUALIZATION ===== */
.hero-orbit-wrap { position: relative; display: flex; align-items: center; justify-content: center; }
.orbit-stage {
  position: relative; width: 400px; height: 400px; flex-shrink: 0;
}

/* Orbit rings */
.orbit-ring {
  position: absolute; top: 50%; left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.orbit-ring--inner {
  border: 1px solid rgba(86,182,194,0.16);
  box-shadow: 0 0 30px rgba(86,182,194,0.05) inset;
}
.orbit-ring--outer {
  border: 1px solid rgba(97,175,239,0.10);
  box-shadow: 0 0 50px rgba(97,175,239,0.04) inset;
}

/* Center node */
.orbit-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  border: 1px solid var(--border-a);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  box-shadow: 0 0 36px rgba(86,182,194,0.12), 0 0 0 8px rgba(86,182,194,0.04);
}

/* Icon nodes */
.o-icon {
  position: absolute; top: 50%; left: 50%;
  z-index: 5;
}
.o-icon-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.o-icon:hover .o-icon-inner {
  transform: scale(1.22);
  box-shadow: 0 0 22px rgba(86,182,194,0.28), 0 4px 16px rgba(0,0,0,0.4);
}
.o-icon img { width: 60%; height: 60%; object-fit: contain; filter: brightness(0) invert(1); }
.o-icon-text { font-size: 0.6rem; font-weight: 700; color: var(--c0); font-family: 'Geist Mono', monospace; }

/* Supported: green check badge */
.o-check {
  position: absolute; bottom: 0; right: 0;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--green); color: #070a0f;
  font-size: 8px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--bg);
  pointer-events: none;
}

/* Coming soon: dimmed + badge */
.o-icon--soon .o-icon-inner { opacity: 0.38; }
.o-soon-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--surface-3); border: 1px solid var(--border);
  color: var(--text-2); font-size: 0.58rem; padding: 1px 5px; border-radius: 4px;
  font-family: 'Geist Mono', monospace; letter-spacing: 0.06em;
  white-space: nowrap; text-transform: uppercase; pointer-events: none;
}

/* Tooltip */
.o-tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--surface-3); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-1); font-size: 0.7rem; padding: 4px 10px; border-radius: 6px;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.15s;
  z-index: 20;
}
.o-icon:hover .o-tooltip { opacity: 1; }

.stats-strip { display: flex; justify-content: center; gap: 52px; padding-top: 52px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { display: block; font-family: 'Outfit', sans-serif; font-size: 2.1rem; font-weight: 800; line-height: 1; margin-bottom: 7px; }
.stat-label { font-size: 0.75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.09em; font-weight: 500; }

/* ===== PROBLEM / SOLUTION ===== */
/* ===== PROBLEM / SOLUTION SECTION ===== */
.ps-section { background: var(--surface); }
.ps-heading { margin-top: 10px; margin-bottom: 14px; }
.ps-sub { color: var(--text-2); font-size: 1rem; max-width: 520px; margin-bottom: 44px; }

.ps-compare {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; align-items: stretch;
}

/* Cards */
.ps-panel {
  position: relative; padding: 36px 32px; border-radius: var(--rl);
  border: 1px solid transparent; overflow: hidden;
}
.ps-panel--problem {
  background: linear-gradient(145deg, rgba(224,108,117,0.06) 0%, var(--bg) 55%);
  border-color: rgba(224,108,117,0.18);
}
.ps-panel--solution {
  background: linear-gradient(145deg, rgba(86,182,194,0.07) 0%, var(--bg) 55%);
  border-color: rgba(86,182,194,0.20);
}

/* Corner bracket decorators (from 21st.dev Features 10) */
.ps-corner {
  position: absolute; width: 10px; height: 10px; pointer-events: none;
}
.ps-panel--problem .ps-corner { border-color: rgba(224,108,117,0.5); }
.ps-panel--solution .ps-corner { border-color: rgba(86,182,194,0.5); }
.ps-corner--tl { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.ps-corner--tr { top: -1px; right: -1px; border-top: 2px solid; border-right: 2px solid; }
.ps-corner--bl { bottom: -1px; left: -1px; border-bottom: 2px solid; border-left: 2px solid; }
.ps-corner--br { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }

/* Badge */
.ps-panel-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Geist Mono', monospace; font-size: 0.7rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 100px; margin-bottom: 20px;
  border: 1px solid;
}
.ps-panel-badge--problem {
  color: var(--red); background: rgba(224,108,117,0.08); border-color: rgba(224,108,117,0.22);
}
.ps-panel-badge--solution {
  color: var(--c0); background: rgba(86,182,194,0.08); border-color: rgba(86,182,194,0.22);
}

.ps-panel-top h3 { font-size: 1.3rem; margin-bottom: 12px; color: var(--text-1); }
.ps-panel-top p { color: var(--text-2); font-size: 0.92rem; line-height: 1.7; margin-bottom: 0; }

/* List */
.ps-list {
  display: flex; flex-direction: column; gap: 0;
  margin-top: 24px; border-top: 1px solid var(--border); padding-top: 20px;
}
.ps-list li {
  display: flex; align-items: baseline; gap: 10px;
  color: var(--text-2); font-size: 0.875rem; line-height: 1.55;
  padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ps-list li:last-child { border-bottom: none; }
.ps-list li::before {
  content: ''; flex-shrink: 0; width: 16px; height: 16px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; line-height: 16px; text-align: center;
}
.ps-list--problem li::before {
  content: '✕'; background: rgba(224,108,117,0.12); color: var(--red); border: 1px solid rgba(224,108,117,0.3);
}
.ps-list--solution li::before {
  content: '✓'; background: rgba(86,182,194,0.12); color: var(--c0); border: 1px solid rgba(86,182,194,0.3);
}

/* Divider */
.ps-divider {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 20px; gap: 8px;
}
.ps-divider-line { flex: 1; width: 1px; background: linear-gradient(to bottom, transparent, var(--border-a), transparent); }
.ps-divider-icon {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border-a); background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--c0); flex-shrink: 0;
}

/* ===== PERSONAS ===== */
.personas { background: var(--bg); }
.personas-sub { max-width: 560px; color: var(--text-2); font-size: 1rem; margin-bottom: 40px; }
.personas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.persona-card { border-radius: var(--rl); padding: 32px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; }
.persona-solo { background: linear-gradient(145deg, rgba(86,182,194,0.07) 0%, var(--surface-2) 60%); border-color: rgba(86,182,194,0.22); }
.persona-team { background: linear-gradient(145deg, rgba(97,175,239,0.07) 0%, var(--surface-2) 60%); border-color: rgba(97,175,239,0.22); }
.persona-solo .ps-corner { border-color: rgba(86,182,194,0.45); }
.persona-team .ps-corner { border-color: rgba(97,175,239,0.45); }
.persona-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 14px; border-radius: 100px; font-family: 'Geist Mono', monospace; font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; width: fit-content; border: 1px solid; }
.persona-solo .persona-badge { background: rgba(86,182,194,0.10); color: var(--c0); border-color: rgba(86,182,194,0.25); }
.persona-team .persona-badge { background: rgba(97,175,239,0.10); color: var(--c1); border-color: rgba(97,175,239,0.25); }
.persona-card h3 { font-size: 1.3rem; line-height: 1.2; margin: 0; }
.persona-desc { color: var(--text-2); font-size: 0.875rem; line-height: 1.72; margin: 0; }
.persona-list { display: flex; flex-direction: column; gap: 0; padding: 0; margin: 0; border-top: 1px solid var(--border); padding-top: 16px; }
.persona-list li { display: flex; align-items: baseline; gap: 10px; color: var(--text-2); font-size: 0.875rem; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); line-height: 1.5; }
.persona-list li:last-child { border-bottom: none; }
.persona-list li::before { content: '→'; flex-shrink: 0; font-size: 0.75rem; font-weight: 700; }
.persona-solo .persona-list li::before { color: var(--c0); }
.persona-team .persona-list li::before { color: var(--c1); }
.persona-terminal {
  background: var(--bg); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px; padding: 14px 16px;
  font-family: 'Geist Mono', monospace; font-size: 0.76rem; line-height: 1.85;
  overflow-x: auto; margin-top: auto;
}
.pt-line { color: #abb2bf; display: block; white-space: nowrap; }
.pt-cmd { color: #abb2bf; }
.pt-cmd::before { content: '$ '; color: #61afef; }
.pt-g { color: #98c379; }
.pt-muted { color: #484f58; }
.pt-cyan { color: var(--c0); }

@media (max-width: 900px) {
  .personas-grid { grid-template-columns: 1fr; gap: 20px; }
  .personas-sub { margin-bottom: 44px; }
}
@media (max-width: 640px) {
  .persona-card { padding: 26px 22px; }
  .persona-terminal { font-size: 0.72rem; }
}

/* ===== IMPROVEMENT LOOP ===== */
.improve { background: var(--surface); }
.improve-sub { max-width: 640px; margin: 0 0 44px; color: var(--text-2); font-size: 1rem; line-height: 1.75; }

.loop-track {
  display: grid; grid-template-columns: 1fr 28px 1fr 28px 1fr 28px 1fr;
  align-items: stretch; gap: 0; margin-bottom: 44px;
}
.loop-step { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--rl); padding: 24px 20px; position: relative; overflow: hidden; align-self: stretch; display: flex; flex-direction: column; }
.loop-step .ps-corner { border-color: rgba(255,255,255,0.08); }
.loop-step--peak { border-color: rgba(86,182,194,0.35); background: linear-gradient(145deg, rgba(86,182,194,0.07) 0%, var(--surface-2) 100%); }
.loop-step--peak .ps-corner { border-color: rgba(86,182,194,0.5); }
.loop-step-num {
  font-family: 'Geist Mono', monospace; font-size: 0.68rem; font-weight: 500;
  color: var(--c0); letter-spacing: 0.12em; margin-bottom: 14px;
}
.loop-step--peak .loop-step-num { color: var(--c0); }
.loop-step h4 { margin-bottom: 10px; font-size: 0.95rem; }
.loop-step p { color: var(--text-2); font-size: 0.82rem; line-height: 1.6; margin: 0; }
.loop-connector {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--border-a);
}
.loop-connector::after { content: '→'; }

.compound-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; align-items: center; margin-bottom: 28px; }
.compound-panel { border-radius: var(--rl); overflow: visible; position: relative; }
.compound-panel .ps-corner { border-color: transparent; }
.compound-panel--before .ps-corner { border-color: rgba(224,108,117,0.4); }
.compound-panel--after .ps-corner { border-color: rgba(152,195,121,0.4); }
.compound-panel-label { padding: 12px 18px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-family: 'Geist Mono', monospace; border-radius: var(--rl) var(--rl) 0 0; }
.compound-panel--before .compound-panel-label { background: rgba(224,108,117,0.08); color: #e06c75; border: 1px solid rgba(224,108,117,0.15); border-bottom: none; }
.compound-panel--after .compound-panel-label { background: rgba(152,195,121,0.08); color: #98c379; border: 1px solid rgba(152,195,121,0.15); border-bottom: none; }
.compound-terminal { background: var(--bg); padding: 18px; font-family: 'Geist Mono', monospace; font-size: 0.8rem; line-height: 2; overflow-x: auto; border-radius: 0 0 var(--rl) var(--rl); }
.compound-panel--before .compound-terminal { border: 1px solid rgba(224,108,117,0.15); }
.compound-panel--after .compound-terminal { border: 1px solid rgba(152,195,121,0.15); }
.ct-line { display: block; }
.ct-good { color: #98c379; }
.ct-bad { color: #e06c75; }

.compound-vs {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 0 24px; text-align: center;
}
.compound-vs-iterations {
  font-family: 'Geist Mono', monospace; font-size: 0.65rem; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.1em; white-space: nowrap;
}
.compound-vs-arrow {
  font-size: 1.6rem; background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.improve-footer {
  text-align: center; color: var(--text-2); font-size: 0.9rem; line-height: 1.6;
  max-width: 540px; margin: 0 auto;
}
.improve-footer strong { color: var(--text-1); }

/* improvement loop responsive rules are merged into the main 900px block below */

/* ===== FEATURES ===== */
.features { background: var(--bg); }
.features h2 { margin-bottom: 10px; }
.features-sub { color: var(--text-2); font-size: 1rem; max-width: 560px; margin-bottom: 36px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--rl); overflow: hidden; }
.feature-card {
  background: var(--surface); border: none; border-radius: 0;
  padding: 28px; position: relative; overflow: hidden;
  transition: background 0.25s;
}
.feature-card:hover { background: var(--surface-2); }
.feature-card:hover .ps-corner { border-color: rgba(86,182,194,0.6); }
.feature-card .ps-corner { border-color: transparent; transition: border-color 0.25s; }
.feature-icon-box {
  width: 38px; height: 38px; border-radius: 9px; margin-bottom: 18px;
  background: rgba(86,182,194,0.10); border: 1px solid rgba(86,182,194,0.2);
  display: flex; align-items: center; justify-content: center;
}
.feature-icon { font-size: 1.1rem; color: var(--c0); margin: 0; }
.feature-card h4 { margin-bottom: 9px; font-size: 0.98rem; }
.feature-card p { color: var(--text-2); font-size: 0.86rem; line-height: 1.62; margin-bottom: 0; }
.feature-more { display: inline-block; margin-top: 14px; font-size: 0.72rem; font-weight: 500; color: var(--c0); letter-spacing: 0.06em; }

/* ===== AGENTS ===== */
.agents { background: var(--surface); text-align: center; overflow: hidden; }
.agents-label { color: var(--text-2); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 22px; font-weight: 500; }

/* Carousel tracks */
.agents-carousel { position: relative; display: flex; flex-direction: column; gap: 14px; }
.carousel-track { overflow: hidden; width: 100%; }
.carousel-inner { display: flex; gap: 14px; width: max-content; }

@keyframes scroll-forward {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes scroll-reverse {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

.carousel-track--forward .carousel-inner { animation: scroll-forward 28s linear infinite; }
.carousel-track--reverse .carousel-inner { animation: scroll-reverse 22s linear infinite; }
.agents-carousel:hover .carousel-inner { animation-play-state: paused; }

/* Chip base */
.agent-chip {
  display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0;
  padding: 9px 20px; border-radius: 100px;
  font-size: 0.86rem; font-weight: 500; border: 1px solid transparent;
  white-space: nowrap; user-select: none;
}
.agent-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.agent-check { font-size: 0.75rem; opacity: 0.9; margin-left: 2px; }

/* Logo chips */
.agent-chip.agent-logo {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  color: var(--text-2);
  padding: 8px 18px 8px 12px;
  transition: background 0.2s, border-color 0.2s;
}
.agent-chip.agent-logo:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.18); }
.agent-logo-img {
  width: 22px; height: 22px; border-radius: 5px; object-fit: contain; flex-shrink: 0;
}
.agent-name { color: var(--text-1); font-weight: 500; }

/* Coming-soon chips */
.agent-chip.agent-soon {
  background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08);
  color: var(--text-2); opacity: 0.6;
}
.agent-soon-badge {
  display: inline-block; font-size: 0.65rem; font-weight: 600;
  padding: 2px 7px; border-radius: 100px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-2); text-transform: uppercase; letter-spacing: 0.08em;
  margin-left: 2px;
}

/* Edge fade */
.agents-fade {
  position: absolute; top: 0; bottom: 0; width: 120px; pointer-events: none; z-index: 2;
}
.agents-fade--l { left: 0;  background: linear-gradient(to right, var(--surface), transparent); }
.agents-fade--r { right: 0; background: linear-gradient(to left,  var(--surface), transparent); }

@media (prefers-reduced-motion: reduce) {
  .carousel-inner { animation: none !important; }
}

/* ===== STATS BAR ===== */
/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--surface-2);
  border-top: 1px solid rgba(86,182,194,0.12);
  border-bottom: 1px solid rgba(86,182,194,0.12);
  padding: 28px 0;
}
.stats-row {
  display: flex; align-items: center; justify-content: space-between;
}
.sbar-stats {
  display: flex; align-items: center; gap: 0;
}
.sbar-stat {
  display: flex; flex-direction: column; gap: 6px; padding: 0 36px;
}
.sbar-stat:first-child { padding-left: 0; }
.sbar-num {
  font-family: 'Outfit', sans-serif; font-size: 1.9rem; font-weight: 800;
  letter-spacing: -0.03em; line-height: 1;
}
.sbar-label {
  font-size: 0.68rem; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.09em; line-height: 1.4;
  white-space: nowrap;
}
.sbar-divider {
  width: 1px; height: 32px; flex-shrink: 0;
  background: linear-gradient(to bottom, transparent, rgba(86,182,194,0.18), transparent);
}
.sbar-badges { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sbar-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: var(--r);
  font-family: 'Geist Mono', monospace; font-size: 0.75rem; font-weight: 500;
  text-decoration: none; transition: border-color 0.2s, background 0.2s;
  white-space: nowrap;
}
.sbar-badge--npm {
  background: rgba(203,56,55,0.08); border: 1px solid rgba(203,56,55,0.25);
  color: var(--text-2);
}
.sbar-badge--npm:hover { background: rgba(203,56,55,0.14); border-color: rgba(203,56,55,0.45); color: var(--text-1); }
.sbar-badge--mit {
  background: rgba(86,182,194,0.07); border: 1px solid rgba(86,182,194,0.2);
  color: var(--text-2);
}
.sbar-badge--mit svg { color: var(--c0); }

/* ===== QUICK START ===== */
.quickstart { background: var(--bg); }
.quickstart h2 { margin-bottom: 10px; }
.qs-sub { color: var(--text-2); font-size: 1rem; max-width: 520px; margin-bottom: 40px; }
.qs-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.qs-steps { display: flex; flex-direction: column; gap: 0; }
.qs-step { display: flex; align-items: flex-start; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.qs-step:last-child { border-bottom: none; }
.step-num { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: var(--bg); display: flex; align-items: center; justify-content: center; font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 0.82rem; }
.step-content h4 { margin-bottom: 6px; }
.step-content code { font-size: 0.84rem; padding: 5px 10px; }
.step-note { margin-top: 8px; font-size: 0.78rem; color: var(--text-3); line-height: 1.5; }

/* ===== TERMINAL ===== */
.terminal { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--rl); overflow: hidden; font-family: 'Geist Mono', monospace; }
.terminal-header { display: flex; align-items: center; gap: 8px; padding: 13px 18px; background: var(--surface-3); border-bottom: 1px solid var(--border); }
.dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #e06c75; }
.dot-yellow { background: #e5c07b; }
.dot-green { background: #98c379; }
.terminal-title { margin-left: 6px; font-size: 0.7rem; color: var(--text-3); }
.terminal-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 5px; }
.tl { font-size: 0.82rem; line-height: 1.45; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.t-p { color: var(--text-3); }
.t-$ { color: var(--green); }
.t-c { color: var(--text-2); }
.t-m { color: var(--text-3); font-size: 0.78rem; }
.t-cyan { color: var(--c0); }
.t-g { color: var(--green); }
.t-w { color: var(--text-1); }
.tl-final { margin-top: 8px; }
.blink { color: var(--c0); animation: blink 1.1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ===== ABOUT ===== */
.about { background: var(--surface); }
.about-card { position: relative; border: 1px solid var(--border-a); border-radius: var(--rl); padding: 40px; background: linear-gradient(145deg, rgba(86,182,194,0.05) 0%, var(--surface-2) 70%); margin-top: 32px; overflow: hidden; }
.about-card .ps-corner { border-color: rgba(86,182,194,0.4); }
.about-layout { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.avatar-ring { width: 100px; height: 100px; border-radius: 50%; padding: 3px; background: var(--grad); flex-shrink: 0; }
.avatar-inner { width: 100%; height: 100%; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.4rem; color: var(--c0); }
.avatar-photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.about-name-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.about-name-row h2 { font-size: 1.5rem; margin-bottom: 0; }
.about-social-icons { display: flex; align-items: center; gap: 6px; }
.about-social-icon { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text-2); text-decoration: none; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.about-social-icon:hover { border-color: var(--border-a); color: var(--c0); background: rgba(86,182,194,0.08); }
.about-role { font-family: 'Geist Mono', monospace; font-size: 0.8rem; letter-spacing: 0.06em; color: var(--c0); margin-bottom: 18px; }
.about-bio { color: var(--text-2); line-height: 1.78; max-width: 560px; }
.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-link { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); padding: 10px 18px; border-radius: var(--r); font-size: 0.88rem; font-weight: 500; transition: border-color 0.2s, color 0.2s; }
.social-link:hover { border-color: var(--border-a); color: var(--text-1); }

/* ===== CONTACT ===== */
.contact { background: var(--bg); }
.contact h2 { margin-bottom: 10px; }
.contact-sub { color: var(--text-2); margin-bottom: 28px; max-width: 440px; font-size: 1rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 14px; }
.contact-link { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--rl); color: var(--text-1); font-size: 0.9rem; font-weight: 500; text-decoration: none; transition: border-color 0.2s, background 0.2s, transform 0.15s; }
.contact-link:hover { border-color: var(--border-a); background: var(--surface-3); transform: translateY(-2px); }
.contact-link--email { border-color: rgba(86,182,194,0.3); color: var(--c0); }
.contact-link--email:hover { border-color: var(--c0); }

/* ===== FOOTER ===== */
footer { border-top: 1px solid var(--border); padding: 40px 0; background: var(--bg); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 18px; }
.footer-copy { color: var(--text-3); font-size: 0.84rem; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-3); font-size: 0.84rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--text-1); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
  /* Single column: top → orbit → bottom */
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .hero-top {
    grid-column: 1; grid-row: 1;
    align-items: center; text-align: center;
  }
  .hero-top h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); }
  .hero-orbit-wrap {
    grid-column: 1; grid-row: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* contain the 400px orbit-stage */
    height: 300px;
    margin: 0;
  }
  .orbit-stage { transform: scale(0.68); }
  /* Glow: fit within the 300px container and boost visibility */
  .hero-glow {
    width: 360px; height: 300px;
    background: radial-gradient(ellipse at center, rgba(86,182,194,0.26) 0%, rgba(97,175,239,0.12) 45%, transparent 72%);
  }
  .hero-bottom {
    grid-column: 1; grid-row: 3;
    align-items: center; text-align: center;
  }
  .hero-sub { margin: 0 auto 26px; }
  .hero-ctas { justify-content: center; }
}
@media (max-width: 900px) {
  :root { --gap: 60px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .ps-compare { grid-template-columns: 1fr; }
  .ps-divider { flex-direction: row; padding: 16px 0; }
  .ps-divider-line { flex: 1; width: auto; height: 1px; background: linear-gradient(to right, transparent, var(--border-a), transparent); }
  .ps-divider-icon { transform: rotate(90deg); }
  .stats-row { flex-wrap: wrap; gap: 20px; }
  .sbar-badges { padding-top: 16px; border-top: 1px solid var(--border); width: 100%; }
  .qs-layout { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; text-align: center; }
  .social-links { justify-content: center; }
  .avatar-ring { margin: 0 auto; }
  .about-bio { margin-left: auto; margin-right: auto; }
  /* improvement loop */
  .loop-track { grid-template-columns: 1fr; }
  .loop-connector { padding: 4px 0; transform: rotate(90deg); }
  .loop-step { padding: 22px 20px; }
  .compound-compare { grid-template-columns: 1fr; gap: 12px; }
  .compound-vs { flex-direction: row; justify-content: center; padding: 0; }
  .compound-vs-arrow { transform: rotate(90deg); }
  .improve-sub { margin-bottom: 44px; }
}

@media (max-width: 640px) {
  :root { --gap: 48px; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-strip { gap: 28px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-brand { flex-direction: column; gap: 6px; }
  .sbar-stat { padding: 0 16px; }
  .sbar-stat:first-child { padding-left: 0; }
  /* ps-panel reduced padding */
  .ps-panel { padding: 24px 20px; }
  /* improvement loop small */
  .compound-terminal { font-size: 0.74rem; padding: 14px; }
  .ct-line { white-space: nowrap; }
  /* install command */
  .install-block { padding: 12px 16px; }
  .install-cmd { font-size: 0.82rem; }
  .nav-links {
    display: none; position: fixed; inset: 0;
    background: rgba(7,10,15,0.97); backdrop-filter: blur(20px);
    flex-direction: column; justify-content: center; align-items: center;
    gap: 28px; z-index: 90; font-size: 1.1rem;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; z-index: 101; }
  .lang-switcher { z-index: 101; }
  .nav-inner { padding: 18px 20px; }
  #nav.scrolled:has(.nav-links.open) {
    background: rgba(7,10,15,0.97);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (max-width: 480px) {
  /* Orbit: scale down further for small phones */
  /* Orbit: scale down further for small phones */
  .hero-orbit-wrap { height: 250px; }
  .orbit-stage { transform: scale(0.56); margin-top: 0; margin-bottom: 0; }
  .hero-glow { width: 290px; height: 250px; }
  /* About: stack name + social icons vertically on small phones */
  .about-name-row { flex-direction: column; align-items: center; gap: 8px; }
  /* Stats bar: wrap stats and hide dividers */
  .sbar-stats { flex-wrap: wrap; gap: 16px 0; }
  .sbar-stat { padding: 0 20px 0 0; flex-basis: 50%; }
  .sbar-stat:nth-child(odd) { padding-left: 0; }
  .sbar-divider { display: none; }
  /* Hero: tighten top padding */
  .hero { padding-top: 96px; padding-bottom: 60px; }
  /* Section headings: slightly smaller */
  h3 { font-size: 1.2rem; }
}

@media (max-width: 375px) {
  /* Very small phones: reclaim horizontal space */
  .container { padding: 0 16px; }
  .hero { padding-top: 88px; }
  .nav-inner { padding: 16px; }
  .about-card { padding: 28px 20px; }
  .ps-panel { padding: 20px 16px; }
  .modal-box { padding: 20px 14px; }
}

/* ===== FEATURE CARD INTERACTIVITY ===== */
.feature-card[data-feature] { cursor: pointer; }
.feature-card[data-feature]:focus-visible { outline: 2px solid var(--c0); outline-offset: 3px; }
.feature-more {
  display: inline-block; margin-top: 14px;
  font-size: 0.75rem; font-weight: 500; color: var(--c0);
  letter-spacing: 0.06em; transition: gap 0.15s;
}

/* ===== FEATURE MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7,10,15,0.86); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200; padding: 24px;
  visibility: hidden; opacity: 0;
  transition: opacity 0.22s ease, visibility 0.22s;
}
.modal-overlay.is-open { visibility: visible; opacity: 1; }

.modal-box {
  background: var(--surface); border: 1px solid rgba(86,182,194,0.18);
  border-radius: 14px; max-width: 600px; width: 100%; max-height: 88vh;
  overflow-y: auto; padding: 40px 44px; position: relative;
  transform: translateY(18px) scale(0.97);
  transition: transform 0.25s ease;
}
.modal-overlay.is-open .modal-box { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  color: #484f58; font-size: 1rem; cursor: pointer; line-height: 1;
  width: 32px; height: 32px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.modal-close:hover { color: var(--text-1); background: rgba(255,255,255,0.07); }

.modal-label {
  font-family: 'Geist Mono', monospace; font-size: 0.63rem;
  letter-spacing: 0.14em; color: var(--c0); text-transform: uppercase; margin-bottom: 10px;
}
.modal-title { font-size: 1.45rem; font-weight: 700; color: var(--text-1); margin-bottom: 14px; line-height: 1.25; }
.modal-desc { color: var(--text-2); font-size: 0.875rem; line-height: 1.72; margin-bottom: 22px; }
.modal-section-title { font-size: 0.82rem; font-weight: 600; color: var(--text-1); margin-bottom: 10px; margin-top: 4px; }

.modal-terminal {
  background: var(--bg); border: 1px solid rgba(255,255,255,0.07); border-radius: 8px;
  padding: 14px 18px; font-family: 'Geist Mono', monospace; font-size: 0.78rem;
  margin-bottom: 20px; line-height: 1.7;
}
.modal-terminal .t-line { color: #abb2bf; }
.modal-terminal .t-cmd { color: #abb2bf; }
.modal-terminal .t-cmd::before { content: '$ '; color: #61afef; }
.modal-terminal .t-g { color: #98c379; }
.modal-terminal .t-r { color: #e06c75; }
.modal-terminal .t-y { color: #e5c07b; }
.modal-terminal .t-cyan { color: var(--c0); }
.modal-terminal .t-muted { color: #484f58; }

.modal-agents-grid { display: flex; flex-direction: column; gap: 7px; margin-bottom: 22px; }
.modal-agent-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg); border-radius: 6px; padding: 9px 14px;
}
.modal-agent-row code { color: var(--c0); font-family: 'Geist Mono', monospace; font-size: 0.8rem; flex: 1; background: none; padding: 0; }
.modal-agent-row span { color: var(--text-2); font-size: 0.84rem; }

.modal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.modal-stat-box { background: var(--bg); border-radius: 8px; padding: 16px; text-align: center; }
.modal-stat-box .snum { font-size: 1.75rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.1; }
.modal-stat-box .slbl { font-size: 0.72rem; color: var(--text-3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.08em; }

.modal-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; padding: 0; }
.modal-list li { color: var(--text-2); font-size: 0.85rem; line-height: 1.55; padding-left: 18px; position: relative; }
.modal-list li::before { content: '→'; position: absolute; left: 0; color: var(--c0); }

.modal-layers { display: flex; flex-direction: column; gap: 7px; margin-bottom: 22px; }
.modal-layer {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg); border-radius: 6px; padding: 11px 14px;
}
.modal-layer-num { font-family: 'Geist Mono', monospace; font-size: 0.7rem; color: var(--c0); min-width: 16px; }
.modal-layer-name { font-size: 0.84rem; font-weight: 600; color: var(--text-1); min-width: 48px; }
.modal-layer-desc { font-size: 0.8rem; color: var(--text-2); }

.modal-hooks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 22px; }
.modal-hook {
  background: var(--bg); border-radius: 5px; padding: 8px 11px;
  font-family: 'Geist Mono', monospace; font-size: 0.72rem; color: #abb2bf;
}

@media (max-width: 768px) {
  .modal-box { padding: 28px 24px; }
  .modal-hooks-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .modal-box { padding: 24px 18px; max-height: 92vh; }
  .modal-stats { grid-template-columns: 1fr 1fr; }
  .modal-stat-box .snum { font-size: 1.4rem; }
  .modal-hooks-grid { grid-template-columns: 1fr; }
  .modal-terminal { font-size: 0.72rem; padding: 12px 14px; overflow-x: auto; }
}
