/* Prophets — the whole design in one file.
   Inverse of founderspodcast.com: white background, black text, system fonts,
   Libre Baskerville Italic wordmark. */

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --faint: #9b9b9b;
  --line: #ebebeb;
  --card: #f5f5f5;
  --pill: #f0f0f0;
  --max: 880px;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
}

@font-face {
  font-family: "Libre Baskerville";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/libre-baskerville-italic.woff2") format("woff2");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; z-index: 10; }

/* ---------- Header ---------- */
.site-header { padding: 28px 0; }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wordmark { font-family: var(--serif); font-style: italic; font-size: 1.75rem; line-height: 1; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { font-size: 0.9375rem; color: var(--muted); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.site-nav a:hover { color: var(--text); }
.site-nav a.active { color: var(--text); background: var(--pill); }

/* ---------- Hero (home) ---------- */
.hero { padding: 96px 0 56px; }
.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  font-weight: 650; letter-spacing: -0.025em; line-height: 1.08; margin: 0;
}

/* ---------- Lists ---------- */
.page-header { padding: 64px 0 16px; }
.page-header h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 10px; }
.page-header .lede { color: var(--muted); margin: 0; max-width: 56ch; }

.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.list-head h2 { font-size: 0.9375rem; font-weight: 600; margin: 0; }
.all-link { font-size: 0.9375rem; color: var(--muted); }
.all-link:hover { color: var(--text); }

.year-label { font-size: 0.875rem; font-weight: 500; color: var(--faint); margin: 28px 0 2px; }
.post-list { list-style: none; margin: 0 0 8px; padding: 0; }
.post-row a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 13px 0;
}
.row-title { font-size: 1.0625rem; }
.post-row a:hover .row-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.row-date { color: var(--faint); font-size: 0.9375rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty-note { color: var(--muted); padding: 24px 0; }

.list-controls { display: flex; gap: 10px; margin: 24px 0 0; }
.list-search {
  flex: 1; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
}
.list-search:focus { outline: none; border-color: #b5b5b5; }
.list-sort {
  font: inherit; color: var(--muted); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}

.pagination {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 36px 0 24px; font-size: 0.9375rem; color: var(--muted);
}
.pagination a { border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px; }
.pagination a:hover { border-color: #b5b5b5; color: var(--text); }

.btn {
  display: inline-block; border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 20px; font-size: 0.9375rem;
}
.btn:hover { border-color: #b5b5b5; }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: #000; border-color: #000; }
.load-more { text-align: center; margin: 36px 0 24px; }

/* ---------- Posts (episodes, articles, book notes) ---------- */
.post-header { padding: 56px 0 0; }
.post-title {
  font-size: clamp(1.875rem, 4.5vw, 2.75rem);
  line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 16px; font-weight: 650;
}
.post-meta { color: var(--muted); font-size: 0.9375rem; margin: 0 0 32px; }
.post-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-meta .dot { margin: 0 6px; color: var(--faint); }
.post-category {
  display: inline-block; font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 14px;
}
.post-category:hover { color: var(--text); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0 0 36px; }
.kicker {
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin: 44px 0 0;
}
.prose-page { max-width: 680px; margin: 0 auto; }

/* ---------- Audio player ---------- */
.player { background: var(--card); border-radius: 16px; padding: 24px; }
.player-top { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.player-art { width: 72px; height: 72px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.player-title { margin: 0; font-weight: 600; line-height: 1.4; }
.player-range {
  width: 100%; height: 4px; border-radius: 2px; margin: 0;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background: linear-gradient(to right, var(--text) var(--fill, 0%), #d9d9d9 var(--fill, 0%));
}
.player-range::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 12px; height: 12px; border-radius: 50%; background: var(--text);
}
.player-range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--text); }
.player-times {
  display: flex; justify-content: space-between;
  color: var(--muted); font-size: 0.8125rem; margin-top: 8px; font-variant-numeric: tabular-nums;
}
.player-controls { display: flex; align-items: center; justify-content: center; gap: 30px; margin-top: 8px; }
.player-speed { color: var(--muted); font-size: 0.9375rem; min-width: 44px; font-variant-numeric: tabular-nums; }
.player-speed:hover { color: var(--text); }
.player-skip { color: var(--text); opacity: 0.75; display: grid; place-items: center; }
.player-skip:hover { opacity: 1; }
.player-skip svg { width: 26px; height: 26px; }
.player-play {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--text); color: var(--bg); display: grid; place-items: center;
}
.player-play svg { width: 22px; height: 22px; }
.player-play:hover { background: #000; }
.player .icon-pause { display: none; }
.player.is-playing .icon-pause { display: block; }
.player.is-playing .icon-play { display: none; }
.no-js .player-scrub, .no-js .player-controls { display: none; }
.player noscript audio { width: 100%; margin-top: 4px; }
.listen-links { margin: 20px 0 0; }

/* ---------- Prose (rendered Ghost content) ---------- */
.prose { font-size: 1.0625rem; line-height: 1.75; }
.prose p { margin: 1.25em 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #bbb; }
.prose a:hover { text-decoration-color: var(--text); }
.prose h2 { font-size: 1.375rem; letter-spacing: -0.01em; margin: 2em 0 0.6em; }
.prose h3 { font-size: 1.125rem; margin: 1.8em 0 0.5em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 1.25em 0; }
.prose li { margin: 0.5em 0; }
.prose blockquote {
  margin: 1.6em 0; padding-left: 1.25em;
  border-left: 2px solid var(--text); font-style: italic; color: #333333;
}
.prose blockquote p { margin: 0.4em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose img { border-radius: 8px; }
.prose figure { margin: 2em 0; }
/* Hero feature image: reserve a fixed box so the image can't shift layout as it
   loads (Ghost's API doesn't expose intrinsic dimensions to set width/height). */
.post-hero { margin: 0 0 2em; }
.post-hero img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.prose figcaption { text-align: center; color: var(--faint); font-size: 0.875rem; margin-top: 0.6em; }
.prose code { background: var(--card); border-radius: 4px; padding: 0.15em 0.4em; font-size: 0.9em; }
.prose .kg-callout-card { background: var(--card); border-radius: 12px; padding: 18px 20px; display: flex; gap: 12px; margin: 1.6em 0; }
.prose .kg-callout-card p { margin: 0; }
.prose .kg-button-card { margin: 1.6em 0; }
.prose .kg-btn, .prose .kg-button-card a {
  display: inline-block; background: var(--text); color: var(--bg);
  border-radius: 999px; padding: 10px 20px; font-size: 0.9375rem; text-decoration: none;
}
.prose .kg-bookmark-card { margin: 1.6em 0; }
.prose .kg-bookmark-card a { text-decoration: none; }
.prose .kg-bookmark-container { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.prose .kg-bookmark-container:hover { border-color: #b5b5b5; }
.prose .kg-bookmark-title { font-weight: 600; }
.prose .kg-bookmark-description { color: var(--muted); font-size: 0.9375rem; margin-top: 4px; }
.prose .kg-bookmark-metadata { color: var(--faint); font-size: 0.8125rem; margin-top: 10px; }
.prose .kg-bookmark-thumbnail, .prose .kg-bookmark-icon { display: none; }
.prose .kg-embed-card { margin: 1.6em 0; }
.prose .kg-embed-card iframe { max-width: 100%; }

/* Episode notes: the audio card + Apple button at the top of the post are
   lifted into the player UI above, so hide the originals. */
.episode-notes > audio, .episode-notes .kg-audio-card { display: none; }
.episode-notes .kg-button-card:has(a[href*="podcasts.apple.com"]) { display: none; }

/* ---------- Newsletter ---------- */
.nl-hero { max-width: 620px; margin: 0 auto; padding: 88px 0 24px; text-align: center; }
.nl-hero h1 { font-size: clamp(1.875rem, 4.5vw, 2.75rem); letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 12px; }
.nl-hero .prose { text-align: left; }
.nl-form { display: flex; gap: 10px; max-width: 460px; margin: 28px auto 0; }
.nl-form input {
  flex: 1; min-width: 0; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid #d5d5d5; border-radius: 999px; padding: 12px 18px;
}
.nl-form input:focus { outline: none; border-color: var(--text); }
.nl-status { color: var(--muted); margin: 16px 0 0; }
.nl-fineprint { color: var(--faint); font-size: 0.875rem; margin: 14px 0 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 48px; }
.footer-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.copyright { color: var(--faint); font-size: 0.875rem; margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-nav a { color: var(--muted); font-size: 0.875rem; }
.footer-nav a:hover { color: var(--text); }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .site-header { padding: 20px 0; }
  .site-nav a { padding: 6px 9px; font-size: 0.875rem; }
  .hero { padding: 56px 0 36px; }
  .page-header { padding: 44px 0 12px; }
  .post-header { padding: 40px 0 0; }
  .player { padding: 18px; }
  .player-controls { gap: 20px; }
  .row-title { padding-right: 4px; }
}
