/* ════════════════════════════════════════════════════════════
   The AI Stack — Linear-inspired theme
   ────────────────────────────────────────────────────────────
   Monochrome palette + Linear purple accent.
   Tight modern typography (Inter Tight + Inter).
   Generous whitespace. Sharp edges. No decorative ornaments.
   ════════════════════════════════════════════════════════════ */

:root {
  /* Surface */
  --bg: #fafafa;
  --bg-soft: #f4f4f5;
  --surface: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0, 0, 0, 0.04);

  /* Lines */
  --border: #e4e4e7;
  --border-strong: #d4d4d8;

  /* Ink */
  --text: #27272a;
  --text-soft: #52525b;
  --text-muted: #a1a1aa;
  --heading: #09090b;

  /* Accent — Linear purple */
  --accent: #5e6ad2;
  --accent-hover: #4a55b5;
  --accent-soft: rgba(94, 106, 210, 0.12);
  --accent-bg: rgba(94, 106, 210, 0.04);
  --accent-text-on: #ffffff;

  /* Subtle gradient (Linear hero text) */
  --gradient: linear-gradient(135deg, #5e6ad2 0%, #8b62f8 50%, #d05ec0 100%);

  /* Code */
  --code-bg: #09090b;
  --code-text: #e4e4e7;
  --code-inline-bg: #f4f4f5;
  --code-inline-text: #5e6ad2;
}

html.dark {
  --bg: #08080a;
  --bg-soft: #111114;
  --surface: #131316;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);

  --border: #1f1f23;
  --border-strong: #2a2a2f;

  --text: #d4d4d8;
  --text-soft: #a1a1aa;
  --text-muted: #71717a;
  --heading: #ffffff;

  --accent: #7c85e8;
  --accent-hover: #9097f0;
  --accent-soft: rgba(124, 133, 232, 0.18);
  --accent-bg: rgba(124, 133, 232, 0.06);

  --gradient: linear-gradient(135deg, #7c85e8 0%, #a87cff 50%, #e879b8 100%);

  --code-bg: #050507;
  --code-text: #ededed;
  --code-inline-bg: #1f1f23;
  --code-inline-text: #9097f0;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  font-feature-settings: "cv11", "ss01";
  letter-spacing: 0;
}

/* Very subtle radial gradient backdrop — Linear-like */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--accent-soft), transparent),
    radial-gradient(ellipse 50% 30% at 80% 10%, var(--accent-bg), transparent);
  pointer-events: none;
  opacity: 0.7;
}

.sans { font-family: 'Inter', system-ui, sans-serif; }
.tight { font-family: 'Inter Tight', 'Inter', system-ui, sans-serif; }
.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Smooth global transitions */
body,
.site-header,
.site-footer,
.article-card,
.featured-card,
.btn,
.theme-toggle,
.signup-form input[type="email"],
.signup-form button,
.cta-block,
.tier,
.lesson,
.market-gap-card,
.how-step,
.about-block,
.newsletter-inline,
.topic-chip,
.prose .mermaid,
.prose blockquote,
.prose code,
.prose pre {
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

/* ════════════════════════════════════════════════════════════
   Site chrome — sticky, blurred header
   ════════════════════════════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.875rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  flex: 1;
  margin-left: 0.5rem;
}

.site-nav a {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.875rem;
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0;
  padding: 0.25rem 0;
  position: relative;
}

.site-nav a:hover { color: var(--heading); }

.site-nav a.active {
  color: var(--heading);
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  bottom: -1.4rem;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-header-inner { justify-content: space-between; }
}

.brand {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--heading);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.brand:hover { color: var(--accent); }
.brand-dollar { color: var(--accent); }

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

.btn {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--heading);
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: -0.005em;
}

.btn:hover {
  border-color: var(--text);
  color: var(--heading);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: var(--heading);
  color: var(--bg);
  border-color: var(--heading);
}

.btn-primary:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover { border-color: var(--text); color: var(--heading); }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 6rem;
  background: var(--bg-soft);
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 720px) {
  .site-footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-brand .brand { margin-bottom: 0.5rem; }

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.5;
  max-width: 22rem;
  margin: 0;
}

.footer-heading {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.footer-col a {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.875rem;
  color: var(--text-soft);
  text-decoration: none;
  padding: 0.15rem 0;
}

.footer-col a:hover { color: var(--heading); }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

@media (max-width: 720px) {
  .footer-bottom { flex-direction: column; gap: 0.5rem; }
}

/* ════════════════════════════════════════════════════════════
   Layout
   ════════════════════════════════════════════════════════════ */

.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 2rem; }

