/* 500 Tabs — blog theme
   Aesthetic: clean, modern, readable. Cooler palette, sans-serif.
   Shares structural DNA with solarpunk but distinct character. */

/* ── Palette ─────────────────────────────────────────────────────────────── */
:root {
  --bg:           #f4f6f8;   /* cool light grey — like a clean notebook */
  --bg-alt:       #eaedf1;   /* slightly darker, used for code/blockquotes */
  --text:         #1c2128;   /* near-black with a blue undertone */
  --text-muted:   #6b7280;   /* neutral grey for metadata and secondary text */
  --primary:      #3b82f6;   /* clean blue — main accent, links */
  --primary-alt:  #6366f1;   /* indigo — secondary accent */
  --green:        #059669;   /* emerald — small nod to the solarpunk sibling */
  --border:       #d1d5db;   /* light grey divider */
  --border-dark:  #9ca3af;   /* slightly heavier border for emphasis */
}

/* ── Reset & base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

li {
  margin-bottom: 0.3rem;
}

html {
  font-size: 18px;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

h1 {
  font-size: 2rem;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.3rem;
}

h2 { font-size: 1.3rem; }

h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

p { margin-bottom: 1.2rem; }

a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}

a:hover {
  color: var(--primary-alt);
  border-color: var(--primary-alt);
}

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

blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 3px solid var(--primary);
  background: var(--bg-alt);
  color: var(--text-muted);
  font-style: italic;
}

code {
  font-family: "Menlo", "Monaco", monospace;
  font-size: 0.85em;
  color: var(--green);
  background: var(--bg-alt);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-left: 3px solid var(--primary);
}

pre code { background: none; color: inherit; padding: 0; font-size: 0.85rem; }

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

/* ── Header & nav ───────────────────────────────────────────────────────── */
.site-header {
  margin-bottom: 3rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.site-header nav {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  border: none;
  letter-spacing: -0.01em;
}

.site-title:hover { color: var(--primary); border: none; }

.nav-sep { color: var(--border-dark); }

.nav-section {
  color: var(--text-muted);
  font-size: 1rem;
  border: none;
}

.nav-section:hover { color: var(--primary); border: none; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer a { color: var(--text-muted); border-color: var(--border); }
.site-footer a:hover { color: var(--primary); }

/* ── Post list ──────────────────────────────────────────────────────────── */
.post-list { margin-top: 1rem; }

.post-summary {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

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

.post-summary time {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: "Menlo", monospace;
  letter-spacing: 0.05em;
}

.post-content { overflow-wrap: break-word; }

.post-title {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.post-title a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  border: none;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--border-dark);
  text-underline-offset: 4px;
}

.post-title a:hover {
  color: var(--primary);
  text-decoration-color: var(--primary);
}

/* ── Single post ────────────────────────────────────────────────────────── */
.post-header { margin-bottom: 2rem; }

.post-header h1 {
  font-size: 1.8rem;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.3rem;
}

.post-date {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: "Menlo", monospace;
}

.post-tags {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.75rem;
  background: var(--bg-alt);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.5em;
  font-family: "Menlo", monospace;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  html { font-size: 16px; }
  body { padding: 1.25rem 1rem 3rem; }
  h1 { font-size: 1.6rem; }
}

/* ── Footnotes ──────────────────────────────────────────────────────────── */
.footnotes {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.footnotes a { border-bottom: none; }
