/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --navy:        #111111;
  --navy-mid:    #111111;
  --navy-light:  #3D3D3D;
  --gold:        #1E293B;
  --gold-light:  #2D3F52;
  --steel:       #1E293B;
  --muted:       #696969;
  --page-bg:     #F7F6F3;
  --surface:     #FFFFFF;
  --surface-2:   #F0EFE9;
  --text:        #111111;
  --text-mid:    #4A4A4A;
  --line:        #E4E0D8;

  --header-h:    68px;
  --maxw:        1140px;
  --px:          1.25rem;
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;

  --shadow-sm:   0 1px 3px rgba(26,26,26,.07), 0 1px 2px rgba(26,26,26,.04);
  --shadow-md:   0 4px 16px rgba(26,26,26,.10), 0 1px 4px rgba(26,26,26,.06);
  --shadow-lg:   0 12px 40px rgba(26,26,26,.15);

  --font-body:   'Inter', system-ui, sans-serif;
  --font-display:'Playfair Display', Georgia, serif;

  --ease:        cubic-bezier(.25,.46,.45,.94);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--page-bg);
}

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

a { color: var(--gold); text-decoration: none; }

section[id] { scroll-margin-top: var(--header-h); }

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--px);
}

.section-pad { padding-block: 6rem; }

.section-eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #1E293B;
  margin-bottom: .75rem;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: #111111;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 560px;
  margin-bottom: 3rem;
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(247, 246, 243, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #E4E0D8;
  transition: box-shadow .3s;
}

.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(26,26,26,.35);
}

.header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.header-inner .header-socials {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.header-inner .primary-nav {
  justify-self: center;
}

.header-inner .header-cta {
  justify-self: end;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #fff;
  flex-shrink: 0;
}
.logo img {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}
.brand {
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .03em;
}

/* Nav */
.menu {
  list-style: none;
  display: flex;
  gap: .25rem;
}
.menu a {
  color: rgba(26,26,26,.75);
  font-size: .9rem;
  font-weight: 500;
  padding: .45rem .75rem;
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}
.menu a:hover {
  color: #111111;
  background: rgba(0,0,0,.06);
}

/* CTA */
.header-cta {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background: #1E293B;
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  padding: .55rem 1.25rem;
  border-radius: 999px;
  transition: background .2s, transform .15s;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn-primary:hover { background: #2D4A6B; transform: translateY(-1px); color: #fff; }

.btn-ghost {
  display: inline-block;
  color: #4A4A4A;
  font-weight: 500;
  font-size: .9rem;
  padding: .55rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.2);
  transition: border-color .2s, color .2s, background .2s;
}
.btn-ghost:hover { border-color: rgba(0,0,0,.4); color: #111111; background: rgba(0,0,0,.04); }

.cta-btn {
  display: inline-block;
  background: #111111;
  color: #fff;
  font-weight: 600;
  font-size: .875rem;
  padding: .45rem 1.1rem;
  border-radius: 999px;
  transition: background .2s;
}
.cta-btn:hover { background: #333; color: #fff; }

/* Burger */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: .4rem;
}
.burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}
.burger span {
  display: block;
  height: 2px;
  background: #111111;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

.site-header.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.menu-open .burger span:nth-child(2) { opacity: 0; }
.site-header.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: #F7F6F3;
  border-bottom: 1px solid #E4E0D8;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-block: 8rem 6rem;
  max-width: 680px;
}

.hero-eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  display: block;
  transition-delay: .05s;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 1.0;
  margin-bottom: 1.5rem;
  transition-delay: .12s;
}
.hero-title-light {
  color: #111111;
  font-weight: 700;
}
.hero-title-bold {
  color: rgba(26,26,26,.62); /* was .25 — 1.70:1, failed AA. .62 gives 4.75:1 */
  font-weight: 700;
}

.hero-sub {
  font-size: 1.1rem;
  color: #4A4A4A;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 520px;
  transition-delay: .2s;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  transition-delay: .28s;
}

/* ============================================================
   STAT STRIP
   ============================================================ */
.stat-strip {
  background: #1E293B;
  border-top: 1px solid rgba(255,255,255,.07);
}
.stat-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-block: 2.25rem;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: .5rem 2rem;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1;
}
.stat-label {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-top: .35rem;
}
.stat-divider {
  width: 1px;
  height: 44px;
  background: rgba(255,255,255,.1);
  flex-shrink: 0;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-section { background: #F7F6F3; }

.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 5rem;
  align-items: start;
}

.about-body {
  color: var(--text-mid);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* ============================================================
   CAREER TIMELINE
   Default (no JS, mobile, or prefers-reduced-motion): a plain
   horizontally-swipeable strip — accessible and functional with
   zero JS. script.js progressively enhances it on desktop by
   adding .career-pinned, which inflates the section height and
   makes .career-pin position:sticky so normal vertical scroll
   drives a translateX() on .career-track until it's exhausted,
   then scroll continues past the section as usual. No wheel-event
   hijacking — it rides the browser's real scroll, so trackpad
   momentum, keyboard paging and screen readers all keep working.
   ============================================================ */
.career-section {
  background: var(--page-bg);
  border-top: 1px solid var(--line);
  position: relative;
}
.career-pin {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.career-intro {
  flex-shrink: 0;
  padding-bottom: 1.5rem;
}
.career-hint {
  font-size: .85rem;
  color: var(--muted);
  margin-top: .5rem;
}
.career-track-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding-bottom: 1rem;
  width: 100%;
}
.career-track {
  --stop-w: 300px;
  --stop-gap: 4.5rem;
  display: flex;
  gap: var(--stop-gap);
  padding-inline: var(--px, 1.5rem);
  width: max-content;
}
.career-stop {
  flex: 0 0 var(--stop-w);
  position: relative;
  padding-top: 2.25rem;
  scroll-snap-align: start;
}
.career-stop::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--stop-w) + var(--stop-gap));
  height: 2px;
  background: var(--line);
}
.career-stop:last-child::before { width: var(--stop-w); }
.career-dot {
  display: block;
  position: absolute;
  top: -5px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--page-bg);
}
.career-year {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: .6rem;
}
.career-role {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: .3rem;
}
.career-org {
  display: block;
  font-size: .88rem;
  color: var(--muted);
}
.career-progress {
  display: none;
  flex-shrink: 0;
  margin-top: 2.5rem;
  margin-inline: var(--px, 1.5rem);
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.career-progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
}

