/* Project5Pi Blog — design system v1 (locked 2026-04-13) */

:root {
  --bg-page: #0a0e1a;
  --bg-page-2: #111827;
  --brand-mint: #5de6c8;
  --brand-mint-hi: #7df0d6;
  --brand-mint-lo: #3fcab0;

  --bg-article: #FCFCFA;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-subtle: #e2e8f0;
  --callout-bg: #f1f5f9;
  --callout-mint: #e8fbf5;
  --callout-urgent: #fef3c7;
  --callout-urgent-border: #f59e0b;

  --font-display: Fraunces, Georgia, "Times New Roman", serif;
  --font-ui: Inter, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  --shell: 1080px;
  --col: 680px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background: var(--bg-article);
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ------- header ------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-page);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .inner {
  max-width: var(--shell); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
}
.site-header .logo {
  font-family: 'JetBrains Mono', monospace; font-size: 24px; font-weight: 600;
  color: var(--brand-mint); text-decoration: none; letter-spacing: -0.5px;
}
.site-header .logo span { color: var(--brand-mint); }
.site-header nav a {
  color: rgba(255,255,255,0.75); text-decoration: none; font-size: 14px; font-weight: 500;
  margin: 0 14px;
}
.site-header nav a:hover { color: var(--brand-mint); }
.site-header .cta {
  background: var(--brand-mint); color: var(--bg-page);
  padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: background 0.15s;
}
.site-header .cta:hover { background: var(--brand-mint-hi); }

/* ------- article ------- */
.article {
  max-width: var(--col); margin: 64px auto; padding: 0 24px;
}
.breadcrumb {
  font-size: 13px; color: var(--text-muted); margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-mint-lo); }
.tag-pill {
  display: inline-block; background: var(--callout-mint); color: var(--brand-mint-lo);
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 20px;
}
.article h1 {
  font-family: var(--font-display); font-size: 52px; line-height: 1.1; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 24px; color: var(--text-primary);
}
.meta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-bottom: 28px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 40px;
  font-size: 14px; color: var(--text-secondary);
}
.meta .author {
  display: flex; align-items: center; gap: 10px; font-weight: 500;
}
.meta .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-mint) 0%, var(--bg-page) 100%);
}
.meta .badge-updated {
  background: var(--callout-urgent); color: #92400e; padding: 3px 10px;
  border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
}

/* ------- content blocks ------- */
.article .lead {
  font-size: 22px; line-height: 1.5; color: var(--text-primary); margin-bottom: 32px; font-weight: 400;
}
.article h2 {
  font-size: 32px; line-height: 1.25; font-weight: 700; margin: 56px 0 20px;
  letter-spacing: -0.01em;
}
.article h3 {
  font-size: 24px; line-height: 1.3; font-weight: 600; margin: 40px 0 16px;
}
.article p { margin-bottom: 24px; color: var(--text-primary); }
.article p + p { margin-top: -8px; }
.article a { color: var(--brand-mint-lo); text-decoration: underline; text-underline-offset: 3px; }
.article a:hover { color: var(--brand-mint-lo); filter: brightness(0.85); }
.article ul, .article ol { margin: 0 0 24px 24px; }
.article li { margin-bottom: 10px; }
.article strong { color: var(--text-primary); font-weight: 700; }

/* TL;DR */
.tldr {
  background: var(--callout-mint); border-left: 4px solid var(--brand-mint);
  padding: 24px 28px; margin: 32px 0; border-radius: 0 8px 8px 0;
}
.tldr .label {
  font-size: 12px; font-weight: 700; color: var(--brand-mint-lo);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 10px;
}
.tldr ul { margin: 0 0 0 20px; }
.tldr li { font-size: 16px; color: var(--text-primary); }

/* Stat callout */
.stat {
  background: var(--callout-bg); border-radius: 12px; padding: 32px; margin: 40px 0;
  text-align: center;
}
.stat .num {
  font-family: var(--font-mono); font-size: 56px; font-weight: 500;
  color: var(--text-primary); letter-spacing: -0.02em; margin-bottom: 8px;
}
.stat .desc { font-size: 16px; color: var(--text-secondary); margin-bottom: 6px; }
.stat .source { font-size: 13px; color: var(--text-muted); font-style: italic; }

/* Pull quote */
.pullquote {
  font-family: var(--font-display); font-style: italic; font-size: 28px;
  line-height: 1.4; color: var(--text-primary);
  border-left: 4px solid var(--brand-mint); padding: 8px 0 8px 28px;
  margin: 40px 0;
}
.pullquote .attrib {
  display: block; font-family: var(--font-ui); font-style: normal; font-size: 14px;
  color: var(--text-muted); margin-top: 12px; font-weight: 500;
}

