@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,500&family=Source+Sans+Pro:wght@400;600;700&display=swap');

:root {
  --ink:         #1a1f2e;
  --paper:       #f5f3ef;
  --stone:       #e8e4dd;
  --deep-blue:   #2c3e6b;
  --ochre:       #b08847;
  --ochre-hover: #967238;
  --slate:       #5a6478;
  --text:        #2a2e38;
  --text-light:  #4a5060;
  --text-muted:  #7a8090;
  --border:      #d5d0c8;
  --border-light:#e2ded6;
  --white:       #faf9f7;
  --serif:       'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:        'Source Sans Pro', system-ui, -apple-system, sans-serif;
  --max-w:       1080px;
  --article-w:   50rem;
  --radius:      2px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:       #1c1f28;
    --stone:       #22252f;
    --white:       #16181f;
    --text:        #d4d2ce;
    --text-light:  #a8a6a2;
    --text-muted:  #787672;
    --border:      #3a3d48;
    --border-light:#2e3038;
    --deep-blue:   #8da4d4;
    --ochre:       #d4a85a;
    --ochre-hover: #c49a4e;
    --slate:       #98a0b0;
    --ink:         #d8d6d2;
  }
}
:root[data-theme="dark"] {
  --paper:       #1c1f28;
  --stone:       #22252f;
  --white:       #16181f;
  --text:        #d4d2ce;
  --text-light:  #a8a6a2;
  --text-muted:  #787672;
  --border:      #3a3d48;
  --border-light:#2e3038;
  --deep-blue:   #8da4d4;
  --ochre:       #d4a85a;
  --ochre-hover: #c49a4e;
  --slate:       #98a0b0;
  --ink:         #d8d6d2;
}
:root[data-theme="light"] {
  --ink:         #1a1f2e;
  --paper:       #f5f3ef;
  --stone:       #e8e4dd;
  --white:       #faf9f7;
  --text:        #2a2e38;
  --text-light:  #4a5060;
  --text-muted:  #7a8090;
  --border:      #d5d0c8;
  --border-light:#e2ded6;
  --deep-blue:   #2c3e6b;
  --ochre:       #b08847;
  --ochre-hover: #967238;
  --slate:       #5a6478;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.05vw, 1.1rem);
  line-height: 1.78;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--deep-blue); text-decoration-color: var(--border); text-underline-offset: 3px; transition: color 0.15s; }
a:hover { color: var(--ochre); text-decoration-color: var(--ochre); }
::selection { background: rgba(44,62,107,0.15); }

/* Typography — journal style, serif throughout */
h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  line-height: 1.2;
  text-wrap: balance;
  color: var(--ink);
  font-weight: 600;
}
h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  margin: 2.75rem 0 0.75rem;
  font-weight: 600;
}
h3 {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  margin: 2rem 0 0.5rem;
  font-weight: 600;
}
h4 { font-size: 1rem; margin: 1.25rem 0 0.35rem; font-weight: 600; }
p { margin-bottom: 1.15rem; text-wrap: pretty; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1.15rem; }
li { margin-bottom: 0.35rem; }
strong { font-weight: 600; }
em { font-style: italic; }
blockquote {
  border-left: 2px solid var(--ochre);
  padding: 0.6rem 1.25rem;
  margin: 1.75rem 0;
  background: var(--stone);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--text-light);
}
hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 2.5rem 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
th, td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}
th {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  border-bottom: 2px solid var(--border);
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Skip Link */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: fixed; left: 1rem; top: 1rem; width: auto; height: auto;
  padding: 0.5rem 1rem; background: var(--deep-blue); color: #fff;
  font-family: var(--sans); font-weight: 700; border-radius: var(--radius);
  z-index: 9999; text-decoration: none;
}

/* ---- Header ---- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: 1rem;
}
.logo {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-shrink: 0;
}
.logo-main {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.logo-sep {
  color: var(--border);
  font-weight: 300;
  font-size: 1.1rem;
}
.logo-sub {
  font-family: var(--sans);
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}
.site-nav a {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color 0.15s;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--deep-blue);
}

/* ---- Masthead (homepage) ---- */
.masthead {
  padding: clamp(3.5rem, 10vw, 6rem) 1.5rem clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.masthead::after {
  content: '';
  display: block;
  width: 3rem;
  height: 2px;
  background: var(--ochre);
  margin: 1.5rem auto 0;
}
.masthead h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.75rem;
  max-width: none;
}
.masthead .tagline {
  font-family: var(--sans);
  font-size: clamp(0.72rem, 1vw, 0.78rem);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--slate);
  margin-bottom: 1.5rem;
}
.masthead .lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--text-light);
  max-width: 52ch;
  margin: 0 auto;
  font-weight: 400;
  line-height: 1.65;
}

/* ---- Page hero (articles + utility) ---- */
.page-hero {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2.5rem, 7vw, 4rem) 1.5rem clamp(2rem, 5vw, 3rem);
}
.page-hero .inner {
  max-width: var(--article-w);
  margin: 0 auto;
}
.page-hero h1 {
  color: var(--paper);
  margin-bottom: 0.6rem;
  font-weight: 700;
}
.page-hero p {
  color: rgba(245,243,239,0.7);
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  line-height: 1.6;
  margin-bottom: 0;
}
.kicker {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ochre);
  margin-bottom: 0.6rem;
  display: block;
}

