/* public/css/main.css */

/* ── Reset & base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

:root {
  --color-bg:       #fafafa;
  --color-surface:  #ffffff;
  --color-text:     #111111;
  --color-muted:    #666666;
  --color-border:   #e2e2e2;
  --color-accent:   #010101;
  --color-accent2:  #286d00;  /* the green from the existing site gradient */
  --color-link:     #010101;

  --font-body:  'Georgia', serif;
  --font-ui:    system-ui, -apple-system, sans-serif;

  --max-w:      1160px;
  --max-w-narrow: 740px;
  --gap:        2rem;
  --radius:     4px;

  --header-h:   64px;
}

body {
  font-family: var(--font-ui);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ────────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container-narrow { max-width: var(--max-w-narrow); }

.section {
  padding: 5rem 0;
}

/* ── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-ui);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

.prose { font-family: var(--font-body); font-size: 1.1rem; line-height: 1.75; }
.prose p + p { margin-top: 1em; }
.prose h2 { margin: 2em 0 0.5em; }
.prose h3 { margin: 1.5em 0 0.4em; }
.prose a { color: var(--color-accent2); }
.prose ul, .prose ol { padding-left: 1.5em; margin: 1em 0; }
.prose li + li { margin-top: 0.4em; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose blockquote { border-left: 4px solid var(--color-accent2); padding-left: 1em; color: var(--color-muted); margin: 1.5em 0; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .6em 1.4em;
  border-radius: 25px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-primary:hover { background: #333; border-color: #333; }
.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.btn-outline:hover { background: var(--color-accent); color: #fff; }

/* ── Header / Nav ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(250, 250, 250, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--color-text);
  letter-spacing: -0.03em;
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.site-nav a {
  text-decoration: none;
  color: var(--color-muted);
  font-size: .875rem;
  font-weight: 500;
  transition: color .15s;
}
.site-nav a:hover { color: var(--color-text); }
.site-nav .nav-cta {
  background: var(--color-accent);
  color: #fff;
  padding: .4em 1em;
  border-radius: 25px;
}
.site-nav .nav-cta:hover { background: #333; color: #fff; }
.nav-toggle { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  padding: 8rem 0 6rem;
  background: linear-gradient(180deg, #286d00 0%, #010101 29%);
  color: #fff;
}
.hero-eyebrow { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; opacity: .7; margin-bottom: .5rem; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero-lead { font-size: 1.25rem; max-width: 580px; margin-bottom: .5rem; opacity: .9; }
.hero p { max-width: 580px; opacity: .8; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2.5rem; flex-wrap: wrap; }
.hero .btn-primary { background: #fff; color: #010101; border-color: #fff; }
.hero .btn-primary:hover { background: #eee; }
.hero .btn-outline { border-color: rgba(255,255,255,.5); color: #fff; }
.hero .btn-outline:hover { background: rgba(255,255,255,.1); }

/* ── Page hero (sub-pages) ─────────────────────────────────────────────────── */
.page-hero {
  padding: 5rem 0 3rem;
  background: var(--color-accent);
  color: #fff;
}
.page-hero h1 { color: #fff; }
.page-hero .hero-subtitle { color: rgba(255,255,255,.8); margin-top: .5rem; font-size: 1.15rem; }
.page-hero .speaking-meta, .page-hero time { color: rgba(255,255,255,.6); font-size: .875rem; margin-top: .75rem; display: flex; gap: 1rem; align-items: center; }
.page-hero .hero-eyebrow { color: rgba(255,255,255,.6); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .5rem; }

/* ── Section headings ──────────────────────────────────────────────────────── */
.section-title { margin-bottom: 2.5rem; }
.section-cta { margin-top: 2.5rem; }

/* ── Speaking grid ─────────────────────────────────────────────────────────── */
.speaking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--gap);
}
.speaking-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.speaking-card-thumb { display: block; aspect-ratio: 16/9; overflow: hidden; position: relative; }
.speaking-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.speaking-card-thumb:hover img { transform: scale(1.03); }
.play-badge { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.35); color: #fff; font-size: 2rem; opacity: 0; transition: opacity .2s; }
.speaking-card-thumb:hover .play-badge { opacity: 1; }
.speaking-card-body { padding: 1.25rem; }
.speaking-card-title { font-size: 1rem; margin-bottom: .25rem; }
.speaking-card-title a { text-decoration: none; color: var(--color-text); }
.speaking-card-sub { color: var(--color-muted); font-size: .875rem; margin-bottom: .25rem; }
.speaking-card-event { font-size: .8rem; color: var(--color-muted); }
.speaking-card-date { font-size: .8rem; color: var(--color-muted); display: block; margin-top: .25rem; }

