:root {
  /* Matches the original: 40px @768, 70px @1024, 120px @1440+ */
  --pad: clamp(20px, calc(12vw - 52px), 120px);
  --gap: 25px;
  --font-ui: 'Jost', 'Europa', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Crimson Pro', 'Minion Pro', Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }

/* ---- header ---------------------------------------------------------- */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 40px var(--pad) 20px;
  font-family: var(--font-ui);
}
.logo {
  font-weight: 800;
  font-size: clamp(30px, 5.6vw, 46px);
  letter-spacing: -0.01em;
  text-decoration: none;
  line-height: 1;
}
.nav-toggle {
  justify-self: start;
  width: 28px; height: 22px;
  background: none; border: 0; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 4px; background: #000; border-radius: 1px; }
.header-right { justify-self: end; display: flex; align-items: center; gap: 4px; }
.socials { display: flex; gap: 4px; }
.social { display: inline-flex; line-height: 0; }
.search-link { display: inline-flex; margin-left: 12px; padding-left: 12px; border-left: 1px solid #e5e5e5; }
@media (max-width: 640px) {
  .header-right .socials { display: none; }
  .search-link { border: 0; margin: 0; padding: 0; }
}

/* Left slide-out drawer */
.site-nav {
  font-family: var(--font-ui);
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 100;
  width: min(340px, 85vw);
  display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
  padding: 90px 36px 36px;
  background: #fff;
  box-shadow: 4px 0 24px rgba(0, 0, 0, .15);
  overflow-y: auto;
  transform: translateX(-105%);
  visibility: hidden;
  transition: transform .3s ease, visibility 0s linear .3s;
}
.nav-open .site-nav { transform: none; visibility: visible; transition: transform .3s ease; }
.site-nav a { text-decoration: none; font-weight: 600; font-size: 22px; letter-spacing: 0.04em; }
.site-nav a:hover, .site-nav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }
.nav-close { position: absolute; top: 34px; left: 32px; background: none; border: 0; padding: 4px; cursor: pointer; line-height: 0; }
.nav-backdrop {
  position: fixed; inset: 0; z-index: 99; background: rgba(0, 0, 0, .35);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s;
}
.nav-open .nav-backdrop { opacity: 1; visibility: visible; transition: opacity .3s ease; }
.nav-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .site-nav, .nav-backdrop { transition: none; } }

