:root {
  --bg: #050816;
  --bg-alt: #0b1120;
  --card-bg: #020617;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.1);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.2);
  --radius-xl: 1.25rem;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.85);
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1d283a 0, var(--bg) 45%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Layout */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(15,23,42,0.95), rgba(15,23,42,0.7), transparent);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.88rem;
}

.logo-orb {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: conic-gradient(from 180deg, #38bdf8, #a855f7, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 25px rgba(56, 189, 248, 0.8),
    0 0 55px rgba(168, 85, 247, 0.45);
}

.logo-orb-inner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #f9fafb 0, #0f172a 70%);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.nav-links a {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all 0.18s ease-out;
}

.nav-links a:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 65%);
}

.nav-links a.nav-primary {
  border-color: rgba(56, 189, 248, 0.7);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.3), rgba(15,23,42,0.95));
  color: #f9fafb;
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.3);
}

/* Page */

.page {
  padding: 1.5rem 0 2.5rem;
}

.page-header {
  padding: 2.25rem 0 1.5rem;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.badge-pill {
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(148,163,184,0.5);
  background: radial-gradient(circle at top left, rgba(56,189,248,0.2), rgba(15,23,42,0.95));
  font-size: 0.7rem;
}

.page-title {
  font-size: clamp(1.8rem, 2.5vw, 2.2rem);
  letter-spacing: -0.04em;
  margin: 0 0 0.6rem;
}

.page-subtitle {
  max-width: 640px;
  color: var(--muted);
  font-size: 0.95rem;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1.1fr);
  gap: 1.4rem;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .page-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Cards */

.card {
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top left, rgba(56,189,248,0.10), rgba(15,23,42,0.96));
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem 1.3rem;
}

.card-muted {
  background: radial-gradient(circle at top left, rgba(51,65,85,0.55), rgba(15,23,42,0.96));
  border-color: rgba(148, 163, 184, 0.25);
}

.card-plain {
  background: rgba(15,23,42,0.9);
  border-color: rgba(148,163,184,0.25);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.card-subtitle {
  font-size: 0.83rem;
  color: var(--muted);
}

/* Hero highlights */

.hero-metadata {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}

.meta-item {
  border-radius: 0.9rem;
  background: radial-gradient(circle at top, rgba(15,23,42,0.9), rgba(15,23,42,0.96));
  border: 1px solid rgba(148,163,184,0.35);
  padding: 0.75rem 0.85rem;
  font-size: 0.78rem;
}

.meta-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
}

.meta-value {
  margin-top: 0.2rem;
}

/* Lists & content */

.section {
  margin-bottom: 1.5rem;
}

.section h2 {
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
}

.section p {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.section ul {
  margin: 0.4rem 0 0.2rem;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.section li {
  margin-bottom: 0.2rem;
}

/* Definition table */

.definition-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.definition-table th,
.definition-table td {
  padding: 0.5rem 0.4rem;
  text-align: left;
}

.definition-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  border-bottom: 1px solid rgba(148,163,184,0.4);
}

.definition-table tr:nth-child(even) td {
  background: rgba(15,23,42,0.9);
}

.definition-table td:first-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Code blocks */

pre {
  margin: 0.6rem 0;
  padding: 0.85rem 0.9rem;
  border-radius: 0.9rem;
  background: radial-gradient(circle at top left, #020617, #020617);
  border: 1px solid rgba(148,163,184,0.3);
  overflow-x: auto;
  font-size: 0.82rem;
}

code {
  font-size: inherit;
}

/* Language tabs (simple) */

.lang-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.lang-tag {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.5);
  font-size: 0.75rem;
  color: var(--muted);
}

/* Label chips */

.label-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.3rem;
}

.label-chip {
  font-size: 0.74rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.4);
  color: var(--muted);
}

/* Footer */

.site-footer {
  padding: 1.5rem 0 1.8rem;
  border-top: 1px solid rgba(15,23,42,0.9);
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  background: radial-gradient(circle at bottom, rgba(56,189,248,0.25), transparent 55%);
}

.site-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-style: dotted;
}

/* Small */

.small {
  font-size: 0.78rem;
  color: var(--muted);
}

.badge-get {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(74,222,128,0.8);
  background: rgba(22,163,74,0.1);
  color: #bbf7d0;
}

/* Responsive tweaks */

@media (max-width: 720px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
  .nav-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .card {
    padding: 1.05rem 1rem;
  }
}
