/* simonpnazer.com — Fraunces + Inter + Geist Mono design system */

:root {
  --bg: #f7f5f2;
  --bg-2: #efece8;
  --ink: #1a1714;
  --ink-2: #4a4540;
  --ink-3: #6e665e;            /* was #9a928a (2.82:1) — now 5.2:1 on --bg, passes AA */
  --accent: #c17b3a;           /* decorative amber only — fails AA as small text */
  --accent-ink: #9a5a20;       /* amber for text links — 5.0:1 on --bg */
  --accent-hover: #7a4417;
  --rule: #ddd8d2;
  --rule-strong: #c8c2ba;
  --ghost: rgba(26, 23, 20, 0.13);
  --fs-label: 0.75rem;         /* the one small-caps size (12px) */
  --ls-label: 0.12em;          /* the one small-caps tracking */
  --max: 800px;
  --wide: 1100px;
  --gap: 2rem;
  --r: 2px;
}

* { margin: 0; box-sizing: border-box; }

html {
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  padding: 0 var(--gap);
}

a { color: var(--ink-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
header a { text-decoration: none; }

/* Header */
header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.logo {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
nav a {
  font-size: 0.88rem;
  color: var(--ink-3);
  text-decoration: none;
  margin-left: 1.5rem;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink-3);
}
nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

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

main > .era:first-child {
  margin-top: 0;
}

footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink-3);
}

/* Hero */
.hero {
  margin-bottom: 3.5rem;
  padding-bottom: 0;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.hero.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: none;
  margin-bottom: 1.25rem;
}
.hero .lead {
  font-size: 1.05rem;
  color: var(--ink-2);
  max-width: none;
  margin-bottom: 1.5rem;
}
.hero-cta {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 2.25rem;
}
.hero-cta a {
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.hero-cta a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

/* Geography ticker */
.geo {
  font-family: "Geist Mono", "SF Mono", monospace;
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 2.1;
  max-width: none;
  padding-bottom: 0.5rem;
}
.geo span {
  display: inline-block;
  white-space: nowrap;
}
.geo .sep {
  font-style: normal;
  color: var(--rule-strong);
  margin: 0 0.6rem;
}

/* Hero image */
.hero-image {
  margin: -1.5rem 0 3.5rem;
}
.hero-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  object-position: center 38%;
  border-radius: 4px;
  display: block;
  background: var(--bg-2);
}
.hero-image figcaption {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--ink-3);
  margin-top: 0.6rem;
}

/* Numbers block */
.numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin: 0 0 1.5rem;
  transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s;
}
.js .numbers {
  opacity: 0;
  transform: translateY(20px);
}
.js .numbers.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.num {
  text-align: left;
}
.num-value {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 300;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.num-label {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--ink-3);
  margin-top: 0.5rem;
}

/* Era labels */
.era {
  font-family: "Geist Mono", "SF Mono", monospace;
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 3.5rem 0 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}
.era::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--rule-strong);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.era.is-visible::before {
  width: 100%;
}
.era::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
  position: relative;
  z-index: 1;
}

/* Timeline items */
.tl-item {
  margin-bottom: 2.75rem;
  position: relative;
  padding-left: 5.25rem;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js .tl-item {
  opacity: 0;
  transform: translateY(16px);
}
.js .tl-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.tl-year {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--ghost);
  letter-spacing: -0.02em;
  position: absolute;
  top: 0;
  left: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  pointer-events: none;
  user-select: none;
  transition: color 0.8s ease 0.2s;
}
.js .tl-item .tl-year {
  color: rgba(0,0,0,0);
}
.js .tl-item.is-visible .tl-year {
  color: var(--ghost);
}
.tl-body { position: relative; z-index: 1; }
.tl-format {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--ink-3);
  margin-bottom: 0.35rem;
}
.tl-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.15rem;
}
.tl-org {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--ink-3);
  margin-bottom: 0.4rem;
}
.tl-desc {
  font-size: 0.95rem;
  color: var(--ink-2);
  max-width: 54ch;
  line-height: 1.6;
  margin-bottom: 0.4rem;
}
.tl-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent-ink);
}
.tl-link:hover { color: var(--accent-hover); }

