:root {
  --bg: #0d0d0d;
  --surface: #151515;
  --surface-soft: #1a1a1a;
  --border: #2a2a2a;
  --text: #ece8df;
  --muted: #a59d91;
  --accent: #c8f060;
  --accent-alt: #68d3f7;
  --serif: "Fraunces", Georgia, serif;
  --mono: "DM Mono", monospace;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(200, 240, 96, 0.1), transparent 30%),
    radial-gradient(circle at top right, rgba(104, 211, 247, 0.08), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: var(--mono);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a:hover {
  text-decoration: underline;
}

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

code {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent);
}

pre {
  overflow-x: auto;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  backdrop-filter: blur(14px);
  background: rgba(13, 13, 13, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

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

.brand-mark {
  width: clamp(1.1rem, 1rem + 0.7vw, 1.45rem);
  height: clamp(1.1rem, 1rem + 0.7vw, 1.45rem);
  border-radius: 0.35rem;
  flex: 0 0 auto;
  object-fit: contain;
  box-shadow: none;
}

.brand-label {
  display: inline-block;
  transform: translateY(-0.01em);
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.83rem;
}

.nav-links .lang-link {
  color: var(--text);
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.hero {
  padding: 4.5rem 0 2rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.eyebrow::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(200, 240, 96, 0.45);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(200, 240, 96, 0.45); }
  70% { box-shadow: 0 0 0 12px rgba(200, 240, 96, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 240, 96, 0); }
}

.hero-grid,
.feature-grid,
.split-grid,
.metric-grid,
.card-grid,
.related-grid {
  display: grid;
  gap: 1rem;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
  align-items: start;
}

.hero-copy h1,
.article-hero h1 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.lead {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1rem;
}

.hero-actions,
.footer-links,
.button-row,
.toc-list,
.tag-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
}

.button:hover {
  text-decoration: none;
  border-color: rgba(200, 240, 96, 0.5);
}

.button-primary {
  background: var(--accent);
  color: #101010;
  border-color: transparent;
}

.hero-panel,
.panel,
.card,
.feature-card,
.callout,
.toc,
.faq-list details,
.metric-card,
.article-shell,
.feature-note {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-panel,
.panel,
.feature-note,
.article-shell {
  padding: 1.25rem;
}

.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card {
  padding: 1rem;
}

.metric-card strong {
  display: block;
  font-size: 1rem;
}

.metric-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
}

.panel-note p,
.section-head p,
.feature-card p,
.card p,
.meta-strip,
.site-footer p,
.toc p,
.faq-list p,
.prose p,
.prose li,
.prose td,
.prose th,
.callout p {
  color: var(--muted);
}

.section {
  padding: 1rem 0 3rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.section-head h2,
.prose h2,
.prose h3 {
  margin: 0;
  font-family: var(--serif);
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: 1.8rem;
}

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

.card,
.feature-card {
  padding: 1.2rem;
}

.card h3,
.feature-card h3,
.related-card h3 {
  margin: 0.15rem 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.03em;
}

.card-tag,
.meta-pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.66rem;
}

.card-meta {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.78rem;
}

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

.faq-list {
  display: grid;
  gap: 0.9rem;
}

.faq-list details {
  padding: 1rem 1.15rem;
}

.faq-list summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 2rem 0 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.article-wrap {
  padding: 3rem 0 4rem;
}

.article-shell {
  width: min(860px, 100%);
  margin: 0 auto;
}

.article-hero {
  margin-bottom: 1.5rem;
}

.meta-strip,
.lang-strip {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.82rem;
}

.lang-strip a {
  color: var(--text);
}

.prose {
  font-size: 0.96rem;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2 {
  margin-top: 2.2rem;
  margin-bottom: 0.7rem;
  font-size: 1.8rem;
}

.prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.45rem;
  font-size: 1.15rem;
}

.prose p,
.prose ul,
.prose ol,
.prose pre,
.prose table,
.callout,
.toc {
  margin: 0 0 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.prose blockquote,
.callout {
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--accent);
}

.callout strong {
  color: var(--text);
}

.toc-list a {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

.related-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1rem;
}

.related-card {
  display: block;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.related-card p {
  margin: 0;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

@media (max-width: 860px) {
  .hero-grid,
  .feature-grid,
  .split-grid,
  .site-footer {
    grid-template-columns: 1fr;
    display: grid;
  }
}

@media (max-width: 720px) {
  .site-nav {
    padding: 0.9rem 0;
  }

  .brand {
    gap: 0.42rem;
    font-size: 0.98rem;
  }

  .brand-mark {
    width: 1.1rem;
    height: 1.1rem;
  }

  .nav-links {
    gap: 0.55rem;
  }

  .nav-links a {
    font-size: 0.76rem;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-copy h1,
  .article-hero h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .section-head h2,
  .prose h2 {
    font-size: 1.45rem;
  }

  .site-footer {
    align-items: start;
  }
}
