/* ==========================================================================
   Blog: listing, single post, author page + content typography (.prose)
   ========================================================================== */

/* ---------- Shared ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-600);
  background: #fff;
  border: 1px solid var(--brand-100);
  padding: .35rem .8rem;
  border-radius: 999px;
}

.cat-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-600);
  text-decoration: none;
}
.cat-tag:hover { color: var(--brand-700); }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .9rem;
  font-size: .85rem;
  color: var(--muted);
}
.meta-row .dot { width: 4px; height: 4px; border-radius: 50%; background: #c9c2cc; }

.blog-breadcrumb { font-size: .84rem; margin-bottom: 1rem; }
.blog-breadcrumb ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 0; color: var(--muted); }
.blog-breadcrumb li + li::before { content: "/"; margin-right: .35rem; color: #c9c2cc; }
.blog-breadcrumb a { color: var(--muted); text-decoration: none; }
.blog-breadcrumb a:hover { color: var(--brand-600); }
.blog-breadcrumb [aria-current] { color: var(--navy); font-weight: 600; }

/* ---------- Listing hero ---------- */
.blog-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(237, 28, 148, .12), transparent 60%),
    radial-gradient(500px 260px at 0% 100%, rgba(27, 37, 89, .08), transparent 60%),
    var(--soft);
  border-bottom: 1px solid var(--line);
}
.blog-hero h1 { color: var(--navy); font-size: clamp(2rem, 4.2vw, 3.1rem); margin: 1rem 0 .75rem; }
.blog-hero .lead { color: var(--muted); font-size: 1.08rem; max-width: 620px; }

.blog-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .35rem .35rem 1.1rem;
  box-shadow: var(--shadow-sm);
  max-width: 520px;
}
.blog-search .icon { color: var(--muted); }
.blog-search input { flex: 1; border: 0; outline: 0; background: transparent; min-width: 0; font-size: .95rem; padding: .45rem 0; }
.blog-search .btn { padding: .5rem 1.15rem; box-shadow: none; }

.chip-row { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-size: .87rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s ease;
}
.chip small { color: var(--muted); font-weight: 600; }
.chip:hover { border-color: var(--brand); color: var(--brand-600); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip.active small { color: rgba(255, 255, 255, .7); }

/* ---------- Cards ---------- */
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.post-card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--brand-50); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card-media img { transform: scale(1.04); }
.post-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem 1.35rem 1.35rem; }
.post-card-title { font-size: 1.22rem; line-height: 1.35; margin: .45rem 0 .6rem; color: var(--navy); }
.post-card-title a { color: inherit; text-decoration: none; }
.post-card-title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.post-card-excerpt {
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.65;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .meta-row { margin-top: auto; font-size: .8rem; }
.post-card .cat-tag { position: relative; z-index: 1; }

.post-featured { display: grid; grid-template-columns: 1fr; }
.post-featured .post-card-media { aspect-ratio: 16 / 9; }
.post-featured .post-card-body { padding: 1.5rem; justify-content: center; }
.post-featured .post-card-title { font-size: clamp(1.45rem, 2.4vw, 2rem); }
.post-featured .post-card-excerpt { -webkit-line-clamp: 4; font-size: 1rem; }
@media (min-width: 992px) {
  .post-featured { grid-template-columns: 1.25fr 1fr; }
  .post-featured .post-card-media { aspect-ratio: auto; min-height: 380px; }
  .post-featured .post-card-body { padding: 2.5rem; }
}

.label-featured {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--brand-50);
  border-radius: 999px;
  padding: .25rem .65rem;
  align-self: flex-start;
  margin-bottom: .6rem;
}

.blog-empty { text-align: center; padding: 4rem 1rem; color: var(--muted); }

/* ---------- Pagination ---------- */
.blog-pagination { display: flex; justify-content: center; gap: .4rem; flex-wrap: wrap; margin-top: 3rem; }
.blog-pagination a,
.blog-pagination span {
  min-width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0 .9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
}
.blog-pagination a:hover { border-color: var(--brand); color: var(--brand-600); }
.blog-pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.blog-pagination .disabled { opacity: .45; }