/* Comparison table */
.cmp {
  width: 100%; border-collapse: collapse; margin: 32px 0;
  font-size: 15px; border: 1px solid var(--border-subtle); border-radius: 8px; overflow: hidden;
}
.cmp thead { background: var(--bg-page); color: #fff; }
.cmp th, .cmp td { padding: 14px 16px; text-align: left; }
.cmp th { font-weight: 600; font-size: 14px; letter-spacing: 0.02em; }
.cmp tbody tr:nth-child(even) { background: var(--callout-bg); }
.cmp tbody tr { border-top: 1px solid var(--border-subtle); }

/* Urgent / alert callout */
.alert {
  background: var(--callout-urgent); border-left: 4px solid var(--callout-urgent-border);
  padding: 20px 24px; margin: 32px 0; border-radius: 0 8px 8px 0;
}
.alert .label {
  font-size: 12px; font-weight: 700; color: #92400e;
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px;
}
.alert p { margin: 0; color: #78350f; }

/* Inline email capture */
.capture {
  background: var(--bg-page); color: #fff; padding: 32px;
  border-radius: 12px; margin: 48px 0;
}
.capture h3 {
  color: #fff; font-size: 22px; margin-bottom: 8px;
  font-family: var(--font-ui); font-weight: 600;
}
.capture p { color: rgba(255,255,255,0.75); font-size: 15px; margin-bottom: 20px; }
.capture form { display: flex; gap: 10px; flex-wrap: wrap; }
.capture input[type="email"] {
  flex: 1; min-width: 220px; padding: 12px 14px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05);
  color: #fff; font-family: var(--font-ui); font-size: 15px;
}
.capture input::placeholder { color: rgba(255,255,255,0.4); }
.capture button {
  background: var(--brand-mint); color: var(--bg-page);
  padding: 12px 22px; border: 0; border-radius: 8px;
  font-weight: 700; font-family: var(--font-ui); font-size: 15px; cursor: pointer;
}
.capture button:hover { background: var(--brand-mint-hi); }

/* Final CTA */
.cta-final {
  background: linear-gradient(135deg, var(--bg-page) 0%, var(--bg-page-2) 100%);
  border: 1px solid var(--brand-mint); border-radius: 16px;
  padding: 48px 40px; margin: 64px 0 32px; text-align: center;
}
.cta-final h2 {
  color: #fff; font-family: var(--font-display); font-size: 32px; margin: 0 0 12px;
}
.cta-final p { color: rgba(255,255,255,0.8); margin-bottom: 24px; }
.cta-final a {
  display: inline-block; background: var(--brand-mint); color: var(--bg-page);
  padding: 14px 28px; border-radius: 10px; font-weight: 700; text-decoration: none;
  transition: background 0.15s;
}
.cta-final a:hover { background: var(--brand-mint-hi); }

/* ------- footer ------- */
.site-footer {
  background: var(--bg-page); color: rgba(255,255,255,0.6);
  padding: 48px 24px; font-size: 14px; text-align: center; margin-top: 96px;
}
.site-footer a { color: rgba(255,255,255,0.85); text-decoration: none; margin: 0 12px; }
.site-footer a:hover { color: var(--brand-mint); }

/* ------- blog index listing ------- */
.index-hero {
  max-width: var(--shell); margin: 0 auto; padding: 80px 24px 40px; text-align: center;
}
.index-hero h1 {
  font-family: var(--font-display); font-size: 56px; line-height: 1.1; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 16px;
}
.index-hero p { font-size: 20px; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }
.post-grid {
  max-width: var(--shell); margin: 0 auto; padding: 32px 24px 64px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px;
}
.post-card {
  background: #fff; border: 1px solid var(--border-subtle); border-radius: 12px;
  padding: 28px; text-decoration: none; color: inherit; display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px -12px rgba(15,23,42,0.15); }
.post-card .tag {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--brand-mint-lo); font-weight: 700; margin-bottom: 10px;
}
.post-card h3 {
  font-family: var(--font-display); font-size: 22px; line-height: 1.3;
  margin-bottom: 12px; color: var(--text-primary);
}
.post-card p { font-size: 15px; color: var(--text-secondary); margin-bottom: 16px; flex: 1; }
.post-card .meta-row { font-size: 13px; color: var(--text-muted); }

/* ------- responsive ------- */
@media (max-width: 640px) {
  .article h1 { font-size: 36px; }
  .article .lead { font-size: 19px; }
  .article h2 { font-size: 26px; }
  .stat .num { font-size: 40px; }
  .pullquote { font-size: 22px; padding-left: 20px; }
  .cmp { font-size: 13px; }
  .cmp th, .cmp td { padding: 10px; }
  .site-header nav { display: none; }
  .index-hero h1 { font-size: 38px; }
}
