*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --ink: #1a1a1a;
  --bg: #f5f2e9;
  --muted: #6b6b6b;
  --accent: #e5462b;
  --line: #d8d3c4;

  --max-width: 680px;
  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Courier New', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html {
  font-size: 18px;
  line-height: 1.7;
}

body {
  margin: 0;
  padding: 0 1rem;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ── Header ── */
.site-header {
  max-width: var(--max-width);
  margin: 2.5rem auto 3rem;
  padding-bottom: 1rem;
  display: flex;
  align-items: baseline;
  gap: 2rem;
  border-bottom: 2.5px solid var(--ink);
}

.site-title {
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

/* a, c, k picked out in the accent color — the letters that turn
   "spark" into "sparck". Static, no motion. */
.site-title .spark {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

.site-nav a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

/* ── Landing page ── */
.landing {
  padding: 3rem 0 2rem;
}

.landing-intro {
  font-size: 1.2rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 540px;
  margin: 0;
}

.landing-quote {
  max-width: 560px;
  margin: 0;
  padding-left: 1.25rem;
  border-left: 4px solid var(--accent);
}

.landing-quote p {
  font-size: 1.4rem;
  line-height: 1.55;
  font-style: italic;
  margin: 0 0 0.9rem;
}

.landing-quote cite {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-style: normal;
  color: var(--muted);
}

.landing-quote cite::before {
  content: "— ";
}

/* ── Main ── */
main {
  max-width: var(--max-width);
  margin: 0 auto 4rem;
}

/* ── Post list (index page) ── */
.year-group {
  margin-bottom: 2.5rem;
}

.year-heading {
  display: inline-block;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin: 0 0 1rem;
  padding: 0.15rem 0.5rem;
  border: 2px solid var(--ink);
}

.year-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.12s ease;
}

.post-item:hover {
  border-bottom-color: var(--accent);
}

.post-item-date {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  font-family: var(--font-mono);
  min-width: 7rem;
}

.post-item a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

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

/* ── Individual post ── */
.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 2.5px solid var(--ink);
}

.post-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}

.post-date {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--muted);
}

.post-content {
  margin-top: 2rem;
}

.post-content p {
  margin: 0 0 1.3rem;
}

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1.5px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
  border: 2.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

.post-content blockquote {
  margin: 1.75rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 4px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content pre,
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.post-content pre {
  padding: 1rem 1.1rem;
  border: 2px solid var(--ink);
  overflow-x: auto;
}

.post-content :not(pre) > code {
  padding: 0.08em 0.32em;
  background: rgba(229, 70, 43, 0.12);
}

.post-footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

.post-footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

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

/* ── Small screens ── */
@media (max-width: 600px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .site-nav {
    margin-left: 0;
    gap: 1.25rem;
  }

  .post-item {
    flex-direction: column;
    gap: 0.15rem;
  }
}
