/*
 * Built in the Garage — blog.trackdays.ai
 * Single shared stylesheet for index + post pages.
 * No JS. No external fonts. No analytics.
 *
 * Design tokens (locked 2026-05-21):
 *   bg: #fafafa
 *   text: #1a1a1a
 *   muted: #555
 *   accent: #003366 (deep AWS-ish blue)
 *   border: #e0e0e0
 *   content width: 680px
 *   body: Georgia
 *   headings: system sans
 */

:root {
  --bg: #fafafa;
  --text: #1a1a1a;
  --muted: #555;
  --accent: #003366;
  --accent-hover: #002244;
  --border: #e0e0e0;
  --max-width: 680px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ── Site header ─────────────────────────────────────────── */

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

header.site-header h1.site-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

header.site-header h1.site-title a {
  color: var(--text);
  text-decoration: none;
}

header.site-header .tagline {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
}

/* ── Article typography ──────────────────────────────────── */

article h1 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

article .subtitle {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

article .post-meta {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

article h2 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

article h3 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

article p {
  margin-bottom: 1.2rem;
}

article p + p { margin-top: 0; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

em { font-style: italic; }
strong { font-weight: 700; }

code {
  font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 0.88em;
  background: rgba(0, 51, 102, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  color: var(--accent);
}

blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--muted);
}

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

/* ── Post list (homepage) ────────────────────────────────── */

.post-list {
  list-style: none;
}

.post-list li {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list h2 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

.post-list h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-list h2 a:hover {
  color: var(--accent);
}

.post-list .post-date {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.post-list .post-excerpt {
  font-family: Georgia, serif;
  color: var(--muted);
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* ── About author block ──────────────────────────────────── */

.author-bio {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--muted);
}

.author-bio p {
  margin-bottom: 0.8rem;
}

/* ── Site footer ─────────────────────────────────────────── */

footer.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

footer.site-footer a {
  color: var(--muted);
}

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

/* ── Mobile ──────────────────────────────────────────────── */

@media (max-width: 720px) {
  body { font-size: 17px; }
  .container { padding: 2rem 1.25rem; }
  article h1 { font-size: 1.7rem; }
  article h2 { font-size: 1.3rem; }
  article .subtitle { font-size: 1.05rem; }
  .post-list h2 { font-size: 1.2rem; }
  footer.site-footer { flex-direction: column; gap: 0.4rem; }
}

/* ── Figures ─────────────────────────────────────────────── */
article .hero {
  margin: 1.5rem 0 2rem;
  width: 100%;
}
article .hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
article .hero figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

article .outro {
  margin: 3rem 0 2rem;
  width: 100%;
}
article .outro img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
article .outro figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}
