:root {
  --bg: #f5f1e8;
  --ink: #1a1810;
  --ink-soft: #5a4d3a;
  --ink-faint: #8a7a5e;
  --rust: #b8682d;
  --rust-soft: rgba(184, 104, 45, 0.08);
  --rule: rgba(26, 24, 16, 0.12);
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--rust); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

/* Header */
.site-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--rule);
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--rust);
  position: relative;
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--bg);
}
.brand-name { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }

.site-nav { display: flex; gap: 24px; font-family: var(--sans); font-size: 14px; }
.site-nav a { text-decoration: none; color: var(--ink-soft); font-weight: 500; }
.site-nav a:hover { color: var(--rust); }

/* Main */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

/* Hero (homepage) */
.hero { margin-bottom: 72px; }
.hero-title {
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.hero-lede {
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--ink-soft);
}

/* Post cards on homepage */
.posts { display: flex; flex-direction: column; gap: 48px; }
.post-card { padding-bottom: 48px; border-bottom: 1px solid var(--rule); }
.post-card:last-child { border-bottom: none; }
.post-card-meta { font-family: var(--sans); font-size: 13px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.post-card-title { font-size: clamp(24px, 3vw, 32px); font-weight: 400; line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 8px; }
.post-card-title a { text-decoration: none; color: var(--ink); }
.post-card-title a:hover { color: var(--rust); }
.post-card-desc { color: var(--ink-soft); font-style: italic; }

.empty-state { color: var(--ink-faint); font-style: italic; text-align: center; padding: 48px 0; }

/* Post page */
.post-header { margin-bottom: 48px; }
.post-meta { font-family: var(--sans); font-size: 13px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.post-tag { color: var(--ink-faint); }
.post-title { font-size: clamp(32px, 4.5vw, 48px); font-weight: 400; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 16px; }
.post-lede { font-size: 21px; color: var(--ink-soft); font-style: italic; line-height: 1.5; }

.post-body { font-size: 18px; }
.post-body h2 { font-size: 28px; font-weight: 400; margin: 48px 0 16px; letter-spacing: -0.015em; }
.post-body h3 { font-size: 22px; font-weight: 600; margin: 32px 0 12px; }
.post-body p { margin-bottom: 24px; }
.post-body ul, .post-body ol { margin: 0 0 24px 24px; }
.post-body li { margin-bottom: 8px; }
.post-body blockquote { border-left: 3px solid var(--rust); padding-left: 20px; margin: 24px 0; font-style: italic; color: var(--ink-soft); }
.post-body code { font-family: 'SF Mono', Consolas, monospace; font-size: 0.9em; background: var(--rust-soft); padding: 2px 5px; border-radius: 3px; }
.post-body pre { background: #1a1810; color: #f5f1e8; padding: 20px; border-radius: 4px; overflow-x: auto; margin: 24px 0; font-size: 14px; }
.post-body pre code { background: none; padding: 0; color: inherit; }
.post-body hr { border: none; border-top: 1px solid var(--rule); margin: 48px 0; }
.post-body img { max-width: 100%; height: auto; border-radius: 4px; margin: 24px 0; }

.post-divider { border: none; border-top: 1px solid var(--rule); margin: 64px 0 32px; }
.post-disclosure { font-size: 13px; color: var(--ink-faint); font-style: italic; }

/* Generic page (about, privacy) */
.page h1 { font-size: clamp(32px, 4vw, 40px); font-weight: 400; letter-spacing: -0.02em; margin-bottom: 32px; }
.page h2 { font-size: 22px; font-weight: 600; margin: 32px 0 12px; }
.page p { margin-bottom: 16px; }
.page ul { margin: 0 0 24px 24px; }
.page-meta { font-size: 13px; color: var(--ink-faint); margin-top: 48px; }

/* Footer */
.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-faint);
}
.site-footer a { color: var(--ink-faint); text-decoration: none; }
.site-footer a:hover { color: var(--rust); }
