:root {
  --bg: #100b0d;
  --surface: #1a1115;
  --surface-2: #24171c;
  --text: #f7f0e8;
  --muted: #cbbdb2;
  --gold: #d8aa61;
  --burgundy: #7f243f;
  --line: rgba(216, 170, 97, .28);
  --max: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
.container { width: min(var(--max), calc(100% - 36px)); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 50; padding: 10px 14px; background: var(--gold); color: #160d10; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 11, 13, .93);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; font-family: Georgia, serif; font-weight: 700; font-size: clamp(18px, 2vw, 24px); }
.brand-mark { display: none; }
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 650; }
.main-nav a:hover, .main-nav a:focus-visible { background: var(--surface-2); color: var(--text); }

.magazine-hero { padding: clamp(54px, 8vw, 94px) 0 42px; background: radial-gradient(circle at 85% 15%, rgba(127, 36, 63, .35), transparent 35%); }
.eyebrow { margin: 0 0 12px; color: var(--gold); font-size: 13px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.15; text-wrap: balance; }
.magazine-hero h1 { max-width: 920px; margin: 0; font-size: clamp(38px, 6vw, 72px); letter-spacing: -.035em; }
.hero-lead { max-width: 780px; margin: 22px 0 0; color: var(--muted); font-size: clamp(18px, 2.1vw, 23px); }
.topic-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.topic-button { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 15px; background: transparent; color: var(--text); cursor: pointer; }
.topic-button:hover, .topic-button.is-active { color: #1a1012; background: var(--gold); border-color: var(--gold); }

.featured { display: grid; grid-template-columns: 1.25fr .75fr; min-height: 430px; margin: 0 auto 44px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.featured-media { min-height: 360px; }
.featured-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(26px, 5vw, 52px); }
.featured-copy h2 { margin: 8px 0 16px; font-size: clamp(29px, 3.4vw, 45px); }
.featured-copy p { margin: 0 0 24px; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 14px; }
.category { color: var(--gold); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.read-more { align-self: flex-start; display: inline-flex; align-items: center; min-height: 46px; padding: 10px 17px; border-radius: 10px; background: var(--burgundy); color: white; font-weight: 800; text-decoration: none; }
.read-more:hover { background: #a23556; }

.posts-section { padding-bottom: 70px; }
.section-heading { margin: 0 0 24px; font-size: clamp(30px, 4vw, 44px); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); transition: transform .2s ease, border-color .2s ease; }
.post-card:hover { transform: translateY(-4px); border-color: rgba(216, 170, 97, .65); }
.post-card[hidden] { display: none; }
.post-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-copy { padding: 21px; }
.card-copy h2 { margin: 8px 0 12px; font-size: 25px; }
.card-copy h2 a { text-decoration: none; }
.card-copy h2 a:hover { color: var(--gold); }
.card-copy p { margin: 0 0 16px; color: var(--muted); }

.breadcrumbs { padding: 22px 0; color: var(--muted); font-size: 14px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li + li::before { content: "›"; margin-right: 7px; color: var(--gold); }
.breadcrumbs a { text-decoration: none; }

.article-header { max-width: 920px; margin: 22px auto 34px; text-align: center; }
.article-header h1 { margin: 12px 0 20px; font-size: clamp(37px, 5.5vw, 64px); letter-spacing: -.025em; }
.article-deck { max-width: 790px; margin: 0 auto 20px; color: var(--muted); font-size: clamp(18px, 2vw, 22px); }
.article-meta { justify-content: center; }
.hero-image { width: min(1180px, calc(100% - 36px)); margin: 0 auto 36px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; }
.hero-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.article-layout { width: min(1060px, calc(100% - 36px)); margin: 0 auto 80px; display: grid; grid-template-columns: minmax(0, 730px) 260px; gap: 54px; align-items: start; }
.article-content { min-width: 0; }
.article-content > p:first-of-type { font-size: 21px; color: #fff9f2; }
.article-content h2 { scroll-margin-top: 95px; margin: 50px 0 18px; font-size: clamp(28px, 4vw, 38px); color: #f4d49c; }
.article-content p { margin: 0 0 22px; }
.article-content a { color: #f2c77d; text-underline-offset: 4px; }
.toc { position: sticky; top: 96px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.toc strong { display: block; margin-bottom: 10px; font-family: Georgia, serif; font-size: 20px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 8px 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.toc a { text-decoration: none; }
.toc a:hover { color: var(--gold); }
.editorial-callout { margin: 38px 0; padding: 24px; border-left: 4px solid var(--gold); border-radius: 0 14px 14px 0; background: var(--surface-2); }
.editorial-callout strong { display: block; margin-bottom: 7px; color: var(--gold); }
.editorial-callout a { display: inline-block; margin-top: 9px; font-weight: 800; }

.share-panel { margin-top: 48px; padding-top: 27px; border-top: 1px solid var(--line); }
.share-panel h2, .comments h2, .related h2 { margin: 0 0 18px; font-size: 30px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.share-button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer; }
.share-button:hover { border-color: var(--gold); color: var(--gold); }
.share-status { min-height: 25px; margin: 9px 0 0; color: var(--gold); font-size: 14px; }

.comments { margin-top: 48px; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.comments-note, .comments-disabled { color: var(--muted); }
.comments-disabled { margin-top: 16px; padding: 18px; border: 1px dashed var(--line); border-radius: 10px; }
.related { margin-top: 54px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; }
.related-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.related-card span { display: block; padding: 13px; font-weight: 750; line-height: 1.35; }

.site-footer { border-top: 1px solid var(--line); background: #0b0809; }
.footer-inner { padding: 36px 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 16px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--gold); }
.footer-note { max-width: 800px; margin: 0; color: #a99b91; font-size: 14px; }

@media (max-width: 900px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured { grid-template-columns: 1fr; }
  .featured-media { min-height: 0; }
  .featured-media img { aspect-ratio: 3 / 2; }
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; }
}

@media (max-width: 640px) {
  body { font-size: 18px; line-height: 1.75; }
  .container, .article-layout, .hero-image { width: min(100% - 24px, var(--max)); }
  .header-inner { min-height: 64px; }
  .brand { font-size: 17px; }
  .main-nav a { padding: 8px; font-size: 14px; }
  .main-nav a:first-child { display: none; }
  .magazine-hero { padding-top: 42px; }
  .magazine-hero h1 { font-size: 40px; }
  .featured { border-radius: 15px; }
  .featured-copy { padding: 24px 20px; }
  .post-grid { grid-template-columns: 1fr; }
  .card-copy h2 { font-size: 27px; }
  .article-header { margin-top: 12px; }
  .article-header h1 { font-size: 39px; }
  .article-deck { font-size: 19px; }
  .hero-image { border-radius: 12px; margin-bottom: 24px; }
  .article-content > p:first-of-type { font-size: 20px; }
  .article-content h2 { margin-top: 42px; font-size: 31px; }
  .toc, .comments { padding: 19px; }
  .share-button { flex: 1 1 calc(50% - 10px); }
  .related-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .related-card { flex: 0 0 82%; scroll-snap-align: start; }
}

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