:root {
  --bg: #faf7f1;
  --surface: #fffdf8;
  --surface-soft: #fbf3e8;
  --ink: #201912;
  --ink-soft: #74695d;
  --ink-faint: #a19487;
  --accent: #b7651d;
  --accent-deep: #8a4913;
  --accent-soft: #f5e7d3;
  --line: rgba(138, 73, 19, 0.1);
  --line-strong: rgba(138, 73, 19, 0.18);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  padding: 0 max(24px, calc((100vw - 1160px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(250, 247, 241, 0.9);
  backdrop-filter: blur(18px);
}

.brand-group,
.post-meta,
.footer-identity,
.footer-links {
  display: flex;
  align-items: center;
}

.brand-group {
  gap: 14px;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 1;
}

.blog-badge {
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
}

.inline-wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.04em;
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  gap: 22px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.topnav a,
.footer-links a {
  transition: color 160ms ease;
}

.topnav a:hover,
.footer-links a:hover {
  color: var(--ink);
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.post-header {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(56px, 7vw, 72px) 0 38px;
}

.eyebrow {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 18px;
}

.post-header h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(2.65rem, 5.2vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

.post-meta {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.post-date-short {
  display: none;
}

.copy-link,
.discussion-link {
  margin: -6px -4px;
  padding: 6px 4px;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: color 160ms ease;
}

.copy-link:hover,
.copy-link[data-copied="true"],
.discussion-link:hover {
  color: var(--accent-deep);
}

.copy-link svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.discussion-link .x-logo {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.hero-image {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: #2f2118;
  box-shadow: 0 24px 70px rgba(32, 25, 18, 0.14);
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.post-body {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(42px, 5vw, 56px) 0 32px;
}

.post-body p {
  margin: 0 0 1.55em;
  color: #352b22;
  font-size: clamp(1.08rem, 1.5vw, 1.2rem);
  line-height: 1.72;
}

.post-body section {
  padding-top: 32px;
}

.post-body h2,
.learn-more h2 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 730;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.post-body h2 {
  margin-bottom: 24px;
  font-size: clamp(1.6rem, 2.8vw, 2rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.post-body strong {
  color: var(--ink);
  font-weight: 700;
}

.post-footer {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 56px;
}

.learn-more {
  padding: 42px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.learn-more h2 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.learn-more p {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.65;
}

.learn-more a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-color: rgba(138, 73, 19, 0.4);
  text-underline-offset: 0.18em;
}

.author-card {
  margin: 0;
  padding: 30px 0 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  font-family: var(--sans);
}

.author-monogram {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 15px;
  font-weight: 750;
}

.author-card strong {
  font-size: 16px;
}

.author-card p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

.site-footer {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-identity {
  gap: 12px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
}

.footer-wordmark {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 1;
}

.footer-links {
  gap: 20px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand:focus-visible,
.topnav a:focus-visible,
.copy-link:focus-visible,
.discussion-link:focus-visible,
.learn-more a:focus-visible,
.footer-wordmark:focus-visible,
.footer-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (max-width: 620px) {
  .topbar {
    min-height: 62px;
    padding-inline: 16px;
  }

  .topnav {
    gap: 12px;
  }

  main {
    width: min(100% - 24px, 1160px);
  }

  .post-header {
    width: min(100% - 20px, 720px);
    padding-top: 50px;
  }

  .post-header h1 {
    font-size: clamp(2.45rem, 11vw, 3.2rem);
  }

  .post-meta {
    flex-wrap: nowrap;
    gap: 6px;
    font-size: 10px;
    white-space: nowrap;
  }

  .post-date-full {
    display: none;
  }

  .post-date-short {
    display: inline;
  }

  .hero-image {
    width: min(100% - 20px, 720px);
    border-radius: 16px;
  }

  .hero-image img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
  }

  .post-body {
    width: min(100% - 20px, 720px);
    padding-top: 40px;
  }

  .post-body section {
    padding-top: 28px;
  }

  .post-body h2 {
    margin-bottom: 24px;
  }

  .post-footer {
    width: min(100% - 20px, 720px);
    padding-bottom: 48px;
  }

  .learn-more p {
    font-size: 16px;
  }

  .author-card {
    margin-inline: 0;
    align-items: start;
  }

  .site-footer {
    width: min(100% - 44px, 1160px);
  }
}

@media (max-width: 420px) {
  .blog-badge {
    font-size: 13px;
  }

  .post-meta .read-separator,
  .post-meta .read-time {
    display: none;
  }

  .author-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .author-monogram {
    width: 48px;
    height: 48px;
    font-size: 13px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
