/* ═══════════════════════════════════════════════════════════════
   PROF. V.N. RAJASEKHARAN PILLAI  —  Website v7
   Light editorial — ivory ground, ink text, gold accent
   Left-fixed identity panel  |  Right scrolling content
   Lora (display/body serif)  +  DM Sans (utility sans)
═══════════════════════════════════════════════════════════════ */

/* ── Reset & Tokens ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ivory:     #F6F4EF;
  --paper:     #FDFCFA;
  --white:     #FFFFFF;
  --ink:       #1A1915;
  --charcoal:  #2E2D2A;
  --mid:       #6B6860;
  --rule:      #E4E0D8;
  --gold:      #B8892A;
  --gold-lt:   #D4A84B;
  --gold-pale: rgba(184,137,42,.10);
  --panel-w:   360px;
  --serif:     'Lora', Georgia, serif;
  --sans:      'DM Sans', 'Poppins', system-ui, sans-serif;
  --ease:      cubic-bezier(.25,.46,.45,.94);
}

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

body {
  font-family: var(--sans);
  background: var(--ivory);
  color: var(--charcoal);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Skip link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -8em; left: 1rem; z-index: 9999;
  background: var(--gold); color: var(--white);
  padding: .45rem 1rem; font-size: .8rem; border-radius: 3px;
  transition: top .2s;
}
.skip-link:focus { top: .75rem; }

/* ═══════════════════════════════════════════════════════════════
   PAGE SHELL  — two-column split
═══════════════════════════════════════════════════════════════ */
.page-shell { display: flex; min-height: 100vh; }

/* ═══════════════════════════════════════════════════════════════
   IDENTITY PANEL  — fixed left column
   Photo: brightness(.55) contrast(1.08)  → crisp, not muddy
═══════════════════════════════════════════════════════════════ */
.identity-panel {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--panel-w);
  background: var(--ink) var(--panel-image, none) center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 2rem;
  z-index: 100;
  overflow: hidden;
}

/* Layered overlay: upper-left dark for text, bottom gradient for footer */
.panel-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(20,18,14,.86) 0%, rgba(20,18,14,.52) 55%, rgba(20,18,14,.78) 100%),
    linear-gradient(to bottom, transparent 55%, rgba(10,9,7,.9) 100%);
}

/* Brighten the photo itself via filter on a pseudo */
.identity-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  background-image: var(--panel-image);
  background-size: cover;
  background-position: center;
  /* Photo vivid and dramatic — not crushed */
  filter: brightness(.62) contrast(1.08) saturate(1.05);
  z-index: -1;
}
/* Remove the background from the element itself to avoid double-painting */
.identity-panel { background-color: var(--ink); background-image: none !important; }

.identity-panel > * { position: relative; z-index: 1; }

/* Monogram / logo */
.monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border: 1px solid rgba(184,137,42,.45);
  font-family: var(--serif);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .15em;
  color: var(--gold-lt);
  text-decoration: none;
  transition: border-color .25s, background .25s;
}
.monogram:hover { border-color: var(--gold-lt); background: rgba(184,137,42,.10); }

/* Panel copy */
.eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-lt);
  display: block;
  margin-bottom: 1rem;
}
.eyebrow.light { color: rgba(212,168,75,.85); }

.panel-copy { padding-bottom: 1.5rem; }

.identity-panel h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  font-weight: 500;
  color: var(--white);
  line-height: 1.28;
  margin-bottom: 1.1rem;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
}

.panel-role {
  font-size: .85rem;
  color: rgba(255,255,255,.75);
  line-height: 1.8;
  letter-spacing: .02em;
  font-weight: 400;
}

