/* Blog. Builds on /styles.css tokens and components. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Listing hero */
.blog-hero .hero-inner { padding: 60px 22px 92px; }
.blog-hero h1 { font-size: clamp(34px, 5.4vw, 54px); }
.blog-hero .sub { margin-bottom: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink-faint); margin-bottom: 18px; }
.crumbs a { color: var(--purple); text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.crumbs.on-dark { justify-content: center; color: rgba(244,244,244,.6); }
.crumbs.on-dark a { color: var(--lime); }

/* Topic nav: pills are links here */
.blog-list { padding-top: 40px; }
.topic-nav { margin-bottom: 40px; }
a.pill { text-decoration: none; }
.pill[aria-current="page"] { background: var(--violet); color: var(--white); border-color: var(--violet); }

/* Cards */
.bpost-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.bpost-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease); position: relative; }
.bpost-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pc-img { display: block; aspect-ratio: 16/9; overflow: hidden; background: linear-gradient(135deg, var(--violet), var(--purple)); }
.pc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.bpost-card:hover .pc-img img { transform: scale(1.04); }
.pc-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pc-topic { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--purple); text-decoration: none; position: relative; z-index: 2; }
.pc-topic:hover { text-decoration: underline; }
.bpost-card h2, .bpost-card h3 { font-size: 20px; line-height: 1.25; }
.bpost-card h2 a, .bpost-card h3 a { color: var(--violet); text-decoration: none; }
.bpost-card h2 a::after, .bpost-card h3 a::after { content: ''; position: absolute; inset: 0; z-index: 1; } /* whole card clickable */
.bpost-card p { color: var(--ink-soft); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bpost-card .pc-meta { margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--ink-faint); display: flex; gap: 8px; }
.feature-wrap { margin-bottom: 56px; }
.bpost-card.feature { display: grid; grid-template-columns: 1.25fr 1fr; }
.bpost-card.feature .pc-img { aspect-ratio: auto; min-height: 320px; }
.bpost-card.feature .pc-body { padding: 36px 36px 32px; justify-content: center; }
.bpost-card.feature h3 { font-size: clamp(26px, 3vw, 34px); }
.bpost-card.feature p { font-size: 17px; -webkit-line-clamp: 4; }
.list-title { font-size: clamp(26px, 3.4vw, 32px); margin-bottom: 24px; }

/* Article */
.article { padding-top: 44px; }
.bpost-head { max-width: 800px; text-align: center; }
.bpost-head .crumbs { justify-content: center; }
.bpost-head h1 { font-size: clamp(34px, 5.2vw, 52px); letter-spacing: -0.025em; }
.dek { font-size: 20px; line-height: 1.55; color: var(--ink-soft); margin: 20px auto 0; max-width: 680px; }
.byline { display: inline-flex; align-items: center; gap: 12px; margin-top: 26px; text-align: left; font-size: 15px; color: var(--violet); }
.byline small { display: flex; gap: 8px; color: var(--ink-faint); font-size: 14px; }
.bpost-hero { max-width: 1044px; margin: 36px auto 0; }
.bpost-hero img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-lg); aspect-ratio: 16/9; object-fit: cover; }