/* Pinned/scroll-jacked enhancement — added by JS on desktop only,
   never when prefers-reduced-motion or the mobile breakpoint apply. */
.career-pinned .career-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 480px;
  overflow: hidden;
}
.career-pinned .career-track-viewport {
  overflow: hidden;
}
.career-pinned .career-track {
  will-change: transform;
}
.career-pinned .career-hint { display: none; }
.career-pinned .career-progress { display: block; }

/* ============================================================
   SKILLS
   Built from var(--navy)/var(--gold)/var(--text-mid)/var(--line)
   only, so it cascades correctly through dark mode with no
   per-theme overrides. Same background as About (they read as one
   chapter — bio, then career, then skills) with a hairline on top
   for a soft break instead of a hard color change.
   ============================================================ */
.skills-section {
  background: var(--page-bg);
  border-top: 1px solid var(--line);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 1rem;
}

.skills-col-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.1rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--gold);
}

.skills-list { list-style: none; }
.skills-list li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: .65rem;
  color: var(--text-mid);
  font-size: .97rem;
  line-height: 1.5;
}
.skills-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* ============================================================
   SERVICES
   ============================================================ */
.services-section { background: #F0EFE9; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 2rem 2rem 2rem 2rem;
  transition: box-shadow .25s, transform .35s cubic-bezier(.2,.8,.2,1), border-color .25s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--steel));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.service-card:hover { box-shadow: var(--shadow-md); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  filter: grayscale(100%);
  transition: filter .25s ease;
}
.service-card:hover .service-icon { filter: grayscale(0%); }
.service-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .6rem;
}
.service-body { font-size: .95rem; color: var(--text-mid); line-height: 1.65; text-align: justify; text-justify: inter-word; hyphens: auto; }

/* ============================================================
   DOWNLOADS
   ============================================================ */
.downloads-section { background: #F7F6F3; }

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.download-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: box-shadow .25s, transform .35s cubic-bezier(.2,.8,.2,1);
  position: relative;
  overflow: hidden;
}
.download-card:hover { box-shadow: var(--shadow-md); }