.panel-footer {
  display: flex;
  align-items: center;
  gap: .9rem;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.vertical-rule { display: inline-block; width: 1px; height: 24px; background: rgba(184,137,42,.45); }

/* ═══════════════════════════════════════════════════════════════
   CONTENT WRAP  — right column, scrolls independently
═══════════════════════════════════════════════════════════════ */
.content-wrap {
  margin-left: var(--panel-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--paper);
}

/* ═══════════════════════════════════════════════════════════════
   SITE HEADER  — sticky top bar inside content-wrap
═══════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253,252,250,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .4rem;
  padding: 0 3rem;
  height: 60px;
  transition: box-shadow .25s;
}
.site-header.shadowed { box-shadow: 0 1px 12px rgba(0,0,0,.06); }

.brand-mobile {
  display: none;
  font-family: var(--serif);
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
  margin-right: auto;
}

.site-nav { display: flex; align-items: center; gap: .2rem; }

.nav-link {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mid);
  padding: .4rem .9rem;
  border-radius: 3px;
  position: relative;
  transition: color .2s, background .2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -1px; left: .9rem; right: .9rem;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .25s var(--ease);
}
.nav-link:hover { color: var(--ink); background: rgba(0,0,0,.04); }
.nav-link.active { color: var(--ink); font-weight: 700; }
.nav-link.active::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: all .25s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile nav drawer */
.mobile-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(253,252,250,.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  z-index: 100;
  padding: 1rem 3rem 1.4rem;
  flex-direction: column;
  gap: .2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.mobile-drawer.open { display: flex; }
.mobile-drawer .nav-link {
  font-size: .8rem;
  padding: .7rem 1rem;
  border-radius: 4px;
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════════════════════════ */
main { flex: 1; }

/* ── Section spacing ────────────────────────────────────────── */
.section-pad { padding: 5rem 3rem; }
.section-pad.no-top { padding-top: 0; }
.section-sm { padding: 2.5rem 3rem; }
.alt-bg { background: var(--white); }
.gold-bg { background: linear-gradient(135deg, #1a1610 0%, #111008 100%); }

/* ── Section headings ───────────────────────────────────────── */
.section-heading { margin-bottom: 2.8rem; }
.section-heading h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.22;
  margin-top: .5rem;
}
.section-heading.split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.text-link {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color .2s;
  white-space: nowrap;
}
.text-link:hover { border-color: var(--gold); }

/* ── Buttons ────────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .8rem 1.8rem;
  border-radius: 3px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .22s var(--ease);
}
.button-dark { background: var(--ink); color: var(--white); border-color: var(--ink); }
.button-dark:hover { background: var(--charcoal); border-color: var(--charcoal); }
.button-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.button-line:hover { background: var(--ink); color: var(--white); }
.button-gold { background: var(--gold); color: var(--white); border-color: var(--gold); }
.button-gold:hover { background: #9e7622; border-color: #9e7622; }
.button-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.45); }
.button-light:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.button-row { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════════
   HOME — HERO
═══════════════════════════════════════════════════════════════ */
.hero-section { border-bottom: 1px solid var(--rule); }

.hero-section h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.5vw, 3.2rem);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.18;
  max-width: 660px;
  margin: .8rem 0 1rem;
}
.hero-deck {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
}
.lead {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--mid);
  max-width: 620px;
  margin-bottom: 2.2rem;
}

/* ── Stats bar ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--white);
}
.stat {
  padding: 2rem 2.5rem;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: .35rem;
}
.stat:last-child { border-right: none; }
.stat strong {
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
}
.stat span { font-size: .75rem; color: var(--mid); line-height: 1.45; max-width: 120px; }

/* ═══════════════════════════════════════════════════════════════
   LESSON & EVENT CARDS  — image + caption grid
   Photos: minimal filter — let them breathe
═══════════════════════════════════════════════════════════════ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: var(--rule);
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}

.card {
  background: var(--paper);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: none;
  text-align: left;
  color: inherit;
  font-family: inherit;
  transition: background .2s;
}
.card:hover { background: var(--white); }

.card-img-wrap {
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #e8e5de;
  flex-shrink: 0;
}
.card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  /* Good treatment: bright enough to read, warm colour preserved */
  filter: brightness(.9) contrast(1.03);
  transition: transform .5s var(--ease), filter .3s;
}
.card:hover .card-img { transform: scale(1.05); filter: brightness(.95) contrast(1.03); }

