/* === Reset & tokens === */
:root{
  --bg:#070B14; --bg-2:#0B1020; --surface:#111827; --surface-2:#121A2B;
  --border:rgba(255,255,255,.08); --border-strong:rgba(255,255,255,.14);
  --text:#F8FAFC; --text-2:#CBD5E1; --muted:#94A3B8;
  --accent:#38BDF8; --accent-2:#22C55E; --accent-hover:#60A5FA;
  --radius:18px; --radius-sm:12px; --radius-lg:24px;
  --shadow-sm:0 4px 14px rgba(0,0,0,.25);
  --shadow:0 18px 48px rgba(0,0,0,.35);
  --container:1180px;
  --font:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:var(--font);font-size:16px;line-height:1.65;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;overflow-x:hidden}
body{background:radial-gradient(1200px 600px at 80% -20%,rgba(56,189,248,.10),transparent 60%),radial-gradient(900px 500px at -10% 10%,rgba(34,197,94,.08),transparent 60%),var(--bg)}
img{max-width:100%;height:auto;display:block}
a{color:var(--accent);text-decoration:none;transition:color .18s}a:hover{color:var(--accent-hover)}
h1,h2,h3,h4,h5{color:var(--text);font-weight:800;letter-spacing:-.01em;margin:0}
h1{font-size:48px;line-height:1.1}h2{font-size:30px;line-height:1.2}h3{font-size:20px;line-height:1.35}h4{font-size:15px;line-height:1.3}
p{margin:0 0 1em;color:var(--text-2)}
.container{width:min(var(--container),calc(100% - 32px));margin:0 auto}
.eyebrow{display:inline-block;font-size:12px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--accent);margin-bottom:10px}
.section-head{margin-bottom:28px}
.section-head--row{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;flex-wrap:wrap}
.section-head h2{margin-top:4px}

/* === Buttons === */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 20px;border-radius:12px;font-weight:600;font-size:14.5px;border:1px solid transparent;transition:transform .15s,background .18s,border-color .18s,color .18s;cursor:pointer}
.btn-primary{background:linear-gradient(135deg,var(--accent),var(--accent-hover));color:#06121f}
.btn-primary:hover{color:#06121f;transform:translateY(-1px);box-shadow:0 12px 28px rgba(56,189,248,.25)}
.btn-ghost{border-color:var(--border-strong);color:var(--text)}
.btn-ghost:hover{border-color:var(--accent);color:var(--accent)}

/* === Header === */
.site-header{position:sticky;top:0;z-index:50;background:rgba(7,11,20,.78);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:1px solid var(--border)}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:20px;height:72px}
.brand{display:inline-flex;align-items:center;gap:12px;color:var(--text);font-weight:800;font-size:16px;line-height:1;min-width:0;flex-shrink:0;max-width:60%}
.brand:hover{color:var(--text)}
.brand-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#06121f;font-weight:900;font-size:14px;flex-shrink:0;box-shadow:0 8px 22px rgba(56,189,248,.22)}
.brand-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px}
.desktop-nav{display:flex;align-items:center;gap:6px}
.desktop-nav a,.nav-more{color:var(--text-2);font-size:14px;font-weight:600;padding:9px 12px;border-radius:9px;white-space:nowrap;background:transparent;border:0;font-family:inherit;cursor:pointer;line-height:1.2}
.desktop-nav a:hover,.nav-more:hover{color:var(--text);background:rgba(255,255,255,.05)}
.nav-dropdown{position:relative}
.nav-dropdown-menu{position:absolute;top:calc(100% + 6px);right:0;min-width:240px;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:8px;box-shadow:var(--shadow);display:none;z-index:60}
.nav-dropdown-menu a{display:block;padding:9px 12px;border-radius:8px;color:var(--text-2);font-size:14px}
.nav-dropdown-menu a:hover{background:rgba(255,255,255,.06);color:var(--text)}
.nav-dropdown:hover .nav-dropdown-menu,.nav-dropdown:focus-within .nav-dropdown-menu{display:block}
.mobile-menu-button{display:none;background:transparent;border:1px solid var(--border-strong);border-radius:10px;width:42px;height:42px;cursor:pointer;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:0}
.mobile-menu-button span{display:block;width:18px;height:2px;background:var(--text);border-radius:2px}
.mobile-nav{display:none;flex-direction:column;background:var(--surface-2);border-bottom:1px solid var(--border);padding:8px 16px 16px}
.mobile-nav.open{display:flex}
.mobile-nav a{padding:11px 12px;color:var(--text-2);border-radius:8px;font-size:14.5px;font-weight:600}
.mobile-nav a:hover{background:rgba(255,255,255,.05);color:var(--text)}