.download-badge {
  display: inline-block;
  background: rgba(30,41,59,.12);
  color: var(--gold);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .25rem .65rem;
  border-radius: 999px;
  width: fit-content;
}
.download-icon {
  font-size: 2.2rem;
  filter: grayscale(100%);
  transition: filter .25s ease;
}
.download-card:hover .download-icon { filter: grayscale(0%); }
.download-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}
.download-body { font-size: .9rem; color: var(--text-mid); line-height: 1.65; flex: 1; text-align: justify; text-justify: inter-word; hyphens: auto; }
.download-cta {
  display: inline-block;
  margin-top: .5rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--gold);
  transition: color .2s, gap .2s;
  /* Reset — this is a <button> (it performs an action, not navigation),
     so it needs the link-like look re-declared over browser button chrome. */
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.download-cta:hover { color: var(--navy); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #EDECE7;
  padding-block: 3.5rem 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #111111;
  margin: 0 0 .75rem;
}
.footer-tagline {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 34ch;
  margin: 0;
}
.footer-col-title {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #1E293B;
  margin: 0 0 1.1rem;
}
.footer-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.footer-link-list a {
  font-size: .92rem;
  color: var(--muted);
  transition: color .2s;
}
.footer-link-list a:hover { color: #111111; }
.footer-connect-icons {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: .5rem;
}
.social-icon-btn.is-disabled {
  opacity: .35;
  pointer-events: none;
}
/* GitHub gets a colorful brand-purple hover instead of the plain grey
   treatment the other footer icons use. */
.social-icon-btn.github-icon-btn:hover {
  background: linear-gradient(135deg, #6e5494, #2b6cb0);
  border-color: transparent;
  color: #FFFFFF;
  transform: translateY(-1px) scale(1.06);
}
.footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(0,0,0,.08);
}
.footer-bottom-right { display: flex; align-items: center; justify-content: flex-end; gap: 1.5rem; }
.footer-copy-group { text-align: center; }
.footer-copy {
  font-size: .85rem;
  color: var(--muted); /* was #7A7A7A — 3.63:1 on this background, fails AA */
}
.footer-location {
  font-size: .78rem;
  color: var(--muted); /* opacity: .75 removed — dragged this below AA (2.93:1). Plain --muted is 4.64:1 */
  margin-top: .2rem;
}
.footer-top {
  font-size: .85rem;
  font-weight: 500;
  color: rgba(26,26,26,.65); /* was .45 — 2.84:1, failed AA. .65 gives 5.04:1 */
  transition: color .2s;
}
.footer-top:hover { color: #111111; }

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-photo-col { display: flex; flex-direction: column; align-items: center; }
  .about-photo-wrap { max-width: 240px; }

  .career-track { --stop-w: 230px; --stop-gap: 3rem; }

  .services-grid { grid-template-columns: 1fr; }
  .downloads-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-main { grid-template-columns: 1fr; gap: 2.25rem; }
}

@media (max-width: 768px) {
  .section-pad { padding-block: 4rem; }

  .primary-nav { display: none; }
  .menu-toggle { display: block; }

  .primary-nav.open {
    display: block;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: #F7F6F3;
    border-bottom: 1px solid #E4E0D8;
    border-top: 1px solid #E4E0D8;
    padding: 1rem var(--px) 1.5rem;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
  }
  .primary-nav.open .menu { flex-direction: column; gap: .25rem; }
  .primary-nav.open .menu a { font-size: 1rem; padding: .65rem 1rem; display: block; color: #111111; }
  .primary-nav.open .menu a:hover { background: rgba(0,0,0,.05); color: #111111; }

  .stat-inner { gap: 0; }
  .stat { padding: .75rem 1.5rem; }
  .stat-divider { display: none; }

  .hero-content { padding-block: 6rem 4rem; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-ghost { text-align: center; }
  .footer-bottom { display: flex; flex-direction: column; text-align: center; gap: .85rem; }
}

/* ============================================================
   SOCIAL ICON BUTTONS (header)
   ============================================================ */
.header-socials {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: rgba(26,26,26,.55);
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.1);
  transition: color .2s, background .2s, border-color .2s, transform .15s;
}
.social-icon-btn:hover {
  color: #111111;
  background: rgba(0,0,0,.08);
  border-color: rgba(0,0,0,.2);
  transform: translateY(-1px);
}
.social-icon-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* ============================================================
   SOCIAL LINKS (footer)
   ============================================================ */
.footer-socials {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s;
}
.footer-social-link:hover { color: var(--gold); }
.footer-social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Hide header socials on very small screens to avoid crowding */
@media (max-width: 480px) {
  .header-socials { display: none; }
}

/* ============================================================
   ABOUT PHOTO
   ============================================================ */

.about-photo-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 300px;
}

.about-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-md);
  display: block;
  position: relative;
  z-index: 1;
}

/* Gold accent border — aligned exactly with the photo edges */
.about-photo-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid var(--gold);
  border-radius: var(--radius-md);
  z-index: 2;
  pointer-events: none;
}

@media (max-width: 900px) {
  .about-photo-wrap { max-width: 240px; }
}
/* ============================================================
   POSTS SECTION
   ============================================================ */
.posts-section { background: #F0EFE9; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.25rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
}

/* Gold-to-steel top accent bar — matches service cards */
.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--steel));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.post-card:hover::before { transform: scaleX(1); }

/* Avatar picks up the same LinkedIn brand-colour hover as the header icon */
.post-card:hover .post-avatar {
  background: #0A66C2;
  border-color: #0A66C2;
  color: #fff;
  transform: translateY(-1px);
}