/* ---------- Single post ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--brand), #ff6fbe);
  z-index: 1040;
  pointer-events: none;
}

.post-hero { background: var(--soft); border-bottom: 1px solid var(--line); }
.post-hero h1 { color: var(--navy); font-size: clamp(1.8rem, 3.6vw, 2.9rem); line-height: 1.18; margin: .6rem 0 1rem; max-width: 900px; }
.post-hero .post-excerpt { font-size: 1.08rem; color: var(--muted); max-width: 820px; margin-bottom: 1.5rem; }

.byline { display: flex; align-items: center; gap: .75rem; }
.byline img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid #fff; box-shadow: var(--shadow-sm); }
.byline-name { font-weight: 700; color: var(--navy); font-size: .95rem; line-height: 1.3; text-decoration: none; }
.byline-name:hover { color: var(--brand-600); }
.byline .meta-row { font-size: .82rem; }

.post-cover {
  margin: 0 0 2rem;
  border-radius: 20px;
  overflow: hidden;
  background: var(--brand-50);
  aspect-ratio: 16 / 9;
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.post-sidebar { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 1.25rem; }

.toc-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.25rem 1.1rem 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.toc-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 .75rem;
}
.toc-title .icon { color: var(--brand); }
.toc-scroll { max-height: calc(100vh - var(--header-h) - 420px); min-height: 140px; overflow-y: auto; padding-right: .25rem; scrollbar-width: thin; }
.toc-list { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc-list li { margin: 0; }
.toc-list a {
  display: block;
  position: relative;
  padding: .42rem .5rem .42rem .9rem;
  font-size: .88rem;
  line-height: 1.45;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid var(--line);
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.toc-list .toc-h3 a { padding-left: 1.7rem; font-size: .84rem; }
.toc-list a:hover { color: var(--navy); border-left-color: #d6cdd6; }
.toc-list a.active { color: var(--brand-700); font-weight: 600; border-left-color: var(--brand); background: var(--brand-50); border-radius: 0 8px 8px 0; }

.cta-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 1.4rem;
  color: #fff;
  background: linear-gradient(150deg, var(--brand) 0%, #c3127a 55%, var(--navy) 130%);
  box-shadow: 0 18px 40px -20px rgba(237, 28, 148, .7);
}
.cta-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
}
.cta-card-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; position: relative; z-index: 1; }
.cta-card-head img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid rgba(255, 255, 255, .7); background: #fff; }
.cta-card h2 { font-size: 1.2rem; color: #fff; margin: 0; line-height: 1.3; }
.cta-card p { font-size: .9rem; color: rgba(255, 255, 255, .9); margin-bottom: 1rem; line-height: 1.6; position: relative; z-index: 1; }
.cta-card .btn { position: relative; z-index: 1; border-radius: 999px; font-weight: 700; padding: .6rem 1rem; }
.cta-card .btn-light { color: var(--brand-700); }
.cta-card .btn-outline-light { font-weight: 600; }
.cta-card .cta-points { list-style: none; padding: 0; margin: 0 0 1rem; font-size: .84rem; position: relative; z-index: 1; }
.cta-card .cta-points li { display: flex; gap: .45rem; align-items: flex-start; line-height: 1.5; margin-bottom: .3rem; }

.toc-mobile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 1.75rem;
}
.toc-mobile summary {
  list-style: none;
  cursor: pointer;
  padding: .9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  color: var(--navy);
  font-size: .95rem;
}
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--brand); }
.toc-mobile[open] summary::after { content: "–"; }
.toc-mobile .toc-list { padding: 0 1rem 1rem; }

.post-footer-block { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 2rem; }

.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.share-row span { font-weight: 700; color: var(--navy); font-size: .9rem; margin-right: .25rem; }
.share-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--navy);
  background: #fff;
  transition: all .15s ease;
}
.share-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

.author-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
  background: linear-gradient(135deg, var(--brand-50), #fff 70%);
  border: 1px solid var(--brand-100);
  border-radius: 20px;
  padding: 1.5rem;
}
.author-box img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: top; border: 3px solid #fff; box-shadow: var(--shadow-sm); }
.author-box .label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-600); }
.author-box h2 { font-size: 1.35rem; margin: .2rem 0 .15rem; color: var(--navy); }
.author-box h2 a { color: inherit; text-decoration: none; }
.author-box .creds { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: .6rem; }
.author-box p { font-size: .94rem; color: var(--ink); margin-bottom: .9rem; }
@media (max-width: 575.98px) {
  .author-box { grid-template-columns: 1fr; text-align: left; }
  .author-box img { width: 80px; height: 80px; }
}

.medical-note {
  display: flex;
  gap: .6rem;
  font-size: .82rem;
  color: var(--muted);
  background: var(--soft);
  border-radius: 12px;
  padding: .9rem 1rem;
  margin-top: 1.5rem;
}
.medical-note .icon { color: var(--navy); margin-top: .2rem; }

.related-section { background: var(--soft); border-top: 1px solid var(--line); }

/* ---------- Author page ---------- */
.author-hero { background: var(--soft); border-bottom: 1px solid var(--line); }
.author-photo {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--brand-100), #fff);
  box-shadow: var(--shadow);
}
.author-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.author-hero h1 { color: var(--navy); font-size: clamp(2rem, 4vw, 3rem); margin: .8rem 0 .4rem; }
.author-role { font-weight: 600; color: var(--brand-700); margin-bottom: 1rem; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 768px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; }
.stat strong { display: block; font-family: var(--font-heading); font-size: 1.6rem; color: var(--brand-600); line-height: 1.1; }
.stat span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.cred-list { list-style: none; padding: 0; margin: 0; }
.cred-list li { display: flex; gap: .7rem; padding: .75rem 0; border-bottom: 1px dashed var(--line); }
.cred-list li:last-child { border-bottom: 0; }
.cred-list .icon { color: var(--brand); margin-top: .35rem; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; height: 100%; }
.info-card h2 { font-size: 1.3rem; color: var(--navy); margin-bottom: 1rem; }
.skill-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.skill-chips span { background: var(--brand-50); color: var(--brand-700); font-weight: 600; font-size: .85rem; padding: .4rem .85rem; border-radius: 999px; }

