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

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  --serif:      Georgia, "Times New Roman", serif;
  --sans:       -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --text:       #1a1a1a;
  --muted:      #767676;
  --border:     #e0e0e0;
  --bg:         #faf9f7;
  --max-width:  680px;
  --line:       1.75;
}

/* ─── Base ───────────────────────────────────────────────── */
html  { font-size: 18px; background: var(--bg); color: var(--text); }
body  { font-family: var(--serif); line-height: var(--line); }

/* ─── Layout ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ─── Header / Masthead ──────────────────────────────────── */
.site-header {
  border-bottom: 2px solid var(--text);
  padding: 1.25rem 0;
  margin-bottom: 3rem;
}
.site-header .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.site-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}
nav a {
  font-family: var(--sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
  margin-left: 1.5rem;
}
nav a:hover { text-decoration: underline; }

/* ─── Post List ──────────────────────────────────────────── */
.post-list { display: flex; flex-direction: column; gap: 2.5rem; }

.post-summary time {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.post-summary h2 {
  font-size: 1.4rem;
  font-weight: bold;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.post-summary h2 a { color: var(--text); text-decoration: none; }
.post-summary h2 a:hover { text-decoration: underline; }
.post-summary .summary { font-size: 0.95rem; color: var(--muted); }

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

.post-header time {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.post-header h1 {
  font-size: 2.25rem;
  font-weight: bold;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.post-description {
  font-size: 1.1rem;
  color: var(--muted);
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

/* ─── Post Content (Markdown output) ────────────────────── */
.post-content { font-size: 1rem; }
.post-content p              { margin-bottom: 1.4em; }
.post-content h2             { font-size: 1.4rem; letter-spacing: -0.02em; margin: 2.5em 0 0.75em; border-top: 1px solid var(--border); padding-top: 1rem; }
.post-content h3             { font-size: 1.15rem; margin: 2em 0 0.5em; }
.post-content a              { color: var(--text); }
.post-content blockquote     { border-left: 3px solid var(--text); padding-left: 1rem; color: var(--muted); font-style: italic; margin: 1.5em 0; }
.post-content pre            { background: #f0efed; padding: 1rem; overflow-x: auto; font-size: 0.85rem; margin: 1.5em 0; border-radius: 2px; }
.post-content code           { font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.88em; background: #f0efed; padding: 0.1em 0.3em; border-radius: 2px; }
.post-content pre code       { background: none; padding: 0; }
.post-content img            { max-width: 100%; height: auto; margin: 1.5em 0; }
.post-content hr             { border: none; border-top: 1px solid var(--border); margin: 2.5em 0; }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 2rem 0;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .post-header h1 { font-size: 1.75rem; }
  .site-header .container { flex-direction: column; gap: 0.75rem; }
  nav a:first-child { margin-left: 0; }
}