/* ---- Prose (article body) ---- */
.prose {
  max-width: var(--article-w);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) 1.5rem;
}
.prose h2 {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
}
.prose h2:first-child,
.prose h2:first-of-type { border-top: none; padding-top: 0; }

/* Content images */
.content-image {
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.content-image.wide { grid-column: 1 / -1; }
.image-caption {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.4;
}

/* ---- Utility pages ---- */
.content-wrap {
  max-width: var(--article-w);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) 1.5rem;
}

/* ---- Homepage: intro section ---- */
.home-intro {
  max-width: var(--article-w);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) 1.5rem;
}

/* ---- Homepage: cluster sections ---- */
.cluster-band {
  padding: clamp(2rem, 5vw, 3rem) 1.5rem;
  border-top: 1px solid var(--border-light);
}
.cluster-band:nth-child(even) { background: var(--stone); }
.cluster-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem 3rem;
  align-items: start;
}
.cluster-label {
  position: sticky;
  top: 5rem;
}
.cluster-label h2 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  margin: 0 0 0.35rem;
  border: none;
  padding: 0;
}
.cluster-label p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 28ch;
}
.cluster-img {
  margin-top: 1rem;
  border-radius: var(--radius);
  width: 100%;
  max-width: 320px;
  height: auto;
  opacity: 0.85;
  filter: saturate(0.8);
  transition: opacity 0.3s, filter 0.3s;
}
.cluster-img:hover {
  opacity: 1;
  filter: saturate(1);
}
.page-hero-img {
  margin-top: 1.5rem;
  border-radius: var(--radius);
  width: 100%;
  max-width: 720px;
  height: auto;
  opacity: 0.9;
  filter: saturate(0.85);
}
.cluster-num {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ochre);
  margin-bottom: 0.4rem;
  display: block;
}
.article-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.article-list li {
  margin: 0;
  border-bottom: 1px solid var(--border-light);
}
.article-list li:last-child { border-bottom: none; }
.article-list a {
  display: block;
  padding: 0.7rem 0;
  text-decoration: none;
  transition: padding-left 0.15s;
}
.article-list a:hover {
  padding-left: 0.5rem;
}
.article-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--deep-blue);
  display: block;
  line-height: 1.35;
}
.article-list a:hover .article-title {
  color: var(--ochre);
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  max-width: var(--article-w);
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  font-family: var(--sans);
  font-size: 0.76rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--deep-blue); }
.breadcrumb .sep { margin: 0 0.3rem; }

/* ---- Footer ---- */
.site-footer {
  background: var(--ink);
  color: rgba(245,243,239,0.65);
  padding: 2.5rem 1.5rem 0;
  margin-top: 3rem;
}
.site-footer .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 1.5rem;
}
.footer-brand .logo-main { color: rgba(245,243,239,0.9); }
.footer-brand .logo-sub { color: rgba(245,243,239,0.4); }
.footer-tagline {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: rgba(245,243,239,0.4);
  margin-top: 0.5rem;
  max-width: 30ch;
  line-height: 1.5;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}
.footer-nav a {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: rgba(245,243,239,0.6);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-nav a:hover { color: rgba(245,243,239,0.95); }
.footer-bottom {
  border-top: 1px solid rgba(245,243,239,0.08);
  padding: 1rem 0;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: rgba(245,243,239,0.35);
}
.footer-bottom a { color: rgba(245,243,239,0.4); text-decoration: none; }
.footer-bottom a:hover { color: rgba(245,243,239,0.8); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .site-header .inner {
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
    padding: 0.6rem 1rem;
    gap: 0.25rem;
  }
  .logo { gap: 0.4rem; }
  .site-nav { gap: 0; }
  .site-nav a { padding: 0.2rem 0.4rem; font-size: 0.76rem; }
  .cluster-inner {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .cluster-label { position: static; }
  .cluster-label p { max-width: none; }
  .site-footer .inner { flex-direction: column; gap: 1rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .masthead h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
  .page-hero h1 { max-width: none; }
  .prose { padding-left: 1rem; padding-right: 1rem; }
  .content-wrap { padding-left: 1rem; padding-right: 1rem; }
}

/* ---- Motion ---- */
@media (prefers-reduced-motion: no-preference) {
  .prose > *,
  .content-wrap > *,
  .article-list li {
    animation: settle 0.35s ease both;
  }
  @keyframes settle {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .prose > *:nth-child(2) { animation-delay: 40ms; }
  .prose > *:nth-child(3) { animation-delay: 80ms; }
  .article-list li:nth-child(2) { animation-delay: 30ms; }
  .article-list li:nth-child(3) { animation-delay: 60ms; }
  .article-list li:nth-child(4) { animation-delay: 90ms; }
  .article-list li:nth-child(5) { animation-delay: 120ms; }
}

/* ---- Print ---- */
@media print {
  .site-header, .site-footer, .skip-link, .breadcrumb { display: none; }
  body { font-size: 11pt; line-height: 1.5; background: #fff; color: #000; }
  .prose, .content-wrap { display: block; max-width: none; padding: 0; }
  a { color: #000; text-decoration: underline; }
  .page-hero { background: #fff; color: #000; padding: 1rem 0; }
  .page-hero h1 { color: #000; }
}
