/* blog-v2.css: full-width blog, like the rest of the site.
   List page: left-aligned filters that stick, a big featured post, 3 clean columns.
   Post page: title + cover side by side, then contents / article / work-with-me card. */

/* ---------- list page ---------- */
html body .blog-filters{justify-content:flex-start;position:sticky;top:76px;z-index:20;margin:0 0 36px;padding:12px 0;background:var(--bg-base)}
html body .featured-post{border:0;box-shadow:none;background:transparent;border-radius:0;gap:56px;align-items:center;margin-bottom:72px;padding-bottom:72px;border-bottom:1px solid var(--border);overflow:visible}
html body .featured-post:hover{transform:none;box-shadow:none}
html body .featured-post__media{border-radius:20px;overflow:hidden;min-height:0;aspect-ratio:16/9;box-shadow:0 0 0 1px var(--border)}
html body .featured-post__media::after{display:none}
html body .featured-post__media img{object-fit:cover;transition:transform .6s cubic-bezier(.2,.8,.2,1)}
html body .featured-post:hover .featured-post__media img{transform:scale(1.03)}
html body .featured-post__body{padding:0}
html body .featured-post .blog-card__title{font-size:clamp(28px,3.4vw,46px)!important;line-height:1.08;letter-spacing:-.035em}
html body .featured-post:hover .blog-card__title{color:var(--accent)}

html body .blog-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:56px 32px}
html body .blog-card{border:0;box-shadow:none;background:transparent;border-radius:0;overflow:visible}
html body .blog-card:hover{transform:none;box-shadow:none}
html body .blog-card__media{border-radius:16px;overflow:hidden;aspect-ratio:16/9;height:auto!important;position:relative;box-shadow:0 0 0 1px var(--border)}
html body .blog-card__media img{transition:transform .6s cubic-bezier(.2,.8,.2,1)}
html body .blog-card:hover .blog-card__media img{transform:scale(1.04)}
html body .blog-card__body{padding:20px 0 0}
html body .blog-card__title{font-size:21px;line-height:1.25;letter-spacing:-.02em;transition:color .2s}
html body .blog-card:hover .blog-card__title{color:var(--accent)}
html body .blog-card__excerpt{margin:10px 0 14px}
@media(max-width:1000px){html body .blog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){html body .blog-grid{grid-template-columns:1fr;gap:40px}html body .blog-filters{top:70px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}html body .blog-filters::-webkit-scrollbar{display:none}html body .blog-pill{flex:none}}

