:root {
  --paper: #f7f4ef;
  --paper-2: #efeae2;
  --ink: #1c1915;
  --ink-soft: #3f3a34;
  --muted: #6f675e;
  --line: #e2dbd1;
  --link: #8c3b1e;
  --max: 760px;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
}
a { color: inherit; }
img { max-width: 100%; }

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.top {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
}
.top-inner {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav a {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--ink); }
.nav-btn {
  display: none;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding: 8px 0;
}

.home { padding: 56px 0 80px; }
.kicker {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--link);
  margin: 0 0 10px;
}
h1 {
  font-weight: 560;
  font-size: clamp(40px, 6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
}
.deck {
  margin: 16px 0 40px;
  color: var(--ink-soft);
  font-size: 22px;
  line-height: 1.45;
}

.posts { list-style: none; margin: 0; padding: 0; }
.posts li { border-top: 1px solid var(--line); }
.posts a {
  display: block;
  padding: 26px 0 28px;
  text-decoration: none;
}
.posts a:hover h2 { color: var(--link); }
.meta {
  display: flex;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.posts h2 {
  margin: 8px 0 8px;
  font-size: 32px;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.posts p { margin: 0; color: var(--ink-soft); }

.article { padding: 42px 0 88px; }
.crumbs {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 22px;
}
.crumbs a { color: var(--ink-soft); }
.article h1 { font-size: clamp(36px, 5vw, 52px); }
.lead {
  font-size: 23px;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 18px 0 8px;
}
.article h2 {
  font-size: 30px;
  font-weight: 560;
  letter-spacing: -0.02em;
  margin: 36px 0 10px;
}
.article p { margin: 0 0 16px; }
.article a { color: var(--link); }
code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--paper-2);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
pre {
  margin: 18px 0 22px;
  padding: 16px 18px;
  background: #241f1b;
  color: #f3ece4;
  border-radius: 8px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.65;
}
pre code { background: transparent; color: inherit; padding: 0; }
.cmd { color: #e7c07b; }

.foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
}
.foot-inner {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.foot a { color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot nav { display: flex; gap: 16px; }

@media (max-width: 700px) {
  .nav-btn { display: block; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 20px 16px;
    gap: 0;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; width: 100%; }
  .top { position: sticky; }
  .top-inner { position: relative; }
}
