:root {
  --bg: #faf9f6;
  --fg: #1a1a1a;
  --muted: #7a7a7a;
  --accent: #3b3b7a;
  --rule: #e5e3dc;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121114;
    --fg: #eceaf0;
    --muted: #8f8b98;
    --accent: #b9b6f0;
    --rule: #2a2830;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Pixelify Sans", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* --- header ------------------------------------------------------------ */
header {
  text-align: center;
  padding: 3rem 1.5rem 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.site-title {
  display: inline-block;
  font-size: clamp(2rem, 7vw, 3.25rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--fg);
  text-decoration: none;
}

nav {
  margin-top: 0.75rem;
  font-size: 1rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 0.6rem;
}

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

/* --- posts ------------------------------------------------------------- */
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.post {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

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

.post-title {
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0 0 0.25rem;
}

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

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

.post-date {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.post p { margin: 0 0 1rem; }

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

.read-more a {
  text-decoration: none;
  font-size: 0.95rem;
}

/* --- long-form elements ------------------------------------------------ */
.post h1, .post h2, .post h3 { line-height: 1.3; }
.post img { max-width: 100%; height: auto; }

blockquote {
  margin: 0 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

pre {
  background: var(--rule);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}

pre code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9rem; }
:not(pre) > code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85em;
  background: var(--rule);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

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

.empty { color: var(--muted); text-align: center; }
