/* ============================================================
   Rehan Shahid — Blog Stylesheet
   Shared by all /blog/*.html pages. Matches the main site's
   gold/dark Playfair Display + Inter design system.
   ============================================================ */

:root{
  --gold:#D4972A;--gold2:#F0BE45;--gold3:#FFD055;--gold4:#FFE89A;--gold-vivid:#FFB830;
  --gold-dim:rgba(212,151,42,.16);--gold-line:rgba(212,151,42,.32);--gold-glow:rgba(212,151,42,.56);
  --ease:cubic-bezier(.22,1,.36,1);--ease3:cubic-bezier(.34,1.56,.64,1);
}
[data-theme="dark"]{
  --bg:#020100;--bg2:#070401;--bg3:#0D0803;
  --sur:rgba(12,7,1,.97);--sur2:rgba(20,12,2,.98);
  --bdr:rgba(212,151,42,.22);--bdr-s:rgba(212,151,42,.09);
  --txt:#FFF9EE;--txt2:#F5E5B8;--txt3:#C0A060;--txt4:#7A5828;
  --shd:rgba(0,0,0,.92);--nav:rgba(2,1,0,.97);
}
[data-theme="white"]{
  --bg:#FFFFFF;--bg2:#F8F6F0;--bg3:#EFEADC;
  --sur:rgba(255,255,255,.98);--sur2:rgba(250,248,242,.99);
  --bdr:rgba(160,105,0,.26);--bdr-s:rgba(160,105,0,.12);
  --txt:#0A0A0A;--txt2:#241A08;--txt3:#6B4A18;--txt4:#9C7A48;
  --shd:rgba(20,15,5,.14);--nav:rgba(255,255,255,.97);
  --gold:#A86A00;--gold2:#C8860A;--gold3:#E0A020;--gold4:#FFCB55;--gold-vivid:#D89000;
  --gold-dim:rgba(168,106,0,.16);--gold-line:rgba(168,106,0,.34);--gold-glow:rgba(168,106,0,.55);
}
[data-theme="gray"]{
  --bg:#13151B;--bg2:#191B22;--bg3:#21232C;
  --sur:rgba(25,27,34,.96);--sur2:rgba(33,36,45,.98);
  --bdr:rgba(159,177,201,.26);--bdr-s:rgba(159,177,201,.11);
  --txt:#F1F3F7;--txt2:#D6DCE5;--txt3:#9AA6B5;--txt4:#576175;
  --shd:rgba(0,0,0,.88);--nav:rgba(17,19,25,.97);
  --gold:#8FB4D9;--gold2:#B7D0E8;--gold3:#DCEAF6;--gold4:#FFFFFF;--gold-vivid:#6FA0D4;
  --gold-dim:rgba(143,180,217,.18);--gold-line:rgba(143,180,217,.38);--gold-glow:rgba(143,180,217,.55);
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:'Inter',sans-serif;
  background:var(--bg);
  color:var(--txt);
  line-height:1.7;
  min-height:100vh;
  transition:background .35s,color .35s;
}
a{text-decoration:none;color:inherit}
button{cursor:pointer;border:none;background:none;font-family:inherit;color:inherit}
h1,h2,h3{font-family:'Playfair Display',serif;line-height:1.22;color:var(--txt)}
.mono{font-family:'Space Mono',monospace}
img{max-width:100%;display:block}
::selection{background:rgba(212,151,42,.28);color:var(--txt)}

/* ===== Top bar ===== */
.blog-top{
  position:sticky;top:0;z-index:50;
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 28px;max-width:1200px;margin:0 auto;
  background:var(--nav);backdrop-filter:blur(14px);
  border-bottom:1px solid var(--bdr-s);
}
.blog-brand{display:flex;align-items:center;gap:10px}
.blog-brand-ico{
  width:36px;height:36px;border-radius:9px;
  background:linear-gradient(135deg,var(--gold),var(--gold2));
  display:flex;align-items:center;justify-content:center;
  font-family:'Playfair Display',serif;font-weight:900;font-size:14px;color:#060200;flex-shrink:0;
}
.blog-brand-name{font-family:'Playfair Display',serif;font-size:15px;font-weight:700}
.blog-nav{display:flex;align-items:center;gap:22px}
.blog-nav a{font-size:13px;font-weight:600;color:var(--txt3);transition:color .2s}
.blog-nav a:hover,.blog-nav a.active{color:var(--gold)}
.theme-btn{
  width:36px;height:36px;border-radius:8px;background:var(--sur);
  border:1px solid var(--bdr);color:var(--txt3);
  display:flex;align-items:center;justify-content:center;transition:all .22s;flex-shrink:0;
}
.theme-btn:hover{border-color:var(--gold);color:var(--gold);background:var(--gold-dim)}
.theme-icon{width:18px;height:18px}.theme-icon svg{width:18px;height:18px;display:block}

/* ===== Shell / container ===== */
.blog-shell{max-width:760px;margin:0 auto;padding:48px 24px 80px}
.blog-listing-shell{max-width:1100px;margin:0 auto;padding:48px 24px 80px}

/* ===== Post header ===== */
.post-eyebrow{
  font-family:'Space Mono',monospace;font-size:11px;letter-spacing:2.5px;text-transform:uppercase;
  color:var(--gold);margin-bottom:14px;display:flex;align-items:center;gap:8px;
}
.post-eyebrow::before{content:'';width:18px;height:1px;background:var(--gold)}
.post-header h1{font-size:clamp(28px,5vw,42px);margin-bottom:16px;font-weight:700}
.post-meta{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px;
  font-size:13px;color:var(--txt3);margin-bottom:32px;padding-bottom:24px;
  border-bottom:1px solid var(--bdr-s);
}
.post-meta .dot{opacity:.5}
.post-lead{font-size:18px;color:var(--txt2);margin-bottom:8px;line-height:1.65}

