/* Veiled Antiquity — dark theme
   Palette: near-black ground, warm ochre/gold accent, cool ash text.
   No JS. No layout shift. Readable at 320px. */

:root {
  --ink-000: #08070a;
  --ink-050: #0b0a0d;
  --ink-100: #121016;
  --ink-200: #191621;
  --ink-300: #221e2c;
  --ink-400: #2e2939;

  --text: #ded9e3;
  --text-dim: #a49dae;
  --text-faint: #7b7486;

  --gold: #c9a227;
  --gold-soft: #e0c063;
  --gold-dim: rgba(201, 162, 39, 0.28);

  --measure: 68ch;
  --shell: 1180px;

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --display: "Cormorant Garamond", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  background: var(--ink-000);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.15rem);
  line-height: 1.72;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(201,162,39,0.085), transparent 62%),
    radial-gradient(760px 520px at 88% 4%, rgba(122,84,168,0.07), transparent 60%),
    var(--ink-000);
  background-attachment: fixed;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--gold); color: var(--ink-000);
  padding: 0.6rem 1rem; z-index: 100; font-family: var(--sans);
}
.skip:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; border-radius: 2px; }

a { color: var(--gold-soft); text-decoration-color: var(--gold-dim); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

/* ---------------------------------------------------------- masthead */

.masthead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem; flex-wrap: wrap;
  max-width: var(--shell); margin: 0 auto;
  padding: 1.6rem clamp(1.1rem, 4vw, 2.5rem) 1.2rem;
  border-bottom: 1px solid var(--ink-300);
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: inherit; }
.brand-mark { color: var(--gold); font-size: 1.5rem; line-height: 1; }
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--display); font-weight: 600; font-size: 1.5rem;
  letter-spacing: 0.055em; color: var(--text);
}
.brand-tag {
  font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-faint); margin-top: 0.15rem;
}
.nav { display: flex; gap: 1.6rem; font-family: var(--sans); font-size: 0.8rem;
  letter-spacing: 0.14em; text-transform: uppercase; }
.nav a { color: var(--text-dim); text-decoration: none; padding-bottom: 2px;
  border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current] { color: var(--gold-soft); border-bottom-color: var(--gold-dim); }

main { max-width: var(--shell); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.5rem) 5rem; }

/* ---------------------------------------------------------- home hero */

.hero { padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); text-align: center; }
.hero-kicker {
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.34em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 1.5rem;
}
.hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(3.2rem, 12vw, 7.5rem); line-height: 0.94;
  letter-spacing: 0.01em; margin: 0; color: var(--text);
}
.hero-dek {
  max-width: 56ch; margin: 1.9rem auto 0; color: var(--text-dim);
  font-size: 1.05rem; line-height: 1.75;
}
.hero::after {
  content: ""; display: block; width: 90px; height: 1px; margin: 3rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.section-label {
  font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--text-faint);
  margin: 3.5rem 0 1.4rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--ink-300);
}

/* ---------------------------------------------------------- lead card */

.lead-link {
  display: block; text-decoration: none; color: inherit;
  padding: clamp(1.6rem, 4vw, 2.8rem);
  background: linear-gradient(160deg, var(--ink-200), var(--ink-100) 70%);
  border: 1px solid var(--ink-400); border-radius: 3px; position: relative;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.lead-link::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 2px;
  background: linear-gradient(180deg, var(--gold), transparent);
}
.lead-link:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.lead-link h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.85rem, 4.2vw, 2.9rem); line-height: 1.12;
  margin: 0 0 0.9rem; color: var(--text);
}
.lead-link p { color: var(--text-dim); margin: 0; max-width: 60ch; }

/* ---------------------------------------------------------- post grid */

.grid { display: grid; gap: 1px; background: var(--ink-300);
  border: 1px solid var(--ink-300); border-radius: 3px; overflow: hidden; }