.bpost-body { max-width: 720px; margin: 0 auto; padding: 48px 22px 80px; font-size: 19px; line-height: 1.75; color: #2b3140; }
.bpost-body > * + * { margin-top: 1.1em; }
.bpost-body h2 { font-size: clamp(26px, 3.2vw, 32px); margin-top: 1.9em; scroll-margin-top: 90px; }
.bpost-body h3 { font-size: 23px; margin-top: 1.6em; scroll-margin-top: 90px; }
.bpost-body h4 { font-size: 19px; margin-top: 1.4em; }
.bpost-body h2 + *, .bpost-body h3 + *, .bpost-body h4 + * { margin-top: .6em; }
.bpost-body strong { color: var(--ink); }
.bpost-body a { color: var(--purple); text-underline-offset: 3px; }
.bpost-body ul, .bpost-body ol { padding-left: 1.3em; }
.bpost-body li + li { margin-top: .45em; }
.bpost-body li::marker { color: var(--purple); font-weight: 700; }
.bpost-body blockquote { border-left: 4px solid var(--lime); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 18px 24px; font-family: var(--serif); font-size: 21px; line-height: 1.5; color: var(--violet); box-shadow: var(--shadow); }
.bpost-body blockquote p + p { margin-top: .6em; }
.bpost-body hr { border: 0; height: 1px; background: var(--line); margin: 2.2em 0; }
.bpost-body figure img { border-radius: var(--radius-sm); margin: 0 auto; height: auto; }
.bpost-updated { font-size: 14px; color: var(--ink-faint); }

.bpost-toc { background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 14px 20px; font-size: 16px; }
.bpost-toc summary { cursor: pointer; font-weight: 700; color: var(--violet); }
.bpost-toc ol { margin-top: 10px; }
.bpost-toc a { text-decoration: none; } .bpost-toc a:hover { text-decoration: underline; }

.yt a { position: relative; display: block; aspect-ratio: 16/9; border-radius: var(--radius-sm); overflow: hidden; background: var(--violet); }
.yt img, .yt iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.yt .play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 64px; height: 64px; border-radius: 50%; background: var(--lime); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px -6px rgba(0,0,0,.4); transition: transform .3s var(--ease); }
.yt .play svg { width: 24px; height: 24px; fill: var(--violet); margin-left: 3px; }
.yt a:hover .play { transform: scale(1.1); }
.yt iframe { aspect-ratio: 16/9; height: auto; border-radius: var(--radius-sm); display: block; }

.bpost-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2.2em; }
.bpost-tags a { font-size: 14px; font-weight: 600; color: var(--violet); background: var(--purple-soft); border-radius: 999px; padding: 5px 14px; text-decoration: none; }
.bpost-tags a:hover { background: var(--violet); color: var(--white); }

.author-box { display: flex; gap: 18px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-top: 2em !important; font-size: 16px; line-height: 1.6; }
.author-box .avatar { width: 56px; height: 56px; font-size: 22px; }
.author-box .ab-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.author-box b { display: block; font-family: var(--serif); font-size: 20px; color: var(--violet); }
.author-box .ab-role { display: block; font-size: 14px; color: var(--purple); font-weight: 600; }
.author-box p:not(.ab-label) { color: var(--ink-soft); margin-top: 8px; }
.author-box a { display: inline-block; margin-top: 8px; font-weight: 700; font-size: 15px; }

.bpost-cta { margin-top: 1.4em !important; background: var(--purple-soft); border-radius: var(--radius); padding: 28px; text-align: center; }
.bpost-cta h2 { font-size: 24px; margin: 0; }
.bpost-cta p { font-size: 16px; color: var(--ink-soft); margin: 10px auto 20px; max-width: 520px; line-height: 1.6; }
.bpost-cta .small { margin: 12px 0 0; font-size: 13px; }
.bpost-disclaimer { font-size: 13px !important; line-height: 1.6; color: var(--ink-faint); margin-top: 1.6em !important; }

.related { padding: 64px 0; }
.related .bpost-grid h3 { font-size: 19px; }

/* Reading progress */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; background: var(--lime); transform-origin: 0 50%; transform: scaleX(0); z-index: 60; pointer-events: none; }

@media (max-width: 900px) {
  .bpost-grid { grid-template-columns: repeat(2, 1fr); }
  .bpost-card.feature { grid-template-columns: 1fr; }
  .bpost-card.feature .pc-img { min-height: 0; aspect-ratio: 16/9; }
  .bpost-card.feature .pc-body { padding: 24px; }
}
@media (max-width: 600px) {
  .bpost-grid { grid-template-columns: 1fr; gap: 20px; }
  .article { padding-top: 28px; }
  .dek { font-size: 18px; }
  .bpost-body { font-size: 18px; padding: 36px 20px 64px; }
  .bpost-body blockquote { font-size: 19px; padding: 16px 18px; }
  .author-box { flex-direction: column; }
  .bpost-hero { padding: 0 12px; }
}
.bpost-body .btn { text-decoration: none; }
.bpost-body .btn-main { color: var(--violet); }
@media (max-width: 600px) {
  .topic-nav { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; margin: 0 -22px 32px; padding: 4px 22px 8px; scrollbar-width: none; }
  .topic-nav::-webkit-scrollbar { display: none; }
  .topic-nav .pill { flex-shrink: 0; }
}
.back-all { text-align: center; margin-top: 2em !important; }
.btn:hover .back-ic { transform: translateX(-3px); }

