/* blog/blog.css
   Blog-only styles. Loads AFTER /style.css
*/

/* -----------------------------
   Old polish variables (keep)
------------------------------ */
:root{
  --blog-paper: #fbfaf7;
  --blog-ink: #0f172a;
  --blog-muted: rgba(15,23,42,.68);
  --blog-line: rgba(15,23,42,.10);
  --blog-accent: #1f6feb;
}

body{
  background: var(--blog-paper);
}

/* Ambient top glow (restores the pretty blue tint across the page top) */
body{
  background: var(--blog-paper);
  position: relative;
}

body::before{
  content:"";
  position: fixed;         /* stays consistent */
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1000px 340px at 28% -8%, rgba(31,111,235,.11), transparent 62%),
    radial-gradient(860px 320px at 82% -12%, rgba(15,23,42,.07), transparent 66%);
}

/* Make sure real content sits above the ambient glow */
.blog-header,
main{
  position: relative;
  z-index: 1;
}

/* -----------------------------
   A11y helpers
------------------------------ */
.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;
}

.skip-link{
  position:absolute;
  left:-999px; top:10px;
  background:#fff;
  border:1px solid rgba(15,23,42,.14);
  padding:8px 12px;
  border-radius:10px;
  z-index:999;
}
.skip-link:focus{ left:12px; }

/* -----------------------------
   Header (sticky, glassy)  ✅ PUT BACK
------------------------------ */
.blog-header{
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251,250,247,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--blog-line);
}

.blog-header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 14px 0;
}

/* Brand */
.blog-brand{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 950;
  letter-spacing: -.015em;
  color: var(--blog-ink);
  white-space: nowrap;
  text-decoration: none;
}

/* FORCE the SVG to behave like an icon (prevents giant logo) */
.blog-logo{
  width: 22px !important;
  height: 22px !important;
  border-radius: 6px;
  flex: 0 0 auto;
  display:block;
}

/* Right nav */
.blog-nav{
  display:flex;
  align-items:center;
  gap: 12px;
  white-space: nowrap;
}

.blog-link{
  font-weight: 800;
  color: var(--blog-muted);
  text-decoration:none;
}
.blog-link:hover{ color: var(--blog-ink); }

/* Search icon button */
.search-toggle{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--blog-line);
  background: rgba(255,255,255,.75);
  color: var(--blog-ink);
  display:grid;
  place-items:center;
  cursor:pointer;
}
.search-toggle:hover{
  border-color: rgba(31,111,235,.35);
}
.search-toggle:focus{
  outline:none;
  box-shadow: 0 0 0 4px rgba(31,111,235,.12);
}

/* inline search that expands */
.blog-search-inline{
  width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: width .18s ease, opacity .18s ease;
}

.blog-search-inline input{
  width: 320px;
  height: 40px;
  border: 1px solid var(--blog-line);
  border-radius: 999px;
  padding: 0 14px;
  font-size: 14px;
  background: rgba(255,255,255,.85);
  color: var(--blog-ink);
  outline: none;
}
.blog-search-inline input:focus{
  border-color: rgba(31,111,235,.35);
  box-shadow: 0 0 0 4px rgba(31,111,235,.12);
}

.blog-nav.is-search-open .blog-search-inline{
  width: min(340px, 40vw);
  opacity: 1;
  pointer-events: auto;
}