/* Author row */
.post-meta {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.post-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(26,26,26,.55);
  transition: color .2s, background .2s, border-color .2s, transform .15s;
}
.post-avatar svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.post-author {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.post-date {
  display: block;
  font-size: .76rem;
  color: var(--muted);
}

/* Topic tag — matches download-badge style */
.post-tag {
  display: inline-block;
  background: rgba(30,41,59,.12);
  color: var(--gold);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .22rem .6rem;
  border-radius: 999px;
  width: fit-content;
}

/* Excerpt */
.post-body {
  font-size: .92rem;
  color: var(--text-mid);
  line-height: 1.65;
  flex: 1;
}
.post-body strong {
  color: var(--text);
  font-weight: 600;
}

/* Footer row */
.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .65rem;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
/* Brand-new posts with no reactions yet skip that element entirely —
   this keeps "Read more" pinned right instead of stranded on the left. */
.post-footer--solo {
  justify-content: flex-end;
}

.post-reactions {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  color: var(--muted);
}
.post-reactions svg {
  width: 13px;
  height: 13px;
  fill: var(--muted);
  flex-shrink: 0;
}

.post-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gold);
  transition: color .2s;
}
.post-link:hover { color: var(--navy); }
.post-link svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* CTA button row */
.posts-cta {
  display: flex;
  justify-content: center;
}

.posts-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .95rem;
  background: #1E293B;
}
.posts-btn:hover {
  background: #2D3F52;
}
.posts-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .posts-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   AVAILABILITY BADGE
   ============================================================ */
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: rgba(30,41,59,.08);
  border: 1px solid rgba(30,41,59,.2);
  color: #1E293B;
  font-size: .82rem;
  font-weight: 500;
  padding: .4rem .9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  transition-delay: .22s;
}
.avail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74,222,128,.25);
  flex-shrink: 0;
  animation: pulse-green 2s ease-in-out infinite;
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74,222,128,.25); }
  50%       { box-shadow: 0 0 0 6px rgba(74,222,128,.08); }
}
@media (prefers-reduced-motion: reduce) { .avail-dot { animation: none; } }

/* ============================================================
   CERTIFICATION BADGES
   ============================================================ */
.cert-badges {
  display: flex;
  gap: .85rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.cert-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: .85rem .9rem;
  min-width: 90px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  text-decoration: none;
}
.cert-badge:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.cert-abbr {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  text-align: center;
}
.cert-name {
  font-size: .68rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}

/* ============================================================
   SPEAKING SECTION
   ============================================================ */
.speaking-section { background: #ECEAE3; }
.speaking-section .section-eyebrow { color: #1E293B; }
.speaking-section .section-title   { color: #111111; }
.speaking-section .section-intro   { color: #4A4A4A; }

.speaking-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.speaking-card {
  background: #FFFFFF;
  border: 1px solid #E4E0D8;
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: background .25s, border-color .25s;
}
.speaking-card:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(30,41,59,.4);
}
.speaking-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .25rem;
}
.speaking-year {
  font-size: .78rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .06em;
}
.speaking-type {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: rgba(30,41,59,.15);
  color: var(--gold);
  padding: .18rem .55rem;
  border-radius: 999px;
}
.speaking-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111111;
  line-height: 1.3;
  margin: 0;
}
.speaking-org {
  font-size: .88rem;
  font-weight: 600;
  color: var(--steel);
  margin: 0;
}
.speaking-body {
  font-size: .9rem;
  color: #4A4A4A;
  line-height: 1.65;
  flex: 1;
  margin: 0;
}
.speaking-link {
  display: inline-block;
  margin-top: .5rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gold);
  transition: color .2s;
}
.speaking-link:hover { color: var(--gold-light); }

@media (max-width: 768px) {
  .speaking-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   TESTIMONIALS SECTION
   ============================================================ */
.testimonials-section { background: var(--surface-2); }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0;
  position: relative;
  transition: box-shadow .25s, transform .25s;
}
.testimonial-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 1rem; left: 1.5rem;
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 1;
  color: var(--gold);
  opacity: .25;
  pointer-events: none;
}
.testimonial-quote {
  font-size: .95rem;
  color: var(--text-mid);
  line-height: 1.7;
  font-style: italic;
  padding-top: 1.5rem;
  flex: 1;
  margin: 0;
  quotes: none;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line);
}
.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.testimonial-name {
  display: block;
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
}
.testimonial-role {
  display: block;
  font-size: .78rem;
  color: var(--muted);
  margin-top: 1px;
}
@media (max-width: 900px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PRIVACY LINK IN FOOTER
   ============================================================ */
.footer-privacy {
  font-size: .85rem;
  font-weight: 500;
  color: rgba(26,26,26,.65); /* was .45 — 2.84:1, failed AA. .65 gives 5.04:1 */
  transition: color .2s;
}
.footer-privacy:hover { color: #111111; }

/* Testimonial — LinkedIn link */
.testimonial-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gold);
  margin-top: .5rem;
  padding-top: .65rem;
  border-top: 1px solid var(--line);
  transition: color .2s;
  width: 100%;
}
.testimonial-link:hover { color: var(--navy); }
.testimonial-link svg {
  width: 12px; height: 12px;
  stroke: currentColor; fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   APPEARANCES — 3-column grid override
   ============================================================ */
.speaking-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
  .speaking-grid--3 { grid-template-columns: 1fr; }
}