/* ════════════════════════════════════════════════════════════
   Hero — massive typography, gradient accent
   ════════════════════════════════════════════════════════════ */

.hero {
  padding: 4.5rem 0 4rem;
  position: relative;
}

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

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

.hero h1 {
  font-family: 'Inter Tight', 'Inter', -apple-system, sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--heading);
  margin: 0 0 1.5rem;
}

.hero h1 .accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero p {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.15rem;
  color: var(--text-soft);
  line-height: 1.55;
  max-width: 36rem;
  margin: 0 0 2rem;
  font-weight: 400;
  letter-spacing: 0;
}

/* ════════════════════════════════════════════════════════════
   Sections
   ════════════════════════════════════════════════════════════ */

.section {
  padding: 5rem 0 3rem;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--heading);
  letter-spacing: -0.028em;
  margin: 0 0 1.5rem;
  line-height: 1.05;
}

.section > p:first-of-type {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 38rem;
  letter-spacing: -0.005em;
}

/* ════════════════════════════════════════════════════════════
   Stats bar (used on topic pages only — homepage removed it)
   ════════════════════════════════════════════════════════════ */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-sm);
}

.stat {
  padding: 1.5rem 1rem;
  text-align: center;
  border-right: 1px solid var(--border);
}

.stat:last-child { border-right: none; }

.stat .stat-num {
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1;
  margin-bottom: 0.4rem;
  letter-spacing: -0.03em;
}

.stat .stat-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ════════════════════════════════════════════════════════════
   Feature list
   ════════════════════════════════════════════════════════════ */

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

.feature-list li {
  display: flex;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
  color: var(--text-soft);
  line-height: 1.55;
  font-size: 1rem;
}

.feature-list .arrow {
  color: var(--accent);
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}

.feature-list strong { color: var(--heading); font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   Market gap cards
   ════════════════════════════════════════════════════════════ */

.market-gap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.market-gap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.market-gap-card.you {
  border: 1px solid var(--accent);
  background: var(--accent-bg);
  box-shadow: var(--shadow-md);
}

.market-gap-card .label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.market-gap-card.you .label { color: var(--accent); }

.market-gap-card .name {
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.25rem;
  letter-spacing: -0.015em;
}

.market-gap-card .topic {
  font-size: 0.875rem;
  color: var(--text-soft);
}

/* ════════════════════════════════════════════════════════════
   Curriculum tracks
   ════════════════════════════════════════════════════════════ */

.curriculum-intro {
  color: var(--text-soft);
  margin-bottom: 2.5rem;
  max-width: 38rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

.curriculum-track { margin-bottom: 2.5rem; }

.track-header {
  display: flex;
  align-items: baseline;
  gap: 0.875rem;
  margin-bottom: 1rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--border);
}

.track-number {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0;
}

.track-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--heading);
  margin: 0;
  letter-spacing: -0.015em;
}

.track-articles {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lesson {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.125rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
}

.lesson.published:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.lesson .num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 1.75rem;
  font-weight: 400;
}

.lesson.published .num { color: var(--accent); }

.lesson .title-block { flex: 1; min-width: 0; }

.lesson .title {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--heading);
  line-height: 1.35;
  letter-spacing: -0.011em;
}