/* ---- feed ------------------------------------------------------------ */
main { padding: 10px var(--pad) 60px; max-width: 1680px; margin: 0 auto; }
.page-heading {
  font-family: var(--font-ui); font-weight: 800; text-align: center;
  font-size: clamp(28px, 4vw, 40px); margin: 20px 0 30px; letter-spacing: .02em;
}
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); align-items: start; margin-top: 20px; }
.grid.masonry { display: flex; gap: var(--gap); align-items: flex-start; }
.grid.masonry .col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card { text-align: center; margin-bottom: 40px; }
.grid.masonry .card { margin-bottom: 0; }
.card-img { display: block; background: #f2f2f2; line-height: 0; }
.card-img img { width: 100%; display: block; object-fit: cover; }
.badge {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 50px; height: 50px; margin: -25px auto 10px;
  background: #000; color: #fff; border-radius: 50%;
  font-family: var(--font-ui); text-transform: uppercase; line-height: 1;
}
.badge span { font-size: 10px; font-weight: 600; letter-spacing: .06em; }
.badge b { font-size: 17px; font-weight: 800; margin-top: 2px; }
.card.no-img .badge { margin-top: 0; }
.card-title {
  font-family: var(--font-ui); font-weight: 500; font-size: clamp(20px, 2.1vw, 23px);
  line-height: 1.25; margin: 0 auto; max-width: 92%;
}
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-author { font-family: var(--font-ui); font-size: 13px; color: #666; margin: 8px 0 0; }

.load-more-wrap { text-align: center; margin: 30px 0 0; }
.load-more, .search-form button {
  font-family: var(--font-ui); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
  display: inline-block; background: #000; color: #fff; border: 2px solid #000; border-radius: 999px;
  padding: 12px 30px; cursor: pointer; text-decoration: none;
}
.load-more:hover, .search-form button:hover { background: #fff; color: #000; }
.empty { text-align: center; font-family: var(--font-ui); color: #666; margin: 60px 0; }

/* ---- post / page ------------------------------------------------------ */
.post { margin: 0 auto; }
.post.page { max-width: 780px; }
.post-header { text-align: center; margin: 20px 0 30px; }
.post-header h1 { font-family: var(--font-ui); font-weight: 700; font-size: clamp(28px, 5vw, 38px); line-height: 1.3; margin: 0 auto 10px; max-width: 600px; }
.post-meta { font-family: var(--font-ui); color: #666; font-size: 14px; margin: 0; letter-spacing: .03em; }

/* single post: full-width hero, badge overlapping its bottom edge, ~580px text column */
/* The original stretches the hero to the full page width; cap it so it stays a sensible size. */
.post-single .post-hero { line-height: 0; background: #f2f2f2; max-width: 860px; margin: 0 auto; }
.post-single .post-hero img { width: 100%; display: block; max-height: 65vh; object-fit: cover; }
.post-single .post-header { margin: 0 0 60px; }
.post-single .badge-lg { width: 60px; height: 60px; margin: 20px auto 20px; }
.post-single.has-hero .badge-lg { margin-top: -30px; }
.post-single .badge-lg span { font-size: 12px; }
.post-single .badge-lg b { font-size: 20px; }
.post-single .post-meta { margin-top: 6px; }
.post-text { max-width: 580px; margin: 0 auto; }
@media (min-width: 700px) and (max-width: 760px) { .post-text { margin-inline: 20px; } }

.post-body { overflow-wrap: break-word; }
.post-body p { margin: 0 0 1.5em; white-space: pre-wrap; }
.post-body h1, .post-body h2, .post-body h3, .post-body h4 { font-family: var(--font-ui); line-height: 1.25; margin: 1.6em 0 .6em; }
.post-body img { display: block; margin: 1.5em auto; }
.post-body figure { margin: 1.5em 0; text-align: center; }
.post-body figcaption { font-size: 14px; color: #666; }
.post-body iframe, .post-body video { max-width: 100%; }
.post-body iframe[src*="youtube"], .post-body iframe[src*="vimeo"] { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.post-body audio { width: 100%; margin: 0 0 1.5em; }
.post-body .video-wrap { position: relative; aspect-ratio: 16 / 9; margin: 1.5em 0; }
.post-body .video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post-body blockquote { border-left: 3px solid #000; margin: 1.5em 0; padding: 0 0 0 1.2em; font-style: italic; }
.post-body a { text-underline-offset: 3px; }
/* share + like row (pill buttons, like the original) */
.share { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 50px 0 10px; font-family: var(--font-ui); }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 20px;
  border: 1px solid #ddd; border-radius: 25px; background: transparent; color: #333;
  font: inherit; font-size: 14px; text-decoration: none; cursor: pointer;
}
.share-btn:hover, .share-btn:focus-visible { border-color: #000; color: #000; }
.like-btn[aria-pressed="true"] { border-color: #000; background: #000; color: #fff; }
.like-btn[aria-pressed="true"] svg path { fill: currentColor; }
.like-btn:disabled { opacity: .6; cursor: default; }
.post-cats { margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.post-cats span { font-family: var(--font-ui); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid #000; border-radius: 999px; padding: 3px 12px; }
.back { font-family: var(--font-ui); text-align: center; margin-top: 40px; }

/* ---- podcast list + audio player ---------------------------------------------- */
/* Spotify / Apple buttons: plain black pills with white text */
.listen { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0 auto 34px; font-family: var(--font-ui); }
.listen-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 140px; height: 46px; padding: 0 28px;
  border: 2px solid #000; border-radius: 999px; background: #000; color: #fff;
  font-size: 16px; font-weight: 600; letter-spacing: .02em; text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.listen-btn:hover, .listen-btn:focus-visible { background: #fff; color: #000; }
.listen-btn:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
@media (max-width: 480px) { .listen { flex-direction: column; align-items: stretch; padding: 0 20px; } }
@media (prefers-reduced-motion: reduce) { .listen-btn { transition: none; } }

.episodes { list-style: none; margin: 10px auto 0; padding: 0; max-width: 780px; }
.episode { padding: 26px 16px; margin: 0 -16px; border-top: 1px solid #e5e5e5; scroll-margin-top: 20px; }
.episode:last-child { border-bottom: 1px solid #e5e5e5; }
.episode:target { background: #f7f7f7; }
.episode-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.episode-title { font-family: var(--font-ui); font-weight: 600; font-size: clamp(18px, 2.4vw, 22px); line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
.episode-date { font-family: var(--font-ui); font-size: 14px; color: #666; letter-spacing: .02em; white-space: nowrap; }
.episode-body { margin-top: 4px; }

/* video under the audio player: a thumbnail that becomes the YouTube player when clicked */
.yt { margin: 18px auto 0; max-width: 520px; }
.yt-link { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
.yt-link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .15s ease, transform .3s ease; }
.yt-link:hover img, .yt-link:focus-visible img { opacity: 1; transform: scale(1.02); }
.yt-link:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.yt-play {
  position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%;
  background: rgba(0, 0, 0, .78); color: #fff; display: grid; place-items: center; transition: background .15s ease, transform .15s ease;
}
.yt-play svg { width: 24px; height: 24px; margin-left: 2px; }
.yt-link:hover .yt-play, .yt-link:focus-visible .yt-play { background: #000; transform: scale(1.08); }
.yt iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #000; }
@media (prefers-reduced-motion: reduce) { .yt-link img, .yt-play { transition: none; } }

.player audio { display: block; width: 100%; } /* native controls until the script upgrades it */
.player.enhanced { display: flex; align-items: center; gap: 16px; font-family: var(--font-ui); }
.player.enhanced audio { display: none; }
.player:not(.enhanced) .pl-play, .player:not(.enhanced) .pl-main, .player:not(.enhanced) .pl-rate { display: none; } /* audio failed to load: native controls + message only */
.pl-play {
  flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 0;
  background: #000; color: #fff; cursor: pointer; display: grid; place-items: center;
  transition: transform .12s ease, background .12s ease;
}
.pl-play:hover { transform: scale(1.06); }
.pl-play:focus-visible, .pl-rate:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.pl-play svg { width: 18px; height: 18px; fill: currentColor; }
.pl-play .ic-pause { display: none; }
.player.is-playing .ic-play { display: none; }
.player.is-playing .ic-pause { display: block; }
.player.is-loading .pl-play { opacity: .7; }
.pl-main { flex: 1; min-width: 0; }
.pl-times { display: flex; justify-content: space-between; margin-top: 2px; font-size: 13px; color: #555; font-variant-numeric: tabular-nums; }
.pl-rate {
  flex: none; min-width: 52px; height: 34px; padding: 0 12px; border: 1px solid #ddd; border-radius: 25px;
  background: transparent; color: #333; font: inherit; font-size: 13px; cursor: pointer;
}
.pl-rate:hover { border-color: #000; color: #000; }
.pl-error { font-size: 13px; color: #b00020; }

.pl-seek { --p: 0%; display: block; width: 100%; height: 22px; margin: 0; padding: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.pl-seek:disabled { cursor: default; opacity: .6; }
.pl-seek:focus-visible { outline: 2px solid #000; outline-offset: 4px; border-radius: 4px; }
.pl-seek::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, #000 var(--p), #ddd var(--p)); }
.pl-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #000; border: 0; transition: transform .1s ease; }
.pl-seek:hover::-webkit-slider-thumb, .pl-seek:active::-webkit-slider-thumb { transform: scale(1.25); }
.pl-seek::-moz-range-track { height: 4px; border-radius: 2px; background: #ddd; }
.pl-seek::-moz-range-progress { height: 4px; border-radius: 2px; background: #000; }
.pl-seek::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #000; }
@media (max-width: 480px) { .player.enhanced { gap: 12px; } .pl-play { width: 44px; height: 44px; } .pl-rate { min-width: 46px; padding: 0 8px; } }
@media (prefers-reduced-motion: reduce) { .pl-play, .pl-seek::-webkit-slider-thumb { transition: none; } }

/* ---- old website archive -------------------------------------------------- */
.archive-list { list-style: none; padding: 0; margin: 1.5em 0; columns: 2; column-gap: 40px; font-family: var(--font-ui); font-size: 18px; }
.archive-list li { margin: 0 0 .6em; break-inside: avoid; }
@media (max-width: 560px) { .archive-list { columns: 1; } }
.archive-list.one-col { columns: 1; }
.archive-date { font-size: 14px; color: #666; margin-left: 8px; white-space: nowrap; }
.archive-byline { font-family: var(--font-ui); font-size: 14px; color: #666; letter-spacing: .02em; margin: -10px 0 28px; text-align: center; }
.archive-page { max-width: 980px; }
.archive-page .post-body figure { margin: 1em 0; }
.archive-page .post-body iframe { display: block; margin: 1em auto; border: 0; }

/* ---- search ------------------------------------------------------------ */
.search-form { font-family: var(--font-ui); max-width: 640px; margin: 30px auto 0; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.search-form input { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #000; border-radius: 0; background: #fff; width: 100%; }

/* ---- footer ----------------------------------------------------------- */
.site-footer { font-family: var(--font-ui); border-top: 1px solid #eee; padding: 50px var(--pad) 60px; text-align: center; display: grid; gap: 36px; }
.site-footer h3 { font-weight: 800; font-size: 22px; margin: 0 0 8px; letter-spacing: .02em; }
.site-footer p { margin: 0 0 14px; font-size: 15px; }
.follow .socials { justify-content: center; gap: 8px; }
.footer-links { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
