:root {
  color-scheme: light;
  --bg: #f5f7f9;
  --paper: #ffffff;
  --ink: #171817;
  --muted: #5f645f;
  --line: rgba(23, 24, 23, 0.14);
  --accent: #d92f3a;
  --accent-strong: #ab1f28;
  --blue: #245c9b;
  --shadow: 0 22px 70px rgba(28, 31, 28, 0.13);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100svh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

body > main {
  flex: 1 0 auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 5vw;
  background: rgba(245, 247, 249, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 750;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: var(--ink);
  border-radius: 8px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(23, 24, 23, 0.12);
  border-radius: 50%;
  background: #111;
  object-fit: cover;
}

.nav {
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.nav a,
.site-footer a,
.back-link {
  transition: color 180ms ease;
}

.nav a:hover,
.site-footer a:hover,
.back-link:hover {
  color: var(--accent);
}

.hero {
  position: relative;
  min-height: calc(100svh - 72px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(10, 12, 12, 0.76), rgba(10, 12, 12, 0.34) 48%, rgba(10, 12, 12, 0.1)),
    url("https://images.unsplash.com/photo-1499750310107-5fef28a66643?auto=format&fit=crop&w=1800&q=80") center / cover;
  transform: scale(1.03);
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 30%;
  content: "";
  background: linear-gradient(to bottom, rgba(245, 247, 249, 0), var(--bg));
}

.hero-content {
  width: min(680px, 90vw);
  padding: 0 0 12vh 5vw;
  color: #ffffff;
  animation: hero-in 700ms ease both;
}

.hero-content h1,
.hero-copy {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.42);
}

.eyebrow,
.section-kicker,
.article-meta {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffb3b8;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: 7rem;
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 560px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.5rem;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--accent);
  border-radius: 8px;
  font-weight: 750;
  transition: transform 180ms ease, background 180ms ease;
}

.primary-link:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 750;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.secondary-link:hover {
  border-color: rgba(217, 47, 58, 0.36);
  color: var(--accent);
  transform: translateY(-2px);
}

.intro,
.articles,
.topics,
.article-page,
.archive-page {
  width: min(1120px, 90vw);
  margin: 0 auto;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 8vw;
  padding: 84px 0 60px;
  border-bottom: 1px solid var(--line);
}

.intro h2,
.section-heading h2 {
  margin-bottom: 0;
  font-size: 3.375rem;
  line-height: 1;
  letter-spacing: 0;
}

.intro > p {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
}

.articles,
.topics {
  padding: 72px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-link {
  color: var(--accent);
  font-weight: 800;
}

.article-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.article-card {
  min-height: 270px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease;
}

.article-card:hover {
  border-color: rgba(15, 118, 110, 0.45);
  transform: translateY(-4px);
}

.article-card a {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  padding: 28px;
}

.article-card h3 {
  margin-bottom: 14px;
  font-size: 2.25rem;
  line-height: 1.08;
}

.article-card p {
  max-width: 54ch;
  color: var(--muted);
}

.article-card .read-more {
  margin-top: auto;
  color: var(--accent);
  font-weight: 800;
}

.tag-row,
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row {
  margin: 8px 0 20px;
}

.tag-row span,
.post-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(36, 92, 155, 0.08);
  color: var(--blue);
  font-size: 13px;
  font-weight: 750;
}

.article-card.muted {
  box-shadow: none;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.topic-grid div {
  padding-top: 24px;
}

.topic-grid h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.topic-grid p {
  color: var(--muted);
}

.site-footer {
  flex-shrink: 0;
  justify-content: space-between;
  gap: 20px;
  min-height: 84px;
  padding: 0 5vw;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer a {
  margin-left: 16px;
}

.article-header {
  position: static;
}

.article-page {
  padding: 72px 0 96px;
}

.post {
  max-width: 760px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 38px;
  color: var(--muted);
  font-weight: 750;
}

.post h1 {
  margin-bottom: 24px;
  font-size: 4.875rem;
  line-height: 0.98;
}

.lead {
  color: var(--ink);
  font-size: 23px;
  line-height: 1.4;
}

.post p,
.post li {
  color: #343834;
  font-size: 18px;
}

.post h2 {
  margin-top: 46px;
  margin-bottom: 12px;
  font-size: 30px;
}

.post ul {
  padding-left: 22px;
}

.post a {
  color: var(--accent);
  font-weight: 700;
}

.post a.primary-link {
  color: #ffffff;
}

.post blockquote {
  margin: 24px 0;
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.post pre {
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  background: #111827;
  color: #f9fafb;
}

.post code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.post figure {
  margin: 28px 0;
}

.post figure img,
.post-hero img {
  display: block;
  width: 100%;
  border-radius: 8px;
}

.post-tags {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.tag-page h1 {
  margin-bottom: 30px;
  color: var(--ink);
}

.archive-page {
  padding: 72px 0 96px;
}

.archive-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 8vw;
  align-items: end;
  padding-bottom: 42px;
  border-bottom: 1px solid var(--line);
}

.archive-hero h1 {
  margin-bottom: 0;
  font-size: 4.875rem;
  line-height: 0.98;
}

.archive-hero p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
}

.archive-tools {
  display: grid;
  gap: 22px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.archive-search {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.archive-search input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.archive-tools p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-row button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.filter-row button.active {
  border-color: rgba(217, 47, 58, 0.32);
  background: rgba(217, 47, 58, 0.08);
  color: var(--accent);
}

.filter-row span {
  color: var(--muted);
}

.archive-results {
  display: grid;
  gap: 16px;
  padding-top: 28px;
}

.archive-count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.archive-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.archive-item.is-hidden {
  display: none;
}

.archive-date span {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.archive-date strong {
  color: var(--accent);
  font-size: 13px;
  text-transform: uppercase;
}

.archive-title {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 2rem;
  font-weight: 850;
  line-height: 1.08;
}

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

.archive-main p {
  max-width: 72ch;
  color: var(--muted);
}

.archive-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.archive-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(36, 92, 155, 0.08);
  color: var(--blue);
  font-size: 13px;
  font-weight: 750;
}

.archive-page {
  width: min(1180px, 94vw);
  padding: 40px 0 88px;
}

.feed-shell {
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  gap: 32px;
  align-items: start;
}

.feed-main {
  min-width: 0;
}

.feed-head {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.feed-head h1 {
  margin: 0 0 10px;
  font-size: 2.75rem;
  line-height: 1.05;
}

.feed-head p:last-child {
  max-width: 70ch;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.feed-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 34px rgba(28, 31, 28, 0.07);
}

.feed-sidebar.archive-tools {
  border-bottom: 1px solid var(--line);
}

.feed-note {
  display: grid;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.feed-note strong {
  color: var(--ink);
}

.feed-item {
  display: block;
  padding: 28px 0 30px;
}

.feed-kind {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.feed-byline,
.feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.feed-byline span {
  color: var(--blue);
}

.feed-meta {
  margin: 8px 0 10px;
}

.feed-meta span {
  position: relative;
}

.feed-meta span + span::before {
  content: "·";
  position: absolute;
  left: -10px;
  color: var(--muted);
}

.feed-item .archive-title {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1.16;
}

.feed-item .archive-tags {
  margin: 8px 0 14px;
}

.feed-item .archive-tags a {
  min-height: auto;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font-size: 14px;
}

.feed-item .archive-main p {
  margin: 0 0 12px;
  max-width: 72ch;
  color: #383d38;
  font-size: 16px;
}

.feed-item .feed-summary {
  margin: 0 0 14px;
  padding: 13px 15px;
  border-left: 3px solid rgba(36, 92, 155, 0.7);
  border-radius: 6px;
  background: rgba(36, 92, 155, 0.055);
  color: #303630;
}

.read-more-inline {
  color: var(--accent);
  font-weight: 800;
}

.feed-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 22px;
}

.feed-pagination a {
  display: inline-grid;
  min-width: 38px;
  min-height: 38px;
  place-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font-weight: 800;
}

.feed-pagination a.active,
.feed-pagination a:hover {
  border-color: rgba(217, 47, 58, 0.36);
  color: var(--accent);
}

.empty-state {
  color: var(--muted);
  font-weight: 700;
}

.not-found-page {
  width: min(1120px, 90vw);
  display: grid;
  align-items: center;
  margin: 0 auto;
  padding: clamp(12px, 2vh, 48px) 0;
}

.not-found-panel {
  position: relative;
  max-width: 780px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.not-found-panel::after {
  content: "404";
  position: absolute;
  right: -20px;
  top: -34px;
  z-index: -1;
  color: rgba(23, 24, 23, 0.045);
  font-size: clamp(8rem, 22vw, 18rem);
  font-weight: 900;
  line-height: 1;
}

.not-found-panel h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(2.75rem, 7vw, 5.6rem);
  line-height: 0.96;
}

.not-found-panel > p:not(.section-kicker) {
  max-width: 64ch;
  color: var(--muted);
  font-size: 19px;
}

.not-found-actions,
.not-found-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.not-found-actions {
  margin-top: 28px;
}

.not-found-links {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.not-found-links a {
  color: var(--muted);
  font-weight: 800;
}

.not-found-links a:hover {
  color: var(--accent);
}

@keyframes hero-in {
  from {
    opacity: 0.96;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    min-height: auto;
    flex-direction: column;
    gap: 14px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
  }

  .hero {
    min-height: 76svh;
  }

  .hero-media {
    background:
      linear-gradient(180deg, rgba(10, 12, 12, 0.86), rgba(10, 12, 12, 0.72) 58%, rgba(10, 12, 12, 0.32)),
      url("https://images.unsplash.com/photo-1499750310107-5fef28a66643?auto=format&fit=crop&w=1200&q=80") center / cover;
  }

  .hero-content {
    padding: 0 5vw 10vh;
  }

  h1 {
    font-size: 3.5rem;
  }

  .hero-copy {
    font-size: 1.125rem;
  }

  .intro h2,
  .section-heading h2 {
    font-size: 2.25rem;
  }

  .article-card h3 {
    font-size: 1.625rem;
  }

  .post h1 {
    font-size: 2.75rem;
  }

  .intro,
  .article-list,
  .archive-hero,
  .feed-shell,
  .archive-item,
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .intro {
    gap: 24px;
    padding-top: 54px;
  }

  .articles,
  .topics {
    padding: 52px 0;
  }

  .article-card,
  .article-card a {
    min-height: 240px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .site-footer a {
    margin-left: 0;
    margin-right: 16px;
  }

  .archive-page {
    padding-top: 48px;
  }

  .archive-hero {
    gap: 20px;
  }

  .archive-hero h1 {
    font-size: 3rem;
  }

  .feed-sidebar {
    position: static;
  }

  .feed-main {
    display: contents;
  }

  .feed-head {
    order: 1;
  }

  .feed-sidebar {
    order: 2;
  }

  .archive-results {
    order: 3;
  }

  .feed-head h1 {
    font-size: 2.25rem;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .archive-item {
    gap: 12px;
  }

  .archive-title,
  .feed-item .archive-title {
    font-size: 1.5rem;
  }
}