.lesson .desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  line-height: 1.45;
}

.lesson .status {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.65rem;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  flex-shrink: 0;
  font-weight: 500;
  text-transform: lowercase;
}

.lesson .status.live { background: var(--accent-soft); color: var(--accent); }
.lesson .status.next { background: var(--bg-soft); color: var(--text-soft); }
.lesson .status.soon { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }

.lesson.upcoming { opacity: 0.55; }
.lesson.upcoming .title { color: var(--text-soft); }

/* ════════════════════════════════════════════════════════════
   How it works
   ════════════════════════════════════════════════════════════ */

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.how-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.how-step .step-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 1rem;
  letter-spacing: 0;
}

.how-step h3 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 0.5rem;
  letter-spacing: -0.018em;
}

.how-step p {
  font-size: 0.92rem;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.55;
}

/* ════════════════════════════════════════════════════════════
   Featured cards — clean sharp Linear-style
   ════════════════════════════════════════════════════════════ */

.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.75rem;
}

@media (min-width: 700px) {
  .featured-grid { grid-template-columns: 1fr 1fr; }
}

.featured-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.featured-card::after {
  content: "→";
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: var(--text-muted);
  font-size: 1rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.18s ease;
}

.featured-card:hover {
  border-color: var(--text);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.featured-card:hover::after {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

.featured-card .featured-tag {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 0.875rem;
  font-weight: 400;
}

.featured-card h3 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 0.625rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.featured-card p {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-soft);
  margin: 0 0 1rem;
  line-height: 1.55;
  letter-spacing: -0.005em;
}

.featured-card .meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.featured-card .meta .dot { opacity: 0.4; }

/* ════════════════════════════════════════════════════════════
   Pricing tiers
   ════════════════════════════════════════════════════════════ */

.pricing-note {
  color: var(--text-soft);
  font-size: 1rem;
  margin: 0 0 2rem;
  max-width: 38rem;
  line-height: 1.55;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.tier {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.tier.featured {
  border: 1px solid var(--accent);
  background: var(--accent-bg);
  box-shadow: var(--shadow-md);
}

.tier.featured::before {
  content: "Recommended";
  position: absolute;
  top: -0.65rem;
  left: 1.75rem;
  background: var(--accent);
  color: white;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.tier .tier-name {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.tier.featured .tier-name { color: var(--accent); }

.tier .tier-price {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.25rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

.tier .tier-price-unit {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: -0.005em;
}

.tier .tier-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  color: var(--text-soft);
  margin: 0.75rem 0 1.5rem;
  line-height: 1.5;
  min-height: 2.5rem;
}

.tier ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: 0.92rem;
  color: var(--text-soft);
  flex: 1;
  line-height: 1.5;
}

.tier li {
  padding: 0.35rem 0;
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}

.tier li::before {
  content: "→";
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   FAQ
   ════════════════════════════════════════════════════════════ */

.faq { margin-top: 1.75rem; }

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 1.125rem 0;
}

.faq details:first-of-type { border-top: 1px solid var(--border); }

.faq summary {
  cursor: pointer;
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--heading);
  list-style: none;
  position: relative;
  padding-right: 2rem;
  user-select: none;
  letter-spacing: -0.015em;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-family: 'JetBrains Mono', monospace;
  position: absolute;
  right: 0;
  top: -0.05rem;
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1;
}

.faq details[open] summary::after { content: "−"; color: var(--accent); }
.faq summary:hover { color: var(--accent); }

.faq details > p,
.faq details > div {
  margin: 0.75rem 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ════════════════════════════════════════════════════════════
   Who it's for / profiles
   ════════════════════════════════════════════════════════════ */

.profiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.profile p {
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0.4rem 0 0;
}

.profile .label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  color: var(--accent);
}

/* ════════════════════════════════════════════════════════════
   CTA blocks
   ════════════════════════════════════════════════════════════ */

.cta-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.cta-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, var(--accent-soft), transparent);
  pointer-events: none;
}

.cta-block > * { position: relative; }

.cta-block h2 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.85rem;
  margin: 0 0 0.75rem;
  color: var(--heading);
  letter-spacing: -0.03em;
}