/* ============================================================
   GALLERY SECTION
   ============================================================ */
.gallery-section { background: #07112B; }
.gallery-section .section-eyebrow { color: #1E293B; }
.gallery-section .section-title   { color: #111111; }
.gallery-section .section-intro   { color: #4A4A4A; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 5;
  background: #1A3066;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: var(--radius-md);
  transition: transform .4s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

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

/* ============================================================
   CRISC — gold "in progress" cert badge
   ============================================================ */
.cert-badge--wip {
  border-style: dashed;
  border-color: rgba(30,41,59,.55);
  cursor: default;
}
.cert-badge--wip:hover {
  border-color: rgba(30,41,59,.55);
  transform: none;
  box-shadow: none;
}

.cert-wip-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(30,41,59,.12);
  border: 1px solid rgba(30,41,59,.35);
  color: #1E293B;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .18rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.cert-wip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  animation: pulse-gold-cert 2s ease-in-out infinite;
}
@keyframes pulse-gold-cert {
  0%, 100% { box-shadow: 0 0 0 2px rgba(30,41,59,.3); }
  50%       { box-shadow: 0 0 0 5px rgba(30,41,59,.08); }
}

/* ============================================================
   Download cards — badge + status pill row, green "available" pill
   ============================================================ */
.download-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.avail-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(74,222,128,.1);
  border: 1px solid rgba(74,222,128,.35);
  color: #16a34a;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .18rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.avail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  animation: pulse-green-avail 2s ease-in-out infinite;
}
@keyframes pulse-green-avail {
  0%, 100% { box-shadow: 0 0 0 2px rgba(74,222,128,.3); }
  50%       { box-shadow: 0 0 0 5px rgba(74,222,128,.08); }
}

@media (prefers-reduced-motion: reduce) {
  .cert-wip-dot, .avail-dot { animation: none; }
}

/* ============================================================
   GALLERY — empty placeholder state
   ============================================================ */
.gallery-item--empty {
  background: linear-gradient(135deg, rgba(0,0,0,.03), rgba(0,0,0,.01));
  border: 1px dashed rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
}

.gallery-empty-label {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .03em;
  color: rgba(0,0,0,.3);
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

/* Visually hidden but still reachable by screen readers — for labels
   that would be visually redundant next to a placeholder-only input. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip navigation link — invisible until focused */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: #111111;
  color: #fff;
  padding: .6rem 1.2rem;
  border-radius: 0 0 6px 6px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
  transition: top .15s ease;
}
.skip-link:focus {
  top: 0;
}

/* Visible focus indicators — every focusable element */
:focus-visible {
  outline: 2px solid #1E293B;
  outline-offset: 3px;
  border-radius: 3px;
}

/* Buttons and links need focus rings too */
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.cta-btn:focus-visible,
.download-cta:focus-visible,
.cert-badge:focus-visible,
.social-icon-btn:focus-visible,
.menu-toggle:focus-visible {
  outline: 2px solid #1E293B;
  outline-offset: 3px;
}

/* Remove focus ring only for mouse users (pointer, not keyboard) */
:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================================
   SOCIAL ICON — brand colour hover states
   ============================================================ */

/* LinkedIn — blue */
a.social-icon-btn[aria-label="LinkedIn profile"]:hover {
  background: #0A66C2;
  border-color: #0A66C2;
  color: #fff;
  transform: translateY(-1px);
}

/* Xing — mint green */
a.social-icon-btn[aria-label="Xing profile"]:hover {
  background: #006567;
  border-color: #006567;
  color: #fff;
  transform: translateY(-1px);
}

/* Credly — orange */
a.social-icon-btn[aria-label="Credly badges"]:hover {
  background: #FF6B35;
  border-color: #FF6B35;
  color: #fff;
  transform: translateY(-1px);
}

/* Envelope — slate blue glow */
.social-icon-btn[aria-label="Contact me"]:hover {
  background: #1E293B;
  border-color: #1E293B;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(30,41,59,.18);
}

/* Calendly booking badge — clickable */
a.availability-badge {
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
}
a.availability-badge:hover {
  background: rgba(30,41,59,.16);
  border-color: rgba(30,41,59,.4);
  transform: translateY(-1px);
}

/* Instagram — gradient brand colour on hover */
a.social-icon-btn[aria-label="Instagram profile"]:hover {
  background: #E1306C;
  border-color: #E1306C;
  color: #fff;
  transform: translateY(-1px);
}

/* Calendly friction hint */
.calendly-hint {
  font-size: .75rem;
  color: var(--muted); /* was #969696 — 2.74:1 on this background, fails AA */
  font-style: italic;
  margin: -.5rem 0 .75rem;
  max-width: 320px;
  line-height: 1.5;
}

/* CRISC — pale, unearned, no hover effect.
   Previously used `opacity: .35` on the whole badge, which fades the text
   and its background toward the same page color together and nearly
   cancels out the contrast between them (measured ~1.6–2.3:1, needs 4.5:1).
   Solid muted colors instead — still reads as de-emphasized, but legible. */
.cert-badge--pale {
  cursor: default;
  pointer-events: none;
  background: var(--surface-2);
}
.cert-badge--pale .cert-abbr { color: var(--muted); }

/* Inner circle badge — blue pulsing dot */
@keyframes pulseBlue {
  0%, 100% { box-shadow: 0 0 0 2px rgba(30,41,59,.3); }
  50%       { box-shadow: 0 0 0 5px rgba(30,41,59,.08); }
}

/* Inner circle button — match availability-badge dimensions exactly */
button.availability-badge {
  margin-bottom: 0;
  padding: .4rem .9rem;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(30,41,59,.08);
  border: 1px solid rgba(30,41,59,.2);
  color: #1E293B;
}
button.availability-badge:hover {
  background: rgba(30,41,59,.14);
  border-color: rgba(30,41,59,.35);
  transform: translateY(-1px);
  cursor: pointer;
}

/* Wrapper — align badges to same baseline */
.badge-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.badge-row .availability-badge {
  margin-bottom: 0;
  justify-content: center;
  width: 180px;
  height: 38px;
  box-sizing: border-box;
}

/* Blue pulsing dot for inner circle badge */
.avail-dot--blue {
  background: #1E293B;
  animation: pulseBlue 2s ease-in-out infinite;
}
@keyframes pulseBlue {
  0%, 100% { box-shadow: 0 0 0 2px rgba(30,41,59,.3); }
  50%       { box-shadow: 0 0 0 5px rgba(30,41,59,.08); }
}

/* ============================================================
   INNER CIRCLE BUTTON — no inline styles, CSP-safe
   ============================================================ */
.btn-inner-circle {
  cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
  border: none;
}

/* ============================================================
   INNER CIRCLE POP-UP — CSP-safe, no inline styles
   ============================================================ */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.popup-overlay.is-open {
  display: flex;
}
.popup-card {
  background: #F7F6F3;
  border-radius: 12px;
  max-width: 540px;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0,0,0,.18);
}
.popup-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: #696969;
  line-height: 1;
}
.popup-inner {
  padding: 2.5rem 2.5rem 2rem;
}
.popup-eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #1E293B;
  margin: 0 0 1rem;
}
.popup-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #111111;
  margin: 0 0 1rem;
  line-height: 1.25;
}
.popup-body {
  font-size: .95rem;
  color: #4A4A4A;
  line-height: 1.7;
  margin: 0 0 1.75rem;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.popup-input {
  width: 100%;
  box-sizing: border-box;
  background: #FFFFFF;
  border: 1px solid #E4E0D8;
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .95rem;
  color: #111111;
  margin-bottom: .75rem;
  font-family: 'Inter', system-ui, sans-serif;
}
.popup-input.input-error {
  border-color: #E53E3E;
}
.popup-submit-btn {
  width: 100%;
  background: #1E293B;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: .75rem 1.5rem;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
  transition: background .2s;
}
.popup-submit-btn:hover {
  background: #334155;
}
.popup-success {
  display: none;
  text-align: center;
  padding: 1rem 0;
}
.popup-success.is-visible {
  display: block;
}
.popup-success-title {
  font-size: 1rem;
  color: #111111;
  font-weight: 600;
}
.popup-success-sub {
  font-size: .9rem;
  color: #696969;
  margin-top: .5rem;
}
.popup-disclaimer {
  font-size: .72rem;
  color: var(--muted); /* was #969696 — 2.74:1 on this background, fails AA */
  margin: 1rem 0 0;
  text-align: center;
}

/* ============================================================
   PRIVACY POLICY PAGE
   (moved out of a page-local <style> block — CSP's style-src has no
   'unsafe-inline', so that block was silently ignored on the live site)
   ============================================================ */
.privacy-wrap { max-width: 720px; margin: 0 auto; padding: 3rem 1.25rem 6rem; }
.privacy-wrap h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--text);
  margin-bottom: .5rem;
}
.privacy-wrap .updated {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  display: block;
}
.privacy-wrap h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 .5rem;
}
.privacy-wrap p,
.privacy-wrap li {
  font-size: .98rem;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: .75rem;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.privacy-wrap ul { padding-left: 1.5rem; }
/* Links inherit the site-wide `a { color: var(--gold); }` rule for color,
   and it auto-adapts in dark mode. But color alone isn't enough to mark
   a link inside a paragraph of body text (WCAG 1.4.1) — underline them. */
.privacy-wrap p a { text-decoration: underline; text-underline-offset: 2px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 2rem;
  text-decoration: none;
  transition: color .2s;
}
.back-link:hover { color: var(--text); }

/* ============================================================
   DARK MODE — Warm Charcoal
   Binary toggle via a header button (script.js), persisted in a
   'theme' cookie (read pre-paint by theme-init.js to avoid a flash
   of the wrong theme).
   ============================================================ */

html.theme-dark {
  --navy:        #F3EFE4;
  --navy-mid:    #F3EFE4;
  --navy-light:  #C8C2B2;
  --gold:        #C9A24A;
  --gold-light:  #DDB765;
  --steel:       #C9A24A;
  --muted:       #8F897A;
  --page-bg:     #17150F;
  --surface:     #211F19;
  --surface-2:   #1C1A14;
  --text:        #F3EFE4;
  --text-mid:    #C8C2B2;
  --line:        rgba(255,255,255,.10);

  --shadow-sm:   0 1px 3px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.25);
  --shadow-md:   0 4px 16px rgba(0,0,0,.45), 0 1px 4px rgba(0,0,0,.30);
  --shadow-lg:   0 16px 44px rgba(0,0,0,.55);

  background: var(--page-bg);
  color: var(--text);
}

