/* ─── Design tokens ─────────────────────────────────────────────── */
:root {
  --bg:      #f9f7f4;
  --text:    #1a1918;
  --muted:   #8c8884;
  --border:  #e5e2dc;
  --accent:  #b83c27;
  --code-bg: #eeecea;
  --pre-bg:  #1a1918;
  --pre-fg:  #e8e4de;
  --mono:    'IBM Plex Mono', 'Courier New', monospace;
  --serif:   'Newsreader', Georgia, serif;
}

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

html {
  border-top: 3px solid var(--accent);
  background: var(--bg);
}

body {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ─── Layout ─────────────────────────────────────────────────────── */
.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ─── Header ─────────────────────────────────────────────────────── */
.site-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.site-title {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
}

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

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

.site-bio {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* ─── Post list ──────────────────────────────────────────────────── */
#posts {
  list-style: none;
}

.post-listing {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.post-listing a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.1s;
}

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

.date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

/* ─── Post page ──────────────────────────────────────────────────── */
.post-title {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.post-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-content p {
  margin-bottom: 1.4em;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 2em;
  margin-bottom: 0.5em;
  letter-spacing: -0.01em;
}

.post-content a {
  color: var(--text);
  text-decoration-color: var(--border);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.post-content a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.post-content img {
  display: block;
  margin: 28px auto;
  max-width: 100%;
}

.post-content blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 20px;
  margin: 2em 0;
  color: var(--muted);
  font-style: italic;
}

/* ─── Code ───────────────────────────────────────────────────────── */
code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--code-bg);
  padding: 0.1em 0.4em;
  border-radius: 2px;
  color: var(--text);
}

pre {
  background: var(--pre-bg);
  color: var(--pre-fg);
  padding: 20px 24px;
  overflow-x: auto;
  border-radius: 3px;
  margin: 28px 0;
  line-height: 1.6;
}

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

/* ─── Footer ─────────────────────────────────────────────────────── */
#footer {
  margin-top: 72px;
  padding: 28px 0 52px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#footer nav {
  display: flex;
  gap: 20px;
}

#footer nav a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.1s;
}

#footer nav a:hover {
  color: var(--text);
}

.goodbye {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