/* ===== Prose content ===== */
.post-content h2{
  font-size:clamp(22px,3.6vw,28px);margin:42px 0 16px;font-weight:700;
  padding-top:6px;
}
.post-content h3{font-size:clamp(18px,3vw,21px);margin:28px 0 12px;font-weight:700;color:var(--gold3)}
.post-content p{font-size:16px;color:var(--txt2);margin-bottom:18px}
.post-content ul,.post-content ol{margin:0 0 18px 22px;color:var(--txt2);font-size:16px}
.post-content li{margin-bottom:8px}
.post-content strong{color:var(--txt);font-weight:700}
.post-content a{color:var(--gold);border-bottom:1px solid var(--gold-line)}
.post-content a:hover{color:var(--gold2)}
.post-content blockquote{
  margin:24px 0;padding:18px 22px;border-left:3px solid var(--gold);
  background:var(--sur);border-radius:0 10px 10px 0;color:var(--txt2);font-style:italic;
}
.post-content code{
  font-family:'Space Mono',monospace;font-size:13.5px;background:var(--sur2);
  padding:2px 7px;border-radius:5px;color:var(--gold3);
}

/* ===== Key takeaways box ===== */
.key-takeaways{
  margin:36px 0;padding:24px 26px;border-radius:14px;
  background:var(--sur);border:1px solid var(--bdr-s);position:relative;overflow:hidden;
}
.key-takeaways::before{content:'';position:absolute;top:0;left:0;right:0;height:2px;background:linear-gradient(90deg,transparent,var(--gold),transparent)}
.key-takeaways h2{margin-top:0!important;font-size:18px!important;color:var(--gold)!important}
.key-takeaways ul{margin-bottom:0}

/* ===== FAQ ===== */
.faq-item{border-bottom:1px solid var(--bdr-s);padding:18px 0}
.faq-item:last-child{border-bottom:none}
.faq-item h3{margin:0 0 8px;font-size:17px}
.faq-item p{margin-bottom:0}

/* ===== Author / footer-of-post ===== */
.post-footer{
  margin-top:48px;padding-top:28px;border-top:1px solid var(--bdr-s);
  display:flex;align-items:center;gap:14px;
}
.post-author-ico{
  width:44px;height:44px;border-radius:50%;flex-shrink:0;
  background:linear-gradient(135deg,var(--gold),var(--gold2));
  display:flex;align-items:center;justify-content:center;font-family:'Playfair Display',serif;font-weight:900;color:#060200;
}
.post-author-name{font-size:14px;font-weight:700;color:var(--txt)}
.post-author-role{font-size:12.5px;color:var(--txt3)}

/* ===== Article cards (drop-in compatible class names) ===== */
.article-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:22px;margin-top:28px;
}
.article-card{
  background:var(--sur);border:1px solid var(--bdr-s);border-radius:16px;
  padding:26px 24px;display:flex;flex-direction:column;gap:10px;
  transition:transform .25s var(--ease),border-color .25s,box-shadow .25s;
}
.article-card:hover{transform:translateY(-4px);border-color:var(--gold-line);box-shadow:0 18px 44px var(--shd)}
.article-card .article-cat{
  font-family:'Space Mono',monospace;font-size:10.5px;letter-spacing:1.5px;text-transform:uppercase;color:var(--gold);
}
.article-card h3{font-size:19px;margin:0}
.article-card p{font-size:14px;color:var(--txt3);margin:0;line-height:1.6;flex-grow:1}
.article-card a{
  font-size:13px;font-weight:700;color:var(--gold);display:inline-flex;align-items:center;gap:6px;margin-top:4px;
}
.article-card a:hover{color:var(--gold2)}

/* ===== Blog listing hero ===== */
.blog-listing-hero{margin-bottom:8px}
.blog-listing-hero h1{font-size:clamp(30px,5vw,46px);margin-bottom:14px}
.blog-listing-hero p{font-size:16px;color:var(--txt3);max-width:620px}

/* ===== Footer ===== */
.site-footer{
  text-align:center;padding:32px 24px;font-size:13px;color:var(--txt4);
  border-top:1px solid var(--bdr-s);
}
.site-footer a{color:var(--gold)}

@media(max-width:560px){
  .blog-top{padding:16px 18px}
  .blog-shell{padding:32px 18px 60px}
  .blog-listing-shell{padding:32px 18px 60px}
}

/* ===== Scroll reveal ===== */
.rev{opacity:1;transform:none;filter:none}
html.rdy .rev{opacity:0;transform:translate3d(0,32px,0) scale(.985);filter:blur(2px);transition:opacity .8s var(--ease),transform .8s var(--ease),filter .7s ease;will-change:transform,opacity}
html.rdy .rev.vis{opacity:1;transform:none;filter:none}
.d1{transition-delay:.08s}.d2{transition-delay:.16s}.d3{transition-delay:.24s}.d4{transition-delay:.32s}
@media(prefers-reduced-motion:reduce){.rev{opacity:1!important;transform:none!important;filter:none!important}}

/* ===== Category icon badge on cards ===== */
.article-card-icon{
  width:42px;height:42px;border-radius:11px;display:flex;align-items:center;justify-content:center;
  background:var(--gold-dim);border:1px solid var(--gold-line);color:var(--gold);margin-bottom:4px;
}
.article-card-icon svg{width:20px;height:20px}
