:root {
  --canvas: #0f1419;
  --canvas-2: #0c1015;
  --surface: rgba(255, 255, 255, 0.015);
  --surface-2: rgba(255, 255, 255, 0.03);
  --surface-3: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.06);
  --border-2: rgba(255, 255, 255, 0.10);
  --text: #d8dee4;
  --text-strong: #f5f7fa;
  --text-mute: #94a3b8;
  --text-faint: #5b6473;
  --accent: #22d3ee;
  --accent-deep: #052029;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "URW Palladio L", Georgia, serif;
  --font-mono: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header — same Lab chrome as the studio */
.header {
  position: sticky; top: 0;
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 0;
}
.brand-row { display: flex; align-items: center; gap: 12px; }
.lights { display: flex; gap: 6px; }
.lights span { width: 8px; height: 8px; border-radius: 50%; }
.lights span:nth-child(1) { background: #fb7185; }
.lights span:nth-child(2) { background: #fbbf24; }
.lights span:nth-child(3) { background: #34d399; }
.brand {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--text-mute);
}
.brand b { color: var(--text-strong); font-weight: 500; }

.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 5px;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.nav a:hover { color: var(--text-strong); background: var(--surface-3); text-decoration: none; }
.nav a.active { color: var(--accent); }

.studio-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  border: 0.5px solid rgba(34, 211, 238, 0.30);
  padding: 6px 12px;
  border-radius: 5px;
}
.studio-link:hover { background: rgba(34, 211, 238, 0.06); text-decoration: none; }

/* Category hero */
.hero { padding: 48px 0 24px; }
.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--text-strong);
}
.hero .lead {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-mute);
  max-width: 60ch;
  margin: 0;
}

/* Grid of post cards */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 32px 0 64px;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } .hero h1 { font-size: 32px; } }

.card {
  background: var(--surface-2);
  border: 0.5px solid var(--border-2);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: rgba(34, 211, 238, 0.30); transform: translateY(-2px); }
.card-body { padding: 20px; }
.card .kicker {
  margin-bottom: 10px;
  font-size: 10px;
  letter-spacing: 0.12em;
}
.card h2 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 10px;
}
.card h2 a { color: var(--text-strong); }
.card h2 a:hover { color: var(--accent); text-decoration: none; }
.card .excerpt {
  font-family: var(--font-serif);
  color: var(--text-mute);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 14px;
}
.card .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card .meta .arrow { color: var(--accent); margin-left: auto; }

/* Empty state */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--surface-2);
  border: 0.5px solid var(--border);
  border-radius: 12px;
}

/* Single post */
.post {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 0 80px;
}
.post .kicker { margin-bottom: 18px; }
.post .kicker a { color: var(--text-faint); }
.post .kicker a:hover { color: var(--accent); text-decoration: none; }

.post h1 {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--text-strong);
}
.post .lead {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-mute);
  margin: 0 0 36px;
  font-style: italic;
}

.post .content {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
}
.post .content p { margin: 0 0 1.4em; }
.post .content h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  margin: 2em 0 0.6em;
  color: var(--text-strong);
}
.post .content h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  margin: 1.6em 0 0.5em;
  color: var(--text-strong);
}
.post .content a {
  color: var(--accent);
  border-bottom: 0.5px solid rgba(34, 211, 238, 0.40);
}
.post .content a:hover { background: rgba(34, 211, 238, 0.06); text-decoration: none; }
.post .content blockquote {
  margin: 1.6em 0;
  padding-left: 18px;
  border-left: 2px solid var(--accent);
  color: var(--text-strong);
  font-style: italic;
}
.post .content code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--surface-3);
  padding: 1px 6px;
  border-radius: 4px;
}
.post .content ul, .post .content ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.post .content li { margin-bottom: 0.5em; }
.post .content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5em 0;
  border: 0.5px solid var(--border-2);
}

/* Affiliate link styling — make sponsored links visually distinguishable */
.post .content a[rel*="sponsored"]::after {
  content: " ↗";
  font-family: var(--font-mono);
  font-size: 0.9em;
  opacity: 0.6;
}

/* Footer */
.footer {
  border-top: 0.5px solid var(--border);
  background: var(--surface);
  padding: 24px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.disclosure {
  color: var(--text-mute);
  font-size: 13px;
  font-family: var(--font-serif);
  font-style: italic;
  max-width: 70ch;
}
.foot-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  border-top: 0.5px solid var(--border);
  padding-top: 12px;
}
.foot-meta a { color: var(--text-mute); }
.foot-meta a:hover { color: var(--accent); text-decoration: none; }