.cta-block p {
  color: var(--text-soft);
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  line-height: 1.5;
}

.cta-block .btn-primary { padding: 0.7rem 1.25rem; font-size: 0.95rem; }

/* ════════════════════════════════════════════════════════════
   Newsletter inline
   ════════════════════════════════════════════════════════════ */

.newsletter-inline {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 3rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.newsletter-inline .pitch { flex: 1; min-width: 220px; }

.newsletter-inline .pitch-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.2rem;
  letter-spacing: -0.018em;
}

.newsletter-inline .pitch-desc {
  font-size: 0.875rem;
  color: var(--text-soft);
}

/* Signup form */

.signup-form {
  display: flex;
  gap: 0.5rem;
  max-width: 26rem;
  flex-wrap: wrap;
}

.signup-form input[type="email"] {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 0 0.85rem;
  height: 2.375rem;
  border-radius: 6px;
  color: var(--heading);
  font-size: 0.9rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1;
}

.signup-form input[type="email"]::placeholder { color: var(--text-muted); }
.signup-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.signup-form button {
  background: var(--heading);
  color: var(--bg);
  border: none;
  padding: 0 1rem;
  height: 2.375rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.signup-form button:hover { background: var(--text); }

/* ════════════════════════════════════════════════════════════
   About block
   ════════════════════════════════════════════════════════════ */

.about-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem 2rem;
  margin-top: 1.5rem;
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
}

.about-block strong { color: var(--heading); font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   Article meta
   ════════════════════════════════════════════════════════════ */

.article-meta {
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.article-meta .tag {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--accent);
}

.article-meta .back-link {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
}

.article-meta .back-link:hover { color: var(--accent); }

/* ════════════════════════════════════════════════════════════
   Article prose — Linear-style technical writing
   ════════════════════════════════════════════════════════════ */

.prose {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  letter-spacing: -0.008em;
}

.prose > *:first-child { margin-top: 0; }

.prose h1 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--heading);
  margin: 2rem 0 1.5rem;
}

.prose h2 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.65rem;
  color: var(--heading);
  margin: 3rem 0 1rem;
  letter-spacing: -0.028em;
  line-height: 1.2;
}

.prose h3 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--heading);
  margin: 2rem 0 0.625rem;
  letter-spacing: -0.02em;
}

.prose p { margin: 1rem 0; }

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

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

