:root {
  --bg: #0b1120;
  --bg-alt: #111827;
  --surface: #1e293b;
  --border: rgba(148, 163, 184, 0.14);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --accent: #c4a040;
  --radius: 12px;
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --container: min(1120px, 92vw);
  --narrow: min(720px, 92vw);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(139, 92, 246, 0.1), transparent);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: #fff;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container { width: var(--container); margin-inline: auto; }
.narrow { width: var(--narrow); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11, 17, 32, 0.85);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); }
.lang-switch {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 4vw 1.25rem;
  border-top: 1px solid var(--border);
}
.mobile-nav a { color: var(--text); text-decoration: none; }
.mobile-nav[hidden] { display: none !important; }
.mobile-nav.is-open { display: flex; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.85rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary-hover); }

.hero {
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.hero h1 {
  font-size: clamp(2.75rem, 7vw, 4rem);
  line-height: 1.05;
  margin: 0 0 0.35rem;
  letter-spacing: -0.03em;
}
.hero-sub {
  font-size: 1.35rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-weight: 500;
}
.hero-copy p { margin: 0 0 1rem; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.9rem; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1rem;
}
.version-badge {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}
.version-badge strong { color: var(--accent); }
.version-date { color: var(--muted); font-weight: 400; font-size: 0.82rem; margin-left: 0.25rem; }

.stack-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}
.stack-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.stack-arrow {
  text-align: center;
  color: var(--muted);
  padding: 0.35rem 0;
  font-size: 1.1rem;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.green { background: #34d399; }
.dot.blue { background: #60a5fa; }
.dot.purple { background: #a78bfa; }
.dot.amber { background: #fbbf24; }

.section { padding: clamp(3rem, 7vw, 4.5rem) 0; }
.section-alt { background: rgba(17, 24, 39, 0.55); }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
}
.section-head p { color: var(--muted); margin: 0; max-width: 36rem; margin-inline: auto; }
.section h3 { margin-top: 0; font-size: 1.25rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.feature-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}
.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: #e2e8f0;
}
.feature-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

.arch-diagram {
  font-family: var(--mono);
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 0 0 1.5rem;
}
.arch-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
}
.arch-list li { margin-bottom: 0.5rem; }

.tabs { margin-top: 1rem; }
.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.tab-list button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}
.tab-list button[aria-selected="true"] {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
}
.tab-list button:hover { color: var(--text); }
.tab-panel[hidden] { display: none !important; }
.tab-panel ul { color: var(--muted); padding-left: 1.2rem; }
.tab-panel a { color: #a5b4fc; }

.code-block {
  display: flex;
  align-items: stretch;
  margin: 1rem 0 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.code {
  flex: 1;
  margin: 0;
  padding: 1rem 1.15rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  background: rgba(15, 23, 42, 0.95);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.copy-btn {
  flex-shrink: 0;
  width: 3rem;
  border: none;
  border-left: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.95);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
}
.copy-btn:hover { color: var(--accent); background: rgba(30, 41, 59, 0.95); }

.link-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.5rem;
}
.link-list a {
  display: block;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
}
.link-list a:hover { border-color: rgba(99, 102, 241, 0.45); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 2rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-inner p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.9rem; }
.footer-meta { font-size: 0.85rem !important; }

.copy-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--primary);
  color: #fff;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 100;
}
.copy-toast[hidden] { display: none !important; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 420px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
}
