
:root{--bg:#050814;--surface:#0d1224;--surface2:#131929;--card:#1a2235;--border:rgba(255,255,255,0.07);--text:#f1f5f9;--muted:#64748b;--accent:#6366f1;--accent2:#a855f7;--green:#10b981;--yellow:#f59e0b;--red:#ef4444;--font:'Inter',sans-serif;--head:'Outfit',sans-serif;--shadow:0 4px 24px rgba(0,0,0,0.4);--glow:0 0 30px rgba(99,102,241,0.3);--radius:14px;--trans:all 0.3s cubic-bezier(.4,0,.2,1)}
*{margin:0;padding:0;box-sizing:border-box}
html{font-size:16px;scroll-behavior:smooth}
body{font-family:var(--font);background:var(--bg);color:var(--text);line-height:1.7;overflow-x:hidden}
body::before{content:'';position:fixed;top:0;right:0;width:600px;height:600px;background:radial-gradient(circle,rgba(99,102,241,.12) 0%,transparent 70%);pointer-events:none;z-index:0}
body::after{content:'';position:fixed;bottom:0;left:0;width:400px;height:400px;background:radial-gradient(circle,rgba(168,85,247,.08) 0%,transparent 70%);pointer-events:none;z-index:0}
h1,h2,h3,h4{font-family:var(--head);font-weight:800;letter-spacing:-.02em;line-height:1.2}
a{color:inherit;text-decoration:none;transition:var(--trans)}
img{max-width:100%;display:block}
ul{list-style:none}

/* NAV */
.navbar{position:fixed;top:0;left:0;right:0;z-index:1000;padding:.9rem 5%;display:flex;align-items:center;justify-content:space-between;background:rgba(5,8,20,.85);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border-bottom:1px solid var(--border)}
.navbar::after{content:'';position:absolute;bottom:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,rgba(99,102,241,.5),rgba(168,85,247,.5),transparent)}
.nav-brand{font-family:var(--head);font-size:1.4rem;font-weight:900;background:linear-gradient(135deg,#818cf8,#c084fc);-webkit-background-clip:text;-webkit-text-fill-color:transparent}
.nav-links{display:flex;gap:.25rem}
.nav-links a{padding:.45rem .9rem;border-radius:8px;font-size:.9rem;font-weight:500;color:var(--muted);transition:var(--trans)}
.nav-links a:hover,.nav-links a.active{color:var(--text);background:rgba(255,255,255,.06)}
.nav-actions{display:flex;gap:.5rem}
.nav-btn{background:none;border:1px solid var(--border);color:var(--text);width:38px;height:38px;border-radius:10px;cursor:pointer;font-size:1rem;display:flex;align-items:center;justify-content:center;transition:var(--trans)}
.nav-btn:hover{background:rgba(255,255,255,.06);border-color:rgba(99,102,241,.4)}
.hamburger{display:none}

/* MOBILE NAV */
.mobile-nav{display:none;position:fixed;bottom:0;left:0;right:0;z-index:1000;background:rgba(13,18,36,.95);backdrop-filter:blur(20px);border-top:1px solid var(--border);padding:.6rem 0 env(safe-area-inset-bottom,.6rem)}
.mobile-nav ul{display:flex;justify-content:space-around}
.mobile-nav a{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:.65rem;font-weight:600;color:var(--muted);padding:.4rem .8rem;border-radius:10px;transition:var(--trans)}
.mobile-nav a i{font-size:1.2rem}
.mobile-nav a.active,.mobile-nav a:hover{color:var(--accent)}

/* HERO */
.hero{position:relative;min-height:92vh;display:flex;align-items:flex-end;padding:0;margin-top:66px;overflow:hidden}
.hero-bg{position:absolute;inset:0;object-fit:cover;width:100%;height:100%}
.hero-overlay{position:absolute;inset:0;background:linear-gradient(to top,rgba(5,8,20,1) 0%,rgba(5,8,20,.7) 50%,rgba(5,8,20,.3) 100%)}
.hero-content{position:relative;z-index:2;padding:4rem 5% 5rem;max-width:820px}
.hero-badge{display:inline-flex;align-items:center;gap:.5rem;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff;padding:.35rem 1rem;border-radius:20px;font-size:.8rem;font-weight:700;text-transform:uppercase;letter-spacing:1px;margin-bottom:1.5rem}
.hero h1{font-size:clamp(2.2rem,5vw,4rem);color:#fff;margin-bottom:1.5rem}
.hero p{font-size:1.2rem;color:rgba(255,255,255,.7);margin-bottom:2.5rem;max-width:600px;line-height:1.6}
.hero-actions{display:flex;gap:1rem;flex-wrap:wrap}
.btn{display:inline-flex;align-items:center;gap:.5rem;padding:.85rem 2rem;border-radius:10px;font-weight:700;font-size:.95rem;border:none;cursor:pointer;transition:var(--trans)}
.btn-primary{background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff;box-shadow:0 4px 20px rgba(99,102,241,.35)}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 8px 30px rgba(99,102,241,.5);color:#fff}
.btn-outline{background:rgba(255,255,255,.08);color:#fff;border:1px solid rgba(255,255,255,.2);backdrop-filter:blur(10px)}
.btn-outline:hover{background:rgba(255,255,255,.15);color:#fff;transform:translateY(-2px)}
.hero-scroll{position:absolute;bottom:2rem;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:.5rem;color:rgba(255,255,255,.5);font-size:.8rem;animation:bounce 2s infinite}
@keyframes bounce{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(-8px)}}

/* CONTAINER */
.container{max-width:1200px;margin:0 auto;padding:0 5%}
.section{padding:5rem 0}
.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:3rem;padding-bottom:1rem;border-bottom:1px solid var(--border)}
.section-title{font-size:1.8rem;display:flex;align-items:center;gap:.75rem}
.section-title::before{content:'';display:block;width:4px;height:28px;background:linear-gradient(to bottom,var(--accent),var(--accent2));border-radius:2px}
.view-all{color:var(--accent);font-weight:600;font-size:.9rem;display:flex;align-items:center;gap:.35rem;transition:var(--trans)}
.view-all:hover{gap:.6rem}

/* FEATURED GRID */
.featured-grid{display:grid;grid-template-columns:1.8fr 1fr;grid-template-rows:auto auto;gap:1.5rem}
.featured-main{grid-row:1/3}
.post-card{position:relative;border-radius:var(--radius);overflow:hidden;background:var(--card);border:1px solid var(--border);transition:var(--trans)}
.post-card:hover{transform:translateY(-4px);border-color:rgba(99,102,241,.3);box-shadow:var(--shadow),var(--glow)}
.post-card .thumb{width:100%;object-fit:cover;transition:transform .5s ease}
.post-card:hover .thumb{transform:scale(1.04)}
.featured-main .thumb{height:480px}
.post-card-sm .thumb{height:220px}
.post-overlay{position:absolute;inset:0;background:linear-gradient(to top,rgba(5,8,20,.95) 0%,rgba(5,8,20,.3) 60%,transparent 100%)}
.post-body{position:absolute;bottom:0;left:0;right:0;padding:2rem}
.post-cat{display:inline-block;padding:.25rem .8rem;border-radius:20px;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.5px;margin-bottom:.75rem;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff}
.post-title{font-size:1.6rem;color:#fff;line-height:1.3;margin-bottom:.75rem;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.post-card-sm .post-title{font-size:1.1rem;-webkit-line-clamp:2}
.post-meta{display:flex;gap:1rem;color:rgba(255,255,255,.55);font-size:.8rem}

/* ARTICLE FEED (BLOG LIST) */
.blog-layout{display:grid;grid-template-columns:2fr 1fr;gap:3rem;align-items:start}
.blog-feed{}
.article-row{display:flex;gap:1.5rem;padding:1.75rem 0;border-bottom:1px solid var(--border);transition:var(--trans)}
.article-row:last-child{border-bottom:none}
.article-row:hover{transform:translateX(4px)}
.article-row-thumb{width:180px;height:120px;border-radius:10px;object-fit:cover;flex-shrink:0;transition:transform .4s ease}
.article-row:hover .article-row-thumb{transform:scale(1.03)}
.article-row-body{flex:1;display:flex;flex-direction:column;gap:.5rem}
.article-row-cat{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--accent)}
.article-row-title{font-size:1.15rem;font-weight:700;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.article-row-title:hover{color:var(--accent)}
.article-row-excerpt{font-size:.9rem;color:var(--muted);line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.article-row-meta{font-size:.8rem;color:var(--muted);margin-top:auto;display:flex;gap:1rem}

/* SIDEBAR */
.sidebar{display:flex;flex-direction:column;gap:2rem;position:sticky;top:90px}
.sidebar-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.75rem;overflow:hidden}
.sidebar-card-title{font-size:1.05rem;font-weight:800;margin-bottom:1.5rem;padding-bottom:.75rem;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:.5rem}
.sidebar-card-title i{color:var(--accent)}
.trend-item{display:flex;gap:1rem;padding:.75rem 0;border-bottom:1px solid var(--border);align-items:center;transition:var(--trans)}
.trend-item:last-child{border:none}
.trend-item:hover{transform:translateX(4px)}
.trend-num{font-size:2rem;font-weight:900;color:var(--border);min-width:2rem;font-family:var(--head)}
.trend-info{}
.trend-cat{font-size:.7rem;font-weight:700;color:var(--accent);text-transform:uppercase;letter-spacing:.5px}
.trend-title{font-size:.92rem;font-weight:600;line-height:1.4;margin-top:.2rem}
.cat-pills{display:flex;flex-wrap:wrap;gap:.6rem}
.cat-pill{padding:.45rem 1rem;border-radius:20px;font-size:.82rem;font-weight:600;background:var(--surface2);border:1px solid var(--border);color:var(--muted);transition:var(--trans)}
.cat-pill:hover{background:var(--accent);color:#fff;border-color:var(--accent)}
.newsletter-card{background:linear-gradient(135deg,rgba(99,102,241,.15),rgba(168,85,247,.15));border:1px solid rgba(99,102,241,.3)}
.newsletter-card h3{font-size:1.3rem;margin-bottom:.5rem}
.newsletter-card p{color:var(--muted);font-size:.9rem;margin-bottom:1.25rem}
.newsletter-input{width:100%;padding:.75rem 1rem;border-radius:8px;border:1px solid var(--border);background:var(--surface);color:var(--text);font-size:.9rem;margin-bottom:.75rem;outline:none;transition:var(--trans)}
.newsletter-input:focus{border-color:var(--accent)}
.btn-full{width:100%;justify-content:center;padding:.85rem}

/* CARDS GRID */
.cards-grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem}
.flat-card{border-radius:var(--radius);overflow:hidden;background:var(--card);border:1px solid var(--border);transition:var(--trans)}
.flat-card:hover{transform:translateY(-5px);border-color:rgba(99,102,241,.3);box-shadow:var(--shadow),var(--glow)}
.flat-card .thumb{width:100%;height:200px;object-fit:cover;transition:transform .5s ease}
.flat-card:hover .thumb{transform:scale(1.05)}
.flat-card-body{padding:1.25rem}
.flat-cat{font-size:.72rem;font-weight:700;text-transform:uppercase;color:var(--accent);letter-spacing:.5px;margin-bottom:.5rem}
.flat-title{font-size:1.05rem;font-weight:700;line-height:1.4;margin-bottom:.5rem}
.flat-title:hover{color:var(--accent)}
.flat-excerpt{font-size:.85rem;color:var(--muted);line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* CATEGORY BANNER */
.cat-banner{border-radius:var(--radius);padding:3.5rem 3rem;display:flex;align-items:center;justify-content:space-between;gap:2rem;background:linear-gradient(135deg,var(--surface2),var(--card));border:1px solid var(--border);margin-bottom:4rem;position:relative;overflow:hidden}
.cat-banner::before{content:'';position:absolute;right:-50px;top:-50px;width:250px;height:250px;background:radial-gradient(circle,rgba(99,102,241,.2),transparent 70%);border-radius:50%}
.cat-banner-text h2{font-size:2.5rem;margin-bottom:.75rem}
.cat-banner-text p{color:var(--muted);max-width:500px;line-height:1.6}
.cat-count{font-size:4rem;font-weight:900;font-family:var(--head);background:linear-gradient(135deg,var(--accent),var(--accent2));-webkit-background-clip:text;-webkit-text-fill-color:transparent;flex-shrink:0}

/* ARTICLE PAGE */
.article-wrap{max-width:820px;margin:0 auto;padding:0 5%}
.article-wrap main{padding-top:80px}
.article-hero{border-radius:var(--radius);overflow:hidden;margin-bottom:3rem;max-height:480px}
.article-hero img{width:100%;height:480px;object-fit:cover}
.article-header{margin-bottom:2.5rem}
.breadcrumb{display:flex;align-items:center;gap:.5rem;font-size:.85rem;color:var(--muted);margin-bottom:1.5rem;flex-wrap:wrap}
.breadcrumb a:hover{color:var(--accent)}
.breadcrumb span{color:var(--border)}
.article-cat{display:inline-block;padding:.3rem .9rem;border-radius:20px;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.5px;margin-bottom:1rem}
.article-title{font-size:clamp(1.8rem,4vw,3rem);line-height:1.2;margin-bottom:1.5rem}
.article-meta-bar{display:flex;align-items:center;gap:1.5rem;padding:1rem 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);margin-bottom:2rem;flex-wrap:wrap}
.article-meta-bar span{font-size:.875rem;color:var(--muted);display:flex;align-items:center;gap:.4rem}
.article-content p{font-size:1.1rem;line-height:1.85;margin-bottom:1.75rem;color:#e2e8f0}
.article-content h2{font-size:1.75rem;margin:3rem 0 1.25rem}
.article-content h3{font-size:1.35rem;margin:2.25rem 0 1rem}
.article-content ul,.article-content ol{padding-left:1.75rem;margin-bottom:1.75rem}
.article-content li{font-size:1.05rem;line-height:1.8;margin-bottom:.6rem;color:#e2e8f0}
.article-content strong{color:#fff;font-weight:700}
.article-content a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}

/* INFO BOXES */
.callout{padding:1.5rem;border-radius:12px;margin:2rem 0;background:var(--surface);border:1px solid var(--border)}
.box-green{border-left:4px solid var(--green)}
.box-purple{border-left:4px solid var(--accent2)}
.box-red{border-left:4px solid var(--red)}
.box-yellow{border-left:4px solid var(--yellow)}

/* TABLE */
.table-wrap{overflow-x:auto;border-radius:12px;border:1px solid var(--border);margin:2rem 0}
table{width:100%;border-collapse:collapse;background:var(--surface)}
th,td{padding:1rem 1.25rem;text-align:left;border-bottom:1px solid var(--border);font-size:.95rem}
th{background:var(--surface2);font-weight:700;color:var(--text)}
tr:hover td{background:rgba(255,255,255,.02)}
.td-yes{color:var(--green);font-weight:700}
.td-no{color:var(--red)}
.td-yellow{color:var(--yellow)}

/* RELATED */
.related-section{margin-top:4rem;padding-top:3rem;border-top:1px solid var(--border)}
.related-section h3{font-size:1.5rem;margin-bottom:2rem}
.related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem}
.related-card{border-radius:10px;overflow:hidden;background:var(--surface);border:1px solid var(--border);transition:var(--trans)}
.related-card:hover{transform:translateY(-3px);border-color:rgba(99,102,241,.3)}
.related-card img{width:100%;height:130px;object-fit:cover}
.related-card-body{padding:1rem}
.related-card-cat{font-size:.7rem;font-weight:700;color:var(--accent);text-transform:uppercase;margin-bottom:.4rem}
.related-card-title{font-size:.9rem;font-weight:700;line-height:1.4}

/* AUTHOR BOX */
.author-box{display:flex;gap:1.5rem;align-items:center;padding:2rem;border-radius:var(--radius);background:var(--surface);border:1px solid var(--border);margin-top:3rem}
.author-img{width:72px;height:72px;border-radius:50%;object-fit:cover;border:3px solid var(--accent);flex-shrink:0}
.author-name{font-weight:800;margin-bottom:.25rem}
.author-bio{font-size:.9rem;color:var(--muted)}

/* FOOTER */
footer{background:var(--surface);border-top:1px solid var(--border);padding:4rem 0 2rem;margin-top:5rem}
.footer-grid{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:3rem;margin-bottom:3rem}
.footer-brand{font-family:var(--head);font-size:1.4rem;font-weight:900;background:linear-gradient(135deg,#818cf8,#c084fc);-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-bottom:1rem}
.footer-desc{color:var(--muted);font-size:.9rem;line-height:1.6}
.footer-col h4{font-size:.9rem;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--text);margin-bottom:1.25rem}
.footer-links{display:flex;flex-direction:column;gap:.75rem}
.footer-links a{color:var(--muted);font-size:.9rem;transition:var(--trans)}
.footer-links a:hover{color:var(--accent);padding-left:4px}
.footer-bottom{display:flex;justify-content:space-between;align-items:center;padding-top:2rem;border-top:1px solid var(--border);color:var(--muted);font-size:.85rem;flex-wrap:wrap;gap:1rem}

/* SEARCH OVERLAY */
.search-overlay{position:fixed;inset:0;background:rgba(5,8,20,.95);z-index:9999;display:flex;align-items:flex-start;justify-content:center;padding-top:15vh;opacity:0;pointer-events:none;transition:opacity .3s ease}
.search-overlay.active{opacity:1;pointer-events:all}
.search-inner{width:90%;max-width:700px;position:relative}
.search-inner input{width:100%;padding:1.25rem 1.5rem;font-size:1.4rem;background:var(--surface);border:1px solid rgba(99,102,241,.4);border-radius:14px;color:var(--text);outline:none;font-family:var(--font)}
.search-inner input::placeholder{color:var(--muted)}
.search-inner input:focus{border-color:var(--accent)}
.search-close-btn{position:absolute;top:-3rem;right:0;background:none;border:none;color:var(--muted);font-size:1.5rem;cursor:pointer;transition:var(--trans)}
.search-close-btn:hover{color:var(--text)}

/* CATEGORY PAGE */
.hub-hero{padding:6rem 5% 4rem;text-align:center}
.hub-hero h1{font-size:clamp(2.5rem,5vw,4rem);margin-bottom:1rem;background:linear-gradient(135deg,#fff,#94a3b8);-webkit-background-clip:text;-webkit-text-fill-color:transparent}
.hub-hero p{color:var(--muted);font-size:1.2rem;max-width:600px;margin:0 auto 2rem}
.hub-stats{display:flex;justify-content:center;gap:2rem;flex-wrap:wrap}
.hub-stat{text-align:center}
.hub-stat-num{font-size:2.5rem;font-weight:900;font-family:var(--head);background:linear-gradient(135deg,var(--accent),var(--accent2));-webkit-background-clip:text;-webkit-text-fill-color:transparent}
.hub-stat-label{font-size:.85rem;color:var(--muted)}

/* BADGE COLORS */
.badge-esports{background:linear-gradient(135deg,#6366f1,#4f46e5)}
.badge-hardware{background:linear-gradient(135deg,#0ea5e9,#0284c7)}
.badge-games{background:linear-gradient(135deg,#f59e0b,#d97706)}
.badge-guides{background:linear-gradient(135deg,#10b981,#059669)}
.badge-tech{background:linear-gradient(135deg,#a855f7,#7c3aed)}
.badge-culture{background:linear-gradient(135deg,#ec4899,#db2777)}
.badge-earn{background:linear-gradient(135deg,#14b8a6,#0d9488)}

/* RESPONSIVE */
@media(max-width:1024px){.featured-grid{grid-template-columns:1fr 1fr}.featured-main{grid-row:unset;grid-column:1/-1}.featured-main .thumb{height:400px}.footer-grid{grid-template-columns:1fr 1fr}}
@media(max-width:768px){.nav-links,.nav-actions .nav-btn:not(.hamburger){display:none}.hamburger{display:flex}.mobile-nav{display:block}.featured-grid{grid-template-columns:1fr}.blog-layout{grid-template-columns:1fr}.sidebar{position:static}.cards-grid-3{grid-template-columns:1fr}.related-grid{grid-template-columns:1fr 1fr}.footer-grid{grid-template-columns:1fr 1fr}.hero{min-height:100svh}.cat-banner{flex-direction:column;text-align:center}.article-row-thumb{width:110px;height:80px}.article-row-title{font-size:1rem}}
@media(max-width:480px){.cards-grid-3,.related-grid{grid-template-columns:1fr}.footer-grid{grid-template-columns:1fr}.hero h1{font-size:2rem}.article-row{flex-direction:column}.article-row-thumb{width:100%;height:200px}}

/* FIX: Hero badge - position correctly */
.hero-badge { position: relative; z-index: 10; }

/* FIX: Post card text stacking over thumbnail text - dark overlay boost */
.post-overlay {
  background: linear-gradient(
    to top,
    rgba(5,8,20,1) 0%,
    rgba(5,8,20,0.85) 40%,
    rgba(5,8,20,0.5) 70%,
    rgba(5,8,20,0.1) 100%
  ) !important;
}

/* FIX: Featured grid - equal 2-column on desktop */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.featured-main { grid-column: 1; grid-row: 1 / 3; }
.featured-main .thumb { height: 100% !important; min-height: 480px; }
.post-card-sm .thumb { height: 220px; }

/* FIX: Flat card image fallback bg */
.flat-card .thumb { background: var(--card); }

/* FIX: nav link hover — cleaner */
.nav-links a:hover { color: #a5b4fc; background: rgba(99,102,241,0.12); }

/* Blog layout gap */
.blog-layout { gap: 2.5rem; }

/* Article row on hover */
.article-row:hover .article-row-title { color: var(--accent); }

/* Footer responsive */
@media(max-width:640px){ .footer-grid { grid-template-columns: 1fr !important; } }

/* =============================================
   LIGHT THEME OVERRIDES
   ============================================= */
[data-theme="light"] {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --card: #ffffff;
  --border: rgba(0,0,0,0.08);
  --text: #0f172a;
  --muted: #475569;
}
[data-theme="light"] body {
  color: #0f172a;
  background-image: radial-gradient(circle at top right, rgba(99,102,241,.07), transparent 40%),
                    radial-gradient(circle at bottom left, rgba(168,85,247,.05), transparent 40%);
}
/* ── Navbar ── */
[data-theme="light"] .navbar {
  background: rgba(255,255,255,.92);
  border-bottom-color: rgba(0,0,0,.08);
}
[data-theme="light"] .nav-brand {
  background: linear-gradient(135deg,#4f46e5,#7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="light"] .nav-links a { color: #334155; }
[data-theme="light"] .nav-links a:hover { color: #4f46e5; background: rgba(99,102,241,.08); }
[data-theme="light"] .nav-btn { border-color: rgba(0,0,0,.12); color: #0f172a; }

/* ── Cards & post cards ── */
[data-theme="light"] .post-card,
[data-theme="light"] .flat-card { background: #fff; border-color: rgba(0,0,0,.09); }
[data-theme="light"] .flat-title { color: #0f172a; }
[data-theme="light"] .flat-excerpt { color: #475569; }

/* ── Article list rows ── */
[data-theme="light"] .article-row { border-bottom-color: rgba(0,0,0,.08); }
[data-theme="light"] .article-row-title { color: #0f172a; }
[data-theme="light"] .article-row-excerpt { color: #475569; }
[data-theme="light"] .article-row-meta { color: #64748b; }

/* ── Sidebar ── */
[data-theme="light"] .sidebar-card { background: #fff; border-color: rgba(0,0,0,.08); }
[data-theme="light"] .sidebar-card-title { color: #0f172a; border-bottom-color: rgba(0,0,0,.08); }
[data-theme="light"] .trend-title { color: #0f172a; }
[data-theme="light"] .trend-num { color: rgba(0,0,0,.12); }
[data-theme="light"] .trend-item { border-bottom-color: rgba(0,0,0,.06); }
[data-theme="light"] .newsletter-card { background: linear-gradient(135deg,rgba(99,102,241,.08),rgba(168,85,247,.06)); border-color: rgba(99,102,241,.2); }
[data-theme="light"] .newsletter-card h3 { color: #0f172a; }
[data-theme="light"] .newsletter-card p { color: #475569; }
[data-theme="light"] .newsletter-input { background: #fff; border-color: rgba(0,0,0,.12); color: #0f172a; }
[data-theme="light"] .newsletter-input::placeholder { color: #94a3b8; }
[data-theme="light"] .cat-pill { background: #f1f5f9; color: #334155; border-color: rgba(0,0,0,.1); }

/* ── Section headers ── */
[data-theme="light"] .section-title { color: #0f172a; }
[data-theme="light"] .section-header { border-bottom-color: rgba(0,0,0,.08); }

/* ── Article page ── */
[data-theme="light"] .article-content p  { color: #1e293b !important; }
[data-theme="light"] .article-content h2 { color: #0f172a !important; }
[data-theme="light"] .article-content h3 { color: #0f172a !important; }
[data-theme="light"] .article-content h4 { color: #0f172a !important; }
[data-theme="light"] .article-content li  { color: #1e293b !important; }
[data-theme="light"] .article-content strong { color: #0f172a !important; }
[data-theme="light"] .article-content a { color: var(--accent); }
[data-theme="light"] .article-title { color: #0f172a; }
[data-theme="light"] .article-meta-bar { border-color: rgba(0,0,0,.08); }
[data-theme="light"] .article-meta-bar span { color: #475569; }
[data-theme="light"] .breadcrumb { color: #64748b; }
[data-theme="light"] .breadcrumb span { color: rgba(0,0,0,.2); }

/* ── Info boxes / callouts ── */
[data-theme="light"] .callout { background: #f8fafc; border-color: rgba(0,0,0,.08); color: #1e293b; }
[data-theme="light"] .callout p,
[data-theme="light"] .callout li { color: #1e293b !important; }

/* ── Tables ── */
[data-theme="light"] .table-wrap { border-color: rgba(0,0,0,.08); }
[data-theme="light"] table { background: #fff; }
[data-theme="light"] th { background: #f1f5f9; color: #0f172a; }
[data-theme="light"] td { color: #1e293b; border-bottom-color: rgba(0,0,0,.06); }
[data-theme="light"] tr:hover td { background: rgba(0,0,0,.02); }

/* ── Related cards ── */
[data-theme="light"] .related-card { background: #fff; border-color: rgba(0,0,0,.08); }
[data-theme="light"] .related-card-title { color: #0f172a; }

/* ── Author box ── */
[data-theme="light"] .author-box { background: #fff; border-color: rgba(0,0,0,.08); }
[data-theme="light"] .author-name { color: #0f172a; }
[data-theme="light"] .author-bio { color: #475569; }

/* ── Category hub pages ── */
[data-theme="light"] .hub-hero h1 { background: linear-gradient(135deg,#0f172a,#334155); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
[data-theme="light"] .hub-hero p { color: #475569; }
[data-theme="light"] .cat-banner { background: linear-gradient(135deg,#f8fafc,#fff); border-color: rgba(0,0,0,.08); }
[data-theme="light"] .cat-banner-text h2 { color: #0f172a; }
[data-theme="light"] .cat-banner-text p { color: #475569; }

/* ── Mobile nav ── */
[data-theme="light"] .mobile-nav { background: rgba(255,255,255,.97); border-top-color: rgba(0,0,0,.08); }
[data-theme="light"] .mobile-nav a { color: #64748b; }
[data-theme="light"] .mobile-nav a.active { color: #4f46e5; }

/* ── Footer ── */
[data-theme="light"] footer { background: #f8fafc; border-top-color: rgba(0,0,0,.08); }
[data-theme="light"] .footer-col h4 { color: #0f172a; }
[data-theme="light"] .footer-links a { color: #475569; }
[data-theme="light"] .footer-links a:hover { color: #4f46e5; }
[data-theme="light"] .footer-desc { color: #475569; }
[data-theme="light"] .footer-bottom { border-top-color: rgba(0,0,0,.08); color: #64748b; }

/* ── Search overlay ── */
[data-theme="light"] .search-overlay { background: rgba(241,245,249,.97); }
[data-theme="light"] .search-inner input { background: #fff; border-color: rgba(99,102,241,.3); color: #0f172a; }
[data-theme="light"] .search-inner input::placeholder { color: #94a3b8; }
[data-theme="light"] .search-close-btn { color: #475569; }
[data-theme="light"] .search-close-btn:hover { color: #0f172a; }

/* =============================================
   HERO SLIDESHOW
   ============================================= */
#hero-slideshow { position: relative; min-height: 92vh; overflow: hidden; margin-top: 66px; display: block; }

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}
.hero-slide.active {
  opacity: 1;
  pointer-events: all;
  position: relative;
  min-height: 92vh;
}
.hero-slide:not(.active):first-child { position: relative; min-height: 0; height: 0; }

/* Use CSS grid stacking so all slides occupy same space */
#hero-slideshow {
  display: grid;
  grid-template-rows: 1fr;
  align-items: stretch;
}
.hero-slide {
  grid-row: 1;
  grid-column: 1;
  min-height: 92vh;
  pointer-events: none;
}
.hero-slide.active { pointer-events: all; }

.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,8,20,1) 0%, rgba(5,8,20,.7) 50%, rgba(5,8,20,.25) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; padding: 4rem 5% 7rem; max-width: 820px; align-self: flex-end; }
.hero-scroll { position: absolute; bottom: 3.5rem; left: 50%; transform: translateX(-50%); z-index: 10; }

/* Dots */
.hero-dots {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .6rem;
  z-index: 20;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  border: none;
  cursor: pointer;
  transition: all .3s ease;
  padding: 0;
}
.hero-dot.active {
  width: 28px;
  border-radius: 4px;
  background: var(--accent);
}

/* Arrows */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(5,8,20,.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  transition: all .3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-prev { left: 2rem; }
.hero-next { right: 2rem; }
.hero-arrow:hover { background: var(--accent); border-color: var(--accent); }

/* Progress bar on active slide */
.hero-slide.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  animation: heroProgress 5s linear forwards;
  z-index: 30;
}
@keyframes heroProgress {
  from { width: 0; }
  to { width: 100%; }
}


/* =============================================
   ARTICLE PAGE — LAYOUT & MISSING CLASSES FIX
   ============================================= */

/* Push all main content below fixed navbar (height ~66px) */
main {
  padding-top: 80px;
}

/* Also covers the .article-wrap pattern */
.article-wrap main {
  padding-top: 0; /* already handled by parent padding-top above */
}

/* Category badge shown above the article h1 */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: .3rem .9rem;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 1rem;
}

/* Article meta row (date · read time · site) */
.article-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--muted);
  font-size: .875rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.article-meta span { display: flex; align-items: center; gap: .35rem; }

/* Hero image wrapper */
.article-hero-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2.5rem;
  max-height: 480px;
}
.article-hero-img img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}

/* Related articles inline list */
.related-articles-section {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.related-articles-section h3 {
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}
.related-list-custom {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.related-list-custom a {
  color: var(--accent);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--trans);
}
.related-list-custom a:hover { color: var(--accent2); }

/* Light theme overrides for article-page additions */
[data-theme="light"] .category-badge { /* inherits gradient — no override needed */ }
[data-theme="light"] .article-meta { color: #64748b; }
[data-theme="light"] .related-articles-section { border-top-color: rgba(0,0,0,.08); }
[data-theme="light"] .related-articles-section h3 { color: #0f172a; }

/* ── AdSense ad unit wrappers ─────────────────────────────── */
.ad-unit {
  margin: 2rem auto;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
}
.ad-unit::before {
  content: 'Advertisement';
  display: block;
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .4rem;
}

/* =============================================
   IMAGE ASPECT RATIO FIX (USER REQUEST)
   ============================================= */
/* Fix for ultra-wide 3.5:1 cropped thumbnails so no text is cut off */
.post-card .thumb,
.article-row-thumb,
.flat-card .thumb,
img.thumb {
    object-fit: contain !important;
    background-color: var(--bg) !important;
}

.article-hero-img {
    max-height: unset !important;
    height: auto !important;
    background-color: transparent !important;
}

.article-hero-img img {
    height: auto !important;
    object-fit: contain !important;
    width: 100% !important;
    background-color: var(--bg) !important;
    border-radius: var(--radius);
}
