/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
  --color-bg: #F9F7F4;
  --color-bg-mid: #F0EDE8;
  --color-text: #1A1A1A;
  --color-muted: #6B6B6B;
  --color-accent: #C84535;      /* AA-compliant: 4.51:1 on bg, 4.82:1 for white */
  --color-accent-dark: #D85640; /* bright terracotta — hover states, decorative */
  --color-border: #E0DBD5;

  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-heading: Georgia, 'Times New Roman', serif;

  --prose-width: 680px;
  --site-width: 1100px;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Motion */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark mode */
:root[dark] {
  --color-bg: #1C1916;
  --color-bg-mid: #252220;
  --color-text: #F0EDE8;
  --color-muted: #A09890;
  --color-accent: #E87060;      /* AA-compliant on dark: 5.76:1 on darkBg */
  --color-accent-dark: #D85640; /* bright terracotta — hover states */
  --color-border: #383330;
}

.disable-animation * {
  transition: none !important;
}

/* ── Keyframes ──────────────────────────────────────────────────────────── */

@keyframes ap-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ap-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  transition: background-color 0.3s var(--ease-out-quart), color 0.3s var(--ease-out-quart);
}

[hidden] {
  display: none !important;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color 0.15s var(--ease-out-quart);
}

a:hover {
  color: var(--color-accent-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

ul, ol {
  padding-left: 1.5em;
}

blockquote {
  border-left: 3px solid var(--color-accent);
  margin-left: 0;
  padding-left: var(--space-md);
  color: var(--color-muted);
  font-style: italic;
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--site-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

/* ==========================================================================
   Button
   ========================================================================== */

.btn {
  display: inline-block;
  background-color: var(--color-accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.65em 1.4em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out-quart),
              transform 0.15s var(--ease-out-quart),
              box-shadow 0.2s var(--ease-out-quart);
  align-self: flex-start;
  width: auto;
}

.btn:hover {
  background-color: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(200, 69, 53, 0.22);
}

.btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
  transition-duration: 0.08s;
}

.btn--large {
  font-size: 1.1rem;
  padding: 0.75em 1.8em;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
  gap: var(--space-md);
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo:hover {
  color: var(--color-accent);
}

.site-logo-img {
  height: 38px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  padding: var(--space-xs);
  line-height: 1;
}

/* Hamburger → X animation */
.bar {
  transition: transform 0.2s ease, opacity 0.15s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .bar-1 {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar-2 {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .bar-3 {
  transform: translateY(-5px) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  .bar { transition: none; }
}

.main-nav {}

.main-nav.nav-no-transition {
  transition: none !important;
}

.nav-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 1.5rem;
  flex-wrap: nowrap;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text);
  letter-spacing: 0.01em;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s var(--ease-out-quart), border-color 0.15s var(--ease-out-quart);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: var(--space-2xl) 0;
}

.hero-inner {
  max-width: var(--prose-width);
}

.hero--has-image .hero-inner {
  max-width: var(--site-width);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-image {
  animation: ap-fade-in 0.8s var(--ease-out-quart) 0.15s both;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  margin-bottom: var(--space-md);
  animation: ap-fade-up 0.65s var(--ease-out-expo) both;
}

.hero-body {
  font-size: 1.15rem;
  color: var(--color-muted);
  margin-bottom: var(--space-lg);
  max-width: 600px; /* Intentionally narrower than --prose-width for scannability */
  animation: ap-fade-up 0.6s var(--ease-out-expo) 0.1s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  animation: ap-fade-up 0.55s var(--ease-out-quart) 0.2s both;
}

.hero-cta-secondary {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.hero-cta-secondary:hover {
  color: var(--color-accent);
}

@media (max-width: 700px) {
  .hero--has-image .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .hero-image {
    max-width: 260px;
    margin: 0 auto;
  }
}

/* ==========================================================================
   Testimonials
   ========================================================================== */

.testimonials {
  background-color: var(--color-bg-mid);
  padding: var(--space-lg) 0;
}

.testimonials--bottom {
  background-color: transparent;
  padding: var(--space-lg) 0 0;
}

.testimonials-label {
  margin-bottom: var(--space-sm);
}

.testimonials-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  margin-bottom: var(--space-xs);
}

.testimonials-subheading {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 600px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-md);
  font-style: normal;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
}

.testimonial-quote {
  position: relative;
  padding-left: 1.2em;
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: var(--space-sm);
  flex: 1;
}

.testimonial-quote::before {
  content: '\201C';
  position: absolute;
  left: 0;
  top: -0.1em;
  font-family: var(--font-heading);
  font-size: 2.5em;
  line-height: 1;
  color: var(--color-accent);
}

.testimonial-quote::after {
  content: '\201D';
  font-family: var(--font-heading);
  color: var(--color-accent);
}

.testimonial-attribution {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.testimonial-name {
  display: block;
  font-weight: 600;
  color: var(--color-text);
}

.testimonial-role {
  display: block;
}

/* ==========================================================================
   Home Sections
   ========================================================================== */

.home-section {
  padding: var(--space-2xl) 0 var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.section-heading {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  margin-bottom: var(--space-lg);
}

.section-heading-link {
  color: inherit;
  text-decoration: none;
}

.section-heading-link:hover {
  color: var(--color-accent);
}

.section-more {
  margin-top: 0;
}

.section-more a {
  font-weight: 600;
  text-decoration: none;
}

.section-more a:not(.btn):hover {
  text-decoration: underline;
}

/* ==========================================================================
   Post Cards
   ========================================================================== */

.post-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .post-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .post-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

/* Stretched link — makes entire card clickable */
.post-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.post-card:hover .post-card-link {
  color: var(--color-accent);
}

.post-card--has-image {
  border-top: none;
  border-radius: 8px;
  background: var(--color-bg);
  overflow: hidden;
}

.post-card-image-link {
  display: block;
}

.post-card-image {
  width: 100%;
  aspect-ratio: 780 / 546;
  background-color: var(--color-bg-mid);
  border-radius: 8px;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card-body {
  flex: 1;
}

.post-card--has-image .post-card-body {
  padding: var(--space-sm) 0 0;
}

.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin-bottom: var(--space-xs);
}

.post-card-link {
  color: var(--color-text);
  text-decoration: none;
}

.post-card-link:hover {
  color: var(--color-accent);
}

.post-card-date {
  display: block;
  font-size: 0.72rem;
  color: var(--color-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-family: var(--font-body);
  margin-bottom: var(--space-xs);
}

.post-card-desc {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.5;
}

/* Episode cards now share post-card styles — see Post Cards section above */


/* ==========================================================================
   Coaching Band (full)
   ========================================================================== */

.coaching-band {
  background-color: var(--color-bg-mid);
  padding: var(--space-xl) 0 var(--space-2xl);
}

.coaching-band-inner {
  max-width: 780px; /* Wider than --prose-width for visual breathing room in the band */
}

.coaching-band-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.coaching-band-headline {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: var(--space-sm);
}

.coaching-band-body {
  color: var(--color-muted);
  font-size: 1.05rem;
  margin-bottom: var(--space-lg);
}

/* ==========================================================================
   Coaching CTA Inline
   ========================================================================== */

.coaching-cta-inline {
  max-width: var(--prose-width);
  margin-left: auto;
  margin-right: auto;
  margin-top: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  background-color: var(--color-bg-mid);
  border-radius: 8px;
}

.coaching-cta-inline-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.coaching-cta-inline-text {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
  max-width: 560px; /* Constrained to keep it punchy */
}

/* ==========================================================================
   Newsletter Block
   ========================================================================== */

.newsletter-block {
  background-color: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-2xl) 0;
}

:root[dark] .newsletter-block {
  background-color: var(--color-bg-mid);
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* ==========================================================================
   Single Post
   ========================================================================== */

.post-single {
  padding: var(--space-xl) 0;
}

.post-header {
  max-width: var(--prose-width);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-lg);
}

.post-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.post-date {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.post-event {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.post-tags {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.post-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  padding: 0.1em 0.5em;
  border-radius: 8px;
}

.post-tag:hover {
  background-color: var(--color-accent);
  color: #fff;
  transform: translateY(-1px);
  transition: background-color 0.15s var(--ease-out-quart),
              color 0.15s var(--ease-out-quart),
              transform 0.15s var(--ease-out-quart);
}

/* ==========================================================================
   Prose
   ========================================================================== */

.prose {
  max-width: var(--prose-width);
  margin-left: auto;
  margin-right: auto;
}

.prose > * + * {
  margin-top: 1em;
}

.prose h2 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.prose h3 {
  margin-top: 1.5em;
  margin-bottom: 0.4em;
}

.prose ul, .prose ol {
  padding-left: 1.5em;
}

.prose li + li {
  margin-top: 0.5em;
}

.prose a {
  color: var(--color-accent);
}

.prose a:hover {
  color: var(--color-accent-dark);
}

.prose a.btn {
  color: #fff;
}

.prose a.btn:hover {
  color: #fff;
  background-color: var(--color-accent-dark);
}

.prose blockquote {
  margin: 1.5em 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg-mid);
  border-left: 3px solid var(--color-accent);
  font-style: italic;
  color: var(--color-muted);
}

.prose blockquote p {
  margin: 0;
}

.prose code {
  font-size: 0.88em;
  background: var(--color-bg-mid);
  padding: 0.1em 0.35em;
  border-radius: 8px;
}

.prose pre {
  background: var(--color-bg-mid);
  padding: var(--space-md);
  overflow-x: auto;
  font-size: 0.85em;
}

.prose figure {
  margin: 0;
}

.prose figcaption {
  margin-top: 0.4em;
  font-size: 0.75rem;
  color: var(--color-muted);
  line-height: 1.4;
}

.image-credit {
  margin-top: 0.3em;
  font-size: 0.7rem;
  color: var(--color-muted);
  line-height: 1.4;
  text-align: right;
}

/* ==========================================================================
   List Pages
   ========================================================================== */

.list-header {
  padding: var(--space-xl) 0 var(--space-lg);
}

.list-header-inner {
  max-width: var(--prose-width);
  margin-left: auto;
  margin-right: auto;
}

.list-header--stacked .list-title,
.list-header--stacked .list-description {
  max-width: var(--prose-width);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.list-header--stacked .list-description {
  margin-bottom: var(--space-lg);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.list-header-image-full {
  margin: var(--space-lg) auto 0;
  width: 70%;
}

.list-header-image-full img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.list-header--stacked .list-header-prose {
  margin-top: var(--space-md);
  max-width: 100%;
}

.list-header--stacked .list-subscribe,
.list-header--stacked .hero-actions {
  text-align: center;
  margin-top: var(--space-md);
}

.list-header--has-image .list-header-inner {
  max-width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.list-header-text {
  min-width: 0;
}

.list-header-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

@media (max-width: 700px) {
  .list-header--has-image .list-header-inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .list-header-image {
    max-width: 220px;
  }
}

.list-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.list-description {
  margin-top: var(--space-sm);
  color: var(--color-muted);
  font-size: 1.05rem;
  max-width: var(--prose-width);
}

.list-header-prose {
  margin-top: var(--space-md);
}

.list-subscribe {
  margin-top: var(--space-md);
}

.list-content {
  padding: var(--space-md) 0 var(--space-xl);
}

.list-content--left .prose {
  margin-left: 0;
  margin-right: 0;
}

.list-prose {
  margin-bottom: var(--space-xl);
}

.prose--wide {
  max-width: var(--site-width);
}

.publications-list p {
  padding-left: 2ch;
  text-indent: -2ch;
}

/* ==========================================================================
   Books Page
   ========================================================================== */

.book-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
  align-items: start;
}

.book-hero-cover img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

:root[dark] .book-hero-cover img {
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.book-hero-body > * + * {
  margin-top: 1em;
}

.book-hero-meta {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.book-secondary {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  align-items: start;
  padding: var(--space-lg);
  background: var(--color-bg-mid);
  border-radius: 8px;
}

.book-secondary-cover img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.book-secondary-body > * + * {
  margin-top: 0.75em;
}

.books-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-xl) 0;
}

@media (max-width: 600px) {
  .book-hero,
  .book-secondary {
    grid-template-columns: 1fr;
  }

  .book-hero-cover,
  .book-secondary-cover {
    max-width: 200px;
  }
}

/* ==========================================================================
   Coaching Page
   ========================================================================== */

.coaching-page > .container:first-child {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.coaching-page > .container:last-child {
  padding-bottom: var(--space-xl);
}

.coaching-header {
  margin-bottom: 0;
}

.coaching-header--has-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.coaching-header-text {
  min-width: 0;
}

.coaching-header-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.coaching-header-text .list-description {
  margin-bottom: var(--space-lg);
}

.coaching-header-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

@media (max-width: 700px) {
  .coaching-header--has-image {
    grid-template-columns: 1fr;
  }
}

.coaching-tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
}

.coaching-body {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.coaching-body > .btn {
  margin-top: var(--space-lg) !important;
  display: block;
  width: fit-content;
}


.coaching-end-cta {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

/* ==========================================================================
   Summary Card (fallback)
   ========================================================================== */

.summary-card {
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--color-border);
}

.summary-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 0.25em;
}

.summary-link {
  color: var(--color-text);
  text-decoration: none;
}

.summary-link:hover {
  color: var(--color-accent);
}

.summary-date {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-xl) 0;
  background-color: var(--color-bg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

.footer-nav-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-nav-link {
  font-size: 0.875rem;
  color: var(--color-muted);
  text-decoration: none;
}

.footer-nav-link:hover {
  color: var(--color-accent);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.social-link {
  color: var(--color-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
}

.social-link:hover {
  color: var(--color-accent);
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--color-muted);
  width: 100%;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.footer-copy a {
  color: var(--color-muted);
}

.footer-copy a:hover {
  color: var(--color-accent);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

/* Pagination — uses Hugo's internal _internal/pagination.html template */
.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: var(--space-xl) 0 0;
  gap: var(--space-xs);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.pagination .page-item {
  list-style: none;
}

.pagination .page-link {
  display: inline-block;
  padding: 0.35em 0.75em;
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--color-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.pagination .page-link:hover {
  color: var(--color-accent);
}

.pagination .page-item.active .page-link {
  color: var(--color-accent);
  font-weight: 700;
  border-bottom: 2px solid var(--color-accent);
}

.pagination .page-item.disabled .page-link {
  color: var(--color-border);
  cursor: default;
  pointer-events: none;
}

@media (max-width: 480px) {
  .pagination .page-item:not(:first-child):not(:nth-child(2)):not(:nth-last-child(2)):not(:last-child) {
    display: none;
  }
  .pagination .page-item.active {
    display: list-item;
  }
}

/* ==========================================================================
   Mobile Navigation
   ========================================================================== */

@media (max-width: 1024px) {
  .header-inner {
    gap: 4px;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin-left: auto;
  }

  .main-nav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-sm) var(--space-md);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
  }

  .nav-list {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

/* ==========================================================================
   Post Navigation (Prev/Next)
   ========================================================================== */

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-lg);
  max-width: var(--prose-width);
  margin-left: auto;
  margin-right: auto;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.post-nav-prev,
.post-nav-next {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  text-decoration: none;
  max-width: 45%;
}

.post-nav-next {
  text-align: right;
  margin-left: auto;
}

.post-nav-label {
  font-size: 0.7rem;
  color: var(--color-muted);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-nav-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.4;
}

.post-nav-prev:hover .post-nav-title,
.post-nav-next:hover .post-nav-title {
  color: var(--color-accent);
}

.post-nav-prev,
.post-nav-next {
  transition: transform 0.2s var(--ease-out-quart);
}

.post-nav-prev:hover {
  transform: translateX(-3px);
}

.post-nav-next:hover {
  transform: translateX(3px);
}

/* ==========================================================================
   Book Promo (Writing list page)
   ========================================================================== */

.book-promo {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  padding: var(--space-lg);
  background-color: var(--color-bg-mid);
  border-radius: 8px;
  margin-bottom: var(--space-xl);
}

.book-promo-image-link {
  flex-shrink: 0;
}

.book-promo-image-link img {
  width: 120px;
  height: auto;
  display: block;
  border-radius: 8px;
}

.book-promo-text {
  min-width: 0;
}

.book-promo-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.book-promo-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}

.book-promo-title a {
  color: var(--color-text);
  text-decoration: none;
}

.book-promo-title a:hover {
  color: var(--color-accent);
}

.book-promo-desc {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.55;
  margin-bottom: var(--space-sm);
}

.btn--small {
  font-size: 0.85rem;
  padding: 0.4em 1em;
}

@media (max-width: 480px) {
  .book-promo {
    flex-direction: column;
  }
}

/* ==========================================================================
   Post Featured Image
   ========================================================================== */

.post-featured-image {
  max-width: var(--prose-width);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-lg);
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* ==========================================================================
   Gallery Box (used in books, about)
   ========================================================================== */

.gallery-box {
  margin: var(--space-lg) 0;
}

.photo-grid {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.photo-grid img {
  flex: 1;
  min-width: 0;
  height: auto;
  display: block;
  border-radius: 8px;
}

.gallery-box em {
  display: block;
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* ==========================================================================
   Contact Form
   ========================================================================== */

.contact-form-wrap {
  max-width: var(--prose-width);
  margin: var(--space-xl) auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.15s ease;
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -1px;
  border-color: var(--color-accent);
}

.form-field textarea {
  resize: vertical;
  min-height: 180px;
}

.contact-form-success {
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid var(--color-accent);
  color: var(--color-text);
}

.contact-form-error {
  font-size: 0.9rem;
  color: var(--color-accent);
  margin-top: var(--space-xs);
}

/* ==========================================================================
   Nav Icons (search + dark mode toggle)
   ========================================================================== */

.nav-icons {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.nav-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  border-radius: 50%;
  transition: color 0.25s ease, background-color 0.25s ease;
  user-select: none;
}

.nav-icon-btn:hover {
  color: var(--color-accent);
  background-color: var(--color-bg-mid);
}

/* Show moon in light mode, sun in dark mode */
.icon-sun { display: none; }
.icon-moon { display: block; }

:root[dark] .icon-sun,
.dark-mode .icon-sun { display: block; }

:root[dark] .icon-moon,
.dark-mode .icon-moon { display: none; }

/* ==========================================================================
   Search Overlay
   ========================================================================== */

.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;
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.search-overlay.is-open {
  z-index: 200;
  opacity: 1;
}

.search-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 94;
  background: rgba(0,0,0,0.6);
}

body.search-open {
  overflow: hidden;
}

.search-box {
  position: relative;
  z-index: 100;
  display: flex;
  flex-direction: column;
  max-width: 700px;
  max-height: calc(100vh - 160px);
  margin: 80px auto 0;
  padding: 60px;
  border-radius: 8px;
  background: var(--color-bg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  transition: transform 0.25s ease;
  will-change: transform;
}

:root[dark] .search-box {
  box-shadow: 0 8px 40px rgba(0,0,0,0.55);
  border: 1px solid var(--color-border);
}

.search-overlay:not(.is-open) .search-box {
  transform: translateY(-20px);
}

.search-group {
  position: relative;
  margin-bottom: 32px;
}

.search-close {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-text);
  color: var(--color-bg);
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease;
  will-change: transform;
}

.search-close:hover {
  transform: translateY(-50%) rotate(90deg);
  background-color: var(--color-accent);
  color: #fff;
}

.search-input {
  width: 100%;
  padding: 22px 58px 22px 22px;
  font-size: 1.15rem;
  font-weight: 600;
  font-family: var(--font-body);
  line-height: 1.4;
  border: 2px solid var(--color-text);
  border-radius: 8px;
  color: var(--color-text);
  background-color: var(--color-bg);
  outline: 0;
  transition: border-color 0.25s ease;
}

.search-input::placeholder {
  font-weight: 700;
  color: var(--color-muted);
}

.search-input:focus {
  border-color: var(--color-accent);
}

.search-input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -1px;
}

.search-results {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.search-result {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}

.search-result:last-child {
  border-bottom: none;
}

.search-result-date {
  display: block;
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-bottom: 2px;
}

.search-result-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.search-result:hover .search-result-title {
  color: var(--color-accent);
}

.search-no-results {
  color: var(--color-muted);
  font-size: 0.9rem;
  padding: 10px 0;
}

@media (max-width: 700px) {
  .search-box {
    margin: 40px 16px 0;
    max-height: calc(100vh - 80px);
    padding: 32px;
  }
}


/* ==========================================================================
   YouTube Facade
   ========================================================================== */

.yt-facade {
  position: relative;
  cursor: pointer;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.yt-facade-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.yt-facade:hover .yt-facade-thumb { opacity: 0.7; }

.yt-facade-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  transition: transform 0.15s ease;
}

.yt-facade:hover .yt-facade-play { transform: translate(-50%, -50%) scale(1.1); }

.yt-facade-notice {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.4em 0.75em;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.45);
}

.yt-facade-notice a { color: rgba(255,255,255,0.95); }

.yt-facade:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Activated iframe — replaces facade on click */
.yt-iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: none;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .yt-facade-thumb,
  .yt-facade-play { transition: none; }
  .yt-facade:hover .yt-facade-play { transform: translate(-50%, -50%); }
}

/* ==========================================================================
   Featured Post (Writing list page) — matches book-promo flex style
   ========================================================================== */

.featured-post {
  display: flex;
  gap: var(--space-lg);
  align-items: stretch;
  padding: var(--space-lg);
  background-color: var(--color-bg-mid);
  border-radius: 8px;
  margin-bottom: var(--space-xl);
}

.featured-post-image-link {
  flex-shrink: 0;
  display: block;
  aspect-ratio: 780 / 546;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--color-bg-mid);
  max-width: 50%;
}

.featured-post-image-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-post-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.featured-post-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  font-weight: 700;
}

.featured-post-title {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  line-height: 1.25;
  margin-bottom: 0;
}

.featured-post-title a {
  color: var(--color-text);
  text-decoration: none;
}

.featured-post-title a:hover {
  color: var(--color-accent);
}

.featured-post-date {
  display: block;
  font-size: 0.72rem;
  color: var(--color-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.featured-post-desc {
  font-size: 0.92rem;
  color: var(--color-muted);
  line-height: 1.55;
  flex: 1;
}


.featured-post--no-image .featured-post-title {
  font-size: clamp(1.68rem, 3.6vw, 2.4rem);
}

@media (max-width: 600px) {
  .featured-post {
    flex-direction: column;
  }

  .featured-post-image-link {
    flex: none;
    width: 100%;
  }
}

/* ==========================================================================
   Testimonial Pullquote (Homepage — single quote)
   ========================================================================== */

.testimonial-pullquote--band {
  background-color: var(--color-bg-mid);
  padding: var(--space-lg) 0 var(--space-xl);
}

@keyframes pullquote-cycle {
  0%    { opacity: 0; }
  0.45% { opacity: 1; }  /* 0.5s fade in  (0.5/110) */
  8.64% { opacity: 1; }  /* hold ends     (9.5/110) */
  9.09% { opacity: 0; }  /* 0.5s fade out (10/110)  */
  100%  { opacity: 0; }
}

/* Grid wrapper stacks all cards in the same cell — height = tallest card, no resize */
.pullquote-cycle {
  display: grid;
}

.pullquote-card {
  grid-area: 1 / 1;
  max-width: var(--prose-width);
  margin: 0 auto;
  border-left: none;
  padding-left: 0;
  font-style: normal;
  color: var(--color-text);
  opacity: 0;
  /* 11 items × 10s = 110s cycle */
  animation: pullquote-cycle 110s linear calc(var(--i) * 10s) infinite both;
}

.pullquote-card::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 7rem;
  line-height: 1;
  color: var(--color-accent);
  display: block;
  margin-bottom: -0.42em;
}

.pullquote-text {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 3.5vw, 1.9rem);
  line-height: 1.45;
  font-style: italic;
  margin-bottom: 0.75rem;
}

.pullquote-text::after {
  content: '\201D';
  font-family: var(--font-heading);
  font-style: normal;
  color: var(--color-text);
}

.pullquote-attribution {
  font-size: 0.85rem;
}

.pullquote-name::before {
  content: '\2014\00A0';
  color: var(--color-muted);
  font-weight: 400;
}

.pullquote-name {
  color: var(--color-text);
  font-weight: 600;
}

.pullquote-role::before {
  content: ',\00A0';
  color: var(--color-muted);
}

.pullquote-role {
  color: var(--color-muted);
}

/* ==========================================================================
   Newsletter Inline (Writing page — dark band)
   ========================================================================== */

.newsletter-inline {
  background-color: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-xl);
  border-radius: 8px;
}

:root[dark] .newsletter-inline {
  background-color: var(--color-bg-mid);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.newsletter-inline-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 760px) {
  .newsletter-inline-inner {
    grid-template-columns: 1fr 1fr;
  }
}

.newsletter-inline-title {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  margin-bottom: var(--space-xs);
  color: var(--color-bg);
}

:root[dark] .newsletter-inline-title {
  color: var(--color-text);
}

.newsletter-inline-desc {
  font-size: 0.9rem;
  color: var(--color-bg-mid);
  line-height: 1.55;
}

:root[dark] .newsletter-inline-desc {
  color: var(--color-muted);
}

.newsletter-inline-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.newsletter-inline-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.newsletter-inline-input {
  flex: 1;
  min-width: 0;
  padding: 0.6em 0.9em;
  font-size: 0.95rem;
  font-family: var(--font-body);
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: var(--color-bg);
  outline: none;
  border-radius: 8px;
}

:root[dark] .newsletter-inline-input {
  border-color: var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
}

.newsletter-inline-input::placeholder {
  color: rgba(255,255,255,0.5);
}

:root[dark] .newsletter-inline-input::placeholder {
  color: var(--color-muted);
}

.newsletter-inline-input:focus-visible {
  outline: 2px solid rgba(255,255,255,0.9);
  outline-offset: -1px;
  border-color: rgba(255,255,255,0.7);
}

:root[dark] .newsletter-inline-input:focus-visible {
  outline-color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
  :root {
    --space-xl: 2.5rem;
    --space-2xl: 4rem;
  }

  .newsletter-form-row {
    flex-direction: column;
  }

  .newsletter-input {
    width: 100%;
  }

  /* Stack prev/next post navigation vertically */
  .post-nav {
    flex-direction: column;
    gap: var(--space-md);
  }

  .post-nav-prev,
  .post-nav-next {
    max-width: 100%;
    text-align: left;
    margin-left: 0;
  }

  /* Stack newsletter inline form row */
  .newsletter-inline-row {
    flex-direction: column;
  }
}

/* Landscape phones: tighten vertical padding so content is reachable */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .hero {
    padding: var(--space-lg) 0;
  }

  .hero--has-image .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .hero-image {
    max-width: 100%;
    margin: 0;
  }

  .home-section {
    padding: var(--space-xl) 0 var(--space-lg);
  }
}

/* ==========================================================================
   Speaking page overrides
   ========================================================================== */

/* Prose body matches the 70% hero image width */
.speaking-page .list-header-prose {
  width: 70%;
  max-width: 70%;
}

/* 16:9 aspect ratio for presentation slide thumbnails */
.speaking-page .post-card-image {
  aspect-ratio: 16 / 9;
}

@media (max-width: 700px) {
  .speaking-page .list-header-prose {
    width: 100%;
    max-width: 100%;
  }
}

/* ==========================================================================
   Magazine Layout — Writing / Posts list page
   ========================================================================== */

/* Masthead: tighten bottom padding, let hero rule define the boundary */
.magazine-masthead {
  padding-bottom: var(--space-md);
}

.magazine-masthead .list-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  letter-spacing: -0.02em;
}

.magazine-masthead .list-description {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.magazine-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-xl);
  align-items: stretch;
  padding: 0 0 var(--space-xl);
  margin-bottom: var(--space-lg);
}

.magazine-hero--no-image {
  grid-template-columns: 1fr;
  max-width: 740px;
}

.magazine-hero-image-link {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  flex-shrink: 0;
}

.magazine-hero-image-link img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  transition: transform 0.45s var(--ease-out-quart);
}

.magazine-hero-image-link:hover img {
  transform: scale(1.02);
}

.magazine-hero-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.magazine-hero-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  font-weight: 700;
  font-family: var(--font-body);
}

.magazine-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

.magazine-hero-title a {
  color: var(--color-text);
  text-decoration: none;
}

.magazine-hero-title a:hover {
  color: var(--color-accent);
}

.magazine-hero--no-image .magazine-hero-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.magazine-hero-date {
  display: block;
  font-size: 0.75rem;
  color: var(--color-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.magazine-hero-desc {
  font-size: 1rem;
  color: var(--color-muted);
  line-height: 1.65;
  margin-top: var(--space-xs);
  flex: 1;
}

/* ── Section headers ──────────────────────────────────────────────────────── */

.magazine-section-header {
  margin-bottom: var(--space-md);
}

.magazine-section-header--ruled {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
  margin-top: var(--space-sm);
}

/* Homepage writing section — gap between grid and button */
.home-posts .magazine-row-a {
  padding-bottom: 1.5em;
}

.magazine-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  font-weight: 700;
  font-family: var(--font-body);
}

/* ── Row A — 2-col + 1-col + 1-col ───────────────────────────────────────── */

.magazine-row-a {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
}

/* ── Row B — four equal cards ─────────────────────────────────────────────── */

.magazine-row-b {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  padding-top: var(--space-sm);
  padding-bottom: var(--space-md);
  border-top: 1px solid var(--color-border);
}

/* ── Magazine card (shared by row A & B) ──────────────────────────────────── */

.magazine-card {
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.magazine-card--double {
  grid-column: span 2;
}

.magazine-card-image-link {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: var(--space-sm);
  flex-shrink: 0;
}

.magazine-card-image-link img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  transition: transform 0.4s var(--ease-out-quart);
}

.magazine-card-image-link:hover img {
  transform: scale(1.03);
}

.magazine-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-sm);
}

.magazine-card--has-image .magazine-card-body {
  border-top: none;
  padding-top: 0;
}

.magazine-card-date {
  display: block;
  font-size: 0.72rem;
  color: var(--color-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.magazine-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
}

.magazine-card-title--large {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.2;
}

.magazine-card-link {
  color: var(--color-text);
  text-decoration: none;
}

/* Stretch link to cover full card */
.magazine-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.magazine-card:hover .magazine-card-link {
  color: var(--color-accent);
}

.magazine-card-desc {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin-top: 0.1rem;
}

/* ── Text list ────────────────────────────────────────────────────────────── */

.magazine-text-list {
  display: flex;
  flex-direction: column;
}

.magazine-text-item {
  border-bottom: 1px solid var(--color-border);
}

.magazine-text-link {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  column-gap: var(--space-md);
  align-items: baseline;
  padding: var(--space-sm) 0;
  text-decoration: none;
  color: inherit;
}

.magazine-text-link:hover .magazine-text-title {
  color: var(--color-accent);
}

.magazine-text-date {
  font-size: 0.72rem;
  color: var(--color-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.magazine-text-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.magazine-text-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-text);
  transition: color 0.15s ease;
}

.magazine-text-desc {
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.55;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .magazine-hero {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .magazine-row-a,
  .magazine-row-b {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 800px) {
  /* Reduce horizontal padding so the subscribe form row never overflows */
  .newsletter-inline {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }

  .magazine-hero {
    grid-template-columns: 1fr;
  }

  .magazine-hero-image-link img {
    aspect-ratio: 16 / 9;
  }

  .magazine-row-a {
    grid-template-columns: repeat(2, 1fr);
  }

  .magazine-card--double {
    grid-column: span 2;
  }

  .magazine-row-b {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .newsletter-inline {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .magazine-row-a,
  .magazine-row-b {
    grid-template-columns: 1fr;
  }

  .magazine-card--double {
    grid-column: span 1;
  }

  .magazine-text-link {
    grid-template-columns: 3.5rem 1fr;
    column-gap: var(--space-sm);
  }
}

/* ── Focus states ─────────────────────────────────────────────────────────── */

/* Stretched card link — move focus ring to the ::after overlay */
.magazine-card-link:focus-visible {
  outline: none;
}

.magazine-card-link:focus-visible::after {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 8px;
}

/* Text list link — full-row focus ring */
.magazine-text-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Hero title link */
.magazine-hero-title a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Global focus-visible ─────────────────────────────────────────────────── */

.btn:focus-visible,
.nav-link:focus-visible,
.nav-icon-btn:focus-visible,
.social-link:focus-visible,
.footer-nav-link:focus-visible,
.post-nav-prev:focus-visible,
.post-nav-next:focus-visible,
.site-logo:focus-visible,
.search-close:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Post card stretched link — focus ring on overlay */
.post-card-link:focus-visible {
  outline: none;
}

.post-card-link:focus-visible::after {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 8px;
}

/* ── Archive (page 2+) text list ─────────────────────────────────────────── */

.magazine-text-list--archive {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
}

/* ── Skip link ────────────────────────────────────────────────────────────── */

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  top: var(--space-sm);
  left: var(--space-sm);
  width: auto;
  height: auto;
  padding: 0.5em 1em;
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 9999;
}

/* ── CSS scroll-driven reveals (progressive enhancement) ─────────────────── */

@supports (animation-timeline: view()) {
  .magazine-card {
    animation: ap-fade-in 0.5s var(--ease-out-quart) both;
    animation-timeline: view();
    animation-range: entry 0% entry 25%;
  }

  .magazine-text-item {
    animation: ap-fade-in 0.4s var(--ease-out-quart) both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }

  .featured-post {
    animation: ap-fade-in 0.45s var(--ease-out-quart) both;
    animation-timeline: view();
    animation-range: entry 0% entry 25%;
  }

  .post-card {
    animation: ap-fade-in 0.4s var(--ease-out-quart) both;
    animation-timeline: view();
    animation-range: entry 0% entry 25%;
  }
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  /* Show first testimonial statically, hide rest */
  .pullquote-card {
    animation: none;
    opacity: 0;
  }
  .pullquote-card:first-child {
    opacity: 1;
  }

  /* Disable image hover zoom */
  .magazine-hero-image-link:hover img,
  .magazine-card-image-link:hover img {
    transform: none;
  }
  .magazine-hero-image-link img,
  .magazine-card-image-link img {
    transition: none;
  }

  /* Disable mobile nav slide */
  .main-nav {
    transition: opacity 0.2s ease, visibility 0s;
  }

  /* Disable search overlay fade and slide */
  .search-overlay {
    transition: none;
  }
  .search-overlay:not(.is-open) .search-box {
    transform: none;
  }

  /* Disable search close rotation */
  .search-close:hover {
    transform: translateY(-50%);
  }

  /* Kill all hero entrance animations */
  .hero-headline,
  .hero-body,
  .hero-actions,
  .hero-image {
    animation: none;
  }

  /* Kill scroll-driven reveals */
  .magazine-card,
  .magazine-text-item,
  .featured-post,
  .post-card {
    animation: none;
    opacity: 1;
  }

  /* Kill tag and nav hover transforms */
  .post-tag:hover,
  .post-nav-prev:hover,
  .post-nav-next:hover,
  .btn:hover,
  .btn:active {
    transform: none;
    box-shadow: none;
  }

  /* Disable body theme transition */
  body {
    transition: none;
  }

}