/* Header */
html.theme-dark .site-header {
  background: rgba(23,21,15,.85);
  border-bottom-color: rgba(255,255,255,.10);
}
html.theme-dark .site-header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.5); }
html.theme-dark .menu a { color: #C8C2B2; }
html.theme-dark .menu a:hover { color: #F3EFE4; background: rgba(255,255,255,.07); }
html.theme-dark .burger span { background: #F3EFE4; }
html.theme-dark .logo { color: #F3EFE4; }

/* Buttons */
html.theme-dark .btn-primary { background: #C9A24A; color: #17150F; }
html.theme-dark .btn-primary:hover { background: #DDB765; color: #17150F; }
html.theme-dark .btn-ghost { color: #C8C2B2; border-color: rgba(255,255,255,.18); }
html.theme-dark .btn-ghost:hover { border-color: rgba(255,255,255,.35); color: #F3EFE4; background: rgba(255,255,255,.05); }
html.theme-dark .cta-btn { background: #F3EFE4; color: #17150F; }
html.theme-dark .cta-btn:hover { background: #C8C2B2; }

/* Hero */
html.theme-dark .hero { background: #17150F; border-bottom-color: rgba(255,255,255,.10); }
html.theme-dark .hero-title-light { color: #F3EFE4; }
html.theme-dark .hero-title-bold { color: rgba(243,239,228,.52); } /* was .28 — 2.34:1, failed AA. .52 gives 5.04:1 */
html.theme-dark .hero-sub { color: #C8C2B2; }
html.theme-dark .hero-eyebrow { color: #C9A24A; }
/* .calendly-hint needs no override now — it's var(--muted), already cascades. */

/* Stat strip matches the header/hero canvas instead of carrying the
   light-mode's navy accent — that navy was left over from a copy-paste
   and is why this looked like a stray blue band in dark mode. */
html.theme-dark .stat-strip { background: var(--page-bg); border-top-color: rgba(255,255,255,.08); }

/* Section alt backgrounds (mirrors the light-mode F7F6F3 / F0EFE9 rhythm) */
html.theme-dark .about-section { background: #17150F; }
html.theme-dark .services-section { background: #1C1A14; }
html.theme-dark .posts-section { background: #1C1A14; }
html.theme-dark .appearances-section { background: #17150F; }
html.theme-dark .downloads-section { background: #17150F; }
html.theme-dark .speaking-section { background: #17150F; }

html.theme-dark .section-eyebrow { color: #C9A24A; }
html.theme-dark .section-title { color: #F3EFE4; }
html.theme-dark .section-intro { color: #C8C2B2; }

html.theme-dark .about-body { color: #C8C2B2; }

/* Cards: post/service/download all read off var(--surface)/var(--line) already */
html.theme-dark .post-title,
html.theme-dark .post-author,
html.theme-dark .service-title,
html.theme-dark .download-title { color: #F3EFE4; }
html.theme-dark .post-date,
html.theme-dark .post-body,
html.theme-dark .service-body,
html.theme-dark .download-body,
html.theme-dark .post-reactions { color: #C8C2B2; }
html.theme-dark .post-tag { background: rgba(255,255,255,.08); color: #C8C2B2; }

/* Social icons (header) + post avatars */
html.theme-dark .social-icon-btn,
html.theme-dark .post-avatar {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  color: rgba(243,239,228,.65);
}
html.theme-dark .social-icon-btn:hover {
  color: #F3EFE4;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.25);
}

/* Cert badges */
html.theme-dark .cert-badge { border-color: rgba(255,255,255,.10); background: #211F19; color: #F3EFE4; }
html.theme-dark .cert-badge:hover { border-color: #C9A24A; }
/* .cert-badge--pale needs no dark-mode override — it's built entirely from
   var(--surface-2) / var(--muted), which already cascade correctly here. */
html.theme-dark .cert-badge--wip { border-color: rgba(255,255,255,.10); }

/* Appearances cards (hardcoded #FFFFFF in the base stylesheet) */
html.theme-dark .speaking-card { background: #211F19; border-color: rgba(255,255,255,.10); }
html.theme-dark .speaking-card:hover { background: rgba(255,255,255,.05); border-color: rgba(201,162,74,.4); }
html.theme-dark .speaking-title { color: #F3EFE4; }
html.theme-dark .speaking-body { color: #C8C2B2; }
html.theme-dark .speaking-type { background: rgba(201,162,74,.16); color: #C9A24A; }

/* Availability badge / newsletter CTA */
html.theme-dark .availability-badge { color: #C9A24A; border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.04); }
html.theme-dark a.availability-badge:hover { background: rgba(201,162,74,.16); border-color: rgba(201,162,74,.4); }

/* Footer */
html.theme-dark .site-footer { background: #1C1A14; border-top-color: rgba(255,255,255,.06); }
html.theme-dark .footer-brand-name { color: #F3EFE4; }
html.theme-dark .footer-tagline { color: #8F897A; }
html.theme-dark .footer-col-title { color: #C9A24A; }
html.theme-dark .footer-link-list a { color: #8F897A; }
html.theme-dark .footer-link-list a:hover { color: #F3EFE4; }
html.theme-dark .footer-bottom { border-top-color: rgba(255,255,255,.08); }
html.theme-dark .footer-copy { color: #8F897A; }
html.theme-dark .footer-top { color: rgba(243,239,228,.55); } /* was .45 — 4.05:1, failed AA. .55 gives 5.39:1 */
html.theme-dark .footer-top:hover { color: #F3EFE4; }
html.theme-dark .footer-privacy { color: rgba(243,239,228,.55); } /* was .45 — 4.05:1, failed AA. .55 gives 5.39:1 */
html.theme-dark .footer-privacy:hover { color: #F3EFE4; }
html.theme-dark .social-icon-btn.github-icon-btn:hover {
  background: linear-gradient(135deg, #6e5494, #2b6cb0);
  border-color: transparent;
  color: #FFFFFF;
}

/* Focus rings need to stay visible on dark */
html.theme-dark :focus-visible { outline-color: #C9A24A; }

/* Newsletter popup */
html.theme-dark .popup-card { background: #211F19; color: #F3EFE4; }
html.theme-dark .popup-eyebrow,
html.theme-dark .popup-title,
html.theme-dark .popup-success-title { color: #F3EFE4; }
html.theme-dark .popup-body,
html.theme-dark .popup-success-sub,
html.theme-dark .popup-disclaimer { color: #C8C2B2; }
html.theme-dark .popup-input { border-color: rgba(255,255,255,.10); background: #17150F; color: #F3EFE4; }
html.theme-dark .popup-submit-btn { background: #C9A24A; color: #17150F; }
html.theme-dark .popup-submit-btn:hover { background: #DDB765; }

/* "In progress" pill (hardcoded navy-on-navy in the base stylesheet) */
html.theme-dark .cert-wip-pill {
  background: rgba(201,162,74,.14);
  border-color: rgba(201,162,74,.4);
  color: #C9A24A;
}

/* ============================================================
   THEME TOGGLE BUTTON (header)
   Binary switch: light <-> dark (warm charcoal + gold).
   The sun and moon glyphs cross-fade and rotate into each other
   instead of an instant swap — reads as one icon turning, not a
   flicker. Respects prefers-reduced-motion (see base rule below).
   ============================================================ */
.theme-toggle-btn { position: relative; }
.theme-toggle-btn .icon-sun,
.theme-toggle-btn .icon-moon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  opacity: 1;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1), opacity .35s ease;
}
.theme-toggle-btn .icon-moon {
  transform: translate(-50%, -50%) rotate(-90deg) scale(.4);
  opacity: 0;
}
html.theme-dark .theme-toggle-btn .icon-sun {
  transform: translate(-50%, -50%) rotate(90deg) scale(.4);
  opacity: 0;
}
html.theme-dark .theme-toggle-btn .icon-moon {
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  opacity: 1;
  color: #C9A24A;
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle-btn .icon-sun,
  .theme-toggle-btn .icon-moon {
    transition: opacity .2s ease;
  }
}
