:root {
  --bg: #0a0f0d;
  --bg-elev: #101614;
  --bg-soft: #131b18;
  --fg: #d8e2dc;
  --muted: #93a19b;
  --line: #26302c;
  --accent: #82f28a;
  --accent-dim: #57c662;
  --warning: #e7cf71;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI", "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Consolas", "SFMono-Regular", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(130, 242, 138, 0.03), rgba(130, 242, 138, 0.01)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.025) 0 1px, transparent 1px 4px),
    var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration-color: rgba(130, 242, 138, 0.45);
}

a:hover {
  color: var(--accent);
}

code,
pre,
.brand,
.eyebrow,
.post-meta,
.top-nav,
.prompt,
.back-link {
  font-family: var(--mono);
}

.page-grid {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
}

.site-header,
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  border-top: 1px solid var(--line);
  border-bottom: none;
  color: var(--muted);
  font-size: 0.82rem;
}

.brand {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--accent);
  text-decoration: none;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.main-layout,
.article-layout {
  padding: 1.5rem;
}

.hero {
  padding: 1rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  color: var(--accent-dim);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 52rem;
  margin: 1rem 0 0;
  font-size: 1.16rem;
  color: var(--fg);
}

.editor-note {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin: 1.5rem 0;
  padding: 1rem 1rem 1rem 1.1rem;
  border: 1px solid rgba(130, 242, 138, 0.25);
  background: rgba(130, 242, 138, 0.06);
}

.prompt {
  color: var(--accent);
  font-weight: 700;
}

.editor-note p {
  margin: 0;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 2rem 0 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
}

.section-header:first-child {
  margin-top: 0;
}

.section-header h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.section-header span {
  color: var(--muted);
  font-size: 0.8rem;
}

.post-card {
  padding: 1rem 0 1.1rem;
  border-bottom: 1px dotted var(--line);
}

.post-card h3 {
  margin: 0.3rem 0 0.5rem;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.05;
}

.post-card p {
  margin: 0;
  color: var(--muted);
}

.post-meta {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--warning);
}

.sidebar {
  position: sticky;
  top: 1rem;
  align-self: start;
}

.sidebar-block {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
}

.sidebar-block h3 {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.sidebar-block p,
.sidebar-block li {
  color: var(--muted);
  font-size: 0.94rem;
}

.sidebar-block ul {
  margin: 0;
  padding-left: 1rem;
}

.article-shell {
  max-width: 760px;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--muted);
  text-decoration: none;
}

.article-shell h1 {
  margin: 0.35rem 0 0.85rem;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.article-dek {
  margin: 0 0 1.6rem;
  font-size: 1.08rem;
  color: var(--muted);
}

.article-body {
  font-size: 1.03rem;
}

.article-body h1,
.article-body h2,
.article-body h3 {
  font-family: var(--serif);
  line-height: 1.08;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-body h1 {
  font-size: 2rem;
}

.article-body h2 {
  font-size: 1.6rem;
}

.article-body h3 {
  font-size: 1.25rem;
}

.article-body p,
.article-body ul,
.article-body pre {
  margin: 0 0 1rem;
}

.article-body ul {
  padding-left: 1.2rem;
}

.article-body pre {
  padding: 1rem;
  overflow: auto;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.article-body code {
  color: var(--accent);
}

@media (max-width: 980px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header,
  .site-footer,
  .main-layout,
  .article-layout {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav {
    gap: 0.75rem;
  }

  .hero h1 {
    font-size: 2.6rem;
  }

  .post-card h3 {
    font-size: 1.5rem;
  }
}