/* Mobile: compact list cards, calmer hero, left-aligned article head */
@media (max-width: 600px) {
  .blog-hero .hero-inner { padding: 40px 20px 72px; }
  .blog-hero h1 { font-size: 32px; }
  .blog-hero .sub { font-size: 16px; margin-top: 14px; }
  .blog-list { padding-top: 28px; }
  .bpost-grid { gap: 12px; }
  .bpost-card { display: grid; grid-template-columns: 104px 1fr; border-radius: var(--radius-sm); }
  .bpost-card .pc-img { aspect-ratio: auto; height: 100%; min-height: 104px; }
  .bpost-card .pc-body { padding: 12px 14px; gap: 4px; }
  .bpost-card h2, .bpost-card h3, .related .bpost-grid h3 { font-size: 16.5px; line-height: 1.3; }
  .bpost-card p:not(.pc-meta) { display: none; }
  .bpost-card .pc-topic { font-size: 11px; }
  .bpost-card .pc-meta { font-size: 12px; padding-top: 2px; }
  .bpost-card:hover { transform: none; }
  .bpost-head { text-align: left; padding: 0 20px; }
  .bpost-head .crumbs { justify-content: flex-start; }
  .bpost-head h1 { font-size: 30px; }
  .dek { font-size: 17px; margin-top: 14px; }
  .byline { margin-top: 18px; }
  .bpost-hero { padding: 0 20px; margin-top: 24px; }
  .bpost-hero img { border-radius: var(--radius-sm); }
  .related { padding: 44px 0; }
  .related .head { margin-bottom: 24px; }
}

/* Topic nav: label + visible "more" hint when the row scrolls */
.topic-scroll { position: relative; margin-bottom: 40px; }
.topic-scroll .topic-nav { margin-bottom: 0; }
.tn-label { text-align: center; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px; }
.tn-more { display: none; }
@media (max-width: 600px) {
  .topic-scroll { margin-bottom: 28px; }
  .tn-label { text-align: left; margin-bottom: 10px; }
  .topic-scroll .topic-nav { margin-bottom: 0; padding-right: 64px; }
  .tn-more { display: flex; align-items: center; justify-content: flex-end; position: absolute; right: -22px; bottom: 8px; height: 42px; width: 84px; padding-right: 18px; pointer-events: none;
    background: linear-gradient(90deg, rgba(244,244,244,0), var(--white) 55%); transition: opacity .3s var(--ease); }
  .tn-more svg { width: 28px; height: 28px; padding: 6px; border-radius: 50%; background: var(--violet); stroke: var(--white); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; box-shadow: var(--shadow); animation: tn-nudge 1.6s var(--ease) 0.6s 2; }
  .topic-scroll.at-end .tn-more { opacity: 0; }
}
@keyframes tn-nudge { 0%, 100% { transform: none; } 50% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .tn-more svg { animation: none; } }
img.avatar { object-fit: cover; padding: 0; background: var(--purple-soft); }
.author-box img.avatar { width: 56px; height: 56px; }

/* Related videos */
.vids-head { margin-top: 64px; }
.vid-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.vid-card { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.vid-card .yt a, .vid-card .yt iframe { border-radius: var(--radius); box-shadow: var(--shadow); }
.vid-card .yt iframe { width: 100%; aspect-ratio: 16/9; border: 0; display: block; }
.vid-card figcaption { font-family: var(--serif); font-weight: 600; font-size: 17px; line-height: 1.3; color: var(--violet); }
@media (max-width: 900px) { .vid-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .vids-head { margin-top: 44px; }
  .vid-grid { grid-template-columns: 1fr; gap: 20px; }
  .vid-card figcaption { font-size: 16px; }
}
