:root,
[data-theme="light"] {
  --sage-900: #304b37;
  --sage-700: #4f7258;
  --sage-100: #dfeadf;
  --cream-50: #fcfaf5;
  --cream-100: #f7f2e8;
  --cream-200: #e9dfca;
  --terra-700: #a55e3a;
  --terra-500: #c0714a;
  --ink-900: #2c2416;
  --ink-600: #675a47;
  --surface: #ffffff;
  --white: #ffffff;
  --header-background: rgb(252 250 245 / 92%);
  --shadow: 0 16px 45px rgb(44 36 22 / 10%);
  --radius: 1rem;
  --content: 75rem;
  --reading: 46rem;
}

[data-theme="dark"] {
  --sage-900: #95c295;
  --sage-700: #7aaa7a;
  --sage-100: #263725;
  --cream-50: #1a1610;
  --cream-100: #201c14;
  --cream-200: #3a3020;
  --terra-700: #e0a080;
  --terra-500: #d4896a;
  --ink-900: #e8dfc8;
  --ink-600: #b9a783;
  --surface: #201c14;
  --header-background: rgb(26 22 16 / 92%);
  --shadow: 0 16px 45px rgb(0 0 0 / 34%);
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  margin: 0;
  color: var(--ink-900);
  background: var(--cream-50);
  font-family: "Work Sans", "Segoe UI", Inter, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--sage-900);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--terra-700);
}

:focus-visible {
  outline: 3px solid var(--terra-500);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-200%);
  padding: 0.65rem 1rem;
  color: var(--white);
  background: var(--sage-900);
  border-radius: 0.5rem;
}

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

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

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--cream-200);
  background: var(--header-background);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: box-shadow 180ms ease;
}

.site-header--scrolled {
  box-shadow: 0 1px 3px rgb(44 36 22 / 12%);
}

.header-inner {
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  color: var(--ink-900);
  line-height: 1.1;
  text-decoration: none;
}

.brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.brand-copy > span {
  margin-top: 0.15rem;
  color: var(--sage-700);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

[data-theme="dark"] .brand-mark path[fill="#262626"],
[data-theme="dark"] .brand-mark path[fill="#1a1a1a"] {
  fill: #f0ede6;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--ink-600);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--sage-900);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.45em;
}

.header-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.25rem;
}

.theme-toggle,
.menu-toggle {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ink-600);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.theme-toggle:hover,
.menu-toggle:hover {
  color: var(--ink-900);
  background: var(--cream-100);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.mobile-navigation {
  display: none;
  flex-direction: column;
  padding-block: 1rem;
  border-top: 1px solid var(--cream-200);
}

.mobile-navigation.open {
  display: flex;
}

.mobile-navigation a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.65rem 0;
  color: var(--ink-600);
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
}

.mobile-navigation a:hover,
.mobile-navigation a[aria-current="page"] {
  color: var(--sage-900);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.15rem;
  color: var(--white) !important;
  background: var(--sage-700);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--sage-900);
}

.page-hero {
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  background: linear-gradient(145deg, var(--cream-100), var(--sage-100));
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--sage-700);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.14;
  text-wrap: balance;
}

h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.1rem);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.hero-description {
  max-width: 62ch;
  margin: 1.25rem 0 0;
  color: var(--ink-600);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
}

.blog-list {
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1.5rem;
}

.post-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--cream-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.post-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-card-content {
  padding: 1.4rem;
}

.post-card h2 {
  margin: 0.4rem 0 0.75rem;
  font-size: 1.75rem;
  font-weight: 500;
}

.post-card h2 a {
  color: var(--ink-900);
  text-decoration: none;
}

.post-card p {
  margin: 0;
  color: var(--ink-600);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  color: var(--ink-600);
  font-size: 0.86rem;
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cream-200);
  color: var(--ink-600);
  font-size: 0.95rem;
}

.pagination a:last-child {
  justify-self: end;
}

.article-header {
  padding: clamp(3rem, 7vw, 6.5rem) 0 2rem;
}

.article-header .container,
.article-shell {
  width: min(100% - 2rem, var(--reading));
}

.breadcrumbs {
  margin-bottom: 2rem;
  color: var(--ink-600);
  font-size: 0.9rem;
}

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

.breadcrumbs a {
  display: inline-flex;
  align-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.article-header h1 {
  max-width: none;
  font-size: clamp(2.35rem, 6vw, 4.4rem);
}

.article-summary {
  margin: 1.25rem 0;
  color: var(--ink-600);
  font-size: 1.18rem;
}

.featured-image {
  width: min(100% - 2rem, 62rem);
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-shell {
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.article-body > * + * {
  margin-top: 1.3rem;
}

.article-body h2 {
  margin-top: 3rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 500;
}

.article-body li + li {
  margin-top: 0.45rem;
}

.article-lede {
  margin: 0;
  padding: 1.35rem 1.5rem;
  background: var(--sage-100);
  border-left: 5px solid var(--sage-700);
  border-radius: 0.5rem;
  font-size: 1.13rem;
}

.author-box,
.references,
.medical-note,
.article-cta {
  margin-top: 3.5rem;
  padding: 1.5rem;
  background: var(--cream-100);
  border: 1px solid var(--cream-200);
  border-radius: var(--radius);
}

.author-box h2,
.references h2,
.medical-note h2,
.article-cta h2 {
  margin: 0 0 0.65rem;
  font-size: 1.45rem;
}

.references ol {
  padding-left: 1.2rem;
}

.references li + li {
  margin-top: 0.75rem;
}

.article-cta {
  background: var(--sage-900);
  color: var(--white);
}

.article-cta a:not(.button) {
  color: var(--white);
}

.site-footer {
  padding: 3rem 0;
  color: var(--cream-100);
  background: var(--ink-900);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  display: inline-flex;
  align-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  color: var(--cream-100);
}

.language-nav {
  display: inline-flex;
  gap: 0.15rem;
  margin-right: 0.35rem;
}

.language-nav a {
  display: inline-flex;
  width: 2rem;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  color: var(--ink-600);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.language-nav a:hover,
.language-nav a[aria-current="page"] {
  color: var(--sage-900);
  background: var(--cream-100);
}

.footer-inner nav,
.error-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.error-actions {
  margin-top: 1.5rem;
}
[data-theme="dark"] .article-cta {
  background: #304b37;
}

[data-theme="dark"] .site-footer {
  background: #17130e;
}

@media (max-width: 64rem) {
  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 30rem) {
  .container {
    width: min(100% - 1.5rem, var(--content));
  }

  .brand-copy {
    display: none;
  }
}

@media (max-width: 48rem) {
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
