:root {
  --bg: #0b0f14;
  --surface: #121820;
  --border: #1e2a38;
  --text: #e8edf4;
  --muted: #8b9cb3;
  --accent: #2dd4bf;
  --accent-dim: #14b8a6;
  --code-bg: #0d1219;
  --radius: 12px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Fira Code", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo span {
  color: var(--accent);
}

.tagline {
  margin-top: 12px;
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 560px;
}

/* Hero demo */
.hero-demo {
  margin-top: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 0.9rem;
  overflow-x: auto;
}

.hero-demo .prompt {
  color: var(--muted);
}

.hero-demo .cmd {
  color: var(--text);
}

.hero-demo .out {
  color: var(--accent);
  margin-top: 8px;
}

/* Sections */
section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--muted);
}

p {
  color: var(--muted);
  margin-bottom: 16px;
}

/* Code blocks */
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.7;
  margin: 12px 0 20px;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
}

p code,
li code,
td code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 16px 0;
}

th,
td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 500;
}

td {
  color: var(--text);
}

/* Architecture */
.arch {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--muted);
  overflow-x: auto;
  white-space: pre;
}

.arch .hl {
  color: var(--accent);
}

/* Steps */
.steps {
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 36px;
  margin-bottom: 24px;
  color: var(--muted);
}

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

.steps li strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

/* Footer */
footer {
  padding: 32px 0 48px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--muted);
}

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

/* Lang toggle */
.lang {
  float: right;
  font-size: 0.85rem;
}

.lang a {
  color: var(--muted);
  margin-left: 12px;
}

.lang a.active {
  color: var(--accent);
  text-decoration: none;
}

[data-lang="en"] {
  display: none;
}

html.show-en [data-lang="ru"] {
  display: none;
}

html.show-en [data-lang="en"] {
  display: revert;
}

@media (max-width: 600px) {
  header {
    padding: 32px 0 24px;
  }

  .tagline {
    font-size: 1.05rem;
  }

  .lang {
    float: none;
    margin-bottom: 16px;
  }
}
