:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #556074;
  --accent: #111827;
  --line: #e4e8ef;
  --font-inter: "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-jetbrains-mono: "JetBrains Mono", "JetBrains Mono Fallback", SF Mono, SFMono-Regular, Menlo, Monaco, Cascadia Mono, "Segoe UI Mono", Roboto Mono, Oxygen Mono, Ubuntu Monospace, "Source Code Pro", "Fira Mono", "Droid Sans Mono", Consolas, "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-inter);
  color: var(--text);
  background: var(--bg);
  min-height: 100%;
}

body {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #556074;
  --accent: #111827;
  --line: #e4e8ef;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  color: var(--text);
}

body.is-home {
  --bg: #070b13;
  --card: rgba(11, 20, 35, 0.58);
  --text: #e5e7eb;
  --muted: #9fb3c8;
  --accent: #f8fafc;
  --line: #243244;
}

body.is-learn {
  --bg: #070b13;
  --card: rgba(11, 20, 35, 0.58);
  --text: #e5e7eb;
  --muted: #9fb3c8;
  --accent: #f8fafc;
  --line: #243244;
}

body.is-doc {
  --bg: #ffffff;
  --card: #ffffff;
  --text: #111827;
  --muted: #556074;
  --accent: #111827;
  --line: #e4e8ef;
}

body.is-blog {
  --bg: #070b13;
  --card: rgba(11, 20, 35, 0.58);
  --text: #e5e7eb;
  --muted: #9fb3c8;
  --accent: #f8fafc;
  --line: #243244;
}

body:not(.is-home):not(.is-blog):not(.is-learn):not(.is-doc)::before,
body:not(.is-home):not(.is-blog):not(.is-learn):not(.is-doc)::after {
  display: none;
}

body.is-home::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(120deg, rgba(2, 6, 23, 0.8), rgba(17, 24, 39, 0.7)),
    radial-gradient(1200px 540px at 10% 0%, rgba(56, 189, 248, 0.24), transparent 55%),
    radial-gradient(920px 420px at 90% 15%, rgba(236, 72, 153, 0.2), transparent 50%),
    url("./background.png");
  background-size: cover, cover, cover, cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(1.07) contrast(1.06);
}

body.is-blog::before,
body.is-learn::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(120deg, rgba(2, 6, 23, 0.8), rgba(17, 24, 39, 0.7)),
    radial-gradient(1100px 500px at 12% 0%, rgba(16, 185, 129, 0.2), transparent 55%),
    radial-gradient(860px 380px at 88% 18%, rgba(59, 130, 246, 0.2), transparent 50%),
    url("./blog-background.png");
  background-size: cover, cover, cover, cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(1.05) contrast(1.05);
}

body.is-home::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.06), rgba(8, 13, 26, 0.4));
}

body.is-blog::after,
body.is-learn::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.06), rgba(8, 13, 26, 0.4));
}

body > * {
  position: relative;
  z-index: 2;
}

body,
main,
footer,
header {
  position: relative;
}

.bg-orb {
  position: fixed;
  display: none;
  pointer-events: none;
  filter: blur(40px);
  opacity: 0.35;
  border-radius: 50%;
}

.is-home .bg-orb,
.is-blog .bg-orb,
.is-learn .bg-orb {
  display: block;
}

.bg-orb-1 {
  width: 320px;
  height: 320px;
  right: -90px;
  top: 160px;
  background: #dbeafe;
}

.bg-orb-2 {
  width: 240px;
  height: 240px;
  left: -90px;
  top: 520px;
  background: #fce7f3;
}

.topbar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
}

.brand img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

.topbar-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

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

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.hero-compact {
  min-height: 44vh;
  padding-top: 0.5rem;
}

.content-list {
  display: grid;
  gap: 0.75rem;
}

.content-list-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem;
}

.content-list-item h3 {
  margin: 0 0 0.45rem;
}

.content-list-item h3 a {
  color: #ffffff;
}

.content-list-item h3 a:hover {
  opacity: 0.85;
}

.content-list-item p {
  margin: 0;
}

.simple-list {
  margin: 0;
  padding: 0;
  list-style-position: inside;
}

.simple-list li {
  margin: 0.5rem 0;
  color: var(--muted);
}

.eyebrow {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1.06;
  max-width: 16ch;
  font-weight: 750;
}

h1 span {
  color: var(--text);
  position: relative;
}

.subtext {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
}

h2,
h3 {
  margin-top: 0;
}

.lead {
  color: var(--muted);
  max-width: 64ch;
  font-size: 1.05rem;
  margin: 0.2rem 0 1.1rem;
}

.command-row {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  width: 100%;
  max-width: 36rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  padding: 0.5rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 20px 34px -28px rgba(15, 23, 42, 0.6);
  margin-top: 0.3rem;
}

