/* Part A: blog post layout (layout: post) — scoped to article.post */

/* A1 — headline */
article.post .post-hero-caption h1,
article.post .post-header h1 {
  font-family: 'Barlow Condensed', 'Avenir Next Condensed', 'Arial Narrow', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.02;
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  max-width: 900px;
}

/* Long titles (>60 chars): smaller type + wider measure to hit line-wrap targets */
article.post.post-title-long .post-hero-caption h1,
article.post.post-title-long .post-header h1 {
  font-size: clamp(1.875rem, 4.25vw, 2.875rem);
  max-width: min(100%, 62rem);
}

@media (max-width: 768px) {
  article.post.post-title-long .post-hero-caption .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

@media (max-width: 480px) {
  article.post .post-hero-caption h1,
  article.post .post-header h1 {
    font-size: 2.25rem;
  }

  article.post.post-title-long .post-hero-caption h1,
  article.post.post-title-long .post-header h1 {
    font-size: 1.875rem;
    max-width: none;
  }
}

/* 95+ char titles (e.g. programs-compared): tighter margins, min ~31.5px type */
@media (max-width: 480px) {
  article.post.post-title-extra .post-hero-overlay {
    overflow: hidden;
  }

  article.post.post-title-extra .post-hero-caption .container {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
  }

  article.post.post-title-extra .post-hero-caption h1,
  article.post.post-title-extra .post-header h1 {
    font-size: 1.8235rem;
    letter-spacing: 0;
    text-wrap: balance;
  }

  /* Full-bleed measure (~400px) stays inside clipped hero — 4 lines at 31px, no page scroll */
  article.post.post-title-extra .post-hero-caption h1 {
    width: 400px;
    max-width: none;
    margin-left: -17px;
    padding: 0;
  }
}

/* A3 — section headings */
article.post .post-body h2 {
  font-family: 'Barlow Condensed', 'Avenir Next Condensed', 'Arial Narrow', sans-serif;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  line-height: 1.1;
  font-size: 2.1rem;
  margin: 2.75rem 0 1rem;
  padding-bottom: 0;
  border-bottom: none;
}

article.post .post-body h2::before {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: #c41e3a;
  margin-bottom: 0.75rem;
}

@media (max-width: 480px) {
  article.post .post-body h2 {
    font-size: 1.8rem;
  }
}

/* A4 — body text measure */
article.post .post-main {
  max-width: 39.25rem;
}

article.post .post-body p {
  line-height: 1.65;
}

article.post .post-body li {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
}

/* A5 — photo captions */
article.post .post-body p:has(> img:only-child) {
  margin: 0;
}

article.post .post-body p:has(> img:only-child) img {
  margin-bottom: 0.5rem;
}

article.post .post-body p:has(> img:only-child) + p:has(> em:only-child) {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #6b7280;
  font-style: normal;
  margin-bottom: 2rem;
}

article.post .post-body p:has(> img:only-child) + p:has(> em:only-child) em {
  font-style: normal;
}

/* A6 — top share bar spacing */
article.post .post-layout {
  padding-top: 1.5rem;
}

article.post .post-share.post-share-top {
  border-top: none;
  padding: 0 0 1rem;
  border-bottom: 1px solid #eee;
  margin-bottom: 1.75rem;
}

article.post .post-body {
  padding-top: 0;
}

/* A7 — end of article */
article.post .post-browse-directory {
  background: transparent;
  color: #333;
  border-radius: 0;
  border-top: 1px solid #eee;
}

article.post .post-browse-directory a {
  color: #c41e3a;
}

article.post .post-browse-directory a:hover {
  color: #a8182f;
}

article.post .post-author-card {
  border-left: none;
}

article.post .post-author-name,
article.post .post-author-name:visited {
  display: block;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.35rem;
}

article.post .post-author-name:hover {
  color: #c41e3a;
}

article.post .post-author-avatar-link {
  flex-shrink: 0;
}

.author-profile-page {
  padding-bottom: 3rem;
}

.author-profile-hero {
  background: #1a1a2e;
  color: #fff;
  padding: 2.5rem 0 2rem;
}

.author-profile-back-link {
  color: #c9a84c;
  font-size: 0.95rem;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.author-profile-header {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.author-profile-photo {
  border-radius: 12px;
  object-fit: cover;
  width: 160px;
  height: 160px;
}

.author-profile-title {
  color: #c9a84c;
  font-size: 1.05rem;
  margin: 0.35rem 0 1rem;
}

.author-profile-lede {
  color: #e5e7eb;
  line-height: 1.65;
  max-width: 42rem;
}

.author-profile-coach-link a {
  color: #fff;
  text-decoration: underline;
}

.author-profile-body {
  padding: 2.5rem 1rem 1rem;
}

.author-profile-body h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
}

.author-profile-books {
  line-height: 1.65;
  padding-left: 1.25rem;
}

.author-profile-posts {
  padding: 2rem 0 0;
  border-top: 1px solid #eee;
}

.author-profile-posts h2 {
  margin-bottom: 1.25rem;
}

/* A8 — hero photo */
article.post .post-hero-overlay img {
  opacity: 0.85;
}