.card-body {
  padding: 1.3rem 1.4rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-num { font-size: .6rem; color: rgba(184,137,42,.6); margin-bottom: .2rem; }
.card-tag { font-size: .6rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: .5rem; }
.card-title { font-family: var(--serif); font-size: 1rem; font-weight: 500; color: var(--ink); line-height: 1.38; margin-bottom: .65rem; }
.card-excerpt { font-size: .78rem; color: var(--mid); line-height: 1.7; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-cta { margin-top: 1rem; font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: .3rem; transition: gap .2s; }
.card:hover .card-cta { gap: .5rem; }
.card-cta::after { content: '→'; }

/* external link event card */
a.card { text-decoration: none; }

/* ═══════════════════════════════════════════════════════════════
   QUOTE PANEL  — full-bleed photo background
═══════════════════════════════════════════════════════════════ */
.quote-panel {
  position: relative;
  padding: 6rem 3rem;
  overflow: hidden;
}
.quote-panel-photo {
  position: absolute; inset: 0;
  background-size: cover; background-position: center top;
  /* Photo crisp and dramatic */
  filter: brightness(.45) saturate(1.1);
}
.quote-panel-veil {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(20,18,12,.92) 0%, rgba(20,18,12,.65) 100%);
}
.quote-panel-inner { position: relative; z-index: 1; max-width: 680px; }

.quote-panel blockquote {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.2vw, 1.7rem);
  font-style: italic;
  color: var(--white);
  line-height: 1.55;
  padding-left: 1.4rem;
  border-left: 3px solid var(--gold);
  margin: 1rem 0 2rem;
}

/* ═══════════════════════════════════════════════════════════════
   HOME — EVENT STRIP
═══════════════════════════════════════════════════════════════ */
.event-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

/* ═══════════════════════════════════════════════════════════════
   PAGE INTRO  — inner page header
═══════════════════════════════════════════════════════════════ */
.page-intro { border-bottom: 1px solid var(--rule); }
.page-intro h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.18;
  max-width: 640px;
  margin: .7rem 0 1.1rem;
}
.page-intro .lead { max-width: 540px; margin-bottom: 0; }

/* ═══════════════════════════════════════════════════════════════
   ABOUT — PROSE
═══════════════════════════════════════════════════════════════ */
.prose-xl p {
  font-family: var(--serif);
  font-size: clamp(.95rem, 1.2vw, 1.1rem);
  line-height: 1.9;
  color: var(--charcoal);
  max-width: 680px;
  margin-bottom: 1.4rem;
}
.prose-xl p:last-child { margin-bottom: 0; }
.prose-xl strong { color: var(--ink); }

/* Quote split */
.quote-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 360px;
}
.quote-split img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* Let the photo speak — just slightly warm-dimmed */
  filter: brightness(.78) saturate(1.05);
}
.quote-split blockquote {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  font-style: italic;
  color: var(--white);
  line-height: 1.65;
  padding: 3.5rem 3rem 3.5rem 2.5rem;
  display: flex;
  align-items: center;
  background: var(--ink);
  border-left: 3px solid var(--gold);
}

/* Roles 2×2 */
.roles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5px;
  background: var(--rule);
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.role-card { background: var(--paper); padding: 2.2rem 2rem; transition: background .2s; }
.role-card:hover { background: var(--white); }
.role-card-img {
  width: 100%; aspect-ratio: 16/7; object-fit: cover;
  border-radius: 3px; margin-bottom: 1.1rem;
  filter: brightness(.88) contrast(1.04) saturate(1.02);
}
.role-tag { font-size: .6rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: .4rem; }
.role-title { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); margin-bottom: .7rem; }
.role-body { font-size: .82rem; color: var(--mid); line-height: 1.8; }

