:root{
  --ink:#0B1226;
  --ink-soft:#3A4160;
  --blue:#0052FF;
  --teal:#03D9A6;
  --lime:#8CFB03;
  --line:#EBEDF3;
  --line-soft:#F2F3F8;
  --muted:#767E99;
  --radius-lg:20px;
  --radius-md:14px;
  --radius-sm:9px;
  --shadow-sm:0 1px 2px rgba(15,23,42,0.03);
  --shadow-md:0 18px 40px -28px rgba(15,23,42,0.28);
  --shadow-lg:0 30px 70px -30px rgba(15,23,42,0.22);
  --header-h:76px;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  color:var(--ink);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;
  -webkit-font-smoothing:antialiased;
  background:
    radial-gradient(1100px 500px at 50% -8%, #ffffff 0%, #f9fafd 55%, #f2f4f9 100%),
    #f2f4f9;
  background-attachment:fixed;
}
h1,h2,h3,h4{margin:0;letter-spacing:-0.02em;font-weight:700;}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;}
.wrap{max-width:1160px;margin:0 auto;padding:0 20px;}
.skip-link{position:absolute;left:-999px;top:0;background:var(--ink);color:#fff;padding:10px 16px;border-radius:0 0 8px 0;z-index:200;}
.skip-link:focus{left:0;}

/* ===== header ===== */
header.masthead{
  background:rgba(255,255,255,0.85);
  backdrop-filter:blur(14px) saturate(160%);
  border-bottom:1px solid var(--line);
  position:sticky;top:0;z-index:50;
}
.masthead .wrap{display:flex;align-items:center;justify-content:space-between;height:var(--header-h);}
.brand img{height:42px;width:auto;}
nav.primary-nav{display:flex;gap:30px;}
nav.primary-nav a{font-size:14px;font-weight:500;color:var(--ink-soft);padding:8px 0;position:relative;}
nav.primary-nav a:hover{color:var(--ink);}
nav.primary-nav a.active{color:var(--ink);font-weight:700;}
nav.primary-nav a.active::after{content:"";position:absolute;left:0;right:0;bottom:-6px;height:2px;background:var(--blue);border-radius:2px;}
.header-actions{display:flex;align-items:center;gap:14px;}
.icon-btn{width:38px;height:38px;border-radius:50%;border:1px solid var(--line);display:flex;align-items:center;justify-content:center;color:var(--muted);background:#fff;cursor:pointer;}
.icon-btn:hover{border-color:var(--blue);color:var(--blue);}
.subscribe-btn{background:var(--ink);color:#fff;font-weight:600;font-size:13px;padding:10px 20px;border-radius:999px;border:none;cursor:pointer;}
.menu-toggle{display:none;width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:#fff;align-items:center;justify-content:center;cursor:pointer;}

/* mobile nav drawer */
.mobile-nav{display:none;position:fixed;inset:0;z-index:100;}
.mobile-nav.open{display:block;}
.mobile-nav .scrim{position:absolute;inset:0;background:rgba(11,18,38,0.4);}
.mobile-nav .panel{
  position:absolute;top:0;right:0;bottom:0;width:78%;max-width:320px;
  background:#fff;padding:24px 22px;box-shadow:var(--shadow-lg);
  display:flex;flex-direction:column;gap:4px;
}
.mobile-nav .panel a{padding:14px 4px;font-size:16px;font-weight:600;border-bottom:1px solid var(--line-soft);}
.mobile-nav .close-btn{align-self:flex-end;width:36px;height:36px;border-radius:50%;border:1px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:center;margin-bottom:10px;}

/* ===== search overlay ===== */
.search-overlay{display:none;position:fixed;inset:0;z-index:100;background:rgba(11,18,38,0.4);}
.search-overlay.open{display:flex;align-items:flex-start;justify-content:center;padding-top:12vh;}
.search-box{background:#fff;border-radius:var(--radius-lg);padding:20px;width:min(560px,92vw);box-shadow:var(--shadow-lg);}
.search-box form{display:flex;gap:8px;}
.search-box input{flex:1;padding:13px 16px;border-radius:10px;border:1px solid var(--line);font-size:15px;}
.search-box button{background:var(--blue);color:#fff;border:none;padding:0 18px;border-radius:10px;font-weight:600;cursor:pointer;}

/* ===== breadcrumbs ===== */
.breadcrumbs{font-size:12.5px;color:var(--muted);padding:16px 0 0;display:flex;gap:6px;flex-wrap:wrap;}
.breadcrumbs a:hover{color:var(--blue);}
.breadcrumbs span{color:var(--line);}

/* ===== section heading ===== */
.section-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:22px;}
.section-head h2{font-size:22px;font-weight:700;}
.section-head .see-all{font-size:13px;font-weight:600;color:var(--muted);}
.section-head .see-all:hover{color:var(--ink);}

/* ===== tag ===== */
.tag{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;color:var(--muted);letter-spacing:0.01em;}
.tag .dot{width:6px;height:6px;border-radius:50%;flex-shrink:0;}

/* ===== hero ===== */
.hero-section{padding:44px 0 48px;}
.hero-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:48px;align-items:center;}
.hero-body .tag{margin-bottom:18px;}
.hero-body h1{font-size:38px;line-height:1.18;font-weight:700;margin-bottom:18px;color:var(--ink);}
.hero-body p.excerpt{color:var(--muted);font-size:16px;line-height:1.68;max-width:52ch;margin-bottom:22px;}
.byline{display:flex;align-items:center;gap:11px;font-size:13.5px;color:var(--muted);}
.avatar{width:30px;height:30px;border-radius:50%;background:linear-gradient(135deg,var(--blue),var(--teal));flex-shrink:0;object-fit:cover;}
.byline strong{color:var(--ink);font-weight:600;}
.hero-visual{position:relative;aspect-ratio:1/1;border-radius:28px;background:radial-gradient(circle at 30% 25%,#ffffff 0%,#f6f8fc 45%,#edf0f7 100%);border:1px solid var(--line);box-shadow:var(--shadow-lg);overflow:hidden;}
.hero-visual img{width:100%;height:100%;object-fit:cover;}
.hero-visual .orb{position:absolute;border-radius:50%;}
.orb.o1{width:150px;height:150px;background:radial-gradient(circle at 35% 30%,var(--blue),#0033A6 75%);top:18%;left:16%;box-shadow:0 30px 60px -20px rgba(0,82,255,0.45);}
.orb.o2{width:86px;height:86px;background:radial-gradient(circle at 35% 30%,var(--teal),#019B75 75%);bottom:16%;right:20%;box-shadow:0 20px 40px -16px rgba(3,217,166,0.5);}
.orb.o3{width:40px;height:40px;background:radial-gradient(circle at 35% 30%,var(--lime),#5FBE00 75%);top:40%;right:14%;box-shadow:0 14px 26px -10px rgba(140,251,3,0.5);}
.hero-visual .ring{position:absolute;border:1.5px solid rgba(11,18,38,0.08);border-radius:50%;}
.ring.r1{width:260px;height:260px;top:50%;left:50%;transform:translate(-50%,-50%);}
.ring.r2{width:330px;height:330px;top:50%;left:50%;transform:translate(-50%,-50%);}

.divider{height:1px;background:var(--line);border:none;margin:0;}

/* ===== trending ===== */
.trending-list{background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);overflow:hidden;}
.trending-row{display:flex;align-items:center;gap:18px;padding:17px 22px;border-bottom:1px solid var(--line-soft);}
.trending-row:last-child{border-bottom:none;}
.trending-rank{font-size:18px;font-weight:700;color:#D7DAE5;width:24px;flex-shrink:0;}
.trending-row.rank1 .trending-rank,.trending-row.rank2 .trending-rank,.trending-row.rank3 .trending-rank{color:var(--blue);}
.trending-title{font-size:14.5px;font-weight:600;flex:1;}
.trending-cat{font-size:12px;color:var(--muted);flex-shrink:0;}

/* ===== content layout ===== */
.content-layout{display:grid;grid-template-columns:2.1fr 0.9fr;gap:32px;padding-bottom:56px;align-items:start;}
.post-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;}
.post-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius-md);overflow:hidden;transition:box-shadow .2s ease,transform .2s ease;}
.post-card:hover{box-shadow:var(--shadow-md);transform:translateY(-3px);}
.post-thumb{height:140px;position:relative;background:radial-gradient(circle at 25% 20%,#ffffff,#F1F3F8 70%);border-bottom:1px solid var(--line-soft);overflow:hidden;}
.post-thumb img{width:100%;height:100%;object-fit:cover;}
.post-thumb .top-accent{position:absolute;top:0;left:0;right:0;height:3px;z-index:1;}
.post-body{padding:16px 18px 20px;}
.post-body .tag{margin-bottom:10px;}
.post-body h3{font-size:15px;line-height:1.4;font-weight:600;margin-bottom:10px;}
.post-body .meta{font-size:12px;color:var(--muted);}

.pagination{display:flex;gap:8px;justify-content:center;margin-top:30px;flex-wrap:wrap;}
.pagination a,.pagination span{padding:9px 15px;border-radius:8px;border:1px solid var(--line);font-size:13.5px;font-weight:600;background:#fff;}
.pagination a:hover{border-color:var(--blue);color:var(--blue);}
.pagination .current{background:var(--ink);color:#fff;border-color:var(--ink);}

/* ===== sidebar / ads ===== */
.sidebar{display:flex;flex-direction:column;gap:20px;}
.ad-unit{background:#fff;border:1px dashed var(--line);border-radius:var(--radius-md);min-height:100px;display:flex;align-items:center;justify-content:center;overflow:hidden;}
.ad-unit.empty{color:#A6ABBE;font-size:11.5px;flex-direction:column;gap:4px;}
.ad-unit.empty .dim{font-size:11px;color:#C2C6D6;}

.newsletter-card{background:var(--ink);border-radius:var(--radius-lg);padding:26px 22px;color:#fff;}
.newsletter-card h3{font-size:18px;margin-bottom:8px;}
.newsletter-card p{font-size:13.5px;color:#9AA3C4;line-height:1.6;margin-bottom:16px;}
.newsletter-form{display:flex;gap:8px;}
.newsletter-form input{flex:1;padding:12px 13px;border-radius:8px;border:1px solid rgba(255,255,255,0.12);font-size:13.5px;background:rgba(255,255,255,0.06);color:#fff;}
.newsletter-form input::placeholder{color:#6E7695;}
.newsletter-form button{background:#fff;color:var(--ink);border:none;font-weight:700;padding:0 16px;border-radius:8px;cursor:pointer;font-size:13.5px;}

.categories-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);padding:20px;}
.categories-card h3{font-size:14.5px;margin-bottom:14px;}
.cat-row{display:flex;justify-content:space-between;align-items:center;padding:9px 0;border-bottom:1px solid var(--line-soft);font-size:13.5px;font-weight:500;}
.cat-row:last-child{border-bottom:none;}
.cat-row:hover{color:var(--blue);}
.cat-count{color:var(--muted);font-size:12px;font-weight:400;}

/* ===== article page ===== */
.article-header{padding:28px 0 10px;max-width:780px;margin:0 auto;}
.article-header h1{font-size:32px;line-height:1.22;margin:14px 0;}
.article-body{max-width:780px;margin:0 auto;padding:20px 0 40px;font-size:17px;line-height:1.8;color:#232945;}
.article-body p{margin:0 0 20px;}
.article-body h2{font-size:22px;margin:32px 0 14px;}
.article-body h3{font-size:19px;margin:26px 0 12px;}
.article-body img{border-radius:var(--radius-md);margin:20px 0;}
.article-body ul,.article-body ol{margin:0 0 20px;padding-left:22px;}
.article-figure{max-width:780px;margin:0 auto 8px;}
.article-figure img{border-radius:var(--radius-lg);width:100%;aspect-ratio:16/9;object-fit:cover;}
.author-box{max-width:780px;margin:20px auto 40px;background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);padding:22px;display:flex;gap:16px;align-items:flex-start;}
.author-box .avatar{width:52px;height:52px;flex-shrink:0;}
.author-box h4{font-size:15px;margin-bottom:6px;}
.author-box p{font-size:13.5px;color:var(--muted);margin:0;line-height:1.6;}

/* ===== footer ===== */
footer{background:#fff;border-top:1px solid var(--line);padding:44px 0 24px;margin-top:20px;}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:28px;padding-bottom:28px;}
.footer-brand img{height:34px;width:auto;margin-bottom:14px;}
.footer-brand p{font-size:13px;line-height:1.6;max-width:32ch;color:var(--muted);}
footer h4{color:var(--ink);font-size:13px;font-weight:700;margin-bottom:14px;}
footer ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px;}
footer ul a{font-size:13.5px;color:var(--muted);}
footer ul a:hover{color:var(--ink);}
.footer-bottom{display:flex;justify-content:space-between;padding-top:20px;border-top:1px solid var(--line);font-size:12px;color:var(--muted);flex-wrap:wrap;gap:8px;}

/* ===== static pages ===== */
.static-page{max-width:760px;margin:0 auto;padding:40px 0 60px;}
.static-page h1{font-size:30px;margin-bottom:18px;}
.static-page h2{font-size:19px;margin:26px 0 10px;}
.static-page p{font-size:15.5px;line-height:1.75;color:var(--ink-soft);margin:0 0 14px;}

/* ===== 404 ===== */
.error-page{text-align:center;padding:90px 20px;}
.error-page .code{font-size:72px;font-weight:700;color:var(--line);}
.error-page h1{font-size:24px;margin:8px 0 12px;}
.error-page p{color:var(--muted);margin-bottom:22px;}
.error-page a{display:inline-block;background:var(--ink);color:#fff;padding:12px 24px;border-radius:999px;font-weight:600;font-size:14px;}

/* ===== responsive ===== */
@media (max-width:960px){
  nav.primary-nav{display:none;}
  .menu-toggle{display:flex;}
  .hero-grid{grid-template-columns:1fr;gap:30px;}
  .hero-visual{aspect-ratio:16/10;}
  .content-layout{grid-template-columns:1fr;}
  .post-grid{grid-template-columns:1fr 1fr;}
  .footer-grid{grid-template-columns:1fr 1fr;}
}
@media (max-width:640px){
  :root{--header-h:64px;}
  .brand img{height:34px;}
  .subscribe-btn{display:none;}
  .hero-body h1{font-size:28px;}
  .post-grid{grid-template-columns:1fr;}
  .article-header h1{font-size:25px;}
  .article-body{font-size:16px;}
  .footer-grid{grid-template-columns:1fr;gap:24px;}
  .footer-bottom{flex-direction:column;}
  .wrap{padding:0 16px;}
}