/* Buttons inside prose (e.g. end-of-article ☕ button) should not inherit prose link styling. */
.prose a.btn,
.prose a.btn-primary {
  text-decoration: none;
  text-decoration-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.prose a.btn-primary {
  color: var(--bg);
}

.prose a.btn {
  color: var(--heading);
}

.prose a.btn:hover,
.prose a.btn-primary:hover {
  text-decoration: none;
  text-decoration-color: transparent;
}

.prose a.btn-primary:hover { color: var(--bg); }

.prose strong { color: var(--heading); font-weight: 600; }
.prose em { color: var(--text); font-style: italic; }

.prose code {
  background: var(--code-inline-bg);
  color: var(--code-inline-text);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.85em;
  font-weight: 500;
}

.prose pre {
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  position: relative;
}

/* Copy-to-clipboard button (top-right of every code block) */
.code-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: #c9d1d9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  padding: 0.25rem 0.6rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.prose pre:hover .code-copy-btn,
.code-copy-btn:focus-visible {
  opacity: 1;
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.code-copy-btn.copied {
  background: rgba(94, 106, 210, 0.25);
  color: #e6e8eb;
  border-color: rgba(94, 106, 210, 0.6);
  opacity: 1;
}

/* Always-visible on touch devices (no hover) */
@media (hover: none) {
  .code-copy-btn { opacity: 0.7; }
}

.prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
  font-weight: 400;
}

/* highlight.js (github-dark) — keep our pre wrapper styling, let hljs color tokens */
.prose pre code.hljs {
  background: transparent;
  padding: 0;
  color: #c9d1d9;
  display: block;
  overflow-x: auto;
}

/* Re-tune a couple of hljs tokens so they look right on the very dark background */
.prose pre .hljs-keyword,
.prose pre .hljs-built_in,
.prose pre .hljs-type { color: #ff7b72; }
.prose pre .hljs-string,
.prose pre .hljs-attr { color: #a5d6ff; }
.prose pre .hljs-number,
.prose pre .hljs-literal { color: #79c0ff; }
.prose pre .hljs-title,
.prose pre .hljs-title.function_ { color: #d2a8ff; }
.prose pre .hljs-comment,
.prose pre .hljs-meta { color: #8b949e; font-style: italic; }
.prose pre .hljs-variable,
.prose pre .hljs-params,
.prose pre .hljs-property { color: #ffa657; }

.prose ul, .prose ol { margin: 1.125rem 0; padding-left: 1.5rem; }
.prose li { margin: 0.35rem 0; }

.prose ul li::marker { color: var(--accent); }

.prose blockquote {
  border-left: 2px solid var(--accent);
  background: var(--accent-bg);
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text);
}

.prose blockquote p { margin: 0; font-style: italic; }
.prose blockquote strong { color: var(--accent); font-style: normal; }

.prose table {
  width: 100%;
  margin: 1.75rem 0;
  border-collapse: collapse;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.prose th {
  text-align: left;
  background: var(--bg-soft);
  color: var(--heading);
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--border);
}

.prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
}

.prose tr:last-child td { border-bottom: none; }

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ════════════════════════════════════════════════════════════
   In-article explainer / "What does this mean?" box
   ════════════════════════════════════════════════════════════ */

.prose details.explainer {
  background: var(--accent-bg);
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  padding: 0.875rem 1.25rem 0.875rem 1.25rem;
  margin: 1.75rem 0;
}

.prose details.explainer summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-left: 1.85rem;
  padding-right: 2rem;
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.01em;
  line-height: 1.4;
  user-select: none;
}

.prose details.explainer summary::-webkit-details-marker { display: none; }

.prose details.explainer summary::before {
  content: "?";
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.25rem;
  height: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.prose details.explainer summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--accent);
}

.prose details.explainer[open] summary::after { content: "−"; }
.prose details.explainer summary:hover { color: var(--accent-hover); }

.prose details.explainer > *:not(summary) {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.prose details.explainer p:first-of-type { margin-top: 0.85rem; }
.prose details.explainer p:last-child { margin-bottom: 0; }
.prose details.explainer ul,
.prose details.explainer ol { margin: 0.6rem 0; }
.prose details.explainer strong { color: var(--accent); font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   Mermaid diagrams in articles
   ════════════════════════════════════════════════════════════ */

.prose .mermaid {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem 1rem;
  margin: 1.75rem 0;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.prose .mermaid svg { max-width: 100%; height: auto; }

/* ════════════════════════════════════════════════════════════
   Article CTA
   ════════════════════════════════════════════════════════════ */

.article-cta {
  margin-top: 5rem;
  padding-top: 0;
  border-top: none;
}

/* ════════════════════════════════════════════════════════════
   Reading progress bar (article pages)
   ════════════════════════════════════════════════════════════ */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--gradient, var(--accent));
  z-index: 50;
  transition: width 60ms linear;
  border-bottom-right-radius: 2px;
}

/* ════════════════════════════════════════════════════════════
   Previous / Next navigation at the end of an article
   ════════════════════════════════════════════════════════════ */

.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 3rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.prev-next-link {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s ease;
}

.prev-next-link.next { text-align: right; }
.prev-next-link.prev { text-align: left; }

.prev-next-link:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.prev-next-link .prev-next-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.prev-next-link:hover .prev-next-label { color: var(--accent); }

.prev-next-link .prev-next-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--heading);
  letter-spacing: -0.018em;
  line-height: 1.3;
}

.prev-next-spacer { /* keeps the grid balanced when only one side has a link */ }

@media (max-width: 700px) {
  .prev-next { grid-template-columns: 1fr; }
  .prev-next-link.next { text-align: left; }
}

/* ════════════════════════════════════════════════════════════
   Article sidebar layout
   ════════════════════════════════════════════════════════════ */

.container-with-sidebar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem 0;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 4rem;
  align-items: start;
}

.container-with-sidebar .article-main { max-width: 720px; min-width: 0; }

.sidebar { position: relative; }

.sidebar-inner {
  position: sticky;
  top: 4.5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  padding-right: 0.75rem;
  padding-top: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.sidebar-inner::-webkit-scrollbar { width: 6px; }
.sidebar-inner::-webkit-scrollbar-track { background: transparent; }
.sidebar-inner::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.sidebar-header {
  margin-bottom: 1.5rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-topic-name {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: block;
}

.sidebar-topic-name:hover { color: var(--accent); }

.sidebar-stats {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.sidebar-track { margin-bottom: 1.5rem; }

.sidebar-track-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.sidebar-track-desc {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin: 0 0 0.6rem;
  padding-right: 0.5rem;
}

.sidebar-link {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.4rem 0 0.4rem 0.625rem;
  margin-left: -0.75rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  text-decoration: none;
  line-height: 1.4;
  border-left: 2px solid transparent;
  position: relative;
}

.sidebar-link.published { cursor: pointer; }

.sidebar-link.published:hover {
  color: var(--heading);
  border-left-color: var(--border-strong);
}

.sidebar-link.current {
  color: var(--accent);
  font-weight: 500;
  border-left-color: var(--accent);
}

.sidebar-link.upcoming {
  opacity: 0.55;
  cursor: default;
}

.sidebar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  margin-top: 0.45rem;
  flex-shrink: 0;
}

.sidebar-dot.live { background: var(--accent); }
.sidebar-dot.next { background: var(--text-soft); }

/* Checkmark replaces the dot when an article is read */
.sidebar-check {
  width: 6px;
  flex-shrink: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  margin-top: 0.3rem;
  margin-left: -2px;
}

.sidebar-link.read .sidebar-title { opacity: 0.6; }
.sidebar-link.read .sidebar-num { opacity: 0.7; }
.sidebar-link.read .sidebar-read { opacity: 0.55; }
.sidebar-link.read.current .sidebar-title,
.sidebar-link.read.current .sidebar-num { opacity: 1; }

.sidebar-num {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  font-size: 0.7rem;
  width: 1.5rem;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.sidebar-link.current .sidebar-num { color: var(--accent); }
.sidebar-link .sidebar-title-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.sidebar-link .sidebar-title { line-height: 1.35; }

.sidebar-link .sidebar-read {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0;
}

.prev-next-link .prev-next-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--heading);
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.sidebar-toggle::after {
  content: "+";
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
}

.sidebar-toggle.open::after { content: "−"; color: var(--accent); }

@media (max-width: 960px) {
  .container-with-sidebar {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-top: 1.5rem;
  }
  .sidebar { border-bottom: 1px solid var(--border); padding-bottom: 1.25rem; }
  .sidebar-inner {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    padding-top: 0;
  }
  .sidebar-toggle { display: flex; }
  .sidebar-body { display: none; }
  .sidebar-body.open { display: block; }
}

/* ════════════════════════════════════════════════════════════
   Topic chips
   ════════════════════════════════════════════════════════════ */

.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  text-decoration: none;
}

.topic-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.topic-chip .count {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
}