/* Timeline item with a small photo */
.tl-item.has-thumb {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 1.75rem;
  align-items: start;
}
.tl-thumb {
  margin: 0;
  padding-top: 0.3rem;
}
.tl-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
.tl-thumb-ph {
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--bg-2), #e5dfd6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tl-thumb-ph span {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: #a1968a;
  padding: 0.4rem 0.7rem;
  border: 1px solid #d6cec3;
}

/* Featured card */
.featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 2.5rem;
  background: #141210;
  color: #f0ede8;
  border-radius: 6px;
  padding: 3rem;
  margin: 3rem 0;
  max-width: var(--wide);
  margin-left: auto;
  margin-right: auto;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .featured {
  opacity: 0;
  transform: translateY(20px);
}
.js .featured.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.featured .fc-era {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: #a09890;
  margin-bottom: 0.75rem;
}
.featured .fc-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.featured .fc-desc {
  font-size: 0.95rem;
  color: #c8c2ba;
  max-width: 42ch;
  margin-bottom: 1.5rem;
}
.featured .fc-link {
  color: #e07a3a;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color 0.15s;
}
.featured .fc-link:hover { color: #f0985a; border-bottom-color: #f0985a; }
.featured figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.featured figure img {
  width: 100%;
  flex: 1;
  min-height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  background: #2a2520;
}
.featured-placeholder {
  flex: 1;
  min-height: 220px;
  border-radius: 4px;
  background: linear-gradient(135deg, #221812, #402818);
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-label {
  font-family: "Geist Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: #b08a5e;
  padding: 0.7rem 1.2rem;
  border: 1px solid rgba(193, 123, 58, 0.35);
}
.featured figcaption {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: #a09890;
  margin-top: 0.6rem;
  text-align: center;
}

/* Org logo row on featured cards */
.org-logos {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.org-logo {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: #a09890;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.org-logo::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.org-logo.gp::before { background: #2ecc71; }
.org-logo.eeb::before { background: #6ba3d8; }
.org-logo.undp::before { background: #7ab3e0; }
.org-logo.unicef::before { background: #5cb8e8; }
.org-logo.ocha::before { background: #e07a6b; }

/* Card breakout — let featured cards extend beyond the text column */
@media (min-width: 1100px) {
  .featured {
    margin-left: -80px;
    margin-right: -80px;
    max-width: calc(100% + 160px);
  }
}

/* Era "show more" — native <details>, no JS needed */
.era-more { margin: 0 0 1rem; }
.era-more > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--accent-ink);
  padding: 0.6rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.era-more > summary::-webkit-details-marker { display: none; }
.era-more > summary::before {
  content: "+";
  display: inline-block;
  width: 1.4rem; height: 1.4rem;
  line-height: 1.3rem;
  text-align: center;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}
.era-more[open] > summary::before { content: "−"; }
.era-more > summary:hover { color: var(--accent-hover); }
.era-more > summary .more-open,
.era-more[open] > summary .more-closed { display: none; }
.era-more[open] > summary .more-open { display: inline; }
.era-more[open] > summary { margin-bottom: 2rem; }
.era-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.era-more .tl-item:first-of-type { margin-top: 0.5rem; }

/* Notes */
.notes-list { list-style: none; padding: 0; margin: 0; }
.note {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js .note {
  opacity: 0;
  transform: translateY(12px);
}
.js .note.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.note:last-child { border-bottom: none; }
.note-date {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--ink-3);
  margin-bottom: 0.4rem;
}
.note-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}
.note-title a { color: inherit; text-decoration: none; }
.note-title a:hover { color: var(--ink-2); }
.note-excerpt {
  color: var(--ink-2);
  max-width: 56ch;
  line-height: 1.6;
}
.note-tags {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--ink-3);
  margin-top: 0.4rem;
}

/* Reading list */
.book-argues {
  font-size: 0.95rem;
  color: var(--ink-3);
  font-style: italic;
  max-width: 56ch;
  margin-bottom: 0.75rem;
}
.book-quote {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 300;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 0 0 0.9rem;
  max-width: 52ch;
}
.note-body blockquote { /* spec'd pull-quote, never built */
  font-family: "Fraunces", Georgia, serif;
  font-weight: 300;
  font-style: italic;
  border-left: 4px solid var(--accent);
  padding-left: 1.25rem;
  margin: 0 0 1.35rem;
}

.book .note-title { font-size: 1.3rem; }
.earlier-notes { list-style: none; padding: 0; margin: 0 0 1rem; }
.earlier-notes li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.earlier-notes li:last-child { border-bottom: none; }
.earlier-notes .note-date { margin: 0; }
.earlier-notes a {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}
.earlier-notes a:hover { color: var(--accent-ink); }
@media (max-width: 600px) {
  .earlier-notes li { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* Single note */
.back-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--ink-3);
  text-decoration: none;
  margin-bottom: 2.5rem;
}
.back-link:hover { color: var(--ink-2); }
.post-meta {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--ink-3);
  margin-bottom: 0.75rem;
}
.note-body h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  line-height: 1.12;
}
.note-body p {
  color: var(--ink-2);
  max-width: 62ch;
  margin-bottom: 1.35rem;
  font-size: 1.05rem;
  line-height: 1.75;
}
.note-body strong { color: var(--ink); }

/* Archive intro */
.archive-intro {
  color: var(--ink-2);
  margin-bottom: 2.5rem;
  max-width: 58ch;
  font-size: 1rem;
}

/* Contact / CTA */
.cta {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
}
.cta .era {
  margin: 0 0 1.5rem;
}
.cta-line {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 300;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
  max-width: 34ch;
  margin-bottom: 1.75rem;
}
.cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.cta-links a {
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.cta-links a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

/* Focus — keyboard users see where they are */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Featured card lift (spec'd in BLUEPRINT, never built) */
.featured figure img { transition: transform 0.6s ease; }
@media (hover: hover) {
  .featured:hover figure img { transform: scale(1.02); }
}

/* Utilities */
.divider {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 4rem 0;
}

@media (max-width: 780px) {
  :root { --gap: 1.25rem; }
  .featured {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
  .featured figure {
    order: -1;
    min-height: 180px;
  }
  .numbers {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
  }
  .tl-item { padding-left: 4.25rem; }
  .tl-year { font-size: 2.8rem; }
  .hero-image { margin-top: -1rem; }
  .hero-image img { aspect-ratio: 4 / 3; }
  .tl-item.has-thumb { grid-template-columns: 1fr; gap: 1rem; }
  .tl-thumb { padding-top: 0; max-width: 380px; }
}
@media (max-width: 600px) {
  header {
    flex-direction: column;
    gap: 0.75rem;
    padding: 2rem 0 1.25rem;
  }
  nav a { margin-left: 0; margin-right: 1.25rem; }
  .tl-item { padding-left: 0; }
  .tl-year,
  .js .tl-item .tl-year,
  .js .tl-item.is-visible .tl-year {
    position: static;
    display: block;
    writing-mode: horizontal-tb;
    transform: none;
    font-family: "Geist Mono", monospace;
    font-weight: 400;
    font-size: var(--fs-label);
    line-height: 1;
    letter-spacing: var(--ls-label);
    color: var(--ink-3);
    margin-bottom: 0.4rem;
  }
  .numbers { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .tl-item, .js .featured, .js .note, .js .numbers, .hero {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .js .tl-item .tl-year { color: var(--ghost) !important; }
}

