/* ─── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  line-height: 1.6;
  overflow-x: hidden;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.accent { color: #00e5a0; }
code { font-family: 'JetBrains Mono', monospace; font-size: 0.9em; background: rgba(0,229,160,0.1); color: #00e5a0; padding: 2px 6px; border-radius: 4px; }
a { color: #00e5a0; text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

/* ─── Nav ──────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,10,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 60px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: #fff; }
.nav-logo img { border-radius: 6px; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 0.9rem; }
.nav-links a { color: #999; transition: color 0.2s; }
.nav-links a:hover { color: #fff; opacity: 1; }
.nav-github, .nav-npm { display: flex; align-items: center; }
.nav-npm { background: #cb3837; color: #fff !important; padding: 4px 10px; border-radius: 4px; font-weight: 600; font-size: 0.8rem; }
.nav-pypi { background: #3775A9; color: #fff !important; padding: 4px 10px; border-radius: 4px; font-weight: 600; font-size: 0.8rem; display: none; }
body.lang-python .nav-npm { display: none; }
body.lang-python .nav-pypi { display: flex; }
body.lang-python .nav-github svg + span { display: none; }

/* ─── Language Toggle ──────────────────────────────────── */
.lang-toggle {
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,0.06); border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1); overflow: hidden;
}
.lang-toggle-btn {
  padding: 5px 14px; font-size: 0.8rem; font-weight: 600;
  background: none; border: none; color: #666; cursor: pointer;
  transition: all 0.2s; font-family: 'Inter', sans-serif;
  display: flex; align-items: center; gap: 6px;
}
.lang-toggle-btn.active { background: rgba(0,229,160,0.15); color: #00e5a0; }
.lang-toggle-btn:hover:not(.active) { color: #aaa; }
.lang-toggle-btn svg { width: 14px; height: 14px; }

/* Language-specific content */
.lang-js { display: block; }
.lang-py { display: none; }
body.lang-python .lang-js { display: none; }
body.lang-python .lang-py { display: block; }
/* for inline spans */
span.lang-js { display: inline; }
span.lang-py { display: none; }
body.lang-python span.lang-js { display: none; }
body.lang-python span.lang-py { display: inline; }
/* for flex containers */
div.lang-js.flex-item { display: flex; }
div.lang-py.flex-item { display: none; }
body.lang-python div.lang-js.flex-item { display: none; }
body.lang-python div.lang-py.flex-item { display: flex; }
.nav-mobile-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* ─── Hero ─────────────────────────────────────────────── */
#hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  justify-content: center; text-align: center; padding: 100px 24px 60px;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,229,160,0.08) 0%, transparent 60%);
}
.hero-content { position: relative; max-width: 800px; }
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 20px; font-size: 0.8rem;
  background: rgba(0,229,160,0.1); color: #00e5a0; border: 1px solid rgba(0,229,160,0.2);
  margin-bottom: 24px; font-weight: 500;
}
.hero-title { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; color: #fff; line-height: 1.1; margin-bottom: 20px; }
.hero-subtitle { font-size: 1.15rem; color: #999; max-width: 600px; margin: 0 auto 40px; }
.hero-subtitle code { font-size: 1rem; }

/* Hero Tagline */
.hero-tagline {
  display: inline-flex; align-items: center; gap: 0;
  font-family: 'JetBrains Mono', monospace; font-size: 1.05rem;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 10px 20px; margin-bottom: 32px;
  white-space: nowrap;
}
.hero-tagline-prefix { color: #666; }
.hero-tagline-text { color: #00e5a0; font-weight: 600; }
.hero-tagline-cursor { color: #00e5a0; animation: blink 1s infinite; margin-left: 1px; }

/* Terminal */
.terminal {
  background: #1a1a2e; border-radius: 12px; overflow: hidden; text-align: left;
  border: 1px solid rgba(255,255,255,0.08); margin-bottom: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.terminal-header {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: rgba(255,255,255,0.03); border-bottom: 1px solid rgba(255,255,255,0.06);
}
.terminal-dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }
.terminal-title { margin-left: auto; font-size: 0.75rem; color: #666; font-family: 'JetBrains Mono', monospace; }
.terminal-body { padding: 20px; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; line-height: 1.8; }
.terminal-line { display: flex; align-items: center; gap: 10px; }
.terminal-prompt { color: #00e5a0; font-weight: 700; }
.terminal-cmd { color: #fff; }
.terminal-cursor { color: #00e5a0; animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.terminal-dim { color: #666; }
.terminal-output-block { margin-top: 8px; line-height: 1.7; font-size: 0.82rem; }
.t-gray { color: #666; } .t-green { color: #28c840; } .t-white { color: #fff; }
.t-cyan { color: #00e5a0; } .t-dim { color: #888; } .t-bold { color: #fff; font-weight: 700; }
.t-yellow { color: #febc2e; }
.terminal-verbose-label { margin-top: 12px; margin-bottom: 4px; font-size: 0.75rem; text-align: center; display: block; }

/* Hero Actions */
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 48px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px;
  border-radius: 8px; font-weight: 600; font-size: 1rem; transition: all 0.2s;
}
.btn-primary { background: #00e5a0; color: #0a0a0a; }
.btn-primary:hover { background: #00cc8e; opacity: 1; transform: translateY(-1px); }
.btn-secondary { background: rgba(255,255,255,0.06); color: #fff; border: 1px solid rgba(255,255,255,0.1); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); opacity: 1; }

/* Hero Stats */
.hero-stats { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { display: block; font-size: 2.5rem; font-weight: 800; color: #00e5a0; font-family: 'JetBrains Mono', monospace; }
.stat-label { font-size: 0.8rem; color: #666; text-transform: uppercase; letter-spacing: 0.05em; }

/* ─── Sections ─────────────────────────────────────────── */
.section { padding: 100px 0; }
.section-dark { background: #0f0f13; }
.section-title { font-size: 2.5rem; font-weight: 800; color: #fff; text-align: center; margin-bottom: 16px; }
.section-desc { text-align: center; color: #888; font-size: 1.1rem; margin-bottom: 48px; }

/* Before/After Grid */
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: stretch; }
.ba-card { border-radius: 16px; overflow: hidden; }
.ba-before { opacity: 0.55; filter: grayscale(0.6); transition: opacity 0.4s, filter 0.4s; }
.ba-before:hover { opacity: 0.75; filter: grayscale(0.3); }
.ba-after { border: 2px solid rgba(0,229,160,0.25); }
.ba-label { padding: 14px 20px; font-weight: 700; font-size: 0.95rem; }
.ba-label-before { background: rgba(255,80,80,0.08); color: #ff6b6b; }
.ba-label-after { background: rgba(0,229,160,0.08); color: #00e5a0; }
.terminal-sm .terminal-body { padding: 16px; }
.ba-body { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; line-height: 1.7; }
.ba-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ba-dim { color: #555; }
.ba-spacer { height: 6px; }
.t-string { color: #98c379; }
.ba-verdict { padding: 14px 20px; font-size: 0.85rem; font-weight: 600; text-align: center; }
.ba-verdict-before { background: rgba(255,80,80,0.06); color: #ff6b6b; }
.ba-verdict-after { background: rgba(0,229,160,0.06); color: #00e5a0; }

@media (max-width: 768px) {
  .ba-grid { grid-template-columns: 1fr; }
}

/* Why Grid */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.why-card {
  background: #111118; border: 1px solid rgba(255,255,255,0.06); border-radius: 12px;
  padding: 32px; transition: border-color 0.3s, transform 0.3s;
}
.why-card:hover { border-color: rgba(0,229,160,0.3); transform: translateY(-4px); }
.why-icon { font-size: 2rem; margin-bottom: 16px; }
.why-card h3 { color: #fff; font-size: 1.15rem; margin-bottom: 8px; }
.why-card p { color: #888; font-size: 0.95rem; }

/* Steps */
.steps { display: flex; flex-direction: column; gap: 32px; max-width: 700px; margin: 0 auto; }
.step { display: flex; gap: 20px; align-items: flex-start; }
.step-num {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem;
  background: rgba(0,229,160,0.15); color: #00e5a0; border: 2px solid rgba(0,229,160,0.3);
}
.step-content { flex: 1; }
.step-content h3 { color: #fff; margin-bottom: 12px; font-size: 1.2rem; }
.step-note { margin-top: 8px; font-size: 0.85rem; color: #666; }
.step-note a { color: #00e5a0; }

/* Code Blocks */
.code-block {
  position: relative; background: #1a1a2e; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06); overflow: hidden;
}
.code-block pre { margin: 0; padding: 20px; overflow-x: auto; }
.code-block pre code { background: none; padding: 0; font-size: 0.85rem; line-height: 1.7; }
.code-sm pre { padding: 12px 16px; }
.code-sm pre code { font-size: 0.8rem; white-space: pre-wrap; word-break: break-all; }
.copy-btn {
  position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1); color: #888; padding: 4px 12px;
  border-radius: 6px; font-size: 0.75rem; cursor: pointer; transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.copy-btn:hover { background: rgba(0,229,160,0.15); color: #00e5a0; }

/* Flow */
.flow {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap; padding: 32px 0;
}
.flow-step {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: #111118; border: 1px solid rgba(255,255,255,0.06); border-radius: 12px;
  padding: 20px 16px; min-width: 120px; text-align: center; font-size: 0.85rem; color: #ccc;
}
.flow-icon { font-size: 1.5rem; }
.flow-arrow { color: #00e5a0; font-size: 1.5rem; font-weight: 700; }

/* API Cards */
.api-card {
  background: #111118; border: 1px solid rgba(255,255,255,0.06); border-radius: 12px;
  padding: 32px; margin-bottom: 24px;
}
.api-card h3 { color: #fff; margin-bottom: 12px; font-size: 1.1rem; }
.api-card h3 code { font-size: 0.95rem; }
.api-card > p { color: #888; margin-bottom: 16px; }

/* Persona Grid */
.persona-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.persona-card {
  background: #111118; border: 1px solid rgba(255,255,255,0.06); border-radius: 12px;
  padding: 28px; transition: border-color 0.3s, transform 0.3s;
}
.persona-card:hover { border-color: rgba(0,229,160,0.3); transform: translateY(-4px); }
.persona-icon { font-size: 2.5rem; margin-bottom: 12px; }
.persona-card h3 { color: #fff; margin-bottom: 4px; }
.persona-role { color: #00e5a0; font-size: 0.85rem; margin-bottom: 8px; }
.persona-detect { color: #666; font-size: 0.8rem; margin-bottom: 16px; }

/* Config Grid */
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.features-list { display: flex; flex-direction: column; gap: 20px; }
.feature-item {
  background: #16161e; border-radius: 10px; padding: 20px;
  border: 1px solid rgba(255,255,255,0.04);
}
.feature-item h4 { color: #fff; margin-bottom: 6px; font-size: 0.95rem; }
.feature-item p { color: #888; font-size: 0.85rem; line-height: 1.5; }
.feature-item code { font-size: 0.8rem; }

/* Models Table */
.models-table-wrap { overflow-x: auto; }
.models-table {
  width: 100%; border-collapse: collapse; background: #111118;
  border-radius: 12px; overflow: hidden;
}
.models-table th, .models-table td { padding: 14px 20px; text-align: left; }
.models-table th { background: rgba(0,229,160,0.08); color: #00e5a0; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.models-table td { border-bottom: 1px solid rgba(255,255,255,0.04); color: #ccc; font-size: 0.9rem; }
.badge-default { background: rgba(0,229,160,0.15); color: #00e5a0; padding: 3px 10px; border-radius: 12px; font-size: 0.8rem; }

/* Use Cases Grid */
.usecases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.usecase-card {
  background: #16161e; border: 1px solid rgba(255,255,255,0.04); border-radius: 10px;
  padding: 24px; transition: border-color 0.3s;
}
.usecase-card:hover { border-color: rgba(0,229,160,0.2); }
.usecase-icon { font-size: 1.5rem; margin-bottom: 8px; display: block; }
.usecase-card h4 { color: #fff; margin-bottom: 10px; }
.usecase-card code { font-size: 0.78rem; color: #aaa; background: rgba(255,255,255,0.04); display: block; padding: 8px 12px; border-radius: 6px; word-break: break-all; }

/* ─── Footer ───────────────────────────────────────────── */
#footer { padding: 40px 0; border-top: 1px solid rgba(255,255,255,0.06); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; font-size: 0.95rem; }
.footer-brand img { border-radius: 4px; }
.footer-links { display: flex; gap: 24px; font-size: 0.85rem; }
.footer-links a { color: #666; }
.footer-links a:hover { color: #fff; }
.footer-copy { color: #444; font-size: 0.8rem; }

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .hero-title { font-size: 2.2rem; }
  .hero-stats { gap: 24px; }
  .stat-num { font-size: 2rem; }
  .flow { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
  .config-grid { grid-template-columns: 1fr; }
  .persona-grid { grid-template-columns: 1fr; }
  .usecases-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* Prism overrides for dark theme */
pre[class*="language-"] { background: transparent !important; margin: 0 !important; }
code[class*="language-"] { text-shadow: none !important; }
.token.comment { color: #5c6370 !important; }
.token.keyword { color: #c678dd !important; }
.token.string { color: #98c379 !important; }
.token.function { color: #61afef !important; }
.token.number { color: #d19a66 !important; }
.token.operator { color: #56b6c2 !important; }
.token.punctuation { color: #abb2bf !important; }