/* Timeline */
.timeline {
  border-left: 1px solid rgba(184,137,42,.3);
  padding-left: 2.2rem;
  margin-left: .5rem;
  display: flex;
  flex-direction: column;
}
.tl-item {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.tl-item:last-child { border-bottom: none; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -2.62rem; top: 1.7rem;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--paper);
}
.tl-period { font-size: .72rem; font-weight: 700; color: var(--gold); padding-top: .15rem; line-height: 1.4; }
.tl-role { font-size: .9rem; font-weight: 600; color: var(--ink); margin-bottom: .3rem; }
.tl-desc { font-size: .78rem; color: var(--mid); line-height: 1.65; }

.editor-note {
  margin-top: 1.4rem;
  font-size: .72rem;
  color: rgba(0,0,0,.35);
  font-style: italic;
  padding: .65rem 1rem;
  border-left: 2px solid var(--rule);
}

/* 3-col contributions */
.contrib-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: var(--rule);
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.contrib-col { background: var(--paper); padding: 1.8rem 1.6rem; }
.contrib-col h3 { font-size: .65rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--rule); }
.contrib-col ul { list-style: none; display: flex; flex-direction: column; gap: .65rem; }
.contrib-col li { font-size: .78rem; color: var(--mid); line-height: 1.6; padding-left: .9rem; position: relative; }
.contrib-col li::before { content: ''; position: absolute; left: 0; top: .56rem; width: 4px; height: 1px; background: var(--gold); }

/* Legacy CTA */
.legacy-close {
  background: var(--ink);
  padding: 4rem 3rem;
  display: flex; flex-direction: column; gap: 1.1rem;
  max-width: none;
}
.legacy-close h2 { font-family: var(--serif); font-size: clamp(1.3rem, 2.5vw, 2rem); font-weight: 400; color: var(--white); line-height: 1.35; max-width: 620px; }
.legacy-close p { font-size: .88rem; color: rgba(255,255,255,.5); line-height: 1.8; max-width: 560px; }

/* Key metrics 4-stat row */
.key-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5px;
  background: var(--rule);
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 2rem;
}
.km-item { background: var(--gold-pale); padding: 1.6rem 1.4rem; }
.km-num { font-family: var(--serif); font-size: 1.6rem; font-weight: 400; color: var(--gold); line-height: 1; margin-bottom: .35rem; }
.km-label { font-size: .73rem; color: var(--mid); line-height: 1.4; }

/* ═══════════════════════════════════════════════════════════════
   LEGACY LESSONS — card grid + DIALOG MODAL
═══════════════════════════════════════════════════════════════ */
.lessons-intro { padding: 3.5rem 3rem 2rem; border-bottom: 1px solid var(--rule); }
.lessons-intro h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
  margin: .6rem 0 .8rem;
  max-width: 680px;
}
.lessons-intro .lead { max-width: 580px; }

/* ── MODAL  — native <dialog> ───────────────────────────────── */
dialog.essay-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(780px, 95vw);
  max-height: 90dvh;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  display: none;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.22);
  z-index: 800;
  /* start offscreen */
  opacity: 0;
  transform: translateY(18px) scale(.98);
  transition: opacity .3s var(--ease), transform .35s var(--ease);
}
dialog.essay-modal[open] { display: flex; }
dialog.essay-modal.shown { opacity: 1; transform: none; }

dialog.essay-modal::backdrop {
  background: rgba(20,18,14,.78);
  backdrop-filter: blur(3px);
}

.modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1.2rem;
  border-bottom: 1px solid var(--rule);
  background: var(--white);
  flex-shrink: 0;
  gap: 1rem;
}
.modal-nav-row { display: flex; gap: .4rem; }
.modal-btn {
  font-family: var(--sans);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .4rem .9rem;
  background: var(--ivory);
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--mid);
  cursor: pointer;
  transition: all .2s;
}
.modal-btn:hover:not(:disabled) { background: var(--gold-pale); border-color: var(--gold); color: var(--ink); }
.modal-btn:disabled { opacity: .3; cursor: not-allowed; }
.modal-counter { font-size: .65rem; color: var(--gold); font-weight: 700; letter-spacing: .06em; flex: 1; text-align: center; }
.modal-close {
  width: 30px; height: 30px;
  background: var(--ivory);
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--mid);
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}
.modal-close:hover { background: #fde8e8; border-color: #e88; color: #c33; }

.modal-scroll {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}

/* Photo inside modal — bright, editorial */
.modal-photo {
  width: 100%; height: 260px;
  object-fit: cover;
  display: block;
  filter: brightness(.85) contrast(1.04) saturate(1.04);
}

.modal-content { padding: 2rem 2.5rem 3rem; }
.modal-tag { font-size: .6rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: .7rem; }
.modal-title { font-family: var(--serif); font-size: clamp(1.3rem, 2.5vw, 1.9rem); font-weight: 400; color: var(--ink); line-height: 1.22; margin-bottom: .35rem; }
.modal-byline { font-size: .75rem; color: var(--mid); margin-bottom: 1.8rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--rule); }
.modal-body h2 { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--ink); margin: 2rem 0 .7rem; }
.modal-body p { font-family: var(--serif); font-size: .95rem; line-height: 1.92; color: var(--charcoal); margin-bottom: 1.1rem; }
.modal-body ul { padding-left: 1.1rem; margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: .5rem; }
.modal-body li { font-family: var(--serif); font-size: .9rem; color: var(--charcoal); line-height: 1.7; }
.modal-body strong { color: var(--ink); }

/* ═══════════════════════════════════════════════════════════════
   PUBLICATIONS & EVENTS
═══════════════════════════════════════════════════════════════ */
.events-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5px; background: var(--rule); border: 1.5px solid var(--rule); border-radius: 4px; overflow: hidden; }

.media-list { display: flex; flex-direction: column; }
.media-item {
  display: flex; align-items: center; gap: 1.4rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none; color: inherit;
  transition: opacity .2s;
}
.media-item:last-child { border-bottom: none; }
.media-item:hover .media-title { color: var(--gold); }
.media-num { font-family: var(--serif); font-size: 1.8rem; font-weight: 300; color: var(--rule); min-width: 3rem; line-height: 1; flex-shrink: 0; }
.media-src { font-size: .6rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: .3rem; }
.media-title { font-family: var(--serif); font-size: .98rem; color: var(--ink); line-height: 1.38; transition: color .2s; }

.cta-band {
  background: var(--ink);
  padding: 4rem 3rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap;
}
.cta-band p { font-family: var(--serif); font-size: clamp(.95rem, 1.8vw, 1.4rem); color: rgba(255,255,255,.7); max-width: 500px; line-height: 1.5; }

/* ═══════════════════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════════════════ */
.contact-layout { display: grid; grid-template-columns: 1fr 22rem; gap: 4rem; align-items: start; }

.form-title { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; color: var(--ink); margin-bottom: 1.8rem; }
.contact-form { display: flex; flex-direction: column; gap: .9rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group label { font-size: .6rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mid); }
.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--sans);
  font-size: .88rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: .72rem 1rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(0,0,0,.28); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-pale); }
.form-group select { appearance: none; cursor: pointer; }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: .72rem; color: var(--mid); font-style: italic; }
.form-note code { background: var(--ivory); padding: .1rem .4rem; border-radius: 2px; font-style: normal; }

.contact-aside { display: flex; flex-direction: column; gap: .9rem; }
.contact-card { background: var(--white); border: 1px solid var(--rule); border-radius: 4px; padding: 1.4rem 1.5rem; }
.contact-card h3 { font-size: .6rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: .8rem; }
.contact-card p { font-size: .83rem; color: var(--mid); line-height: 1.7; margin-bottom: .35rem; }
.contact-card a { color: var(--gold); font-size: .83rem; transition: opacity .2s; }
.contact-card a:hover { opacity: .75; }
.contact-links { display: flex; flex-direction: column; gap: .45rem; margin-top: .4rem; }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding: 1.4rem 3rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .8rem;
  font-size: .72rem; color: var(--mid);
}
.site-footer a { color: var(--mid); margin-left: 1.2rem; transition: color .2s; }
.site-footer a:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════════
   REVEAL ANIMATION  — one motion, no cascade spam