@media (min-width: 720px)  { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--ink-050); }
.card-link {
  display: flex; flex-direction: column; height: 100%;
  padding: 1.7rem 1.6rem 1.5rem; text-decoration: none; color: inherit;
  transition: background 0.25s ease;
}
.card-link:hover { background: var(--ink-100); }
.card-meta {
  display: flex; gap: 0.75rem; align-items: baseline; flex-wrap: wrap;
  font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-faint); margin: 0 0 0.9rem;
}
.card-meta .cat, .post-meta .cat { color: var(--gold); }
.card-title {
  font-family: var(--display); font-weight: 600; font-size: 1.55rem;
  line-height: 1.18; margin: 0 0 0.7rem; color: var(--text);
}
.card-link:hover .card-title { color: var(--gold-soft); }
.card-dek { color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; margin: 0 0 1.4rem; }
.card-more {
  margin: auto 0 0; font-family: var(--sans); font-size: 0.7rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold);
  display: flex; align-items: center; gap: 0.5rem;
}
.card-more .arrow { transition: transform 0.25s ease; }
.card-link:hover .arrow, .lead-link:hover .arrow { transform: translateX(5px); }
.card-more .rt { margin-left: auto; color: var(--text-faint); letter-spacing: 0.1em; }

/* ---------------------------------------------------------- post page */

.post { max-width: var(--measure); margin: 0 auto; }
.post-head { padding: clamp(2.8rem, 7vw, 4.5rem) 0 0; }
.post-meta {
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: baseline;
  font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.17em;
  text-transform: uppercase; color: var(--text-faint); margin: 0 0 1.5rem;
}
.post-meta .cat { text-decoration: none; }
.post-head h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.3rem, 6.2vw, 3.9rem); line-height: 1.08;
  margin: 0 0 1.2rem; color: var(--text); text-wrap: balance;
}
.dek {
  font-size: 1.2rem; line-height: 1.6; color: var(--text-dim);
  font-style: italic; margin: 0 0 2.5rem;
  padding-left: 1.15rem; border-left: 2px solid var(--gold-dim);
}

.toc {
  background: var(--ink-100); border: 1px solid var(--ink-300);
  border-radius: 3px; padding: 1.4rem 1.6rem; margin: 0 0 3rem;
}
.toc h2 {
  font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--text-faint); margin: 0 0 0.9rem;
  font-weight: 400;
}
.toc ol { margin: 0; padding-left: 1.2rem; color: var(--text-faint); }
.toc li { margin: 0.4rem 0; }
.toc a { text-decoration: none; color: var(--text-dim); }
.toc a:hover { color: var(--gold-soft); }

/* prose */

.prose > p:first-of-type::first-letter,
.lede::first-letter {
  font-family: var(--display); float: left; font-size: 3.9em; line-height: 0.78;
  padding: 0.06em 0.1em 0 0; color: var(--gold); font-weight: 600;
}
.prose h2, .is-page main h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.25rem); line-height: 1.2;
  margin: 3.4rem 0 1rem; color: var(--text);
}
.prose h3 {
  font-family: var(--display); font-weight: 600; font-size: 1.4rem;
  margin: 2.4rem 0 0.7rem; color: var(--text);
}
.prose p, .is-page main p { margin: 0 0 1.35rem; }
.prose ul, .prose ol, .is-page main ul, .is-page main ol { margin: 0 0 1.6rem; padding-left: 1.4rem; }
.prose li, .is-page main li { margin: 0.5rem 0; }
.prose strong { color: #efe9f2; font-weight: 600; }
.prose em { color: var(--text); }

blockquote {
  margin: 2.4rem 0; padding: 0.3rem 0 0.3rem 1.6rem;
  border-left: 2px solid var(--gold); font-family: var(--display);
  font-size: 1.5rem; line-height: 1.4; font-style: italic; color: #e8e2ee;
}
blockquote cite {
  display: block; margin-top: 0.9rem; font-family: var(--sans); font-style: normal;
  font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-faint);
}

.aside {
  margin: 2.6rem 0; padding: 1.5rem 1.7rem;
  background: var(--ink-100); border: 1px solid var(--ink-300);
  border-left: 2px solid var(--gold-dim); border-radius: 3px;
  font-size: 0.97rem;
}
.aside p:last-child { margin-bottom: 0; }
.aside-label {
  display: block; font-family: var(--sans); font-size: 0.64rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 0.75rem;
}

hr {
  border: 0; height: 1px; margin: 3.2rem auto;
  background: linear-gradient(90deg, transparent, var(--ink-400), transparent);
}

/* faq / sources / tags */

.faq, .sources { max-width: var(--measure); margin: 3.5rem auto 0;
  padding-top: 2.2rem; border-top: 1px solid var(--ink-300); }