/* === Hero === */
main{display:block}
.hero{padding:72px 0 48px;position:relative}
.hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:56px;align-items:center}
.hero-text h1{margin:0 0 18px}
.hero-prose{color:var(--text-2);font-size:17px;line-height:1.7;max-width:560px}
.hero-prose p{margin:0 0 14px;color:var(--text-2)}
.hero-cta{display:flex;gap:12px;flex-wrap:wrap;margin-top:26px}
.hero-visual{position:relative}
.hero-glow{position:absolute;inset:auto -10% -20% auto;width:60%;height:60%;background:radial-gradient(closest-side,rgba(56,189,248,.25),transparent 70%);filter:blur(40px);z-index:-1;pointer-events:none}

/* === Image frame === */
.image-frame{aspect-ratio:16/9;overflow:hidden;border-radius:var(--radius);background:linear-gradient(135deg,#0f172a,#1e293b);border:1px solid var(--border);position:relative}
.image-frame img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .5s ease}
.image-frame--hero{aspect-ratio:16/10;border-radius:var(--radius-lg);box-shadow:var(--shadow)}
.image-frame--lg{aspect-ratio:16/10}
.image-frame--article{aspect-ratio:16/8;border-radius:var(--radius-lg);margin:24px 0 32px}

/* === Category strip === */
.category-strip{padding:48px 0}
.category-pills{display:flex;flex-wrap:wrap;gap:10px}
.pill{display:inline-flex;align-items:center;padding:9px 16px;border-radius:999px;background:var(--surface);border:1px solid var(--border);color:var(--text-2);font-size:14px;font-weight:600;transition:.18s}
.pill:hover{border-color:var(--accent);color:var(--accent);background:rgba(56,189,248,.08)}

/* === Featured === */
.featured-section{padding:32px 0 16px}
.featured-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:24px}
.featured-side{display:grid;gap:16px;grid-template-rows:repeat(3,1fr)}
.side-card{display:grid;grid-template-columns:120px 1fr;gap:14px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:12px;color:var(--text);transition:.18s}
.side-card:hover{border-color:var(--accent);color:var(--text);transform:translateY(-2px)}
.side-thumb{aspect-ratio:4/3;border-radius:12px}
.side-card h4{margin:6px 0 0;font-size:15px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* === Post grid & cards === */
.latest-section{padding:48px 0 80px}
.post-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}
.post-card{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;color:var(--text);transition:transform .2s,border-color .2s,box-shadow .2s;text-decoration:none}
.post-card:hover{transform:translateY(-4px);border-color:var(--accent);box-shadow:var(--shadow);color:var(--text)}
.post-card:hover .image-frame img{transform:scale(1.05)}
.post-card .image-frame{border-radius:0;border:0;border-bottom:1px solid var(--border);aspect-ratio:16/9}
.post-card-body{padding:18px 20px 22px;display:flex;flex-direction:column;gap:10px;flex:1}
.post-meta{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;font-weight:700}
.post-cat{color:var(--accent)}
.post-card h3{font-size:18px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.post-card p{margin:0;color:var(--muted);font-size:14px;line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* Featured hero card */
.featured-hero{display:flex;flex-direction:column}
.featured-hero .image-frame{border-radius:var(--radius);border:1px solid var(--border);aspect-ratio:16/10}
.featured-hero h3{font-size:24px;line-height:1.3;-webkit-line-clamp:3}

/* === Breadcrumb === */
.breadcrumb{padding:24px 0 0}
.breadcrumb ol{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:6px;font-size:13px;color:var(--muted)}
.breadcrumb li:not(:last-child)::after{content:"/";margin-left:6px;color:var(--muted)}
.breadcrumb a{color:var(--muted)}.breadcrumb a:hover{color:var(--accent)}
.breadcrumb [aria-current]{color:var(--text-2)}

/* === Static pages === */
.page-section{padding:32px 0 80px}
.page-narrow{max-width:760px}
.page-header h1{margin-bottom:24px}

/* === Category page === */
.category-hero{padding:40px 0 16px}
.category-hero h1{font-size:38px;margin:6px 0 14px}
.category-intro{max-width:760px}
.category-list{padding:24px 0 80px}
.empty-state{color:var(--muted);text-align:center;padding:60px 0}

/* === Article page === */
.article-section{padding:24px 0 80px}
.article-layout{display:grid;grid-template-columns:minmax(0,760px) 320px;gap:48px;align-items:start}
.article-main{min-width:0}
.article-head{margin-bottom:8px}
.article-head .post-cat{display:inline-block;margin-bottom:14px;font-size:12px;letter-spacing:.12em}
.article-head h1{font-size:42px;line-height:1.15;margin:0 0 14px}
.article-lede{color:var(--text-2);font-size:18px;line-height:1.6;margin:0}
.article-prose{font-size:17px;line-height:1.85;color:var(--text-2)}
.article-prose h2{font-size:26px;margin:36px 0 14px;color:var(--text)}
.article-prose h3{font-size:20px;margin:28px 0 10px}
.article-prose p{margin:0 0 16px}
.article-prose ul,.article-prose ol{padding-left:22px;margin:0 0 16px}
.article-prose li{margin:6px 0}
.article-prose strong{color:var(--text)}
.article-prose a{color:var(--accent)}
.article-prose img{border-radius:12px;margin:18px 0}
.internal-links{padding:16px 18px;background:var(--surface);border-left:3px solid var(--accent);border-radius:10px;margin:28px 0;font-size:14.5px;color:var(--text-2)}
.internal-links a{color:var(--accent)}

/* Sidebar */
.article-sidebar{position:sticky;top:96px;align-self:start}
.related-posts{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:22px 22px 16px}
.related-posts h3{font-size:14px;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);margin:0 0 14px}
.related-posts ul{list-style:none;padding:0;margin:0}
.related-posts li{padding:12px 0;border-top:1px solid var(--border)}
.related-posts li:first-child{border-top:0}
.related-posts a{color:var(--text);font-weight:600;font-size:14.5px;line-height:1.45;display:block}
.related-posts a:hover{color:var(--accent)}

/* FAQ */
.faq-box{margin:44px 0 0}
.faq-box h2{font-size:24px;margin:0 0 16px}
.faq-box details{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:14px 18px;margin:10px 0}
.faq-box summary{cursor:pointer;font-weight:700;color:var(--text);list-style:none}
.faq-box summary::after{content:"+";float:right;color:var(--accent);font-weight:700}
.faq-box details[open] summary::after{content:"–"}
.faq-box details p{margin:10px 0 0;color:var(--text-2)}

/* === Footer === */
.site-footer{background:#06090F;border-top:1px solid var(--border);margin-top:80px;color:var(--text-2)}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1.2fr 1fr;gap:48px;padding:56px 0 40px;align-items:start}
.footer-brand .brand--footer{margin-bottom:14px}
.footer-tag{margin:0;color:var(--muted);font-size:14.5px;line-height:1.7;max-width:340px}
.footer-col h4{font-size:13px;text-transform:uppercase;letter-spacing:.12em;color:var(--text);margin:0 0 14px;font-weight:800}
.footer-links{display:flex;flex-direction:column;gap:10px}
.footer-links a{color:var(--text-2);font-size:14px;line-height:1.45;text-decoration:none;transition:color .15s;overflow-wrap:anywhere}
.footer-links a:hover{color:var(--accent)}
.footer-empty{color:var(--muted);font-size:13px;font-style:italic}
.footer-bottom{border-top:1px solid var(--border);padding:20px 0 28px;display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;font-size:13px;color:var(--muted)}
.footer-bottom p{margin:0}
.footer-bottom strong{color:var(--text)}
.footer-note{color:var(--muted)}

/* === Responsive === */
@media (max-width:1024px){
  .hero-grid{grid-template-columns:1fr;gap:36px}
  .article-layout{grid-template-columns:1fr;gap:36px}
  .article-sidebar{position:static}
  .post-grid{grid-template-columns:repeat(2,1fr)}
  .featured-grid{grid-template-columns:1fr;gap:18px}
  .featured-side{grid-template-rows:none;grid-template-columns:repeat(3,1fr)}
  .footer-grid{grid-template-columns:1fr 1fr;gap:36px}
  h1{font-size:38px}
}
@media (max-width:720px){
  .desktop-nav{display:none}
  .mobile-menu-button{display:inline-flex}
  .hero{padding:48px 0 28px}
  .hero h1{font-size:34px}
  .hero-prose{font-size:15.5px}
  .post-grid{grid-template-columns:1fr}
  .featured-side{grid-template-columns:1fr}
  .side-card{grid-template-columns:90px 1fr}
  .footer-grid{grid-template-columns:1fr;gap:30px;padding:40px 0 28px}
  .footer-bottom{flex-direction:column;align-items:flex-start;text-align:left}
  .article-head h1{font-size:28px}
  .article-prose{font-size:16px;line-height:1.78}
  .article-prose h2{font-size:22px}
  .category-hero h1{font-size:30px}
  .brand-name{max-width:160px}
}
@media (max-width:420px){
  h1{font-size:30px}
  .hero h1{font-size:30px}
  .post-card-body{padding:16px}
}