/* Editorial blog — typography-first, restrained palette */

:root {
  --bg: #f7f5f2;
  --bg-elevated: #ffffff;
  --text: #161616;
  --text-muted: #5c5c5c;
  --text-faint: #8a8a8a;
  --accent: #2c4a3e;
  --accent-soft: #e8ede9;
  --border: #e0ddd7;
  --max-read: 38rem;
  --max-wide: 72rem;
  --font-serif: "Newsreader", "Georgia", serif;
  --font-sans: "DM Sans", system-ui, sans-serif;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 0.2em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: #1a3028;
  text-decoration-color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

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

.nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
}

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

main {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.hero {
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.hero__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.hero__lede {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 36ch;
  margin: 0;
  line-height: 1.6;
}

.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 1.25rem;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-card {
  border-bottom: 1px solid var(--border);
}

.post-card:first-of-type {
  border-top: 1px solid var(--border);
}

.post-card a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 2rem;
  align-items: baseline;
  padding: 1.35rem 0;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

@media (min-width: 640px) {
  .post-card a {
    grid-template-columns: 7rem 1fr auto;
    align-items: start;
  }
}

.post-card a:hover {
  background: color-mix(in srgb, var(--accent-soft) 50%, transparent);
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.post-card__date {
  font-size: 0.8125rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.post-card__body h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.post-card__excerpt {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

.post-card__arrow {
  color: var(--text-faint);
  font-size: 1.125rem;
  align-self: center;
}

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

.site-footer {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.site-footer a {
  font-weight: 500;
}

.site-footer__icp {
  font-size: 0.8125rem;
  color: var(--text-faint);
  text-decoration: none;
}

.site-footer__icp:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Article page */
.article-wrap {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

.article-meta {
  font-size: 0.8125rem;
  color: var(--text-faint);
  margin-bottom: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.article-wrap h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  max-width: var(--max-read);
}

.article-dek {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 2rem;
  max-width: var(--max-read);
}

.article-body {
  max-width: var(--max-read);
}

.article-body p {
  margin: 0 0 1.25rem;
}

.article-body h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.35rem;
  margin: 2.25rem 0 0.75rem;
  letter-spacing: -0.02em;
}

.article-body blockquote {
  margin: 1.75rem 0;
  padding: 0 0 0 1.25rem;
  border-left: 3px solid var(--accent);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.55;
}

.article-body ul {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.article-body li {
  margin-bottom: 0.35rem;
}

.article-body code {
  font-family: ui-monospace, "SF Mono", "Consolas", monospace;
  font-size: 0.9em;
  background: var(--accent-soft);
  padding: 0.12em 0.4em;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.about-block {
  margin-top: 3.5rem;
  padding: 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 2px;
  max-width: 36rem;
}

.about-block h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.about-block p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}