/* ==========================================================================
   .prose — typography for blog content (from the editor / pasted content).
   Every rule is scoped so post content can never affect the rest of the site.
   ========================================================================== */
.prose {
  font-size: 1.075rem;
  line-height: 1.85;
  color: #2a2f40;
  overflow-wrap: break-word;
}
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.25rem; line-height: 1.85; }
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 { color: var(--navy); scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h2 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); margin: 2.6rem 0 1rem; line-height: 1.28; }
.prose h3 { font-size: clamp(1.2rem, 1.9vw, 1.4rem); margin: 2rem 0 .75rem; line-height: 1.35; }
.prose h4 { font-size: 1.12rem; margin: 1.6rem 0 .6rem; }
.prose h5, .prose h6 { font-size: 1rem; margin: 1.4rem 0 .5rem; font-family: var(--font-body); font-weight: 700; }
.prose a { color: var(--brand-600); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--brand-700); text-decoration-thickness: 2px; }
.prose strong { color: #151a2b; font-weight: 700; }
.prose ul,
.prose ol { margin: 0 0 1.4rem; padding-left: 1.4rem; }
.prose li { margin-bottom: .45rem; padding-left: .3rem; line-height: 1.75; }
.prose li > p { margin-bottom: .4rem; }
.prose li::marker { color: var(--brand); font-weight: 700; }
.prose ul ul, .prose ol ol, .prose ul ol, .prose ol ul { margin: .45rem 0 .5rem; }
.prose blockquote {
  margin: 1.8rem 0;
  padding: 1.1rem 1.4rem;
  border-left: 4px solid var(--brand);
  background: var(--brand-50);
  border-radius: 0 14px 14px 0;
  font-size: 1.05rem;
  color: var(--navy);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose img { max-width: 100%; height: auto; border-radius: 14px; display: block; margin: 1.75rem auto; }
.prose p > img:only-child { margin: .5rem auto; }
.prose figure { margin: 1.75rem 0; }
.prose figure img { margin: 0 auto; }
.prose figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .6rem; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.5rem 0; opacity: 1; }
.prose code { font-size: .9em; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: .1em .35em; color: var(--brand-700); }
.prose pre { background: var(--navy-900); color: #f4f4f8; border-radius: 12px; padding: 1rem 1.2rem; overflow-x: auto; margin: 0 0 1.4rem; }
.prose pre code { background: none; border: 0; color: inherit; padding: 0; }
.prose mark { background: #fff1a8; padding: 0 .15em; border-radius: 3px; }
.prose .table-wrap { overflow-x: auto; margin: 1.75rem 0; border: 1px solid var(--line); border-radius: 14px; }
.prose table { display: table; width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0; }
.prose th,
.prose td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.6; }
.prose th { background: var(--brand-50); color: var(--navy); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.prose td p, .prose th p { margin: 0; }
.prose .embed-wrap { position: relative; aspect-ratio: 16 / 9; margin: 1.75rem 0; border-radius: 14px; overflow: hidden; background: #000; }
.prose .embed-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 575.98px) {
  .prose { font-size: 1.02rem; }
}