/* ---------- post page ---------- */
html body .post-wrap{max-width:1380px;padding:120px clamp(16px,3vw,40px) 80px}
html body #post{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);column-gap:56px;align-items:center}
html body #post>*{grid-column:1/-1}
html body #post>.post-head{grid-column:1;max-width:none}
html body #post>.post-cover{grid-column:2;margin:0;border-radius:20px}
html body .post-head h1{font-size:clamp(32px,3.7vw,54px);line-height:1.06}
html body .post-lead{font-size:18px}
html body .post-layout{grid-template-columns:220px minmax(0,720px) 280px;justify-content:space-between;gap:48px;margin-top:80px}
.post-rail{position:sticky;top:110px;align-self:start;display:flex;flex-direction:column;gap:16px}
.rail-card{padding:22px;border-radius:20px;background:var(--surface);box-shadow:0 0 0 1px var(--border)}
.rail-card--soft{background:var(--accent-glow);box-shadow:0 0 0 1px var(--accent-soft)}
.rail-card strong{display:block;font-size:18px;line-height:1.25;letter-spacing:-.02em;color:var(--text-primary);margin:10px 0 6px}
.rail-card--soft strong{margin-top:0}
.rail-card p{font-size:14px;line-height:1.55;color:var(--text-secondary);margin:0 0 16px}
.rail-card .btn{width:100%;justify-content:center;height:44px;padding:0 18px;font-size:14.5px}
.rail-link{display:inline-block;margin-top:12px;font-size:14px;font-weight:500;color:var(--text-primary);text-decoration:none}
.rail-link:hover{color:var(--accent)}
.rail-badge{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;font-weight:500;color:#166534;background:#EAF8EF;padding:5px 10px;border-radius:999px}
.rail-badge i{width:7px;height:7px;border-radius:50%;background:#1FB954}
html.dark .rail-badge{background:#0F2A1A;color:#7EE2A6}
/* reading progress */
.read-bar{position:fixed;left:0;right:0;top:0;height:3px;z-index:400;pointer-events:none}
.read-bar i{display:block;height:100%;width:100%;background:var(--accent);transform-origin:0 50%;transform:scaleX(0)}
@media(max-width:1180px){html body .post-layout{grid-template-columns:200px minmax(0,1fr)}.post-rail{display:none}}
@media(max-width:860px){
  html body #post{grid-template-columns:minmax(0,1fr)}
  html body #post>.post-head,html body #post>.post-cover{grid-column:1}
  html body #post>.post-cover{margin-top:28px}
  html body .post-layout{grid-template-columns:minmax(0,1fr);margin-top:40px}
}

/* the site-wide "a card lifts on hover" rule boxed these borderless cards, so switch it off here */
html body a.blog-card:hover,html body a.featured-post:hover,html body .more-grid a:hover{transform:none;box-shadow:none}

/* post page: the two side cards take turns instead of stacking */
.post-rail{display:grid;gap:14px}
.post-rail .rail-card{grid-area:1/1;opacity:0;transform:translateY(14px);pointer-events:none;transition:opacity .6s ease,transform .7s cubic-bezier(.2,.8,.2,1);display:flex;flex-direction:column}
.post-rail .rail-card.on{opacity:1;transform:none;pointer-events:auto}
.post-rail .rail-card--soft .btn{margin-top:auto}
.post-rail .rail-dots{grid-area:2/1;display:flex;justify-content:center;gap:8px}
.post-rail .rail-dots button{width:8px;height:8px;border-radius:999px;border:0;padding:0;background:var(--border);cursor:pointer;transition:width .3s,background .3s}
.post-rail .rail-dots button.on{width:22px;background:var(--accent)}
.rail-cover{height:96px;border-radius:12px;background:#15120F;color:#FF5A1F;display:flex;align-items:flex-end;justify-content:space-between;padding:12px 14px;margin-bottom:14px;position:relative;overflow:hidden}
.rail-cover span{font-weight:700;font-size:22px;line-height:.95;letter-spacing:-.03em}
.rail-cover small{font-size:11px;color:#ffffffa6;font-weight:500}

/* hand-written notes on the blog */
html body .rail-note{grid-area:3/1;margin:0;justify-content:center}
.post-rail{grid-template-columns:minmax(0,1fr)}
html body .nl .ph-note{margin-top:10px;justify-content:flex-start}
html body .post-cta2 .ph-note{margin:18px 0 0;justify-content:flex-start}
/* post FAQ: slide in one by one, smooth open, lift on hover */
.post-faq .post-faq__item{opacity:0;transform:translateY(20px)}
.post-faq.in .post-faq__item{opacity:1;transform:none;transition:opacity .6s ease var(--d,0s),transform .7s cubic-bezier(.2,.8,.2,1) var(--d,0s),box-shadow .3s,border-color .3s}
html body .post-faq.in .post-faq__item:hover{transform:translateY(-2px);box-shadow:0 12px 28px -18px rgba(14,14,14,.25)}
.post-faq__item.is-anim{overflow:hidden}
.post-faq__item .faq-a{opacity:0;transform:translateY(-8px);transition:opacity .35s ease .05s,transform .45s cubic-bezier(.2,.8,.2,1) .05s}
.post-faq__item[open]:not(.is-closing) .faq-a{opacity:1;transform:none}
@media(prefers-reduced-motion:reduce){.post-faq .post-faq__item{opacity:1;transform:none;transition:none}}
.rail-card .rail-badge{align-self:flex-start}