.faq h2, .sources h2, .related h2 {
  font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--text-faint); font-weight: 400; margin: 0 0 1.4rem;
}
.faq details { border-bottom: 1px solid var(--ink-300); padding: 0.9rem 0; }
.faq summary {
  cursor: pointer; font-family: var(--display); font-size: 1.2rem;
  color: var(--text); list-style: none; display: flex; gap: 0.8rem; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--gold); font-size: 1.1rem; }
.faq details[open] summary::before { content: "\2212"; }
.faq summary:hover { color: var(--gold-soft); }
.faq details p { margin: 0.8rem 0 0.3rem 1.6rem; color: var(--text-dim); font-size: 0.97rem; }

.sources ul { padding-left: 1.2rem; }
.sources li { margin: 0.6rem 0; font-size: 0.92rem; color: var(--text-dim); line-height: 1.6; }

.tags { max-width: var(--measure); margin: 2.5rem auto 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-faint);
  border: 1px solid var(--ink-400); border-radius: 100px; padding: 0.3rem 0.75rem;
}

/* related */

.related { max-width: var(--measure); margin: 4.5rem auto 0;
  padding-top: 2.2rem; border-top: 1px solid var(--ink-300); }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px;
  background: var(--ink-300); border: 1px solid var(--ink-300); border-radius: 3px; overflow: hidden; }
.related a {
  display: block; background: var(--ink-050); padding: 1.1rem 1.3rem;
  text-decoration: none; transition: background 0.25s ease;
}
.related a:hover { background: var(--ink-100); }
.rel-cat {
  display: block; font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 0.35rem;
}
.rel-title { font-family: var(--display); font-size: 1.2rem; color: var(--text); line-height: 1.25; }
.related a:hover .rel-title { color: var(--gold-soft); }

/* ---------------------------------------------------------- pages */

.page-head { max-width: var(--measure); margin: 0 auto; padding: clamp(2.8rem, 7vw, 4.5rem) 0 1.5rem; }
.page-head h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.3rem, 6vw, 3.5rem); line-height: 1.1; margin: 0 0 1rem; color: var(--text);
}
.page-head .hero-dek { margin: 0; text-align: left; max-width: var(--measure); }
.is-page main { max-width: var(--measure); }
.is-page main > p, .is-page main > ol, .is-page main > ul, .is-page main > h2 { max-width: var(--measure); }
.lede { font-size: 1.2rem; line-height: 1.65; color: var(--text-dim); }

.arch { list-style: none; margin: 0 0 2.5rem; padding: 0;
  border-top: 1px solid var(--ink-300); }
.arch li { border-bottom: 1px solid var(--ink-300); }
.arch a {
  display: flex; gap: 1.3rem; align-items: baseline; padding: 1rem 0.4rem;
  text-decoration: none; transition: background 0.2s ease, padding-left 0.2s ease;
}
.arch a:hover { background: var(--ink-100); padding-left: 0.9rem; }
.arch time {
  font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-faint); min-width: 5.5rem; flex-shrink: 0;
}
.arch-title { font-family: var(--display); font-size: 1.25rem; color: var(--text); line-height: 1.3; }
.arch a:hover .arch-title { color: var(--gold-soft); }
.is-page main section h2 {
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--gold); font-weight: 400; margin: 3rem 0 1rem;
}

/* ---------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--ink-300); background: var(--ink-050); margin-top: 4rem; }
.footer-inner {
  max-width: var(--shell); margin: 0 auto;
  padding: 3.2rem clamp(1.1rem, 4vw, 2.5rem); text-align: center;
}
.footer-brand {
  font-family: var(--display); font-size: 1.6rem; letter-spacing: 0.06em;
  color: var(--text); margin: 0 0 0.6rem;
}
.footer-note { color: var(--text-faint); font-size: 0.9rem; margin: 0 auto 1.6rem; max-width: 46ch; }
.footer-nav { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap;
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; }
.footer-nav a { color: var(--text-dim); text-decoration: none; }
.footer-nav a:hover { color: var(--gold-soft); }
.footer-legal { color: var(--ink-400); font-size: 0.75rem; margin: 2rem 0 0;
  font-family: var(--sans); letter-spacing: 0.08em; }

/* ---------------------------------------------------------- print */

@media print {
  body { background: #fff; color: #000; }
  .masthead, .footer, .related, .toc, .tags { display: none; }
  .prose, .post { max-width: none; }
  a { color: #000; }
}
