:root {
  --ink: #101827;
  --muted: #5e6a7d;
  --paper: #f6f8fc;
  --surface: #ffffff;
  --line: #d9e0eb;
  --accent: #1d4ed8;
  --accent-dark: #163ca7;
  --highlight: #f8d36b;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --measure: 43rem;
  --shell: 70rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--highlight);
  outline-offset: 4px;
}

.shell {
  width: min(var(--shell), calc(100% - 2rem));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.8rem;
  background: var(--ink);
  color: #fff;
  transform: translateY(-180%);
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
}

.site-header__inner,
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header__inner {
  min-height: 4.75rem;
}

.wordmark {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 1.5rem;
}

.site-header nav a,
.text-link,
.back-link {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

.site-header nav a {
  font-size: 0.92rem;
  text-decoration: none;
}

.site-header nav a:hover,
.text-link:hover,
.back-link:hover {
  text-decoration: underline;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(24rem, 1.1fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 6rem);
  padding-block: clamp(3.5rem, 8vw, 7.5rem);
}

.hero__copy h1,
.page h1,
.post__header h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.hero__copy h1 {
  max-width: 12ch;
  font-size: clamp(2.65rem, 6vw, 5.5rem);
}

.hero__lede {
  max-width: 34rem;
  margin: 1.5rem 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.text-link {
  display: inline-flex;
  gap: 0.5rem;
}

.hero__media {
  position: relative;
  margin: 0;
}

.hero__media::before {
  position: absolute;
  z-index: -1;
  right: -1.1rem;
  bottom: -1.1rem;
  width: 68%;
  height: 55%;
  border-radius: 1.25rem;
  background: var(--highlight);
  content: "";
}

.hero__media img {
  width: 100%;
  height: auto;
  border-radius: 1.25rem;
  box-shadow: 0 1.5rem 4rem rgb(15 23 42 / 0.18);
}

.feed {
  padding-block: clamp(4rem, 8vw, 7rem);
  border-top: 1px solid var(--line);
}

.feed__list {
  border-top: 1px solid var(--ink);
}

.feed-item {
  position: relative;
  padding: 2rem 0 2.25rem;
  border-bottom: 1px solid var(--line);
}

.feed-item__meta,
.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feed-item__meta {
  justify-content: space-between;
}

.feed-item h3 {
  margin: 0.65rem 0 0.8rem;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.feed-item h3 a {
  text-decoration-color: transparent;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

.feed-item h3 a:hover {
  text-decoration-color: var(--accent);
}

.feed-item > p {
  margin: 0;
  color: var(--muted);
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.topic-list li,
.post__tags span {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.78rem;
}

.page,
.post {
  padding-block: clamp(4rem, 9vw, 8rem);
}

.page {
  max-width: calc(var(--measure) + 2rem);
  min-height: 65vh;
}

.page h1,
.post__header h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
}

.page h1 {
  max-width: 13ch;
  margin-bottom: 2.5rem;
}

.post__header,
.prose,
.source-note,
.post__tags {
  max-width: var(--measure);
  margin-inline: auto;
}

.post__header {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-block;
  margin-bottom: 3.5rem;
  font-size: 0.9rem;
}

.post__dek {
  margin: 1.4rem 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
}

.prose {
  padding-top: 2rem;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2vw, 1.2rem);
  line-height: 1.75;
}

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

.prose h2,
.prose h3 {
  margin-top: 2.4em;
  line-height: 1.2;
}

.prose a,
.source-note a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.prose code {
  padding: 0.12em 0.3em;
  border-radius: 0.2rem;
  background: #e8edf6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.source-note {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--highlight);
  background: var(--surface);
}

.source-note span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  min-height: 6rem;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 48rem) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }
}

@media (max-width: 32rem) {
  .site-header__inner,
  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.45rem;
    padding-block: 1rem;
  }

  .site-footer__inner p {
    margin: 0;
  }

  .hero__media::before {
    right: -0.45rem;
    bottom: -0.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
