:root {
  --bg: #0b1220;
  --bg-elevated: #111b2e;
  --bg-card: #152238;
  --border: #24324d;
  --text: #e8eef9;
  --text-muted: #9fb0cc;
  --accent: #3dd6c6;
  --accent-dim: #2aa89b;
  --accent-glow: rgba(61, 214, 198, 0.15);
  --code-bg: #0a101c;
  --link: #6ee7ff;
  --max-width: 1120px;
  --radius: 12px;
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(11, 18, 32, 0.88);
  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);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #4f8cff);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #041018;
  font-weight: 800;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-muted);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.92rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: var(--accent-glow);
  text-decoration: none;
}

.lang-switch {
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
  font-size: 0.85rem;
}

.hero {
  padding: 4rem 0 3rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(61, 214, 198, 0.12), transparent),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(79, 140, 255, 0.08), transparent);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hero .lead {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0 0 1.5rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #041018;
}

.btn-primary:hover {
  background: var(--accent-dim);
}

.btn-secondary {
  border-color: var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.hero-card pre {
  margin: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
  color: #c8d8f0;
}

.section {
  padding: 3rem 0;
}

.section-title {
  font-size: 1.65rem;
  margin: 0 0 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 46rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.page-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.page-header p {
  margin: 0;
  color: var(--text-muted);
  max-width: 46rem;
}

.content {
  padding-bottom: 3rem;
}

.content h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.35rem;
  padding-top: 0.5rem;
}

.content h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.08rem;
}

.content p,
.content li {
  color: #d2ddf0;
}

.content ul,
.content ol {
  padding-left: 1.25rem;
}

.content li + li {
  margin-top: 0.35rem;
}

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

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.55;
}

:not(pre) > code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  font-size: 0.88em;
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

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

th,
td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  text-align: left;
}

th {
  background: var(--bg-elevated);
  color: var(--text);
}

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

.note {
  border-left: 3px solid var(--accent);
  background: var(--accent-glow);
  padding: 0.85rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 1.25rem 0;
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

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

  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav.open {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0.5rem 0 1rem;
  }

  .header-inner {
    flex-wrap: wrap;
  }
}

.nav-toggle {
  display: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
}
