/* James Benham — personal site. Brand: navy + maroon, white/cream background, Playfair + Inter. */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --navy: #090D47;
  --navy-soft: #1a1f5e;
  --maroon: #500A06;
  --maroon-soft: #7a1a14;
  --cream: #FAF8F4;
  --ink: #15191E;
  --ink-soft: #3a4048;
  --gray: #5a5f68;
  --rule: #e6e1d6;
  --rule-soft: #f0ecdf;
  --gold: #C8A14A;
  --max: 1180px;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', 'Helvetica Neue', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--maroon); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy);
}
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 900; }
h2 { font-size: clamp(1.9rem, 4vw, 3.1rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.85rem); }
h4 { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
p { margin-bottom: 1.1rem; max-width: 65ch; }
p.lead { font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.55; font-style: italic; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: 0.85rem;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.7rem;
  border-radius: 2px;
  transition: all .18s ease;
  cursor: pointer;
  border: 1.5px solid transparent;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.2;
}
.btn-primary { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.btn-primary:hover { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn-ghost:hover { background: var(--cream); color: var(--navy); }

/* ============ HEADER / NAV ============ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 244, 0.94);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-nav .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.brand img.wordmark { height: 48px; width: auto; max-width: 100%; display: block; }
.brand .sr { position: absolute; left: -9999px; }
@media (max-width: 540px) {
  .brand img.wordmark { height: 38px; }
}
nav.main ul { list-style: none; display: flex; gap: 1.6rem; font-size: 0.92rem; font-weight: 500; align-items: center; }
nav.main a { color: var(--ink-soft); padding: 0.25rem 0; position: relative; }
nav.main a:hover, nav.main a.active { color: var(--navy); }
nav.main a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--maroon);
}
nav.main a.cta { color: var(--cream); background: var(--navy); padding: 0.55rem 1.1rem; border-radius: 2px; }
nav.main a.cta:hover { background: var(--maroon); color: var(--cream); }
nav.main a.cta::after { display: none; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--navy); }
@media (max-width: 880px) {
  nav.main ul { display: none; }
  .menu-toggle { display: block; }
  nav.main.open ul {
    display: flex; flex-direction: column; gap: 0.6rem;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 12px 24px rgba(0,0,0,0.05);
  }
}

/* ============ HERO ============ */
.hero { padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: 1.6rem; }
.hero h1 .accent { color: var(--maroon); font-style: italic; }
.hero-tagline { max-width: 540px; margin-bottom: 2rem; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: 2.25rem; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.04em; color: var(--ink-soft);
}
.hero-meta span { padding: 0.35rem 0.85rem; background: #fff; border: 1px solid var(--rule); border-radius: 30px; }
.hero-cta { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.hero-photo {
  position: relative; aspect-ratio: 4/5; border-radius: 4px; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  box-shadow: 0 30px 60px rgba(9, 13, 71, 0.22);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after {
  content: ''; position: absolute; right: -1px; bottom: -1px;
  width: 38%; height: 6px; background: var(--maroon);
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-photo { max-width: 380px; margin: 0 auto; }
}

/* ============ SECTIONS ============ */
.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section-light { background: #fff; }
.section-navy {
  background: var(--navy); color: var(--cream);
  position: relative;
}
.section-navy h1, .section-navy h2, .section-navy h3 { color: #fff; }
.section-navy .eyebrow { color: var(--gold); }
.section-navy::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 6px; background: var(--maroon);
}
.section-cream { background: var(--cream); }
.section-title-block { max-width: 760px; margin-bottom: 3rem; }
.section-title-block h2 { margin-bottom: 0.5rem; }

/* ============ PAGE HERO (smaller, for inner pages) ============ */
.page-hero {
  background: var(--navy); color: var(--cream);
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
  position: relative; overflow: hidden;
  border-bottom: 6px solid var(--maroon);
}
.page-hero h1 { color: #fff; max-width: 800px; }
.page-hero .eyebrow { color: var(--gold); }
.page-hero p.lead { color: rgba(250, 248, 244, 0.85); max-width: 720px; }
.page-hero::after {
  content: 'JB'; position: absolute; right: -2.5rem; bottom: -3rem;
  font-family: var(--serif); font-size: clamp(14rem, 22vw, 22rem);
  font-weight: 900; color: rgba(255, 255, 255, 0.05);
  line-height: 0.8; letter-spacing: -0.04em;
  pointer-events: none;
}

/* ---- Primary button for dark hero backgrounds ---- */
.btn-hero-primary { background: var(--cream); color: var(--navy); border-color: var(--cream); }
.btn-hero-primary:hover { background: #fff; color: var(--navy); border-color: #fff; }

/* ---- Hero split layout (page hero with side visual) ---- */
.page-hero .hero-split { display: flex; flex-direction: row; align-items: center; gap: 2.5rem; }
.page-hero .hero-split__text { flex: 1; min-width: 0; }
.page-hero .hero-split__visual { flex-shrink: 0; display: flex; flex-direction: column; gap: 0.75rem; align-items: center; }
@media (max-width: 719px) {
  .page-hero .hero-split { flex-direction: column; gap: 1.25rem; }
  .page-hero .hero-split__visual { flex-direction: row; align-self: flex-start; }
}
.hero-book-covers { display: flex; gap: 0.65rem; }
.hero-book-covers img { height: 140px; width: auto; border-radius: 4px; box-shadow: 0 8px 28px rgba(0,0,0,.4); }
@media (max-width: 719px) { .hero-book-covers img { height: 80px; } }
.hero-headshot-round {
  width: 160px; height: 160px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 8px 28px rgba(0,0,0,.4); border: 3px solid rgba(255,255,255,.18);
}
@media (max-width: 719px) { .hero-headshot-round { width: 80px; height: 80px; } }
.hero-podcast-cover {
  width: 150px; height: 150px; border-radius: 14px; object-fit: cover;
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
}
@media (max-width: 719px) { .hero-podcast-cover { width: 80px; height: 80px; border-radius: 8px; } }

/* ---- Sticky availability bar (mobile only, speaking.html) ---- */
.speaking-sticky {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--navy); border-top: 3px solid var(--maroon);
  padding: 0.9rem clamp(1rem, 4vw, 1.5rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,.25);
  transform: translateY(100%); transition: transform .3s ease;
}
.speaking-sticky.visible { transform: translateY(0); }
.speaking-sticky__text { color: rgba(250,248,244,.85); font-size: 0.82rem; font-weight: 500; line-height: 1.3; flex: 1; }
.speaking-sticky__text strong { color: #fff; display: block; font-size: 0.88rem; }
@media (min-width: 768px) { .speaking-sticky { display: none; } }

/* ============ GRIDS ============ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2vw, 1.75rem); }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 881px) and (max-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
/* Inner-page asymmetric two-column layouts: wider second column on desktop,
   single stacked column on mobile. Replaces inline grid-template-columns that
   overrode the <=880px .grid-2 stacking and squished the layout on phones. */
@media (min-width: 881px) {
  .grid-2.contact-split { grid-template-columns: 1fr 1.2fr; }
  .grid-2.bio-split { grid-template-columns: 1fr 1.4fr; }
}

/* ============ BLOG POST BODY ============ */
.post-body { line-height: 1.75; }
.post-body p { margin: 0 0 1.2rem; }
.post-body h2, .post-body h3, .post-body h4 { font-family: var(--serif); color: var(--navy); margin: 2rem 0 .75rem; line-height: 1.2; }
.post-body ul, .post-body ol { margin: 0 0 1.2rem 1.25rem; }
.post-body li { margin: 0 0 .5rem; }
.post-body img { max-width: 100%; height: auto; border-radius: 4px; }
.post-body a { color: var(--maroon); text-decoration: underline; }
.post-body blockquote { border-left: 3px solid var(--maroon); margin: 1.5rem 0; padding-left: 1.25rem; font-style: italic; color: var(--ink-soft); }
.post-body figure { margin: 1.5rem 0; }
.post-body figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: .4rem; }

/* ============ PAST ENGAGEMENTS (collapsible by year) ============ */
.year-group { border-bottom: 1px solid var(--rule); }
.year-group > summary {
  cursor: pointer; list-style: none; padding: 1rem 0;
  font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--navy);
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
}
.year-group > summary::-webkit-details-marker { display: none; }
.year-group > summary::before { content: "+"; color: var(--maroon); font-family: var(--sans); margin-right: .6rem; }
.year-group[open] > summary::before { content: "–"; }
.year-group[open] > summary { color: var(--maroon); }
.year-group .count { font-family: var(--sans); font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
.year-group ul { columns: 2; column-gap: 2.5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.year-group li { margin: 0 0 .65rem; font-size: .92rem; break-inside: avoid; color: var(--ink); }
.year-group li .ev-date { color: var(--ink-soft); font-weight: 600; }
@media (max-width: 680px) { .year-group ul { columns: 1; } }

/* ============ CARDS ============ */
.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 2rem;
  transition: all .2s ease;
}
a.card:hover, .card--link:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(9,13,71,0.08); border-color: var(--navy); }
a.card { text-decoration: none; display: block; color: inherit; }
.card .num {
  font-family: var(--serif); font-size: 3rem; font-weight: 900;
  color: var(--maroon); line-height: 1; margin-bottom: 0.5rem; display: block;
}
.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 0; }

/* ============ FEATURE BOOK BLOCK ============ */
.feature-book {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.feature-book .cover {
  aspect-ratio: 5/8;
  box-shadow: 0 24px 50px rgba(9, 13, 71, 0.18);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.feature-book .cover.styled {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff; padding: 2.25rem 1.85rem;
  flex-direction: column; justify-content: space-between;
  text-align: center; font-family: var(--sans);
}
.feature-book .cover.styled .stamp { font-size: 0.7rem; letter-spacing: 0.22em; color: var(--gold); font-weight: 700; border-bottom: 2px solid var(--gold); padding-bottom: 0.7rem; }
.feature-book .cover.styled .title {
  font-family: var(--serif); font-size: 2.5rem; font-weight: 900;
  line-height: 0.95; letter-spacing: 0.04em; margin: 0.5rem 0 0.75rem;
}
.feature-book .cover.styled .sub { font-style: italic; font-size: 0.78rem; line-height: 1.45; color: rgba(255,255,255,0.85); }
.feature-book .cover.styled .year { font-size: 0.7rem; letter-spacing: 0.18em; color: var(--gold); font-weight: 700; border-top: 2px solid var(--gold); padding-top: 0.7rem; }
.feature-book .cover img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.feature-book .meta { font-size: 0.84rem; color: var(--gray); margin-top: 1rem; }
@media (max-width: 720px) {
  .feature-book { grid-template-columns: 1fr; }
  .feature-book .cover { max-width: 280px; margin: 0 auto; }
}

/* ============ TIMELINE (bio) ============ */
.timeline { position: relative; padding-left: 2.5rem; }
.timeline::before {
  content: ''; position: absolute; left: 0.65rem; top: 0; bottom: 0;
  width: 2px; background: var(--rule);
}
.timeline-item { position: relative; padding-bottom: 2.5rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute; left: -2.5rem; top: 0.4rem;
  width: 14px; height: 14px; background: var(--maroon); border-radius: 50%;
  border: 3px solid var(--cream);
}
.timeline-item .year { font-family: var(--serif); font-weight: 900; font-size: 1.4rem; color: var(--navy); }

/* ============ LOGO STRIP ============ */
.logo-strip {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.5rem;
  align-items: center; opacity: 0.92;
}
.logo-strip img { max-height: 50px; width: auto; margin: 0 auto; filter: grayscale(0.15); }
@media (max-width: 720px) { .logo-strip { grid-template-columns: repeat(3, 1fr); } }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--navy); color: rgba(250, 248, 244, 0.85);
  padding: 4rem 0 2rem; margin-top: 4rem;
  border-top: 6px solid var(--maroon);
}
.site-footer a { color: rgba(250, 248, 244, 0.85); }
.site-footer a:hover { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .footer-brand .brand { color: #fff; }
.site-footer .footer-brand p { font-size: 0.92rem; margin-top: 1rem; opacity: 0.8; max-width: 320px; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 0.55rem; font-size: 0.92rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.82rem; opacity: 0.7; flex-wrap: wrap; gap: 1rem; }
.social-row { display: flex; gap: 0.5rem; margin-top: 1rem; }
.social-row a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0;
}
.social-row a:hover { background: var(--maroon); border-color: var(--maroon); color: #fff; }

/* ============ UTILITY ============ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 2rem; }
.divider { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }
.accent-line { width: 50px; height: 3px; background: var(--maroon); margin-bottom: 1.25rem; }

/* Quote callouts */
blockquote.pull {
  border-left: 3px solid var(--maroon);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--serif); font-size: 1.3rem; line-height: 1.45;
  font-style: italic; color: var(--navy);
  max-width: 720px;
}
blockquote.pull cite { display: block; font-family: var(--sans); font-style: normal; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); margin-top: 0.6rem; letter-spacing: 0.02em; }
