/* ── Tokens & Design System ── */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --surface: #f9f9f9;
  --surface-hover: #eaeaea;
  --surface-card: #ffffff;
  --border: rgba(0, 0, 0, 0.12);
  --border-strong: rgba(0, 0, 0, 0.25);
  --text: #333333;
  --text-muted: #555555;
  --text-dim: #777777;
  --accent: #007aff;
  --accent-dim: rgba(0, 122, 255, 0.15);
  --accent-glow: rgba(0, 122, 255, 0.35);
  --purple: #818cf8;
  --purple-dim: rgba(129, 140, 248, 0.15);
  --warn: #fbbf24;
  --warn-dim: rgba(251, 191, 36, 0.12);
  --success: #34d399;
  --success-dim: rgba(52, 211, 153, 0.12);
  --danger: #f87171;
  --danger-dim: rgba(248, 113, 113, 0.12);
  --gradient: linear-gradient(135deg, #22d3ee 0%, #818cf8 50%, #f472b6 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(34, 211, 238, 0.1) 0%, rgba(129, 140, 248, 0.1) 100%);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 20px;
  --header-h: 72px;
  --container: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 2px 6px rgba(0,0,0,0.08);
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

code, pre {
  font-family: var(--mono);
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

/* ── Background Noise & Ambient Glow ── */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow {
  position: fixed;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
}

.glow--left {
  top: -220px;
  left: -200px;
  background: rgba(34, 211, 238, 0.22);
}

.glow--right {
  bottom: -120px;
  right: -200px;
  background: rgba(129, 140, 248, 0.18);
}

/* ── Typography & Helpers ── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.85rem, 3.8vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  color: var(--text-muted);
}

/* ── Header & Navigation ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}

.header--scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: var(--border);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.logo__icon {
  font-size: 1.25rem;
  filter: drop-shadow(0 0 12px var(--accent-glow));
}

.logo__badge {
  font-size: 0.7rem;
  background: var(--purple-dim);
  color: var(--purple);
  border: 1px solid rgba(129, 140, 248, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.nav__links a {
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--text);
}

.nav__cta {
  background: var(--surface);
  border: 1px solid var(--border-strong) !important;
  padding: 0.45rem 1rem !important;
  border-radius: var(--radius-sm);
  color: var(--accent) !important;
  font-weight: 500;
  transition: all 0.2s !important;
}

.nav__cta:hover {
  background: var(--surface-hover);
  border-color: var(--accent) !important;
  box-shadow: 0 0 16px var(--accent-dim);
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s var(--ease);
  cursor: pointer;
}

.btn--primary {
  background: var(--accent);
  color: #04121a;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.25);
}

.btn--primary:hover {
  background: #38bdf8;
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.45);
  transform: translateY(-1px);
}

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn--ghost:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* ── Hero Section ── */
.hero {
  padding-top: calc(var(--header-h) + 4rem);
  padding-bottom: 5rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__lead {
  font-size: 1.15rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.stat__num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--mono);
}

.stat__label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ── Hero Terminal Window ── */
.terminal {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(34, 211, 238, 0.08);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1.15rem;
  background: #090e1a;
  border-bottom: 1px solid var(--border);
}

.terminal__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.terminal__dot:nth-child(1) { background: #ff5f56; }
.terminal__dot:nth-child(2) { background: #ffbd2e; }
.terminal__dot:nth-child(3) { background: #27c93f; }

.terminal__title {
  margin-left: auto;
  margin-right: auto;
  font-size: 0.8rem;
  font-family: var(--mono);
  color: var(--text-dim);
}

.terminal__body {
  padding: 1.25rem 1.4rem;
  font-size: 0.86rem;
  line-height: 1.65;
  overflow-x: auto;
  background: #090e1a;
  color: #e2e8f0;
}

/* Syntax helpers */
.c-muted { color: #94a3b8; }
.c-accent { color: var(--accent); }
.c-purple { color: var(--purple); }
.c-key { color: #38bdf8; }
.c-val { color: #a5f3fc; }
.c-warn { color: var(--warn); }
.c-success { color: var(--success); }

/* ── Section General ── */
.section {
  padding-block: 6rem;
  position: relative;
  z-index: 1;
}

.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section__header {
  text-align: center;
  max-width: 650px;
  margin-inline: auto;
  margin-bottom: 3.5rem;
}

.section__subtitle {
  margin-top: 0.75rem;
  font-size: 1.1rem;
}

/* ── Cards Grid (Why Python / Features) ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  position: relative;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.card--featured {
  border-color: rgba(34, 211, 238, 0.35);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.04) 0%, var(--surface-card) 100%);
}

.card__badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.3);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.card__icon {
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card__desc {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

.card__list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.card__list li {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.card__list li::before {
  content: "→";
  color: var(--accent);
  font-family: var(--mono);
}

/* ── Interactive Demo & Explorer ── */
.demo-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.demo-tabs {
  display: flex;
  overflow-x: auto;
  background: #090e1a;
  border-bottom: 1px solid var(--border);
}

.demo-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 1rem 1.5rem;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.demo-tab:hover {
  color: var(--text);
}

.demo-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(34, 211, 238, 0.04);
}

.demo-tab .tab-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.demo-content {
  padding: 2rem;
  display: none;
}

.demo-content.active {
  display: block;
}

.demo-vector-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2rem;
}

.vector-meta {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.vector-meta__item h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.vector-meta__item p {
  color: var(--text);
  font-size: 0.95rem;
}

.vector-steps {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  counter-reset: step-counter;
}

.vector-steps li {
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 1.75rem;
}

.vector-steps li::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: 0;
  top: 1px;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--surface-hover);
  color: var(--accent);
  border-radius: 50%;
  font-size: 0.75rem;
  font-family: var(--mono);
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-panel {
  background: #090e1a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.code-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-family: var(--mono);
  color: var(--text-dim);
}

.code-panel pre {
  padding: 1.2rem;
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
  color: #e2e8f0;
}

/* ── Code Switcher Section (Python & CLI) ── */
.code-switcher {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 900px;
  margin-inline: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.code-switcher__nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: #080d17;
  overflow-x: auto;
}

.code-switcher__btn {
  background: none;
  border: none;
  padding: 0.85rem 1.4rem;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.code-switcher__btn:hover {
  color: var(--text);
}

.code-switcher__btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(34, 211, 238, 0.05);
}

.code-snippet {
  display: none;
  position: relative;
}

.code-snippet.active {
  display: block;
}

.code-snippet pre {
  padding: 1.75rem;
  font-size: 0.9rem;
  line-height: 1.65;
  overflow-x: auto;
  background: #090e1a;
  color: #e2e8f0;
}

.code-snippet .copy-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* ── Skills table ── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-card);
  margin-bottom: 2.75rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table th {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg-alt);
}

.data-table code {
  font-size: 0.82rem;
  color: var(--accent);
}

.subsection-title {
  font-size: 1.35rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.subsection-title + .section__subtitle {
  margin-bottom: 1.5rem;
}

/* ── Checklists & Pillars ── */
.checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.checklist li {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.checklist__icon {
  width: 28px;
  height: 28px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.checklist div strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.checklist div span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ── Install Section ── */
.install {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.install::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 250px;
  height: 250px;
  background: var(--accent);
  filter: blur(100px);
  opacity: 0.12;
  pointer-events: none;
}

.install__text h2 {
  margin-bottom: 1rem;
}

.install__commands {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.command-block {
  background: #090e1a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.command-block__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

.command-block code {
  display: block;
  padding: 0.9rem 1.15rem;
  font-size: 0.88rem;
  color: var(--accent);
  overflow-x: auto;
}

.install__note {
  margin-top: 1.5rem;
  max-width: 720px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.install__note a {
  color: var(--accent);
}

.copy-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-strong);
}

.copy-btn.copied {
  background: var(--success-dim);
  color: var(--success);
  border-color: var(--success);
}

/* ── CTA Banner ── */
.cta-section {
  padding-block: 5rem;
}

.cta {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08) 0%, rgba(129, 140, 248, 0.08) 100%);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  max-width: 800px;
  margin-inline: auto;
}

.cta__emoji {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta h2 {
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.1rem;
  max-width: 500px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.cta__links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem;
  font-size: 0.875rem;
  color: var(--text-dim);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--accent);
}

/* ── Animations & Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

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

.reveal--delay {
  transition-delay: 0.15s;
}

.reveal--delay-2 {
  transition-delay: 0.3s;
}

/* ── Responsive Queries ── */
@media (max-width: 1180px) {
  .nav__links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
    z-index: 40;
  }

  .nav__links--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__toggle--open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav__toggle--open span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle--open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .demo-vector-grid {
    grid-template-columns: 1fr;
  }

  .install {
    grid-template-columns: 1fr;
    padding: 2.5rem;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