.command-intro {
  margin: 0 0 0.6rem;
  max-width: 55ch;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
}

.command-intro-primary {
  color: #ffffff;
  font-weight: 760;
  font-size: 1.04rem;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 0 rgba(15, 23, 42, 0.2);
}

.command-intro-note {
  display: inline-block;
  margin-top: 0.4rem;
  color: inherit;
}

.btn-icon {
  appearance: none;
  position: relative;
  min-height: 2.95rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(15, 23, 42, 0.2);
  background: #f8fafc;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 0.52rem;
  padding: 0 0.9rem;
  flex: 0 0 auto;
  transition: transform 120ms ease, background-color 120ms ease, color 120ms ease;
  font-family: var(--font-inter);
  font-size: 0.92rem;
  font-weight: 560;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.btn-icon:hover {
  background: #eef2ff;
}

.btn-icon:active {
  transform: translateY(1px);
}

.copy-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.copy-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.command {
  margin: 0;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--card);
  padding: 0.9rem 1rem 0.85rem;
  display: inline-block;
  max-width: 420px;
  overflow-x: auto;
  box-shadow: 0 12px 24px -22px rgba(15, 23, 42, 0.5);
  flex: 1;
}

.command-proof {
  margin: 0.55rem 0 0;
  color: var(--muted);
  max-width: 55ch;
  font-size: 0.87rem;
}

.command::before {
  content: "Run";
  position: absolute;
  top: 0.45rem;
  left: 0.95rem;
  font-family: var(--font-jetbrains-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.command code {
  font-size: 0.95rem;
  color: var(--text);
  font-family: var(--font-jetbrains-mono);
  padding-top: 0.55rem;
  display: inline-block;
}

.docs-link {
  margin: 0.75rem 0 0;
  display: inline-flex;
  align-items: center;
}

.docs-link a {
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  text-underline-offset: 0.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.docs-link a:hover {
  text-decoration: underline;
}

.strike-word {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  color: color-mix(in srgb, var(--muted) 68%, var(--text) 32%);
}

.docs-arrow {
  transition: transform 120ms ease;
}

.docs-link a:hover .docs-arrow {
  transform: translate(2px, -2px);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section {
  margin-top: 5rem;
}

.is-doc .section {
  margin-top: 2.8rem;
}

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

.section article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem;
}

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

.links a {
  color: var(--text);
  text-decoration-thickness: 2px;
}

.footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  padding: 2rem 1.25rem 3rem;
  text-align: center;
  color: var(--muted);
}

.footer-links {
  margin-top: 0.55rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 0.45rem;
}

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

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

.footer a:hover {
  text-decoration: underline;
}

.sitemap-main {
  max-width: 760px;
}

.sitemap-list {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.sitemap-list li {
  color: var(--muted);
}

.sitemap-list a {
  color: var(--text);
  text-decoration: none;
}

.sitemap-list a:hover {
  text-decoration: underline;
}

.sitemap-section {
  margin-top: 2rem;
}

@media (max-width: 860px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

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

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

.blog-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem;
  background: var(--card);
}

.blog-item + .blog-item {
  margin-top: 0.8rem;
}

.blog-meta {
  margin: 0 0 0.5rem;
  font-size: 0.86rem;
  color: var(--muted);
  font-family: var(--font-jetbrains-mono);
}

.blog-item a {
  text-decoration: none;
}

.blog-item a:hover {
  text-decoration: underline;
}

.section-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.doc-main {
  max-width: 820px;
}

.doc-article {
  margin-top: 1.6rem;
  padding: 0;
}

.doc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.doc-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-family: var(--font-jetbrains-mono);
}

.doc-prose {
  margin-top: 2rem;
  display: grid;
  gap: 1.2rem;
}

.doc-prose section {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.video-embed {
  position: relative;
  width: 100%;
  max-width: 720px;
  padding-bottom: min(56.25%, 405px);
  margin: 2rem auto 1rem;
  border-radius: 0.7rem;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.doc-prose h2 {
  margin: 0 0 0.6rem;
  font-size: 1.4rem;
  line-height: 1.25;
}

.doc-prose p,
.doc-prose ul {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.doc-prose ul {
  padding-left: 1.25rem;
}

.doc-prose pre {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #0f172a;
  color: #e5e7eb;
  overflow-x: auto;
}

.doc-prose pre code {
  font-family: var(--font-jetbrains-mono);
}

.view-markdown {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.9rem;
  white-space: nowrap;
  margin-left: auto;
}

.view-markdown:hover {
  border-color: #a3a8b6;
}

.view-markdown-icon {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.view-markdown-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

@media (max-width: 860px) {
  .doc-header {
    flex-direction: column;
    align-items: stretch;
  }

  .view-markdown {
    width: fit-content;
    margin-left: 0;
  }
}