═══════════════════════════════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s var(--ease), transform .65s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  :root { --panel-w: 290px; }
  .section-pad { padding: 4rem 2.2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid, .events-grid { grid-template-columns: repeat(2, 1fr); }
  .roles-grid { grid-template-columns: 1fr; }
  .contrib-grid { grid-template-columns: repeat(2, 1fr); }
  .key-metrics { grid-template-columns: repeat(2, 1fr); }
  .quote-split { grid-template-columns: 1fr; }
  .quote-split img { height: 220px; }
  .event-strip { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --panel-w: 0px; }

  .identity-panel {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 240px;
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: wrap;
    padding: 1.8rem 1.4rem;
    z-index: 10;
  }
  .identity-panel::before { filter: brightness(.55) contrast(1.06); }
  .panel-copy { flex: 1; min-width: 200px; }
  .panel-footer { display: none; }
  .page-shell { flex-direction: column; }
  .content-wrap { margin-left: 0; }

  .site-header { padding: 0 1.4rem; justify-content: space-between; z-index: 150; }
  .brand-mobile { display: block; }
  .menu-toggle { display: flex; }
  .site-nav { display: none; }
  .mobile-drawer { left: 0; right: 0; top: 100%; z-index: 150; padding: .9rem 1.4rem 1.2rem; }

  .section-pad { padding: 3rem 1.4rem; }
  .section-sm { padding: 1.8rem 1.4rem; }
  .lessons-intro { padding: 2.5rem 1.4rem 1.4rem; }
  .cta-band { padding: 3rem 1.4rem; flex-direction: column; align-items: flex-start; }
  .quote-panel { padding: 4rem 1.4rem; }
  .legacy-close { padding: 3rem 1.4rem; }
  .site-footer { padding: 1.2rem 1.4rem; flex-direction: column; align-items: flex-start; }
  .site-footer a { margin-left: 0; margin-right: 1rem; }

  .card-grid, .events-grid { grid-template-columns: 1fr; }
  .event-strip { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .contrib-grid { grid-template-columns: 1fr; }
  .roles-grid { grid-template-columns: 1fr; }
  .key-metrics { grid-template-columns: repeat(2, 1fr); }
  .tl-item { grid-template-columns: 1fr; gap: .3rem; }
  .form-row { grid-template-columns: 1fr; }

  .modal-content { padding: 1.4rem 1.2rem 2.5rem; }
  .modal-photo { height: 180px; }
  .section-heading.split { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  dialog.essay-modal { transition: none; }
  .card-img, .card:hover .card-img { transition: none; transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   YOUTUBE GRID
═══════════════════════════════════════════════════════════════ */
.yt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.yt-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.yt-card:hover { border-color: var(--gold); box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.yt-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #111;
}
.yt-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}
.yt-card:hover .yt-thumb img { transform: scale(1.04); }
.yt-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  font-size: 2.5rem;
  color: rgba(255,255,255,.9);
  transition: background .2s;
}
.yt-card:hover .yt-play { background: rgba(184,137,42,.55); }
.yt-body { padding: 1.1rem 1.2rem 1.3rem; }
.yt-tag { font-size: .6rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: .4rem; }
.yt-title { font-family: var(--serif); font-size: .98rem; color: var(--ink); line-height: 1.4; margin-bottom: .4rem; }
.yt-title a { color: var(--ink); transition: color .2s; }
.yt-title a:hover { color: var(--gold); }
.yt-desc { font-size: .75rem; color: var(--mid); line-height: 1.6; }

@media (max-width: 1100px) { .yt-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .yt-grid { grid-template-columns: 1fr; } }


/* ── Adobe PDF media link ─────────────────────────── */
.media-item.pdf .media-title::after {
  content: ' (PDF)';
  font-size: .7rem;
  color: var(--gold);
  margin-left: .3rem;
}
