:root {
  color-scheme: dark;
  --bg: #0d1117;
  --bg-soft: #111827;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --muted: #a7b0c0;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #a7f3d0;
  --accent-2: #93c5fd;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 26px;
}

body.light {
  color-scheme: light;
  --bg: #f7f7f4;
  --bg-soft: #ffffff;
  --surface: rgba(17, 24, 39, 0.055);
  --surface-strong: rgba(17, 24, 39, 0.09);
  --text: #111827;
  --muted: #596173;
  --line: rgba(17, 24, 39, 0.13);
  --accent: #047857;
  --accent-2: #2563eb;
  --shadow: 0 24px 80px rgba(17, 24, 39, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(147, 197, 253, 0.22), transparent 35rem),
    radial-gradient(circle at top right, rgba(167, 243, 208, 0.18), transparent 30rem),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  width: min(1180px, calc(100% - 32px));
  margin: 20px auto 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(22px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 16px;
  z-index: 20;
}

body.light .site-header {
  background: rgba(255, 255, 255, 0.78);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #07111f;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1.1rem;
}

.hero {
  width: min(1180px, calc(100% - 32px));
  margin: 84px auto 52px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 28px;
  align-items: center;
}

.hero-content,
.edge-card,
.feature-card,
.note-card,
.contact-card,
.article-card,
.status-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-content {
  border-radius: calc(var(--radius) + 10px);
  padding: clamp(30px, 6vw, 70px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

h3 {
  margin: 0 0 10px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 760px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 2vw, 1.26rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
}

.button.primary {
  background: var(--text);
  color: var(--bg);
}

.button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 38px 0 0;
}

.metrics div {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.metrics dt {
  font-weight: 800;
}

.metrics dd {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.edge-card {
  border-radius: var(--radius);
  overflow: hidden;
}

.terminal-bar {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
}

.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.8;
}

pre {
  margin: 0;
  padding: 28px;
  overflow: auto;
  color: var(--accent);
  font-size: 0.92rem;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.feature-grid,
.note-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-card,
.note-card,
.contact-card,
.article-card,
.status-card {
  border-radius: var(--radius);
  padding: 24px;
}

.feature-card p,
.note-card p,
.split p,
.contact-section p,
.article-card p,
.status-card p {
  color: var(--muted);
}

.icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  align-items: center;
  justify-content: center;
  background: var(--surface-strong);
  color: var(--accent);
  font-weight: 900;
  margin-bottom: 20px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.note-grid {
  grid-template-columns: repeat(3, 1fr);
}

.note-card {
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.note-card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 243, 208, 0.45);
  background: var(--surface-strong);
}

.note-card span {
  color: var(--accent-2);
  font-weight: 800;
  font-size: 0.84rem;
}

.contact-section {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
}

.contact-card {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.contact-card strong {
  color: var(--text);
  font-size: 1.35rem;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 26px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 18px;
  color: var(--muted);
}

.article-page {
  width: min(860px, calc(100% - 32px));
  margin: 72px auto;
}

.article-card {
  padding: clamp(28px, 6vw, 58px);
}

.article-card h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  margin-bottom: 24px;
}

.article-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-top: 40px;
}

.article-card ul {
  color: var(--muted);
}

.article-card code {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px 6px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--muted);
  text-decoration: none;
}

.status-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.status-ok {
  color: var(--accent);
  font-weight: 800;
}

@media (max-width: 900px) {
  .site-header {
    border-radius: 24px;
    align-items: flex-start;
  }

  .nav {
    display: none;
  }

  .hero,
  .split,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .note-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .feature-grid,
  .note-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    margin-top: 44px;
  }

  .site-footer {
    flex-direction: column;
  }
}
