:root {
  --bg: #0b0e14;
  --bg-soft: #11151f;
  --panel: #151a25;
  --line: #232a3a;
  --text: #d7dce6;
  --head: #f2f5fa;
  --muted: #8a94a8;
  --accent: #7aa2f7;
  --accent-2: #6ee7c7;
  --code-bg: #151a25;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 68rem;
  --radius: 10px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* Subtle top glow so the dark page is not flat. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 26rem;
  background: radial-gradient(60rem 20rem at 50% -8rem, rgba(122, 162, 247, 0.16), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

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

h1, h2, h3, h4 {
  color: var(--head);
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }
.lede { color: var(--muted); font-size: 1.1rem; max-width: 46rem; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--panel);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(11, 14, 20, 0.72);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
}

.brand {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--head);
}
.brand:hover { text-decoration: none; color: var(--head); }

.site-nav { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.site-nav a { color: var(--muted); font-size: 0.94rem; }
.site-nav a:hover { color: var(--head); text-decoration: none; }
.site-nav .nav-repo {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.8rem;
  color: var(--text);
}
.site-nav .nav-repo:hover { border-color: var(--accent); color: var(--head); }

/* ---------- hero ---------- */

.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(1.5rem, 4vw, 3rem); }
.hero h1 { max-width: 38rem; }
.hero .lede { font-size: 1.18rem; }

.hero-inner {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.25rem);
  flex-wrap: wrap;
}

.hero-mark {
  flex: 0 0 auto;
  width: clamp(9rem, 16vw, 12.5rem);
  height: auto;
  filter: drop-shadow(0 0.6rem 1.6rem rgba(110, 231, 199, 0.14));
}

.hero-copy { flex: 1 1 24rem; min-width: 0; }

.hero-note {
  margin: 1.25rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.hero-note a { color: var(--accent-2); }

pre.cmd {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text);
}
pre.cmd code { background: none; padding: 0; border: 0; font-size: inherit; color: inherit; }
pre.cmd::before { content: "$ "; color: var(--accent-2); }

.hero-links { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #08101f;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }

.btn-quiet {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-quiet:hover { border-color: var(--accent); color: var(--head); filter: none; }

/* ---------- sections ---------- */

.section { padding-top: 2.75rem; padding-bottom: 2.75rem; }
.page-head { padding-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: 0.5rem; }

.section-title {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding-bottom: 0.9rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.25rem;
}

.feature h3 { color: var(--head); margin-bottom: 0.6rem; }

.feature {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.feature p { color: var(--muted); margin: 0; font-size: 0.94rem; }

/* ---------- post lists ---------- */

.post-list { list-style: none; margin: 0; padding: 0; }

.post-item {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.post-item:first-child { padding-top: 0; }

.post-item time {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.post-item > a {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--head);
  letter-spacing: -0.01em;
}
.post-item > a:hover { color: var(--accent); text-decoration: none; }
.post-blurb { color: var(--muted); margin: 0.4rem 0 0; font-size: 0.95rem; }

.more { font-family: var(--mono); font-size: 0.88rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.7rem 0 0; }
.tags a {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}
.tags a:hover { color: var(--head); border-color: var(--accent); text-decoration: none; }
.tags-big a { font-size: 0.9rem; padding: 0.3rem 0.8rem; }

/* ---------- post ---------- */

.post { max-width: 48rem; }
.post-head { margin-bottom: 2rem; }
.post-meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.prose { font-size: 1.03rem; }
.prose > h2 { margin-top: 2.4rem; }
.prose > h3 { margin-top: 1.9rem; font-size: 1.05rem; }
.prose ul, .prose ol { padding-left: 1.35rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4em; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.15rem 0 0.15rem 1.1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.87em;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.1em 0.36em;
}

/* Code blocks are deliberately unhighlighted: every block on this site is
   a shell command, and token colouring turns a one-liner into a rainbow
   while mis-reading things like a model name as a literal. */
.prose pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.6;
  margin: 1.4rem 0;
  color: var(--text);
}
.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}
.prose th, .prose td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
.prose th { background: var(--panel); color: var(--head); }

.post-foot {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
  margin: 1rem 0;
}
.post-nav .next { margin-left: auto; text-align: right; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding: 2rem 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.footer-inner p { margin: 0 0 0.3rem; }
.site-footer a { color: var(--text); }

@media (max-width: 34rem) {
  .header-inner { flex-wrap: wrap; padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .site-nav { gap: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
