/* ==========================================================================
   Nicholas Dowornu Mawulorm — official biography site
   Palette: warm cream, sage green and mocha
   ========================================================================== */

:root {
  --cream: #f3f1ec;
  --cream-2: #ebe7df;
  --white: #ffffff;
  --sage: #77846b;
  --sage-btn: #6b785f;
  --sage-dark: #56624c;
  --taupe: #a9978a;
  --mocha: #a8806a;
  --mocha-dark: #8f6a56;
  --ink: #2c2c28;
  --muted: #66665f;
  --line: #e2ddd3;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --max: 1160px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius-lg: 28px;
  --radius: 20px;
  --shadow: 0 18px 40px rgba(60, 50, 40, 0.08);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--sage-dark); text-underline-offset: 3px; }
a:hover { color: var(--mocha-dark); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 300; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 300; }
h3 { font-size: 1.65rem; }
h4 { font-size: 1.25rem; }
h1 em, h2 em, h3 em, .quote em { font-style: italic; }

p { margin: 0 0 1.15em; }
strong { font-weight: 500; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--sage-btn);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

:focus-visible { outline: 2px solid var(--mocha); outline-offset: 3px; }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 18px;
}

.gold-rule { display: none; }

/* ---------- Header ---------- */

.topline { display: none; }

.site-header {
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 18px rgba(60, 50, 40, 0.05); }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 16px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 18px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}
.site-nav a {
  display: block;
  padding: 8px 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--sage-dark); }
.site-nav a[aria-current="page"] { color: var(--sage-dark); text-decoration: underline; text-underline-offset: 6px; }
.site-nav .nav-cta a {
  background: var(--sage-btn);
  color: #fff;
  border-radius: 999px;
  padding: 10px 20px;
  margin-left: 10px;
  text-decoration: none;
}
.site-nav .nav-cta a:hover { background: var(--sage-dark); color: #fff; }

@media (max-width: 1100px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 22px; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 0.78rem; }
  .site-nav .nav-cta a { margin: 16px 0 0; text-align: center; border: 0; }
}