/* Mobile header stacking */
@media (max-width: 820px){
  .blog-header-inner{
    flex-wrap: wrap;
    gap: 12px;
  }
  .blog-nav{
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .blog-nav.is-search-open .blog-search-inline{
    width: 100%;
  }
  .blog-search-inline input{
    width: 100%;
  }
}

/* -----------------------------
   Hero (full-width glow, aligned content)
------------------------------ */
.blog-hero{
  position: relative;
  padding: 72px 0 22px;
  overflow: hidden; /* prevents the glow from looking clipped */
}

/* Full-width glow that spans the viewport */
.blog-hero::before{
  content:"";
  position:absolute;
  left: 50%;
  top: -120px;
  width: 140vw;          /* wider than viewport so it never “cuts” */
  height: 520px;         /* enough vertical room for the glow */
  transform: translateX(-50%);
  pointer-events:none;
  background:
    radial-gradient(900px 280px at 22% 10%, rgba(31,111,235,.12), transparent 62%),
    radial-gradient(760px 260px at 78% 0%, rgba(15,23,42,.07), transparent 66%);
}

/* Content column stays aligned to your site container */
.blog-hero .container{
  position: relative;
  max-width: 980px;   /* match your site container */
}

.blog-hero-inner{
  max-width: 720px;   /* keeps title/sub aligned with chips row */
}

.blog-h1{
  margin: 6px 0 12px;
  font-size: clamp(44px, 4vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 950;
  color: var(--blog-ink);
}

.blog-sub{
  margin: 0;
  color: var(--blog-muted);
  max-width: 74ch;
}

@media (max-width: 900px){
  .blog-hero{ padding: 56px 0 18px; }
  .blog-hero::before{ top: -140px; height: 520px; width: 160vw; }
}

/* -----------------------------
   Chips (polished, not heavy)
------------------------------ */
.blog-chips{
  padding: 6px 0 18px;
}

.chip-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.chip{
  display:inline-flex;
  align-items:center;
  padding: 8px 12px;
  border: 1px solid var(--blog-line);
  border-radius: 999px;
  font-weight: 850;
  color: rgba(15,23,42,.70);
  background: rgba(255,255,255,.65);
  font-size: 13px;
  text-decoration:none;
}
.chip:hover{ opacity: .95; }

.chip.is-active{
  background: rgba(31,111,235,.10);
  border-color: rgba(31,111,235,.25);
  color: rgba(15,23,42,.90);
}

/* -----------------------------
   NEW TOP ROW LAYOUT
------------------------------ */
.blog-top{
  padding: 14px 0 22px;
}

.blog-top-grid{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  align-items:start;
}

@media (max-width: 980px){
  .blog-top-grid{ grid-template-columns: 1fr; }
}

/* -----------------------------
   ABOUT = flat (quiet, pinned)
------------------------------ */
.about-card{
  background: transparent;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 16px;
  padding: 18px;
  box-shadow: none;
}

@media (min-width: 980px){
  .about-card{
    position: sticky;
    top: 92px;
  }
}

.about-title{
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 900;
  color: rgba(15,23,42,.55);
  margin-bottom: 12px;
}

.about-row{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}

.avatar{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 950;
  background: rgba(15,23,42,.06);
  border: 1px solid rgba(15,23,42,.10);
}

.about-name{ font-weight: 950; }
.about-role{
  font-size: 14px;
  color: rgba(15,23,42,.60);
}

.about-text{
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(15,23,42,.70);
}

.about-links{ margin-top: 10px; }
.about-link{
  font-weight: 900;
  color: var(--blog-ink);
  text-decoration:none;
}
.about-link:hover{ opacity: .95; }

/* -----------------------------
   REEL = pop panel (the “work” area)
------------------------------ */
.reel-col{
  background: rgba(255,255,255,.80);
  border: 1px solid var(--blog-line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 18px 48px rgba(15,23,42,.10);
}

.reel-head{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.reel-title{
  font-weight: 950;
  letter-spacing: -.2px;
  font-size: 16px;
}

.reel-subtitle{
  font-size: 13px;
  color: rgba(15,23,42,.62);
  font-weight: 750;
  margin-top: 3px;
}

.reel-hint{
  font-size: 12px;
  color: rgba(15,23,42,.55);
  font-weight: 800;
}

/* -----------------------------
   REEL ROW (scrollable) ✅
------------------------------ */
.reel-row{
  display:flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.reel-row::-webkit-scrollbar{ height: 10px; }
.reel-row::-webkit-scrollbar-track{
  background: rgba(15,23,42,.06);
  border-radius: 999px;
}
.reel-row::-webkit-scrollbar-thumb{
  background: rgba(15,23,42,.18);
  border-radius: 999px;
}
.reel-row::-webkit-scrollbar-thumb:hover{
  background: rgba(15,23,42,.25);
}

/* -----------------------------
   REEL CARD (forces overflow)
------------------------------ */
.reel-card{
  flex: 0 0 auto;     /* critical */
  width: 240px;       /* critical */
  scroll-snap-align: start;

  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,251,255,.92));
  overflow:hidden;
  color: inherit;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.reel-card:hover{
  transform: translateY(-2px);
  border-color: rgba(31,111,235,.20);
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
}

.reel-thumb{
  height: 140px;
  background: rgba(15,23,42,.04);
}

.reel-thumb--placeholder{
  background:
    radial-gradient(260px 120px at 30% 15%, rgba(31,111,235,.12), transparent 55%),
    radial-gradient(240px 120px at 85% 0%, rgba(15,23,42,.08), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.20));
}

.reel-thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.reel-caption{
  padding: 10px 12px 12px;
}

.reel-card-title{
  font-weight: 950;
  letter-spacing: -.15px;
  line-height: 1.25;
}

.reel-card-meta{
  margin-top: 4px;
  font-size: 12px;
  color: rgba(15,23,42,.58);
  font-weight: 750;
}

/* Hide "tip" line on desktop; show on mobile */
.reel-foot{ display:none; }
@media (max-width: 900px){
  .reel-foot{ display:block; }
}

/* -----------------------------
   Feed intro line
------------------------------ */
.feed-intro{
  padding: 18px 0 10px;
}

.feed-kicker{
  color: rgba(15,23,42,.62);
  font-weight: 800;
}

/* -----------------------------
   Footer
------------------------------ */
.blog-footer{
  border-top: 1px solid var(--blog-line);
  padding: 22px 0 34px;
  background: transparent;
}

.blog-footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

@media (max-width: 700px){
  .blog-footer-inner{
    flex-direction: column;
    align-items: flex-start;
  }
}

.muted{ color: rgba(15,23,42,.62); }


/* -----------------------------
   REEL: force overflow + show scrollbar
------------------------------ */

/* Keep the reel panel “popping” */
.reel-col{
  background: rgba(255,255,255,.80);
  border: 1px solid var(--blog-line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 18px 48px rgba(15,23,42,.10);
}

/* This is the key: cap the visible reel viewport so the scrollbar is needed */
.reel-row{
  display:flex;
  gap: 12px;

  max-width: 720px;          /* forces scrolling even on wide desktop */
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 12px;

  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;  /* keeps space for scrollbar */
}

/* Make sure cards NEVER shrink to fit */
.reel-card{
  flex: 0 0 auto;     /* critical */
  width: 300px;       /* critical: 2 cards + partial third in 720px viewport */
  scroll-snap-align: start;

  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
  overflow:hidden;
  color: inherit;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.reel-card:hover{
  transform: translateY(-2px);
  border-color: rgba(31,111,235,.20);
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
}

.reel-thumb{
  height: 140px;
  background: rgba(15,23,42,.04);
}

.reel-thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

/* “More field notes soon” should be neutral — NOT the only place the blue shows */
.reel-thumb--more{
  background:
    radial-gradient(320px 160px at 20% 20%, rgba(15,23,42,.06), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.20));
}

/* Always-visible, polished scrollbar */
.reel-row::-webkit-scrollbar{ height: 12px; }
.reel-row::-webkit-scrollbar-track{
  background: rgba(15,23,42,.06);
  border-radius: 999px;
}
.reel-row::-webkit-scrollbar-thumb{
  background: rgba(15,23,42,.18);
  border-radius: 999px;
}
.reel-row::-webkit-scrollbar-thumb:hover{
  background: rgba(15,23,42,.25);
}

/* Firefox */
.reel-row{
  scrollbar-color: rgba(15,23,42,.22) rgba(15,23,42,.06);
  scrollbar-width: thin;
}

/* On smaller screens, let the reel breathe */
@media (max-width: 900px){
  .reel-row{ max-width: 100%; }
  .reel-card{ width: 280px; }
}
.reel-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:190px;
  border-radius:14px;
  border:1px solid #e5e7eb;
  background:linear-gradient(180deg,#f9fafb,#f3f4f6);
}

.reel-placeholder-inner{
  text-align:center;
  line-height:1.1;
}

.placeholder-line{
  font-weight:800;
  font-size:26px;
  color:#111827;
  letter-spacing:-0.02em;
}

.placeholder-line.muted{
  font-size:22px;
  color:#6b7280;
}

.reel-placeholder:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(0,0,0,.08);
}

/* -----------------------------
   Articles css. 
------------------------------ */

/* ARTICLE BODY */

.post-body{
  max-width:720px;
  margin:0 auto;
  padding:40px 20px 80px;
}

.post-h1{
  font-size:52px;
  line-height:1.1;
  letter-spacing:-0.02em;
  margin:10px 0 10px;
}

.post-lead{
  font-size:20px;
  color:#6b7280;
  margin-bottom:28px;
}

.post-rule{
  border:none;
  border-top:1px solid #e5e7eb;
  margin:30px 0 40px;
}

.post-body p{
  font-size:18px;
  line-height:1.75;
  color:#111827;
  margin-bottom:22px;
}

/* add breathing room after short lines */
.post-body p:empty{
  margin-bottom:30px;
}

/* emphasize key line */
.post-body p strong{
  font-weight:700;
}

/* nicer spacing for question */
.post-body p strong:first-child{
  font-size:20px;
}

/* meta row */
.post-meta-row{
  color:#6b7280;
  font-size:14px;
  margin-bottom:10px;
}

.post-back{
  display:inline-block;
  margin-bottom:14px;
  color:#6b7280;
  text-decoration:none;
}

.post-back:hover{
  text-decoration:underline;
}

.post-author{
  font-size:14px;
  color:#6b7280;
  margin-bottom:20px;
}

.reader-comments {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid #e6e6e6;
}

.reader-comments h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.comment-email a {
  font-weight: 600;
  text-decoration: none;
}

.comment-email a:hover {
  text-decoration: underline;
}

.steps{
  margin: 14px 0 18px;
  padding-left: 18px;
}
.steps li{
  margin: 0 0 10px;
  color: rgba(15,23,42,.78);
  line-height: 1.55;
  font-weight: 650;
}