/* ── Post grid ─────────────────────────────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}
.post-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.post-card-thumb { display: block; aspect-ratio: 16/9; overflow: hidden; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 1.25rem; }
.post-card-body h2, .post-card-body h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.post-card-body h2 a, .post-card-body h3 a { text-decoration: none; color: var(--color-text); }
.post-card-body p { color: var(--color-muted); font-size: .875rem; margin-bottom: .75rem; }
.post-card-body time { font-size: .8rem; color: var(--color-muted); }
.post-back { padding: 2rem 0; border-top: 1px solid var(--color-border); }
.post-back a { color: var(--color-muted); text-decoration: none; font-size: .875rem; }
.post-back a:hover { color: var(--color-text); }

/* ── Project grid ──────────────────────────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}
.project-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.project-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.project-card-body { padding: 1.25rem; }
.project-card-body h2 { font-size: 1.05rem; margin-bottom: .25rem; }
.project-card-body h2 a { text-decoration: none; color: var(--color-text); }
.project-sub { color: var(--color-muted); font-size: .875rem; }
.project-status { display: inline-block; font-size: .7rem; padding: .2em .6em; border-radius: 999px; text-transform: uppercase; font-weight: 600; margin-bottom: .5rem; }
.project-status-active { background: #e6f4ea; color: #1a6b2b; }
.project-status-wip { background: #fff8e1; color: #7a5c00; }
.project-status-completed { background: #f0f0f0; color: #555; }
.project-ext-link { font-size: .875rem; color: var(--color-accent2); text-decoration: none; margin-top: .75rem; display: inline-block; }

/* ── Podcast ───────────────────────────────────────────────────────────────── */
.podcast-list { display: flex; flex-direction: column; gap: 1.5rem; }
.podcast-item { display: flex; gap: 1.25rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem; }
.podcast-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }
.ep-num { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--color-muted); }
.podcast-meta h2 { font-size: 1.05rem; margin: .2rem 0 .4rem; }
.podcast-meta h2 a { text-decoration: none; color: var(--color-text); }
.podcast-foot { font-size: .8rem; color: var(--color-muted); display: flex; gap: 1rem; margin-top: .5rem; }
.audio-section { padding: 2rem 0; }
.audio-player { width: 100%; height: 54px; }

/* ── Video embeds ──────────────────────────────────────────────────────────── */
.video-section { background: #000; padding: 2rem 0; }
.video-wrapper video { max-width: 100%; display: block; }
.embed-wrapper { position: relative; aspect-ratio: 16/9; }
.embed-wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── Contact form ──────────────────────────────────────────────────────────── */
.contact-section { background: var(--color-bg); }
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .375rem; }
.form-group label { font-size: .875rem; font-weight: 600; }
.form-group input, .form-group textarea {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: .65em .85em;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}
.form-group textarea { resize: vertical; }
.alert { padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.alert-success { background: #e6f4ea; color: #1a6b2b; }
.alert-error { background: #fdecea; color: #b71c1c; }
.alert ul { margin: 0; padding-left: 1.25em; }

/* ── Hire CTA section ──────────────────────────────────────────────────────── */
.hire-cta {
  background: var(--color-accent);
  color: #fff;
  text-align: center;
  padding: 5rem 0;
}
.hire-cta h2, .hire-cta p { color: #fff; }
.hire-cta p { margin: 1rem auto 2rem; max-width: 500px; opacity: .85; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
  background: #111;
  color: #ccc;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--gap);
  margin-bottom: 3rem;
}
.footer-about strong { color: #fff; font-size: 1rem; display: block; margin-bottom: .5rem; }
.footer-about p { font-size: .875rem; opacity: .7; max-width: 280px; }
.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer-nav a { color: #ccc; text-decoration: none; font-size: .875rem; }
.footer-nav a:hover { color: #fff; }
.footer-social a { color: #ccc; font-size: .875rem; }
.footer-bottom { border-top: 1px solid #2a2a2a; padding-top: 1.5rem; font-size: .8rem; opacity: .5; }

/* ── Misc ──────────────────────────────────────────────────────────────────── */
.empty-state { color: var(--color-muted); text-align: center; padding: 4rem 0; }
.muted { color: var(--color-muted); }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-nav ul { display: none; flex-direction: column; position: fixed; inset: var(--header-h) 0 0; background: #fff; padding: 2rem; gap: 1.5rem; z-index: 99; }
  .site-nav ul.open { display: flex; }
  .nav-toggle { display: flex; background: none; border: none; cursor: pointer; padding: .5rem; }
  .hamburger, .hamburger::before, .hamburger::after {
    display: block; width: 22px; height: 2px; background: var(--color-text);
    position: relative; transition: transform .2s;
  }
  .hamburger::before, .hamburger::after { content: ''; position: absolute; }
  .hamburger::before { top: -6px; }
  .hamburger::after { top: 6px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 5rem 0 4rem; }
  .speaking-grid { grid-template-columns: 1fr; }
}
