:root {
  color-scheme: light;
  --bg: #f6f7f2;
  --surface: #ffffff;
  --wash: #eef3f0;
  --line: #d8dfd9;
  --line-strong: #b9c5bd;
  --ink: #1d2723;
  --ink-soft: #35423d;
  --muted: #66736d;
  --faint: #8b9892;
  --accent: #2f6f68;
  --accent-strong: #255c56;
  --accent-warm: #9a4f3d;
  --code-bg: #edf1ee;
  --shadow: rgba(34, 45, 40, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Satoshi", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

:focus-visible {
  outline: 2px solid rgba(47, 111, 104, 0.32);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 24px;
  top: 16px;
  transform: translateY(-160%);
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  z-index: 10;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(47, 111, 104, 0.09);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.site-header nav a {
  text-decoration: none;
}

.site-header nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

.site-main,
.article-shell,
.archive-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.home-hero {
  padding: 54px 0 46px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: 58px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-warm);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  max-width: 680px;
  color: var(--ink);
  font-size: 56px;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 630px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.78;
}

.hero-links {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.text-link,
.pill-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
}

.pill-link {
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.pill-link:hover {
  border-color: var(--accent);
  background: var(--surface);
  transform: translateY(-1px);
}

.pill-link:active {
  transform: translateY(1px);
}

.featured-post {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 46px -34px var(--shadow);
  overflow: hidden;
}

.featured-media {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--wash);
  overflow: hidden;
}

.featured-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.featured-body {
  padding: 24px;
}

.post-kicker,
.post-meta {
  margin: 0;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.5;
}

.featured-body h2,
.post-row h2 {
  margin: 10px 0 10px;
  color: var(--ink);
  font-size: 27px;
  line-height: 1.18;
  letter-spacing: 0;
}

.featured-body h2 a,
.post-row h2 a {
  text-decoration: none;
}

.featured-summary,
.post-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.section-heading {
  padding: 54px 0 20px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.section-heading h2,
.archive-heading h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 0;
}

.section-heading p:last-child {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.post-feed {
  border-top: 1px solid var(--line);
}

.post-row {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.post-row:not(.has-cover) {
  grid-template-columns: minmax(0, 1fr);
}

.post-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: var(--wash);
  border: 1px solid var(--line);
  overflow: hidden;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.post-row:hover .post-thumb img {
  transform: scale(1.025);
}

.tag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(47, 111, 104, 0.22);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(47, 111, 104, 0.06);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}

.empty-state {
  padding: 40px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.article-shell {
  max-width: 900px;
  padding-bottom: 80px;
}

.article-header {
  padding: 58px 0 30px;
}

.article-header h1 {
  max-width: 830px;
  margin: 12px 0 18px;
  color: var(--ink);
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: 0;
}

.article-summary {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.76;
}

.article-cover,
.inline-media {
  margin: 0 0 34px;
}

.article-cover img,
.inline-media img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.article-cover figcaption,
.inline-media figcaption {
  margin-top: 9px;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.5;
}

.md-body {
  max-width: 760px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.82;
}

.md-body > *:first-child {
  margin-top: 0;
}

.md-body h2,
.md-body h3,
.md-body h4 {
  color: var(--ink);
  line-height: 1.22;
  letter-spacing: 0;
}

.md-body h2 {
  margin: 48px 0 14px;
  font-size: 29px;
}

.md-body h3 {
  margin: 34px 0 12px;
  font-size: 23px;
}

.md-body h4 {
  margin: 28px 0 10px;
  font-size: 19px;
}

.md-body p,
.md-body ul,
.md-body ol,
.md-body blockquote,
.md-body pre,
.md-body table {
  margin: 0 0 24px;
}

.md-body ul,
.md-body ol {
  padding-left: 1.35em;
}

.md-body li + li {
  margin-top: 6px;
}

.md-body blockquote {
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.md-body code {
  padding: 0.14em 0.34em;
  border-radius: 5px;
  background: var(--code-bg);
  color: var(--accent-strong);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
}

.md-body pre {
  padding: 18px 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #18211e;
  color: #edf4ef;
}

.md-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 14px;
  line-height: 1.7;
}

.md-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.md-body th,
.md-body td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.md-body th {
  background: var(--wash);
  color: var(--ink);
}

.md-body hr {
  margin: 42px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.heading-anchor {
  color: inherit;
  text-decoration: none;
}

.post-nav {
  max-width: 760px;
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.post-nav a {
  display: block;
  padding: 14px 0;
  color: var(--ink);
  text-decoration: none;
}

.post-nav span {
  display: block;
  margin-bottom: 5px;
  color: var(--faint);
  font-size: 12px;
}

.post-nav .next {
  text-align: right;
}

.archive-shell {
  padding: 50px 0 84px;
}

.archive-heading {
  margin-bottom: 36px;
}

.archive-heading p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.72;
}

.archive-year {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 34px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.archive-year h2 {
  margin: 0;
  color: var(--accent-warm);
  font-size: 18px;
}

.archive-list {
  display: grid;
  gap: 18px;
}

.archive-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
}

.archive-item time {
  color: var(--faint);
  font-size: 13px;
}

.archive-item a {
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
  text-decoration: none;
}

.site-footer {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 42px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--faint);
  font-size: 14px;
}

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

.not-found {
  width: min(720px, calc(100% - 48px));
  margin: 0 auto;
  padding: 90px 0;
}

.not-found h1 {
  margin: 0 0 14px;
  font-size: 44px;
  letter-spacing: 0;
}

.not-found p {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 860px) {
  .site-header,
  .site-main,
  .article-shell,
  .archive-shell,
  .site-footer {
    width: min(100% - 32px, 1120px);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 34px;
  }

  .hero-title {
    font-size: 42px;
  }

  .section-heading {
    display: block;
  }

  .section-heading p:last-child {
    margin-top: 10px;
  }

  .post-row {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 18px;
  }

  .article-header h1 {
    font-size: 38px;
  }

  .archive-year {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  .site-header nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .hero-title {
    font-size: 34px;
  }

  .hero-copy,
  .article-summary,
  .md-body {
    font-size: 16px;
  }

  .featured-body {
    padding: 20px;
  }

  .post-row {
    grid-template-columns: 1fr;
  }

  .post-thumb {
    max-width: none;
  }

  .article-header {
    padding-top: 36px;
  }

  .article-header h1 {
    font-size: 32px;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav .next {
    text-align: left;
  }

  .archive-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .site-footer {
    display: block;
  }
}
