/* ============================================================
   The Uyghur Archive — shared stylesheet
   Editorial, archival aesthetic. Serif body, hairline rules.
   ============================================================ */

:root {
  --paper: #faf8f3;
  --paper-deep: #f3f0e7;
  --ink: #1e1d1a;
  --ink-soft: #56534b;
  --ink-faint: #8b877c;
  --accent: #2f6f92;          /* muted sky blue */
  --rule: #ddd8cc;
  --rule-strong: #1e1d1a;
  --measure: 41rem;
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 18px; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #cfe0ea; }

a { color: var(--accent); }

/* ---------- Masthead ---------- */

.site-header {
  padding: 3.2rem 1.5rem 0;
  text-align: center;
}

.site-header .kicker {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.1rem;
}

.site-title {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1.2;
}

.site-title a { color: var(--ink); text-decoration: none; }

.site-tagline {
  margin: 0.9rem auto 0;
  max-width: 30rem;
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-soft);
}

.header-rule {
  width: 4.5rem;
  height: 1px;
  background: var(--accent);
  border: 0;
  margin: 1.9rem auto 0;
}

.site-nav {
  margin: 1.7rem 0 0;
  padding: 0.95rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  margin: 0 1.4rem;
  transition: color 120ms ease;
}

.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 3px; }

/* ---------- Layout ---------- */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

/* ---------- Home: intro ---------- */

.intro {
  text-align: center;
  margin: 0 auto 4rem;
  max-width: 34rem;
}

.intro p {
  font-size: 1.12rem;
  line-height: 1.8;
  margin: 0;
}

.intro p + p { margin-top: 1.2rem; }

/* ---------- Home: essay index ---------- */

.section-label {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
  margin: 0 0 2.4rem;
}

.essay-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: essay;
}

.essay-list > li {
  counter-increment: essay;
  position: relative;
  border-top: 1px solid var(--rule);
  padding: 2.1rem 0 2.1rem 4.2rem;
}

.essay-list > li:last-child { border-bottom: 1px solid var(--rule); }

.essay-list > li::before {
  content: counter(essay, decimal-leading-zero);
  position: absolute;
  left: 0.2rem;
  top: 2.35rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.essay-list .essay-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.essay-list .essay-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color 120ms ease;
}

.essay-list .essay-title a:hover { color: var(--accent); }

.essay-meta {
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0.55rem 0 0;
}

.essay-meta .sep { margin: 0 0.55rem; color: var(--rule); }

.essay-excerpt {
  margin: 0.8rem 0 0;
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 33rem;
}

/* ---------- Essay page ---------- */

.essay-header {
  text-align: center;
  margin: 0 auto 3.4rem;
  max-width: 36rem;
}

.essay-header .essay-meta { margin-bottom: 1.3rem; }

.essay-header h1 {
  font-size: 2.3rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.01em;
  margin: 0;
}

.essay-header .standfirst {
  font-style: italic;
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 1.3rem auto 0;
  max-width: 30rem;
}

.essay-header .header-rule { margin-top: 2.1rem; }

article { max-width: 36rem; margin: 0 auto; }

article p {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}

article > p:first-of-type::first-letter {
  float: left;
  font-size: 3.9rem;
  line-height: 0.82;
  padding: 0.08em 0.12em 0 0;
  font-weight: 500;
  color: var(--accent);
}

article h2 {
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
  margin: 3.2rem 0 1.6rem;
}

article h2::after {
  content: "";
  display: block;
  width: 2.4rem;
  height: 1px;
  background: var(--rule);
  margin: 0.9rem auto 0;
}

article blockquote {
  margin: 2.4rem 1.5rem;
  padding: 0;
  font-style: italic;
  font-size: 1.12rem;
  text-align: center;
  color: var(--ink-soft);
}

article blockquote footer {
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.8rem;
}

.placeholder-note {
  background: var(--paper-deep);
  border: 1px dashed #bfb8a4;
  border-radius: 3px;
  padding: 1.1rem 1.3rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #6d675a;
  margin: 0 auto 3rem;
  max-width: 36rem;
}

/* ---------- Essay footer nav ---------- */

.essay-nav {
  max-width: 36rem;
  margin: 3.5rem auto 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.essay-nav a { color: var(--ink-soft); text-decoration: none; }
.essay-nav a:hover { color: var(--accent); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.4rem 1.5rem 2.8rem;
  text-align: center;
}

.site-footer .footer-title {
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}

.site-footer p {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin: 0.25rem 0;
}

.site-footer a { color: var(--accent); text-decoration: none; }

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  html { font-size: 16.5px; }
  .site-title { font-size: 1.45rem; letter-spacing: 0.17em; }
  .site-nav a { margin: 0 0.8rem; }
  .essay-list > li { padding-left: 2.9rem; }
  .essay-header h1 { font-size: 1.8rem; }
}
