
:root {
  --bg: #f7f7fb;
  --bg-alt: #ffffff;
  --fg: #0f172a;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: rgba(37,99,235,0.08);
  --border: #e5e7eb;
  --card-radius: 18px;
  --shadow-soft: 0 18px 40px rgba(15,23,42,0.08);
  --code-bg: #020617;
}

html[data-theme="dark"] {
  --bg: #020617;
  --bg-alt: #020617;
  --fg: #e5e7eb;
  --muted: #9ca3af;
  --accent: #60a5fa;
  --accent-soft: rgba(96,165,250,0.12);
  --border: #111827;
  --card-radius: 18px;
  --shadow-soft: 0 18px 50px rgba(15,23,42,0.7);
  --code-bg: #020617;
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  text-decoration: underline;
}

.site-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(20px);
}

.header-inner {
  background: color-mix(in srgb, var(--bg-alt) 82%, transparent);
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(15,23,42,0.08);
  padding: 0.4rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-right: 0.75rem;
  border-right: 1px solid var(--border);
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #e5e7eb, transparent 45%),
              radial-gradient(circle at 70% 80%, #38bdf8, transparent 55%),
              radial-gradient(circle at 80% 10%, #6366f1, transparent 50%),
              radial-gradient(circle at 10% 90%, #0f172a, #020617);
  border: 1px solid rgba(148,163,184,0.6);
  position: relative;
  overflow: hidden;
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.22);
  box-shadow: inset 0 0 0 1px rgba(15,23,42,0.3);
}

.logo-text-main {
  font-weight: 650;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.logo-text-sub {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.82rem;
  margin-left: 0.75rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--fg);
  font-weight: 600;
}

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

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.4rem 0.95rem;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  text-decoration: none;
}

.btn-ghost {
  border-color: var(--border);
  background: color-mix(in srgb, var(--bg-alt) 80%, transparent);
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #f9fafb;
  box-shadow: 0 16px 35px rgba(37,99,235,0.45);
}

.btn-primary:hover {
  box-shadow: 0 18px 40px rgba(37,99,235,0.6);
}

.theme-toggle {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 2px;
  background: color-mix(in srgb, var(--bg-alt) 80%, transparent);
  position: relative;
}

.theme-toggle-knob {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--fg);
  transform: translateX(0);
  transition: transform 0.16s ease-out;
}

html[data-theme="dark"] .theme-toggle-knob {
  transform: translateX(12px);
}

main {
  flex: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 2.5rem;
  margin-top: 1.25rem;
  align-items: center;
}

.hero-text-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.hero-title {
  font-size: clamp(2.15rem, 2.6vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.hero-highlight {
  background: linear-gradient(120deg, #2563eb, #22c55e, #f97316);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-lede {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 34rem;
}

.hero-cta-row {
  display: flex;
  margin-top: 1.4rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-meta {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.1rem;
  font-size: 0.76rem;
  color: var(--muted);
  align-items: center;
}

.hero-meta strong {
  color: var(--fg);
}

.hero-card {
  background: radial-gradient(circle at 0 0, rgba(96,165,250,0.16), transparent 55%),
              radial-gradient(circle at 100% 100%, rgba(59,130,246,0.32), transparent 60%),
              var(--bg-alt);
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  padding: 1.65rem 1.4rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero-card-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #e5e7eb;
  margin-bottom: 0.65rem;
}

.hero-card-main {
  font-size: 0.9rem;
  color: #e5e7eb;
  line-height: 1.7;
  max-width: 19rem;
}

.hero-card-grid {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 0.75rem;
}

.hero-metric {
  background: rgba(15,23,42,0.7);
  border-radius: 16px;
  padding: 0.6rem 0.65rem;
  border: 1px solid rgba(148,163,184,0.35);
}

.hero-metric-label {
  font-size: 0.64rem;
  color: #9ca3af;
}

.hero-metric-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e5e7eb;
}

.hero-orbit {
  position: absolute;
  inset: 14%;
  border-radius: 28px;
  border: 1px dashed rgba(148,163,184,0.4);
  pointer-events: none;
}

.hero-orbit-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 0 6px rgba(56,189,248,0.36);
  top: 18%;
  right: 17%;
}

.section {
  margin-top: 3.2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: baseline;
  margin-bottom: 1.35rem;
}

.section-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.section-title {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.section-description {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 32rem;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  background: var(--bg-alt);
  border-radius: var(--card-radius);
  padding: 1.05rem 1.1rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px rgba(15,23,42,0.05);
}

.card h3 {
  font-size: 0.98rem;
  margin: 0 0 0.4rem;
}

.card p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.tag {
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 1.8rem;
}

.code-block {
  background: var(--code-bg);
  color: #e5e7eb;
  border-radius: 18px;
  padding: 1rem 1.1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Courier New", monospace;
  font-size: 0.76rem;
  border: 1px solid rgba(15,23,42,0.8);
  box-shadow: var(--shadow-soft);
}

.code-block pre {
  margin: 0;
  white-space: pre-wrap;
}

.footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

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

@media (max-width: 880px) {
  .hero {
    grid-template-columns: minmax(0,1fr);
  }
  .hero-card {
    order: -1;
  }
  .card-grid-3 {
    grid-template-columns: minmax(0,1fr);
  }
  .split-layout {
    grid-template-columns: minmax(0,1fr);
  }
}

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
  .nav-links {
    display: none;
  }
  .hero-title {
    font-size: 1.9rem;
  }
}
