@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --paper: #FAF8F4;
  --paper-alt: #F0ECE3;
  --ink: #16241F;
  --ink-soft: #3A4842;
  --petrol: #2B4C4F;
  --copper: #B5651D;
  --sage: #5C7A75;
  --rule: #DAD4C6;
  --max-width: 720px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--petrol);
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
a:hover { color: var(--copper); }

::selection { background: var(--copper); color: var(--paper); }

/* ---------- Masthead ---------- */

.masthead {
  border-bottom: 2px solid var(--ink);
  padding: 2.5rem 1.5rem 1.25rem;
}

.masthead-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.masthead-title {
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  font-size: 2.1rem;
  margin: 0;
  letter-spacing: -0.01em;
  position: relative;
  display: inline-block;
}

.masthead-title .rule-mark {
  display: block;
  width: 46px;
  height: 4px;
  background: var(--copper);
  margin-top: 0.6rem;
  border-radius: 2px;
}

.masthead-tagline {
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin: 0.75rem 0 0;
  max-width: 46ch;
}

/* ---------- Post list ---------- */

.post-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.post-entry {
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--rule);
}
.post-entry:first-child { padding-top: 0; }
.post-entry:last-child { border-bottom: none; }

.post-meta {
  font-size: 0.85rem;
  color: var(--sage);
  margin: 0 0 0.4rem;
}

.post-title {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

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

.post-excerpt {
  margin: 0 0 0.6rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

.read-more {
  font-size: 0.92rem;
  font-weight: 500;
}

/* ---------- Single post page ---------- */

.post-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.back-link {
  display: inline-block;
  font-size: 0.92rem;
  margin-bottom: 2rem;
  color: var(--sage);
  text-decoration: none;
}
.back-link:hover { color: var(--copper); }

.post-page-meta {
  font-size: 0.85rem;
  color: var(--sage);
  margin: 0 0 0.5rem;
}

.post-page-title {
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.25;
  margin: 0 0 1.75rem;
  letter-spacing: -0.01em;
}

.post-body p {
  margin: 0 0 1.3rem;
  max-width: 68ch;
}

.post-body h2 {
  font-family: 'Source Serif 4', serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2.2rem 0 1rem;
}

.post-body ul, .post-body ol {
  margin: 0 0 1.3rem;
  padding-left: 1.3rem;
  max-width: 66ch;
}
.post-body li { margin-bottom: 0.5rem; }

.pull-note {
  border-left: 3px solid var(--copper);
  padding: 0.9rem 1.2rem;
  background: var(--paper-alt);
  margin: 1.8rem 0;
  font-size: 0.97rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.75rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--sage);
}

/* ---------- Focus & motion ---------- */

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (max-width: 480px) {
  .masthead-title { font-size: 1.7rem; }
  .post-title { font-size: 1.3rem; }
  .post-page-title { font-size: 1.6rem; }
  body { font-size: 16px; }
}
