/* ═══════════════════════════════════════════════════════════════
   AI BLOG PLATFORM — PUBLIC CSS
   Design: Pixel-matched to Untitled UI blog reference
   ═══════════════════════════════════════════════════════════════ */

/* ── RESET & VARIABLES ───────────────────────────────────────── */
:root {
  --brand:       #7F56D9;
  --brand-dark:  #6941C6;
  --brand-light: #F4EBFF;
  --accent:      #12B76A;
  --danger:      #F04438;
  --warning:     #F79009;
  --bg:          #FFFFFF;
  --surface:     #F9FAFB;
  --border:      #EAECF0;
  --border-dark: #D0D5DD;
  --text:        #101828;
  --sub:         #344054;
  --muted:       #667085;
  --muted-light: #98A2B3;
  --shadow-sm:   0 1px 2px rgba(16,24,40,.05);
  --shadow-md:   0 4px 8px -2px rgba(16,24,40,.1),0 2px 4px -2px rgba(16,24,40,.06);
  --shadow-lg:   0 12px 24px -4px rgba(16,24,40,.08),0 4px 8px -2px rgba(16,24,40,.03);
  --radius:      8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --nav-h:       72px;
  --max-w:       1216px;
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{font-family:var(--font);color:var(--text);background:#fff;line-height:1.6;-webkit-font-smoothing:antialiased}
img{display:block;max-width:100%;height:auto}
a{color:inherit;text-decoration:none}
button{font-family:var(--font);cursor:pointer}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn{display:inline-flex;align-items:center;gap:.5rem;padding:.625rem 1.25rem;border-radius:var(--radius);font-size:.875rem;font-weight:600;line-height:1.4;transition:all .15s;border:1.5px solid transparent;white-space:nowrap}
.btn-primary{background:var(--brand);color:#fff;border-color:var(--brand)}
.btn-primary:hover{background:var(--brand-dark)}
.btn-ghost{background:transparent;color:var(--sub);border-color:var(--border-dark)}
.btn-ghost:hover{background:var(--surface)}
.btn-full{width:100%;justify-content:center}
.btn-sm{padding:.4rem .875rem;font-size:.8125rem}

/* ── FLASH ───────────────────────────────────────────────────── */
.flash{padding:.875rem 1.5rem;font-size:.875rem;font-weight:500;position:sticky;top:var(--nav-h);z-index:50}
.flash-success{background:#ECFDF3;color:#027A48;border-bottom:1px solid #A9EFC5}
.flash-error{background:#FEF3F2;color:#B42318;border-bottom:1px solid #FECDCA}

/* ════════════════════════════════════════════════════════════════
   NAVBAR — matches reference exactly
   White bg, logo left, centred links, sign up pill right
   ════════════════════════════════════════════════════════════════ */
.topnav{
  position:sticky;top:0;z-index:100;
  background:rgba(255,255,255,.97);backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
  height:var(--nav-h);
}
.topnav__inner{
  max-width:var(--max-w);margin:0 auto;padding:0 2rem;
  height:100%;display:flex;align-items:center;gap:2rem;
}
.topnav__logo{
  display:flex;align-items:center;gap:.5rem;
  font-size:.9375rem;font-weight:700;color:var(--text);flex-shrink:0;
}
.topnav__logo svg{color:var(--text)}

/* Centre links */
.topnav__links{display:flex;align-items:center;gap:.125rem;flex:1;justify-content:center}
.tnl{
  display:inline-flex;align-items:center;gap:.3rem;
  padding:.5rem .875rem;border-radius:var(--radius);
  font-size:.9375rem;font-weight:500;color:var(--sub);
  transition:background .15s,color .15s;background:none;border:none;
}
.tnl:hover,.tnl--active{background:var(--surface);color:var(--text)}

/* Dropdown */
.tn-drop{position:relative}
.tn-drop__trigger{cursor:pointer}
.tn-drop__trigger svg{transition:transform .2s;flex-shrink:0}
.tn-drop:hover .tn-drop__trigger svg{transform:rotate(180deg)}
.tn-drop__menu{
  position:absolute;top:calc(100% + .5rem);left:50%;transform:translateX(-50%) translateY(-4px);
  background:#fff;border:1px solid var(--border);border-radius:var(--radius-lg);
  padding:.5rem;min-width:180px;box-shadow:var(--shadow-lg);
  opacity:0;visibility:hidden;transition:all .15s;pointer-events:none;
}
.tn-drop:hover .tn-drop__menu{opacity:1;visibility:visible;transform:translateX(-50%) translateY(0);pointer-events:all}
.tn-drop__menu a{display:block;padding:.5rem .875rem;border-radius:var(--radius);font-size:.875rem;color:var(--sub)}
.tn-drop__menu a:hover{background:var(--surface);color:var(--text)}

/* Right actions */
.topnav__actions{display:flex;align-items:center;gap:.625rem;flex-shrink:0}
.tn-signup{
  display:inline-flex;align-items:center;
  background:var(--text);color:#fff;
  padding:.5rem 1.125rem;border-radius:var(--radius);
  font-size:.875rem;font-weight:600;
  transition:background .15s;
}
.tn-signup:hover{background:#1D2939}

/* Hamburger */
.topnav__ham{display:none;flex-direction:column;gap:5px;background:none;border:none;padding:.5rem}
.topnav__ham span{display:block;width:22px;height:2px;background:var(--sub);border-radius:2px;transition:.2s}
.topnav__mobile{display:none;flex-direction:column;background:#fff;border-top:1px solid var(--border);padding:1rem 2rem;gap:.25rem}
.topnav__mobile.open{display:flex}
.topnav__mobile a{padding:.625rem .5rem;font-size:.9375rem;color:var(--sub);border-radius:var(--radius)}
.topnav__mobile a:hover{background:var(--surface)}

/* ════════════════════════════════════════════════════════════════
   HERO BANNER — full-width image with dark gradient overlay,
   bottom-left text, right-side arrow button
   Matches the reference design exactly
   ════════════════════════════════════════════════════════════════ */
.hero-banner{
  position:relative;
  width:100%;
  height:460px;
  overflow:hidden;
  border-radius:var(--radius-xl);
  margin:1.5rem auto 0;
  max-width:var(--max-w);
  padding:0 2rem;
}
/* Unwrap from padding for full width inside container */
@media(min-width:1280px){
  .hero-banner{max-width:calc(var(--max-w));padding:0;margin:1.5rem auto 0}
}
.hero-bg{
  position:absolute;inset:0;
  background-size:cover;background-position:center top;
  transition:transform 6s ease;
}
.hero-banner:hover .hero-bg{transform:scale(1.03)}
.hero-overlay{
  position:absolute;inset:0;
  background:linear-gradient(to top,rgba(0,0,0,.85) 0%,rgba(0,0,0,.4) 50%,rgba(0,0,0,.1) 100%);
}
.hero-content{
  position:absolute;bottom:2.5rem;left:2.5rem;right:5rem;
  color:#fff;z-index:2;
}
.hero-label{
  display:inline-block;font-size:.8125rem;font-weight:500;
  color:rgba(255,255,255,.8);margin-bottom:.75rem;letter-spacing:.02em;
}
.hero-title{
  font-size:clamp(1.625rem,3.5vw,2.375rem);
  font-weight:600;line-height:1.2;
  margin-bottom:.875rem;
  max-width:700px;
}
.hero-title a{color:#fff}
.hero-title a:hover{text-decoration:underline;text-underline-offset:3px}
.hero-excerpt{
  font-size:.9375rem;line-height:1.65;
  color:rgba(255,255,255,.75);
  max-width:580px;
}
.hero-arrow{
  position:absolute;right:2rem;top:50%;transform:translateY(-50%);
  width:52px;height:52px;border-radius:50%;
  background:rgba(255,255,255,.15);backdrop-filter:blur(6px);
  border:1.5px solid rgba(255,255,255,.3);
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-size:1.375rem;z-index:2;
  transition:background .2s,transform .2s;
}
.hero-arrow:hover{background:rgba(255,255,255,.25);transform:translateY(-50%) scale(1.08)}

/* ════════════════════════════════════════════════════════════════
   BLOG MAIN — matches the "Recent blog posts" section
   ════════════════════════════════════════════════════════════════ */
.blog-main{padding:3.5rem 0 4rem}
.blog-container{max-width:var(--max-w);margin:0 auto;padding:0 2rem}

.recent-heading{
  font-size:1rem;font-weight:600;color:var(--text);
  margin-bottom:2rem;
}

/* 3-column grid — matching reference exactly */
.blog-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:2rem;
}

/* ── BLOG CARD ───────────────────────────────────────────────── */
.blog-card{
  display:flex;flex-direction:column;
  border-radius:0;border:none;background:none;
}

/* Image wrap — 16:9 aspect, no border-radius in the reference */
.blog-card__img-wrap{
  display:block;position:relative;
  aspect-ratio:4/3;overflow:hidden;
  border-radius:var(--radius-lg);
  margin-bottom:1rem;
  background:var(--surface);
}
.blog-card__img-wrap img{
  width:100%;height:100%;object-fit:cover;
  transition:transform .4s ease;
}
.blog-card:hover .blog-card__img-wrap img{transform:scale(1.04)}

/* Podcast play badge */
.play-badge{
  position:absolute;right:.875rem;bottom:.875rem;
  width:40px;height:40px;border-radius:50%;
  background:rgba(0,0,0,.55);backdrop-filter:blur(4px);
  color:#fff;display:flex;align-items:center;justify-content:center;
  font-size:.875rem;
}

.blog-card__body{flex:1;display:flex;flex-direction:column;gap:.5rem}

/* Author + date — small line */
.blog-card__meta{display:flex;align-items:center;gap:.5rem}
.bc-avatar{width:24px;height:24px;border-radius:50%;object-fit:cover;flex-shrink:0}
.bc-initials{
  width:24px;height:24px;border-radius:50%;
  background:var(--brand-light);color:var(--brand-dark);
  font-size:.625rem;font-weight:700;flex-shrink:0;
  display:inline-flex;align-items:center;justify-content:center;
}
.bc-author{font-size:.8125rem;font-weight:600;color:var(--sub)}
.bc-dot{color:var(--muted-light);font-size:.6875rem}
.bc-date{font-size:.8125rem;color:var(--muted)}

/* Card title */
.blog-card__title{
  font-size:1.0625rem;font-weight:600;line-height:1.35;
  color:var(--text);
}
.blog-card__title a{
  display:flex;justify-content:space-between;align-items:flex-start;
  gap:.375rem;color:var(--text);
}
.blog-card__title a:hover{color:var(--brand)}
.bc-arrow{
  opacity:0;flex-shrink:0;font-size:.875rem;
  transition:opacity .2s,transform .2s;margin-top:.125rem;
}
.blog-card:hover .bc-arrow{opacity:1;transform:translate(2px,-2px)}

/* Excerpt */
.blog-card__excerpt{
  font-size:.875rem;color:var(--muted);line-height:1.65;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}

/* Tags row */
.blog-card__tags{display:flex;gap:.375rem;flex-wrap:wrap;margin-top:.25rem}
.bc-tag{
  display:inline-flex;align-items:center;
  padding:.2rem .625rem;border-radius:100px;
  font-size:.6875rem;font-weight:600;
}
.tag-blue  {background:#EFF8FF;color:#175CD3}
.tag-purple{background:#F4EBFF;color:#6941C6}
.tag-green {background:#ECFDF3;color:#027A48}
.tag-orange{background:#FFF6ED;color:#B93815}
.tag-red   {background:#FEF3F2;color:#B42318}
.tag-gray  {background:#F2F4F7;color:#344054}

/* ── LOAD MORE ───────────────────────────────────────────────── */
.blog-pagination{text-align:center;margin-top:3rem}
.load-more-btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:.75rem 2.25rem;border-radius:var(--radius);
  border:1.5px solid var(--border-dark);
  font-size:.9375rem;font-weight:500;color:var(--sub);
  transition:all .15s;background:#fff;
}
.load-more-btn:hover{background:var(--surface);border-color:var(--brand);color:var(--brand)}

/* ════════════════════════════════════════════════════════════════
   CTA DARK — dark rounded box, centred text
   ════════════════════════════════════════════════════════════════ */
.cta-dark{padding:4rem 2rem}
.cta-dark__inner{
  max-width:var(--max-w);margin:0 auto;
  background:#101828;border-radius:var(--radius-xl);
  padding:4rem 2rem;text-align:center;
  color:#fff;
}
.cta-dark__title{font-size:clamp(1.5rem,3vw,2rem);font-weight:700;margin-bottom:.75rem}
.cta-dark__sub{font-size:1rem;color:rgba(255,255,255,.65);margin-bottom:2rem}
.cta-dark__btns{display:flex;justify-content:center;gap:1rem;flex-wrap:wrap}
.btn-cta-outline{
  padding:.75rem 1.75rem;border-radius:var(--radius);
  border:1.5px solid rgba(255,255,255,.3);background:transparent;color:#fff;
  font-size:.9375rem;font-weight:600;cursor:pointer;transition:background .15s;
}
.btn-cta-outline:hover{background:rgba(255,255,255,.08)}
.btn-cta-white{
  display:inline-flex;align-items:center;
  padding:.75rem 1.75rem;border-radius:var(--radius);
  background:#fff;color:var(--text);
  font-size:.9375rem;font-weight:600;transition:opacity .15s;
}
.btn-cta-white:hover{opacity:.9}

/* ════════════════════════════════════════════════════════════════
   FOOTER — dark, 6-col grid, bottom bar
   ════════════════════════════════════════════════════════════════ */
.site-footer{background:#101828;color:rgba(255,255,255,.65);padding:4rem 0 0}
.footer-container{max-width:var(--max-w);margin:0 auto;padding:0 2rem}
.footer-cols{
  display:grid;grid-template-columns:repeat(6,1fr);
  gap:2rem;padding-bottom:3rem;
  border-bottom:1px solid rgba(255,255,255,.1);
}
.footer-col{display:flex;flex-direction:column;gap:.625rem}
.fc-head{font-size:.875rem;font-weight:600;color:#fff;margin-bottom:.25rem}
.footer-col a{font-size:.9375rem;color:rgba(255,255,255,.6);transition:color .15s;display:flex;align-items:center;gap:.4rem}
.footer-col a:hover{color:#fff}
.fc-badge-link{display:inline-flex;align-items:center;gap:.4rem}
.fc-new{
  background:#4E46DC;color:#fff;
  font-size:.6rem;font-weight:700;padding:.15rem .45rem;
  border-radius:100px;line-height:1.4;
}
.footer-bottom{
  display:flex;align-items:center;justify-content:space-between;
  padding:1.5rem 0;gap:1rem;
}
.footer-logo{display:flex;align-items:center;gap:.5rem;color:#fff;font-weight:700;font-size:.9375rem}
.footer-logo__icon{font-size:1.25rem}
.footer-copy{font-size:.875rem;color:rgba(255,255,255,.4)}

/* ════════════════════════════════════════════════════════════════
   POST SINGLE PAGE
   ════════════════════════════════════════════════════════════════ */
.post-hero{padding:4rem 0 2rem;border-bottom:1px solid var(--border)}
.post-hero-inner{max-width:800px;margin:0 auto;padding:0 2rem}
.post-breadcrumb{display:flex;align-items:center;gap:.5rem;font-size:.8125rem;color:var(--muted);margin-bottom:1.5rem;flex-wrap:wrap}
.post-breadcrumb a:hover{color:var(--brand)}
.bc-sep{color:var(--muted-light)}
.post-category-line{display:flex;gap:.5rem;margin-bottom:1rem}
.post-title{font-size:clamp(1.875rem,4vw,2.75rem);font-weight:700;line-height:1.2;margin-bottom:1rem}
.post-subtitle{font-size:1.125rem;color:var(--muted);line-height:1.65;margin-bottom:1.5rem}
.post-meta-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem}
.post-author-block{display:flex;align-items:center;gap:.875rem}
.author-avatar-md{width:44px;height:44px;border-radius:50%;object-fit:cover}
.author-initials-md{width:44px;height:44px;border-radius:50%;background:var(--brand-light);color:var(--brand-dark);font-size:.875rem;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.author-name-lg{font-size:.9375rem;font-weight:600}
.post-date-sm{font-size:.8125rem;color:var(--muted)}
.post-share{display:flex;gap:.5rem}
.share-btn{width:36px;height:36px;border-radius:var(--radius);border:1.5px solid var(--border);background:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s;color:var(--sub)}
.share-btn:hover{border-color:var(--brand);color:var(--brand)}
.post-featured-image{padding:2rem 0}
.post-featured-image img{width:100%;border-radius:var(--radius-xl);max-height:500px;object-fit:cover}
.image-credit{font-size:.8125rem;color:var(--muted-light);margin-top:.75rem;text-align:center}
.image-credit a{color:var(--muted);text-decoration:underline}
.post-content-wrap{padding:3rem 0 4rem}
.post-layout{display:grid;grid-template-columns:220px 1fr;gap:4rem;max-width:1100px;margin:0 auto;padding:0 2rem;align-items:start}
.post-toc{position:sticky;top:calc(var(--nav-h) + 2rem)}
.toc-title{font-size:.8125rem;font-weight:700;color:var(--text);margin-bottom:.75rem;text-transform:uppercase;letter-spacing:.05em}
#tocList{list-style:none;display:flex;flex-direction:column;gap:.375rem}
#tocList li a{font-size:.8125rem;color:var(--muted);transition:color .15s;display:block;padding:.2rem 0;border-left:2px solid var(--border);padding-left:.75rem}
#tocList li a:hover,#tocList li a.active{color:var(--brand);border-left-color:var(--brand)}
#tocList .toc-sub a{padding-left:1.5rem;font-size:.75rem}
.post-body{max-width:720px}
.post-body h2{font-size:1.625rem;font-weight:700;margin:2.5rem 0 .875rem;color:var(--text)}
.post-body h3{font-size:1.25rem;font-weight:700;margin:2rem 0 .75rem}
.post-body p{font-size:1.0625rem;line-height:1.8;color:var(--sub);margin-bottom:1.25rem}
.post-body ul,.post-body ol{padding-left:1.75rem;margin-bottom:1.25rem}
.post-body li{font-size:1.0625rem;line-height:1.75;color:var(--sub);margin-bottom:.375rem}
.post-body blockquote{border-left:4px solid var(--brand);margin:2rem 0;padding:1rem 1.5rem;background:var(--brand-light);border-radius:0 var(--radius) var(--radius) 0}
.post-body blockquote p{color:var(--brand-dark);font-style:italic;margin:0}
.post-body strong{color:var(--text);font-weight:600}
.post-body a{color:var(--brand);text-decoration:underline;text-underline-offset:3px}
.post-body code{background:var(--surface);padding:.15rem .45rem;border-radius:4px;font-size:.875em;border:1px solid var(--border)}
.post-body pre{background:#1a1a2e;color:#e0e0e0;padding:1.5rem;border-radius:var(--radius-lg);margin:1.5rem 0;overflow-x:auto}
.post-body pre code{background:none;border:none;color:inherit;padding:0}
.post-body img{border-radius:var(--radius-lg);margin:2rem 0}
.post-body table{width:100%;border-collapse:collapse;margin:1.5rem 0}
.post-body th,.post-body td{padding:.75rem 1rem;border:1px solid var(--border);font-size:.9375rem;text-align:left}
.post-body th{background:var(--surface);font-weight:600}
.monetization-block{margin:2rem 0;padding:1.25rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);text-align:center;font-size:.8125rem;color:var(--muted)}
.faq-section{margin-top:3rem}
.faq-section h2{font-size:1.625rem;font-weight:700;margin-bottom:1.5rem}
.faq-list{display:flex;flex-direction:column;gap:.75rem}
.faq-item{border:1.5px solid var(--border);border-radius:var(--radius-lg);overflow:hidden}
.faq-item summary{padding:1rem 1.25rem;cursor:pointer;font-weight:600;font-size:.9375rem;list-style:none;display:flex;justify-content:space-between;align-items:center}
.faq-item summary::after{content:'+';font-size:1.25rem;color:var(--muted)}
.faq-item[open] summary::after{content:'−'}
.faq-item p{padding:0 1.25rem 1rem;color:var(--muted);font-size:.9375rem;line-height:1.7}
.post-tags-footer{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin:2rem 0;padding-top:1.5rem;border-top:1px solid var(--border)}
.tags-label{font-size:.875rem;font-weight:600;color:var(--sub)}
.author-bio-card{display:flex;align-items:flex-start;gap:1.25rem;padding:1.5rem;background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);margin-top:2.5rem}
.author-bio-avatar{width:56px;height:56px;border-radius:50%;object-fit:cover;flex-shrink:0}
.author-initials-lg{width:56px;height:56px;border-radius:50%;background:var(--brand-light);color:var(--brand-dark);font-size:1.125rem;font-weight:700;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center}
.author-bio-name{font-weight:700;margin-bottom:.375rem}
.author-bio-text{font-size:.9375rem;color:var(--muted);line-height:1.65}
.related-posts{padding:4rem 0;background:var(--surface);border-top:1px solid var(--border)}
.related-title{font-size:1.625rem;font-weight:700;margin-bottom:2rem;text-align:center;padding:0 2rem}
.related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem;max-width:var(--max-w);margin:0 auto;padding:0 2rem}
.related-card{border-radius:var(--radius-xl);overflow:hidden;border:1px solid var(--border);background:#fff;transition:box-shadow .2s}
.related-card:hover{box-shadow:var(--shadow-md)}
.related-card img{width:100%;aspect-ratio:16/9;object-fit:cover}
.related-body{padding:1.25rem}
.related-author{font-size:.8125rem;color:var(--muted);margin-bottom:.375rem}
.related-body h3{font-size:1rem;font-weight:600;line-height:1.4}
.comments-section{padding:4rem 0;border-top:1px solid var(--border)}
.comments-inner{max-width:720px;margin:0 auto;padding:0 2rem}
.comments-title{font-size:1.375rem;font-weight:700;margin-bottom:2rem}
.comment-item{display:flex;gap:1rem;margin-bottom:1.75rem}
.comment-avatar{width:40px;height:40px;border-radius:50%;background:var(--brand-light);color:var(--brand-dark);font-size:.875rem;font-weight:700;flex-shrink:0;display:flex;align-items:center;justify-content:center}
.comment-author{font-size:.875rem;font-weight:700;margin-bottom:.25rem}
.comment-date{font-size:.8125rem;font-weight:400;color:var(--muted);margin-left:.5rem}
.comment-text{font-size:.9375rem;color:var(--sub);line-height:1.65}
.comment-form-wrap{margin-top:2.5rem;padding-top:2rem;border-top:1px solid var(--border)}
.comment-form-wrap h3{font-size:1.125rem;font-weight:700;margin-bottom:1.25rem}
.comment-form{display:flex;flex-direction:column;gap:1rem}

/* ── FORMS ───────────────────────────────────────────────────── */
.form-row-2{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.form-group{display:flex;flex-direction:column;gap:.375rem}
.form-group label{font-size:.875rem;font-weight:600;color:var(--sub)}
.form-group input,.form-group textarea,.form-group select{padding:.625rem .875rem;border:1.5px solid var(--border-dark);border-radius:var(--radius);font-size:.9375rem;font-family:var(--font);outline:none;transition:border .15s;background:#fff;color:var(--text)}
.form-group input:focus,.form-group textarea:focus,.form-group select:focus{border-color:var(--brand);box-shadow:0 0 0 4px rgba(127,86,217,.08)}
.form-group textarea{resize:vertical;min-height:120px}

/* ── SEARCH ──────────────────────────────────────────────────── */
.search-form{display:flex;gap:.75rem;max-width:600px;margin:0 auto 2rem}
.search-form input{flex:1;padding:.75rem 1.25rem;border:1.5px solid var(--border-dark);border-radius:var(--radius);font-size:1rem;font-family:var(--font);outline:none}
.search-form input:focus{border-color:var(--brand)}
.posts-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:2rem}
.section-head{text-align:center;max-width:700px;margin:0 auto 3rem;padding:0 2rem}
.section-eyebrow{font-size:.875rem;font-weight:600;color:var(--brand);margin-bottom:.5rem}
.section-title{font-size:clamp(1.75rem,4vw,2.5rem);font-weight:700;line-height:1.2;color:var(--text);margin-bottom:1rem}
.section-sub{font-size:1.0625rem;color:var(--muted)}
.blog-section{padding:5rem 0}
.post-card{border-radius:var(--radius-xl);border:1px solid var(--border);overflow:hidden;background:#fff;transition:box-shadow .2s,transform .2s}
.post-card:hover{box-shadow:var(--shadow-lg);transform:translateY(-2px)}
.card-image-wrap{display:block;aspect-ratio:16/9;overflow:hidden}
.card-image-wrap img{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.post-card:hover .card-image-wrap img{transform:scale(1.05)}
.card-body{padding:1.5rem}
.card-title{font-size:1.0625rem;font-weight:600;line-height:1.35;margin:.5rem 0 .625rem}
.card-title a{color:var(--text);display:flex;justify-content:space-between;align-items:flex-start;gap:.5rem}
.card-title a:hover{color:var(--brand)}
.card-arrow{opacity:0;transition:opacity .2s,transform .2s;flex-shrink:0;font-size:.875rem}
.post-card:hover .card-arrow{opacity:1;transform:translate(2px,-2px)}
.card-excerpt{font-size:.9375rem;color:var(--muted);line-height:1.65;margin-bottom:1rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.card-tags{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.post-meta-line{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}
.author-avatar-sm{width:28px;height:28px;border-radius:50%;object-fit:cover}
.author-initials-sm{width:28px;height:28px;border-radius:50%;background:var(--brand-light);color:var(--brand-dark);font-size:.75rem;font-weight:700;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.author-name{font-size:.8125rem;font-weight:600;color:var(--sub)}
.meta-dot{color:var(--muted-light);font-size:.75rem}
.post-date{font-size:.8125rem;color:var(--muted)}
.tag-pill{display:inline-flex;align-items:center;gap:.25rem;padding:.25rem .75rem;border-radius:100px;font-size:.75rem;font-weight:600;white-space:nowrap}
.pagination{display:flex;align-items:center;gap:.5rem;justify-content:center;margin-top:3rem}
.page-btn{padding:.5rem .875rem;border-radius:var(--radius);border:1.5px solid var(--border);font-size:.875rem;font-weight:500;color:var(--sub);transition:all .15s}
.page-btn:hover,.page-btn.active{background:var(--brand);color:#fff;border-color:var(--brand)}
.empty-state{text-align:center;padding:4rem 0;color:var(--muted)}

/* ── AUTH ────────────────────────────────────────────────────── */
.auth-body{min-height:100vh;background:var(--surface);display:flex;align-items:center;justify-content:center}
.auth-container{width:100%;max-width:440px;padding:2rem}
.auth-card{background:#fff;border:1px solid var(--border);border-radius:var(--radius-xl);padding:2.5rem;box-shadow:var(--shadow-md)}
.auth-logo{display:flex;align-items:center;gap:.5rem;font-weight:700;font-size:1.125rem;margin-bottom:1.75rem}
.auth-title{font-size:1.75rem;font-weight:700;margin-bottom:.375rem}
.auth-sub{color:var(--muted);font-size:.9375rem;margin-bottom:1.75rem}
.auth-form{display:flex;flex-direction:column;gap:1.25rem}
.input-eye-wrap{position:relative}
.input-eye-wrap input{width:100%;padding-right:2.75rem}
.eye-btn{position:absolute;right:.75rem;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;color:var(--muted)}
.auth-hint{margin-top:1.5rem;padding:1rem;background:var(--surface);border-radius:var(--radius);font-size:.875rem;color:var(--muted);text-align:center}
.auth-hint strong{color:var(--text)}

/* ── ALERTS & MODAL ──────────────────────────────────────────── */
.alert{padding:.875rem 1.25rem;border-radius:var(--radius);font-size:.9rem;font-weight:500;margin-bottom:1rem}
.alert-success{background:#ECFDF3;color:#027A48;border:1px solid #A9EFC5}
.alert-error{background:#FEF3F2;color:#B42318;border:1px solid #FECDCA}
.modal{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;padding:1rem}
.modal-overlay{position:absolute;inset:0;background:rgba(0,0,0,.5);backdrop-filter:blur(4px)}
.modal-box{position:relative;background:#fff;border-radius:var(--radius-xl);padding:2rem;max-width:480px;width:100%;box-shadow:var(--shadow-lg)}
.modal-close{position:absolute;top:1rem;right:1rem;background:none;border:none;font-size:1.5rem;cursor:pointer;color:var(--muted);line-height:1}
.modal-box h3{font-size:1.25rem;font-weight:700;margin-bottom:.5rem}
.modal-box p{color:var(--muted);font-size:.9375rem;margin-bottom:1.25rem}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media(max-width:1024px){
  .blog-grid{grid-template-columns:repeat(2,1fr)}
  .footer-cols{grid-template-columns:repeat(3,1fr)}
  .post-layout{grid-template-columns:1fr;padding:0 1.5rem}
  .post-toc{display:none}
  .related-grid{grid-template-columns:1fr 1fr}
  .hero-banner{margin:1rem;border-radius:var(--radius-lg)}
}
@media(max-width:768px){
  :root{--nav-h:64px}
  .topnav__links,.topnav__actions{display:none}
  .topnav__ham{display:flex}
  .blog-grid{grid-template-columns:1fr}
  .footer-cols{grid-template-columns:repeat(2,1fr)}
  .related-grid{grid-template-columns:1fr}
  .form-row-2{grid-template-columns:1fr}
  .hero-banner{height:380px;margin:0}
  .hero-title{font-size:1.5rem}
  .hero-content{left:1.5rem;right:4rem;bottom:2rem}
  .hero-arrow{width:44px;height:44px;right:1rem}
  .blog-main{padding:2.5rem 0 3rem}
  .cta-dark{padding:2rem 1rem}
  .cta-dark__inner{padding:2.5rem 1.5rem;border-radius:var(--radius-lg)}
}
@media(max-width:540px){
  .footer-cols{grid-template-columns:1fr 1fr}
  .footer-bottom{flex-direction:column;text-align:center;gap:.5rem}
  .hero-banner{height:320px;border-radius:0}
  .hero-excerpt{display:none}
}
@media(max-width:400px){
  .footer-cols{grid-template-columns:1fr}
}

/* ════════════════════════════════════════════════════════════════
   DARK MODE VARIABLES
   ════════════════════════════════════════════════════════════════ */
[data-theme="dark"]{
  --brand:       #9E77ED;
  --brand-dark:  #7F56D9;
  --brand-light: #1E1A3A;
  --bg:          #0F1117;
  --surface:     #1A1D27;
  --border:      #2D3148;
  --border-dark: #3D4166;
  --text:        #F0F2F8;
  --sub:         #B8BDD4;
  --muted:       #7B82A0;
  --muted-light: #4A5070;
  --shadow-sm:   0 1px 2px rgba(0,0,0,.4);
  --shadow-md:   0 4px 8px -2px rgba(0,0,0,.5);
  --shadow-lg:   0 12px 24px -4px rgba(0,0,0,.6);
}
html{transition:background-color .25s,color .25s}
[data-theme="dark"] body{background:var(--bg);color:var(--text)}
[data-theme="dark"] .topnav{background:rgba(15,17,23,.97);border-bottom-color:var(--border)}
[data-theme="dark"] .topnav__mobile{background:#0F1117;border-top-color:var(--border)}
[data-theme="dark"] .tn-drop__menu{background:#1A1D27;border-color:var(--border)}
[data-theme="dark"] .tnl:hover{background:var(--surface)}
[data-theme="dark"] .blog-card__img-wrap{background:var(--surface)}
[data-theme="dark"] .post-card{background:var(--surface);border-color:var(--border)}
[data-theme="dark"] .related-card{background:var(--surface);border-color:var(--border)}
[data-theme="dark"] .load-more-btn{background:var(--surface);border-color:var(--border);color:var(--sub)}
[data-theme="dark"] .post-hero{border-bottom-color:var(--border)}
[data-theme="dark"] .post-body p,[data-theme="dark"] .post-body li{color:var(--sub)}
[data-theme="dark"] .post-body h2,[data-theme="dark"] .post-body h3{color:var(--text)}
[data-theme="dark"] .post-body blockquote{background:var(--brand-light)}
[data-theme="dark"] .post-body strong{color:var(--text)}
[data-theme="dark"] .post-body code{background:var(--surface);border-color:var(--border)}
[data-theme="dark"] .share-btn{background:var(--surface);border-color:var(--border);color:var(--sub)}
[data-theme="dark"] .author-bio-card{background:var(--surface);border-color:var(--border)}
[data-theme="dark"] .related-posts{background:var(--surface)}
[data-theme="dark"] .faq-item{border-color:var(--border)}
[data-theme="dark"] .comments-section{border-top-color:var(--border)}
[data-theme="dark"] .comment-item{border-color:var(--border)}
[data-theme="dark"] .comment-avatar{background:var(--brand-light);color:var(--brand)}
[data-theme="dark"] .comment-text{color:var(--sub)}
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea{background:var(--surface);border-color:var(--border);color:var(--text)}
[data-theme="dark"] .auth-card{background:var(--surface);border-color:var(--border)}
[data-theme="dark"] .modal-box{background:var(--surface)}
[data-theme="dark"] .tag-blue{background:#0D1F3C;color:#60A5FA}
[data-theme="dark"] .tag-purple{background:#1E1A3A;color:#A78BFA}
[data-theme="dark"] .tag-green{background:#052E1C;color:#34D399}
[data-theme="dark"] .tag-orange{background:#2D1500;color:#FB923C}
[data-theme="dark"] .tag-red{background:#2D0A0A;color:#F87171}
[data-theme="dark"] .tag-gray{background:var(--surface);color:var(--sub)}
[data-theme="dark"] .flash-success{background:#052E1C;color:#34D399}
[data-theme="dark"] .flash-error{background:#2D0A0A;color:#F87171}
[data-theme="dark"] .page-btn{background:var(--surface);border-color:var(--border);color:var(--sub)}

/* ════════════════════════════════════════════════════════════════
   DARK TOGGLE BUTTON
   Single button — shows ☀️ in dark mode, 🌙 in light mode
   ════════════════════════════════════════════════════════════════ */
.dark-toggle{
  display:inline-flex;align-items:center;justify-content:center;
  width:38px;height:38px;
  border-radius:50%;
  border:1.5px solid var(--border-dark);
  background:transparent;
  cursor:pointer;
  font-size:1.1rem;
  flex-shrink:0;
  transition:background .15s,border-color .15s;
  line-height:1;
  padding:0;
}
.dark-toggle:hover{background:var(--surface);border-color:var(--brand)}

/* Light mode: show moon, hide sun */
.dark-toggle .icon-sun{ display:none }
.dark-toggle .icon-moon{ display:inline }

/* Dark mode: show sun, hide moon */
[data-theme="dark"] .dark-toggle .icon-sun{ display:inline }
[data-theme="dark"] .dark-toggle .icon-moon{ display:none }
[data-theme="dark"] .dark-toggle{ border-color:var(--border-dark) }

/* Hide auth links on mobile but keep toggle visible */
.topnav__auth{ display:inline-flex;align-items:center }
@media(max-width:768px){
  .topnav__auth{ display:none !important }
  .dark-toggle{ display:inline-flex !important }
}

/* ════════════════════════════════════════════════════════════════
   COMMENT REACTIONS
   ════════════════════════════════════════════════════════════════ */
.comment-reactions{
  display:flex;flex-wrap:wrap;gap:.375rem;margin-top:.625rem;
}
.react-btn{
  display:inline-flex;align-items:center;gap:.3rem;
  padding:.25rem .65rem;
  border-radius:100px;
  border:1.5px solid var(--border-dark);
  background:transparent;
  font-size:.9rem;
  cursor:pointer;
  transition:all .15s;
  color:var(--muted);
  line-height:1.4;
}
.react-btn:hover:not([disabled]){
  border-color:var(--brand);
  background:var(--brand-light);
  color:var(--brand);
}
/* ONLY buttons with this class are highlighted */
.react-btn.has-reacts{
  border-color:var(--brand) !important;
  background:var(--brand-light) !important;
  color:var(--brand) !important;
  font-weight:600;
}
.react-btn[disabled]{
  cursor:not-allowed;
  opacity:.45;
}
.react-count{
  font-size:.8rem;
  font-weight:700;
  min-width:.5rem;
}
[data-theme="dark"] .react-btn{border-color:var(--border)}
[data-theme="dark"] .react-btn.has-reacts{
  background:rgba(158,119,237,.2) !important;
  border-color:var(--brand) !important;
  color:var(--brand) !important;
}

/* ── Comment threading ───────────────────────────────────────── */
.comment-reply{
  margin-left:3rem;
  padding-left:1rem;
  border-left:2px solid var(--border);
}
.reply-toggle-btn{
  background:none;border:none;
  color:var(--brand);font-size:.8125rem;font-weight:600;
  cursor:pointer;margin-top:.375rem;padding:0;
}
.reply-toggle-btn:hover{text-decoration:underline}
.reply-form{
  margin-top:.75rem;padding:.875rem;
  border-radius:var(--radius-lg);
  background:var(--surface);border:1px solid var(--border);
}
.reply-form textarea{
  width:100%;resize:vertical;min-height:64px;
  padding:.5rem .75rem;
  border:1.5px solid var(--border-dark);
  border-radius:var(--radius);
  font-family:var(--font);font-size:.875rem;
  background:transparent;color:var(--text);
}

/* ── Login prompt box ────────────────────────────────────────── */
.cta-login-box{
  display:flex;align-items:center;justify-content:space-between;
  gap:1rem;padding:1.25rem 1.5rem;flex-wrap:wrap;
  border:1.5px solid var(--border);border-radius:var(--radius-lg);
  background:var(--surface);
}
.cta-login-box p{margin:0;color:var(--muted);font-size:.9375rem}

/* ── Okeeda masthead ─────────────────────────────────────────── */
.okeeda-masthead{
  text-align:center;padding:1.5rem 1rem 1rem;
  border-bottom:1.5px solid var(--border);margin-bottom:2rem;
}
.okeeda-tagline{
  font-size:1rem;color:var(--muted);
  letter-spacing:.02em;font-style:italic;
  max-width:640px;margin:0 auto;
}