/* ---------- Buttons ---------- */

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--sage-btn);
  transition: background 0.2s, color 0.2s;
}
.btn-gold { background: var(--sage-btn); color: #fff; }
.btn-gold:hover { background: var(--sage-dark); color: #fff; }
.btn-ghost { color: var(--sage-dark); background: transparent; }
.btn-ghost:hover { background: var(--sage-btn); color: #fff; }
.btn-mocha { background: var(--mocha); border-color: var(--mocha); color: #fff; }
.btn-mocha:hover { background: var(--mocha-dark); color: #fff; }

/* ---------- Heroes ---------- */

.hero { padding: clamp(32px, 5vw, 64px) 0 clamp(64px, 8vw, 110px); }
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.hero .lede { font-size: 1.05rem; color: var(--muted); max-width: 54ch; margin-top: 18px; }

.page-hero {
  padding: clamp(48px, 7vw, 90px) 0 clamp(64px, 8vw, 110px);
  text-align: center;
}
.page-hero h1 { margin-bottom: 0.3em; }
.page-hero p { max-width: 60ch; margin: 0 auto; color: var(--muted); font-size: 1.05rem; }

.breadcrumb {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--taupe); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb [aria-current] { color: var(--ink); }

/* ---------- Photos / placeholders ---------- */

.photo {
  margin: 0;
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--cream-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.photo.wide { aspect-ratio: 16 / 10; }
.photo.square { aspect-ratio: 1 / 1; }
.photo.landscape { aspect-ratio: 4 / 3; }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.photo figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 20px 16px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #fff;
  background: linear-gradient(transparent, rgba(30, 28, 24, 0.72));
}
.photo.is-empty figcaption { display: none; }
.prose .photo { margin: 1.6em 0 2em; }
.hero .photo { width: 100%; max-width: 440px; justify-self: end; }

.photo.is-empty {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.55), transparent 60%),
    linear-gradient(160deg, #ddd6ca, #cfc6b8);
}
.photo.is-empty::after {
  content: attr(data-placeholder);
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  text-align: center;
  padding: 24px;
  line-height: 1.4;
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 110px) 0; }

/* White panel with rounded top corners, sitting on the cream page */
.section.alt,
.page-hero + .section:not(.navy):not(.taupe),
.panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
}

/* Adjacent white panels get a little breathing room */
.section.alt + .section.alt,
.page-hero + .section + .section.alt { margin-top: 24px; }

/* Mocha band */
.section.navy,
.section.taupe {
  background: var(--taupe);
  color: #fff;
}
.section.navy h2, .section.navy h3,
.section.taupe h2 { color: #fff; }
.section.taupe .section-head .eyebrow,
.section.navy .eyebrow { color: #fff; }

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head p { color: var(--muted); }
.section.taupe .section-head p { color: rgba(255, 255, 255, 0.9); }

.statement { text-align: center; max-width: 760px; margin: 0 auto; }
.statement h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.statement p { color: var(--muted); max-width: 64ch; margin-left: auto; margin-right: auto; font-size: 0.95rem; }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.5em; font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 8px; }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}
.two-col.center { align-items: center; }

/* Sage split block: rounded photo overlapping a sage panel */
.sage-split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  position: relative;
  margin: clamp(32px, 5vw, 56px) 0;
}
.sage-split::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 16%;
  right: calc(-1 * var(--gutter));
  background: var(--sage);
  z-index: 0;
}
.sage-split .photo { position: relative; z-index: 1; margin: clamp(32px, 4vw, 48px) 0; }
.sage-split .sage-body {
  position: relative;
  z-index: 1;
  padding: clamp(40px, 5vw, 64px) 0 clamp(40px, 5vw, 64px) clamp(32px, 6vw, 80px);
  color: #fff;
}
.sage-split h2 { color: #fff; }

.arrow-list { list-style: none; margin: 0; padding: 0; }
.arrow-list li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.7;
}
.arrow-list li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  top: -1px;
  font-size: 1.15rem;
}
.arrow-list strong { display: block; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; opacity: 0.85; }
.sage-split .arrow-list a { color: #fff; }

/* Profile card */
.profile-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 32px;
}
.profile-card h3 { margin-bottom: 16px; font-size: 1.9rem; }
.profile-card dl { margin: 0; }
.profile-card dt {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-top: 16px;
}
.profile-card dt:first-child { margin-top: 0; }
.profile-card dd { margin: 4px 0 0; font-size: 0.95rem; line-height: 1.6; }
.sticky-col { position: sticky; top: 110px; }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 34px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.section.alt .card { background: var(--cream); border-color: transparent; }
.card h3 { font-size: 1.7rem; font-weight: 400; }
.card p { font-size: 0.92rem; color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.card .meta {
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 10px;
}
a.card { color: inherit; text-decoration: none; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .more,
.card .btn { align-self: center; margin-top: auto; }
.card .more {
  display: inline-block;
  background: var(--mocha);
  color: #fff;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
a.card:hover .more { background: var(--mocha-dark); }
.card > p + .more, .card > p + .btn { margin-top: 18px; }
.cards .photo { border-radius: var(--radius); }

/* Carousel (used on the mocha band) */
.carousel { position: relative; }
.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 44px) / 3);
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: rgba(168, 128, 106, 0.85);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 2;
}
.carousel-btn:hover { background: var(--mocha-dark); }
.carousel-btn[disabled] { opacity: 0.35; cursor: default; }
.carousel-btn.prev { left: -23px; }
.carousel-btn.next { right: -23px; }
@media (max-width: 900px) {
  .carousel-track { grid-auto-columns: calc((100% - 22px) / 2); }
}
@media (max-width: 600px) {
  .carousel-track { grid-auto-columns: 86%; }
  .carousel-btn.prev { left: -8px; }
  .carousel-btn.next { right: -8px; }
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 22px;
}
.stat {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  padding: 30px 22px;
  text-align: center;
}
.stat-num { font-family: var(--serif); font-size: 3rem; font-weight: 300; color: #fff; line-height: 1; }
.stat-label { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 12px; color: #fff; }

/* Quote */
.quote {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.25;
  text-align: center;
  max-width: 24ch;
  margin: 0 auto;
}
.quote-source {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 92px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--sage);
}
.timeline li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 34px;
  padding-bottom: 30px;
  position: relative;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 87px;
  top: 9px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px var(--white);
}
.timeline .year { font-family: var(--serif); font-size: 1.5rem; font-style: italic; color: var(--sage-dark); text-align: right; padding-right: 8px; line-height: 1.3; }
.timeline h3 { font-size: 1.45rem; margin-bottom: 2px; }
.timeline p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Role entries */
.role { padding: 34px 0; border-top: 1px solid var(--line); }
.role:first-of-type { border-top: 0; padding-top: 0; }
.role-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px; margin-bottom: 6px; }
.role-head h3 { margin: 0; font-size: 1.9rem; }
.role-dates { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mocha-dark); }
.role-org { font-weight: 500; color: var(--sage-dark); margin-bottom: 12px; }
.role ul { margin: 0 0 1em; padding-left: 1.2em; }
.role li { margin-bottom: 6px; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.tags li {
  border: 1px solid var(--sage);
  color: var(--sage-dark);
  padding: 6px 16px;
  font-size: 0.85rem;
  border-radius: 999px;
}

/* Memoriam */
.memoriam-hero .photo { max-width: 300px; margin: 0 auto 36px; }
.memoriam-dates { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--muted); }
.epigraph { max-width: 640px; margin: 0 auto; text-align: center; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.4; color: #fff; }
.epigraph cite { display: block; font-style: normal; font-family: var(--sans); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; margin-top: 18px; }

/* Contact */
.contact-email {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--sage);
  word-break: break-word;
}
.social-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.social-list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.social-list a:hover { color: var(--sage-dark); }
.social-list span:first-child { font-family: var(--serif); font-size: 1.35rem; }
.social-list span:last-child { color: var(--muted); font-size: 0.88rem; word-break: break-all; text-align: right; align-self: center; }

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

.site-footer { background: var(--sage-dark); color: rgba(255, 255, 255, 0.82); padding: 72px 0 28px; font-size: 0.9rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--cream-2); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { color: #fff; font-family: var(--sans); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-name { font-family: var(--serif); font-size: 1.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: #fff; margin-bottom: 12px; }
.footer-bottom {
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
}

/* ---------- Reveal on scroll ---------- */

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

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

@media (max-width: 900px) {
  .hero .container, .two-col, .footer-grid, .sage-split { grid-template-columns: 1fr; }
  .hero .photo { max-width: 460px; justify-self: start; }
  .sticky-col { position: static; }
  .sage-split::before { left: calc(-1 * var(--gutter)); top: 38%; }
  .sage-split .photo { margin: 0; max-width: 360px; }
  .sage-split .sage-body { padding: 40px 0 48px; }
}

@media (max-width: 560px) {
  .brand { font-size: 1.35rem; letter-spacing: 0.2em; }
  .timeline::before { left: 6px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; padding-left: 32px; }
  .timeline li::before { left: 1px; }
  .timeline .year { text-align: left; padding: 0; }
  .social-list a { flex-direction: column; gap: 2px; }
  .social-list span:last-child { text-align: left; }
}

@media print {
  .site-header, .site-footer, .btn-row, .carousel-btn { display: none; }
  .section.navy, .section.taupe, .sage-split::before { background: none; color: var(--ink); }
}
