:root {
  --ink: #152019;
  --ink-soft: #3a4a40;
  --paper: #e4e9e2;
  --brand: #0d3f2f;
  --signal: #d94f0c;
  --line: rgba(21, 32, 25, 0.14);
  --white: #f7f9f5;
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
a:hover { color: var(--signal); }

.wrap {
  width: min(760px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.top {
  border-bottom: 1px solid var(--line);
  background: #dce3d8;
  padding: 1.1rem 0;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
}

nav a { text-decoration: none; color: var(--ink-soft); }
nav a:hover,
nav a.is-active { color: var(--ink); }

.hero {
  position: relative;
  width: 100%;
  max-height: min(42vw, 420px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #1a241c;
}

.hero img {
  width: 100%;
  height: min(42vw, 420px);
  object-fit: cover;
  object-position: center 35%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 40, 32, 0.18) 0%, rgba(8, 40, 32, 0.05) 40%, rgba(228, 233, 226, 0.55) 100%);
  pointer-events: none;
}

.article {
  padding: 2rem 0 4rem;
}

@media (max-width: 640px) {
  .hero,
  .hero img {
    max-height: 220px;
    height: 220px;
  }

  .article {
    padding-top: 1.5rem;
  }
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 0.6rem;
}

.article > h1:first-of-type,
.article-body > h1:first-child {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.meta {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

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

.post-card {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.post-list li:first-child .post-card {
  padding-top: 0.25rem;
}

.post-card:hover .post-card-title {
  color: var(--signal);
}

.post-card-date {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--ink);
}

.post-card-desc {
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.back-link {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.back-link a {
  text-decoration: none;
  font-weight: 600;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 2.35rem 0 0.75rem;
  line-height: 1.25;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  margin: 1.85rem 0 0.65rem;
}

.article-body p,
.article-body li {
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.article-body ul,
.article-body ol {
  padding-left: 1.25rem;
  margin-bottom: 0.85rem;
}

.article-body li { padding-left: 0.2rem; }

.article-body strong { font-weight: 600; }

.article-body em {
  font-style: italic;
  color: var(--ink-soft);
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.article-body figure,
.article-body p:has(> img:only-child) {
  margin: 1.25rem 0 1.5rem;
}

.article-body img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(8, 40, 32, 0.1);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.35rem;
  font-size: 0.95rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  overflow: hidden;
}

.article-body th,
.article-body td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.article-body th {
  background: #dce3d8;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.article-body tr:last-child td { border-bottom: 0; }

.article-body blockquote {
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--signal);
  background: rgba(217, 79, 12, 0.06);
  color: var(--ink-soft);
}

footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 2rem;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.foot a {
  color: inherit;
  text-decoration: none;
}

.foot a:hover { color: var(--ink); }

.foot strong {
  font-family: var(--font-display);
  color: var(--ink);
}

@media (max-width: 560px) {
  .article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
