/*
Theme Name: TechKnowCrat
Theme URI: https://example.com/techknowcrat
Author: TechKnowCrat
Author URI: https://example.com
Description: A modern, fast dark/light tech-blog theme for developers and tech publications. Features a featured hero, category browsing, recent posts, editor's picks, a newsletter call-to-action and contributor highlights. Built with accessible, semantic markup and a built-in dark/light mode toggle.
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: techknowcrat
Tags: blog, two-columns, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, dark-mode, right-sidebar, full-width-template
*/

/* ============================================================
   THEME TOKENS
   ============================================================ */
:root,
[data-theme="dark"]{
  --bg:#080b14;
  --bg-grad-1:#0b1020;
  --bg-grad-2:#080b14;
  --surface:#0f1525;
  --surface-2:#121a2c;
  --surface-3:#161f33;
  --border:rgba(148,163,184,.10);
  --border-strong:rgba(148,163,184,.18);
  --text:#eef2f8;
  --text-muted:#94a3b8;
  --text-dim:#64748b;
  --heading:#f8fafc;
  --primary:#8b5cf6;
  --primary-2:#3b82f6;
  --grad:linear-gradient(135deg,#8b5cf6 0%,#6366f1 45%,#3b82f6 100%);
  --grad-cta:linear-gradient(110deg,#a855f7 0%,#7c3aed 30%,#4f46e5 55%,#2563eb 100%);
  --chip:#0f1626;
  --input:#0b1120;
  --shadow:0 18px 40px -18px rgba(0,0,0,.7);
  --ring:rgba(139,92,246,.5);
  --glow:rgba(99,102,241,.35);
  --hero-orb:#3b82f6;
}
[data-theme="light"]{
  --bg:#eef2f8;
  --bg-grad-1:#f4f7fc;
  --bg-grad-2:#e9eef6;
  --surface:#ffffff;
  --surface-2:#ffffff;
  --surface-3:#f4f6fb;
  --border:rgba(15,23,42,.09);
  --border-strong:rgba(15,23,42,.14);
  --text:#1e293b;
  --text-muted:#5b6678;
  --text-dim:#8a93a3;
  --heading:#0f172a;
  --primary:#7c3aed;
  --primary-2:#2563eb;
  --grad:linear-gradient(135deg,#8b5cf6 0%,#6366f1 45%,#3b82f6 100%);
  --grad-cta:linear-gradient(110deg,#a855f7 0%,#7c3aed 30%,#4f46e5 55%,#2563eb 100%);
  --chip:#ffffff;
  --input:#ffffff;
  --shadow:0 18px 40px -22px rgba(30,41,59,.28);
  --ring:rgba(124,58,237,.4);
  --glow:rgba(99,102,241,.25);
  --hero-orb:#6366f1;
}

/* ============================================================
   BASE
   ============================================================ */
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  background:
    radial-gradient(1100px 600px at 78% -8%, var(--glow), transparent 60%),
    linear-gradient(180deg,var(--bg-grad-1),var(--bg-grad-2));
  background-repeat:no-repeat;
  color:var(--text);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  transition:background-color .3s ease,color .3s ease;
  overflow-x:hidden;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.wrap{max-width:1200px;margin:0 auto;padding:0 24px}
.eyebrow{font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase}
.muted{color:var(--text-muted)}
.dim{color:var(--text-dim)}
button{font-family:inherit;cursor:pointer;border:none;background:none}

/* section spacing */
section{padding:34px 0}
.sec-head{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:22px;gap:16px;flex-wrap:wrap}
.sec-head h2{font-size:26px;font-weight:800;color:var(--heading);letter-spacing:-.02em}
.sec-head .sub{font-size:13.5px;color:var(--text-muted);margin-top:3px}
.link-more{display:inline-flex;align-items:center;gap:7px;font-size:13.5px;font-weight:600;color:var(--text-muted);transition:color .2s,gap .2s}
.link-more:hover{color:var(--primary);gap:11px}
.link-more svg{width:15px;height:15px}

/* ============================================================
   HEADER
   ============================================================ */
header{position:sticky;top:0;z-index:50;backdrop-filter:blur(14px);
  background:color-mix(in srgb,var(--bg) 78%,transparent);
  border-bottom:1px solid var(--border);}
.nav{display:flex;align-items:center;justify-content:space-between;height:68px}
.brand{display:flex;align-items:center;gap:11px;font-weight:800;font-size:20px;color:var(--heading);letter-spacing:-.02em}
.brand .mark{width:34px;height:34px;border-radius:9px;background:var(--grad);
  display:grid;place-items:center;font-weight:900;color:#fff;font-size:15px;
  box-shadow:0 6px 18px -6px var(--ring)}
.nav-links{display:flex;align-items:center;gap:30px;list-style:none}
.nav-links a{font-size:14.5px;font-weight:500;color:var(--text-muted);display:inline-flex;align-items:center;gap:5px;padding:6px 0;position:relative;transition:color .2s}
.nav-links a:hover{color:var(--text)}
.nav-links a.active{color:var(--text);font-weight:600}
.nav-links a.active::after{content:"";position:absolute;left:0;right:0;bottom:-6px;height:2px;border-radius:2px;background:var(--grad)}
.nav-links svg.caret{width:13px;height:13px;opacity:.8}
.nav-right{display:flex;align-items:center;gap:14px}
.icon-btn{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;color:var(--text-muted);border:1px solid transparent;transition:.2s}
.icon-btn:hover{color:var(--text);background:var(--surface-2);border-color:var(--border)}
.icon-btn svg{width:19px;height:19px}
.btn-sub{padding:10px 20px;border-radius:10px;background:var(--grad);color:#fff;font-weight:600;font-size:14px;
  box-shadow:0 8px 22px -8px var(--ring);transition:transform .15s,box-shadow .2s}
.btn-sub:hover{transform:translateY(-1px);box-shadow:0 12px 26px -8px var(--ring)}
.theme-toggle svg{transition:transform .4s ease}
.sun{display:none}
[data-theme="light"] .moon{display:none}
[data-theme="light"] .sun{display:block}
.burger{display:none}

/* ============================================================
   HERO
   ============================================================ */
.hero{display:grid;grid-template-columns:1fr 1fr;gap:50px;align-items:center;padding:48px 0 30px}
.badge{display:inline-flex;align-items:center;gap:7px;font-size:11px;font-weight:700;letter-spacing:.12em;
  text-transform:uppercase;color:#c4b5fd;background:rgba(139,92,246,.14);
  border:1px solid rgba(139,92,246,.3);padding:6px 13px;border-radius:30px}
[data-theme="light"] .badge{color:#6d28d9;background:rgba(124,58,237,.1)}
.hero h1{font-size:52px;line-height:1.06;font-weight:800;letter-spacing:-.03em;color:var(--heading);margin:20px 0 18px}
.hero p.lead{font-size:16px;color:var(--text-muted);max-width:430px;line-height:1.6}
.hero-meta{display:flex;align-items:center;gap:14px;margin:26px 0 26px;font-size:13.5px;color:var(--text-muted)}
.hero-meta .av{width:38px;height:38px;border-radius:50%;object-fit:cover;border:2px solid var(--border-strong)}
.hero-meta .who{display:flex;align-items:center;gap:8px}
.hero-meta .who b{font-weight:600;color:var(--text)}
.hero-meta .dotsep::before{content:"•";margin-right:14px;color:var(--text-dim)}
.btn-hero{display:inline-flex;align-items:center;gap:10px;padding:13px 24px;border-radius:11px;background:var(--grad);
  color:#fff;font-weight:600;font-size:15px;box-shadow:0 14px 30px -12px var(--ring);transition:transform .15s,box-shadow .2s}
.btn-hero:hover{transform:translateY(-2px);box-shadow:0 18px 34px -12px var(--ring)}
.btn-hero svg{width:17px;height:17px}

/* Hero visual / AI orb */
.hero-visual{position:relative;height:430px}
.hero-visual .panel{position:absolute;background:color-mix(in srgb,var(--surface) 80%,transparent);
  border:1px solid var(--border-strong);border-radius:13px;backdrop-filter:blur(6px);padding:13px 15px;box-shadow:var(--shadow)}
.panel-label{font-size:9.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-dim);font-weight:700}
.p-code{top:8px;left:6px;width:150px}
.p-code .lines{margin-top:8px;display:flex;flex-direction:column;gap:6px}
.p-code .lines i{height:5px;border-radius:3px;background:linear-gradient(90deg,var(--primary),var(--primary-2));display:block;opacity:.55}
.p-code .lines i:nth-child(2){width:70%;opacity:.4}
.p-code .lines i:nth-child(3){width:85%;opacity:.5}
.p-code .lines i:nth-child(4){width:55%;opacity:.3}
.p-chart{top:18px;right:0;width:140px}
.p-chart .bars{display:flex;align-items:flex-end;gap:6px;height:46px;margin-top:8px}
.p-chart .bars i{flex:1;border-radius:3px 3px 0 0;background:linear-gradient(180deg,var(--primary-2),var(--primary))}
.p-chart .bars i:nth-child(1){height:40%}.p-chart .bars i:nth-child(2){height:65%}
.p-chart .bars i:nth-child(3){height:50%}.p-chart .bars i:nth-child(4){height:85%}
.p-chart .bars i:nth-child(5){height:70%}
.p-activity{bottom:96px;left:0;width:160px}
.p-activity .big{font-size:30px;font-weight:800;color:var(--heading);margin-top:6px;line-height:1}
.p-activity .sm{font-size:10px;color:var(--text-dim);margin-top:4px}
.p-sys{top:150px;right:4px;width:128px}
.p-sys .sm{font-size:10px;color:var(--text-muted);margin-top:6px;line-height:1.4}
.orb-wrap{position:absolute;inset:0;display:grid;place-items:center}
.carousel-dots{display:flex;gap:8px;margin-top:6px}
.carousel-dots i{width:8px;height:8px;border-radius:8px;background:var(--text-dim);opacity:.5;transition:.3s}
.carousel-dots i.on{width:26px;background:var(--grad);opacity:1}

/* ============================================================
   CATEGORY PILLS
   ============================================================ */
.pills{display:flex;gap:11px;flex-wrap:wrap;padding:6px 0 8px}
.pill{display:inline-flex;align-items:center;gap:8px;padding:11px 17px;border-radius:12px;
  background:var(--surface);border:1px solid var(--border);font-size:13.5px;font-weight:500;color:var(--text);
  transition:.2s;flex:1;justify-content:center;min-width:120px}
.pill:hover{border-color:var(--border-strong);transform:translateY(-2px);background:var(--surface-2)}
.pill svg{width:16px;height:16px}

/* ============================================================
   CARDS / GRIDS
   ============================================================ */
.card{background:var(--surface);border:1px solid var(--border);border-radius:16px;transition:.22s;position:relative;overflow:hidden}
.card:hover{border-color:var(--border-strong);transform:translateY(-3px);box-shadow:var(--shadow)}
.bookmark{position:absolute;bottom:16px;right:16px;color:var(--text-dim)}
.bookmark svg{width:17px;height:17px}
.bookmark:hover{color:var(--primary)}

/* Latest articles */
.latest-grid{display:grid;grid-template-columns:1.55fr 1fr;gap:18px}
.feat-card{padding:30px;min-height:268px;display:flex;flex-direction:column;justify-content:flex-end;
  background:
    radial-gradient(420px 300px at 100% 30%, rgba(99,102,241,.18), transparent 65%),
    var(--surface);}
.feat-card .nextlogo{position:absolute;top:42%;right:26px;transform:translateY(-50%);
  font-weight:800;font-size:46px;letter-spacing:-.04em;color:var(--heading);opacity:.92;display:flex;align-items:baseline}
.feat-card .nextlogo small{font-size:16px;color:var(--text-muted);margin-left:2px;font-weight:600}
.feat-card .eyebrow{color:var(--primary)}
.feat-card h3{font-size:24px;font-weight:800;color:var(--heading);margin:11px 0 12px;letter-spacing:-.02em;max-width:62%}
.feat-card p{font-size:14px;color:var(--text-muted);max-width:62%;margin-bottom:20px}
.feat-card .auth{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--text-muted)}
.feat-card .auth img{width:30px;height:30px;border-radius:50%}
.side-col{display:flex;flex-direction:column;gap:18px}
.side-card{display:flex;gap:16px;padding:22px;align-items:flex-start;min-height:125px}
.side-card .body{flex:1}
.side-card .eyebrow{margin-bottom:10px;display:block}
.side-card h3{font-size:16px;font-weight:700;color:var(--heading);line-height:1.35;margin-bottom:14px}
.side-card .read{font-size:12.5px;color:var(--text-dim)}
.side-card .gfx{width:62px;height:62px;flex-shrink:0;border-radius:12px;display:grid;place-items:center}
.ev-devops{color:#34d399}.ev-security{color:#34d399}.ev-ai{color:#a78bfa}
.ev-db{color:#38bdf8}.ev-web{color:#34d399}

.tri-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:18px}
.tri-card{padding:0;min-height:155px}
.tri-card .thumb{height:78px;position:relative;background-size:cover;background-position:center}
.tri-card .pad{padding:16px 18px 20px}
.tri-card .eyebrow{display:block;margin-bottom:8px}
.tri-card h3{font-size:15px;font-weight:700;color:var(--heading);line-height:1.35;margin-bottom:12px}
.tri-card .read{font-size:12.5px;color:var(--text-dim)}
.tri-card .corner-gfx{position:absolute;top:14px;right:16px}

/* Browse by category */
.cat-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:16px}
.cat-card{padding:26px 16px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:13px}
.cat-ico{width:54px;height:54px;border-radius:14px;display:grid;place-items:center;background:var(--surface-3)}
.cat-ico svg{width:26px;height:26px}
.cat-card h3{font-size:15px;font-weight:700;color:var(--heading)}
.cat-card .count{font-size:12.5px;color:var(--text-dim);margin-top:-6px}

/* Recently added posts */
.recent-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.recent-card{display:flex;overflow:hidden;min-height:124px}
.recent-thumb{width:92px;flex-shrink:0;display:grid;place-items:center;color:#fff;position:relative}
.recent-thumb svg{width:38px;height:38px}
.rt-web{background:linear-gradient(160deg,#0f3d2e,#082018)}
.rt-devops{background:linear-gradient(160deg,#0e5e74,#06283a)}
.rt-ai{background:linear-gradient(160deg,#4c1d95,#241152)}
.rt-sec{background:linear-gradient(160deg,#831843,#3a0a23)}
.recent-thumb .new-tag{position:absolute;top:8px;left:8px;font-size:8.5px;font-weight:800;letter-spacing:.1em;
  text-transform:uppercase;color:#fff;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.3);
  padding:2px 6px;border-radius:20px;backdrop-filter:blur(3px)}
.recent-body{padding:15px 17px;flex:1;display:flex;flex-direction:column;gap:8px}
.recent-body .eyebrow{display:block}
.recent-body h3{font-size:14.5px;font-weight:700;color:var(--heading);line-height:1.32}
.recent-meta{margin-top:auto;display:flex;align-items:center;gap:9px;font-size:12px;color:var(--text-dim)}
.recent-meta .dot{width:3px;height:3px;border-radius:50%;background:var(--text-dim)}
.r-web{color:#34d399}.r-devops{color:#22d3ee}.r-ai{color:#a78bfa}.r-sec{color:#f472b6}

/* Editor's picks */
.pick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.pick-card{min-height:172px;display:flex;flex-direction:column;justify-content:flex-end;padding:22px;
  position:relative;color:#fff;background-size:cover;background-position:center}
.pick-card::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(8,11,20,.15) 0%,rgba(8,11,20,.55) 50%,rgba(8,11,20,.9) 100%)}
.pick-card>*{position:relative;z-index:2}
.pick-card .eyebrow{margin-bottom:10px}
.pick-card h3{font-size:18px;font-weight:800;line-height:1.25;color:#fff;max-width:78%}
.pick-card .foot{display:flex;align-items:center;justify-content:space-between;margin-top:14px}
.pick-card .read{font-size:12.5px;color:rgba(255,255,255,.75)}
.pick-card .arrow{width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.25);display:grid;place-items:center;backdrop-filter:blur(4px)}
.pick-card .arrow svg{width:16px;height:16px;color:#fff}
.ec-cloud{color:#7dd3fc}.ec-ai{color:#c4b5fd}.ec-lead{color:#fbbf24}

/* Newsletter CTA */
.cta{border-radius:22px;background:var(--grad-cta);padding:48px 50px;position:relative;overflow:hidden;
  display:flex;align-items:center;justify-content:space-between;gap:40px;box-shadow:0 26px 60px -28px rgba(79,70,229,.7)}
.cta::before{content:"";position:absolute;right:-40px;top:-60px;width:320px;height:320px;
  background:radial-gradient(circle,rgba(255,255,255,.18),transparent 60%)}
.cta .left{position:relative;z-index:2;color:#fff;max-width:46%}
.cta h2{font-size:30px;font-weight:800;letter-spacing:-.02em}
.cta .left p{font-size:14.5px;color:rgba(255,255,255,.88);margin-top:8px;line-height:1.5}
.cta-form{position:relative;z-index:2;display:flex;flex-direction:column;gap:10px;min-width:420px}
.cta-input{display:flex;background:#fff;border-radius:11px;padding:5px;gap:5px}
.cta-input input{flex:1;border:none;outline:none;padding:12px 16px;font-size:14px;font-family:inherit;color:#1e293b;background:transparent}
.cta-input button{background:#0f172a;color:#fff;font-weight:600;font-size:14px;padding:0 26px;border-radius:8px}
.cta .note{font-size:12.5px;color:rgba(255,255,255,.82);display:flex;align-items:center;gap:7px}
.cta .note svg{width:13px;height:13px}
.cta .envelope{position:absolute;right:46px;bottom:-10px;opacity:.5;z-index:1}

/* Contributors */
.contrib-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:16px}
.contrib-card{display:flex;align-items:center;gap:13px;padding:18px}
.contrib-card img{width:46px;height:46px;border-radius:50%;object-fit:cover;border:2px solid var(--border-strong)}
.contrib-card .nm{font-size:14px;font-weight:700;color:var(--heading)}
.contrib-card .ro{font-size:12px;color:var(--text-muted);margin:1px 0}
.contrib-card .ar{font-size:11.5px;color:var(--text-dim)}

/* ============================================================
   FOOTER
   ============================================================ */
footer{border-top:1px solid var(--border);margin-top:30px;
  background:color-mix(in srgb,var(--bg) 60%,#000 6%);padding:56px 0 28px}
.foot-grid{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr 1.4fr;gap:32px}
.foot-brand .brand{margin-bottom:16px}
.foot-brand p{font-size:13.5px;color:var(--text-muted);max-width:280px;line-height:1.6}
.socials{display:flex;gap:12px;margin-top:18px}
.socials a{width:36px;height:36px;border-radius:9px;border:1px solid var(--border);display:grid;place-items:center;color:var(--text-muted);transition:.2s}
.socials a:hover{color:var(--text);border-color:var(--border-strong);background:var(--surface-2)}
.socials svg{width:16px;height:16px}
.foot-col h4{font-size:13px;font-weight:700;color:var(--heading);text-transform:uppercase;letter-spacing:.08em;margin-bottom:16px}
.foot-col ul{list-style:none;display:flex;flex-direction:column;gap:10px}
.foot-col a{font-size:13.5px;color:var(--text-muted);transition:color .2s}
.foot-col a:hover{color:var(--primary)}
.foot-col.stay p{font-size:13.5px;color:var(--text-muted);margin-bottom:14px;line-height:1.5}
.foot-input{display:flex;background:var(--input);border:1px solid var(--border);border-radius:10px;padding:4px;gap:4px}
.foot-input input{flex:1;border:none;outline:none;background:transparent;color:var(--text);padding:9px 12px;font-size:13.5px;font-family:inherit}
.foot-input button{width:40px;border-radius:7px;background:var(--grad);color:#fff;display:grid;place-items:center}
.foot-input button svg{width:16px;height:16px}
.foot-bottom{margin-top:40px;padding-top:22px;border-top:1px solid var(--border);font-size:12.5px;color:var(--text-dim)}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:1080px){
  .cat-grid{grid-template-columns:repeat(3,1fr)}
  .recent-grid{grid-template-columns:repeat(2,1fr)}
  .contrib-grid{grid-template-columns:repeat(3,1fr)}
  .foot-grid{grid-template-columns:1fr 1fr 1fr;gap:32px}
  .foot-brand{grid-column:1/-1}
  .foot-col.stay{grid-column:1/-1}
}
@media (max-width:880px){
  .nav-links{display:none}
  .burger{display:grid}
  .hero{grid-template-columns:1fr;gap:36px}
  .hero h1{font-size:42px}
  .hero-visual{height:360px}
  .latest-grid{grid-template-columns:1fr}
  .tri-grid{grid-template-columns:1fr}
  .pick-grid{grid-template-columns:1fr}
  .feat-card h3,.feat-card p{max-width:100%}
  .feat-card .nextlogo{font-size:34px;opacity:.45;top:24px;transform:none}
  .cta{flex-direction:column;align-items:flex-start;padding:36px 30px}
  .cta .left,.cta-form{max-width:100%;min-width:0;width:100%}
}
@media (max-width:560px){
  .wrap{padding:0 16px}
  .hero h1{font-size:34px}
  .cat-grid{grid-template-columns:repeat(2,1fr)}
  .contrib-grid{grid-template-columns:1fr}
  .recent-grid{grid-template-columns:1fr}
  .sec-head h2{font-size:22px}
  .cta-input{flex-direction:column}
  .cta-input button{padding:13px}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
}
:focus-visible{outline:2px solid var(--primary);outline-offset:2px;border-radius:6px}
/* ============================================================
   WORDPRESS CORE / CONTENT STYLES
   ============================================================ */
.skip-link{position:absolute;left:-9999px;top:0;z-index:999;background:var(--surface);color:var(--text);
  padding:10px 16px;border-radius:0 0 8px 0;border:1px solid var(--border)}
.skip-link:focus{left:0}
.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;
  margin:-1px;overflow:hidden;padding:0;position:absolute;word-wrap:normal!important}
.screen-reader-text:focus{background:var(--surface);clip:auto;clip-path:none;color:var(--text);
  display:block;height:auto;left:6px;padding:10px 16px;top:6px;width:auto;z-index:100000;border-radius:8px}

/* page shell for non-home templates */
.site-main{padding:46px 0 20px}
.page-hero{padding:30px 0 8px}
.page-hero .eyebrow{color:var(--primary);display:block;margin-bottom:12px}
.page-title{font-size:38px;font-weight:800;letter-spacing:-.02em;color:var(--heading);line-height:1.1}
.page-subtitle{color:var(--text-muted);margin-top:10px;font-size:15px;max-width:640px}
.breadcrumbs{font-size:13px;color:var(--text-dim);margin-bottom:18px}
.breadcrumbs a:hover{color:var(--primary)}
.breadcrumbs .sep{margin:0 8px;opacity:.6}

.content-area{display:grid;grid-template-columns:minmax(0,1fr) 312px;gap:42px;align-items:start}
.content-area.no-sidebar{grid-template-columns:minmax(0,1fr)}

/* post grid (archive / blog) */
.post-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:22px}
.post-grid.cols-1{grid-template-columns:1fr}
.post-card{display:flex;flex-direction:column;overflow:hidden}
.post-card .pcard-thumb{display:block;aspect-ratio:16/9;background-size:cover;background-position:center;
  background-color:var(--surface-3);position:relative}
.post-card .pcard-thumb.placeholder{background-image:radial-gradient(160px 110px at 70% 35%,rgba(99,102,241,.4),transparent),linear-gradient(135deg,#1e1b4b,#0f1525)}
.post-card .pcard-body{padding:20px 22px 24px;display:flex;flex-direction:column;gap:11px;flex:1}
.post-card .pcat{display:inline-flex;width:fit-content;font-size:10.5px;font-weight:700;letter-spacing:.12em;
  text-transform:uppercase;color:var(--primary);background:color-mix(in srgb,var(--primary) 14%,transparent);
  padding:4px 10px;border-radius:20px}
.post-card h3{font-size:19px;font-weight:700;line-height:1.32;color:var(--heading);letter-spacing:-.01em}
.post-card h3 a:hover{color:var(--primary)}
.post-card .excerpt{font-size:14px;color:var(--text-muted);line-height:1.6}
.post-card .pmeta{margin-top:auto;display:flex;align-items:center;gap:9px;font-size:12.5px;color:var(--text-dim);padding-top:6px}
.post-card .pmeta img{width:26px;height:26px;border-radius:50%}
.post-card .pmeta .dot{width:3px;height:3px;border-radius:50%;background:var(--text-dim)}

/* single / page article */
.entry{background:var(--surface);border:1px solid var(--border);border-radius:18px;overflow:hidden}
.entry-hero-img{width:100%;aspect-ratio:21/9;object-fit:cover;display:block;background:var(--surface-3)}
.entry-inner{padding:40px clamp(22px,5vw,56px) 48px}
.entry-header .entry-cat{display:inline-flex;font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
  color:var(--primary);background:color-mix(in srgb,var(--primary) 14%,transparent);padding:5px 12px;border-radius:20px;margin-bottom:18px}
.entry-title{font-size:clamp(28px,4vw,42px);font-weight:800;letter-spacing:-.02em;line-height:1.12;color:var(--heading)}
.entry-meta{display:flex;align-items:center;gap:11px;margin:22px 0 30px;font-size:13.5px;color:var(--text-muted);flex-wrap:wrap}
.entry-meta img{width:40px;height:40px;border-radius:50%}
.entry-meta b{color:var(--text);font-weight:600}
.entry-meta .dot{width:3px;height:3px;border-radius:50%;background:var(--text-dim)}
.entry-content{font-size:16.5px;line-height:1.78;color:var(--text)}
.entry-content > *{margin-bottom:1.25em}
.entry-content h1,.entry-content h2,.entry-content h3,.entry-content h4{color:var(--heading);font-weight:700;line-height:1.25;margin:1.6em 0 .6em;letter-spacing:-.01em}
.entry-content h2{font-size:27px}.entry-content h3{font-size:22px}.entry-content h4{font-size:18px}
.entry-content a{color:var(--primary);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.entry-content a:hover{opacity:.8}
.entry-content ul,.entry-content ol{padding-left:1.4em}
.entry-content li{margin-bottom:.5em}
.entry-content blockquote{border-left:3px solid var(--primary);padding:6px 0 6px 22px;margin:1.6em 0;
  color:var(--text-muted);font-style:italic;font-size:18px}
.entry-content img{border-radius:12px;height:auto}
.entry-content pre{background:var(--input);border:1px solid var(--border);border-radius:12px;padding:18px 20px;
  overflow:auto;font-size:14px;line-height:1.6}
.entry-content code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em;
  background:color-mix(in srgb,var(--primary) 12%,transparent);padding:2px 6px;border-radius:6px}
.entry-content pre code{background:none;padding:0}
.entry-content table{width:100%;border-collapse:collapse;font-size:14.5px}
.entry-content th,.entry-content td{border:1px solid var(--border);padding:10px 14px;text-align:left}
.entry-content th{background:var(--surface-3);color:var(--heading)}
.entry-content hr{border:none;border-top:1px solid var(--border);margin:2em 0}
.entry-footer{margin-top:34px;padding-top:24px;border-top:1px solid var(--border);display:flex;
  justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.tag-list{display:flex;gap:9px;flex-wrap:wrap}
.tag-list a{font-size:12.5px;color:var(--text-muted);background:var(--surface-3);border:1px solid var(--border);
  padding:6px 13px;border-radius:30px;transition:.2s}
.tag-list a:hover{color:var(--primary);border-color:var(--border-strong)}
.share-link{font-size:13px;color:var(--text-muted)}

/* alignment / caption (required by theme review) */
.alignleft{float:left;margin:6px 24px 16px 0}
.alignright{float:right;margin:6px 0 16px 24px}
.aligncenter{display:block;margin-left:auto;margin-right:auto}
.alignwide{margin-left:-40px;margin-right:-40px;max-width:none}
.alignfull{margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);max-width:100vw}
.wp-caption{max-width:100%}
.wp-caption-text,.wp-element-caption{font-size:12.5px;color:var(--text-dim);text-align:center;margin-top:8px}
.sticky .entry,.bypostauthor>article{position:relative}
.gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.gallery-item img{width:100%;border-radius:10px}

/* author bio box */
.author-box{display:flex;gap:18px;align-items:flex-start;background:var(--surface);border:1px solid var(--border);
  border-radius:16px;padding:24px 26px;margin-top:30px}
.author-box img{width:60px;height:60px;border-radius:50%;flex-shrink:0}
.author-box .ab-name{font-size:16px;font-weight:700;color:var(--heading)}
.author-box .ab-role{font-size:12.5px;color:var(--primary);margin:2px 0 8px;font-weight:600}
.author-box .ab-bio{font-size:14px;color:var(--text-muted);line-height:1.6}

/* post navigation */
.post-nav{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:30px}
.post-nav a{display:block;padding:20px 22px;background:var(--surface);border:1px solid var(--border);border-radius:14px;transition:.2s}
.post-nav a:hover{border-color:var(--border-strong);transform:translateY(-2px)}
.post-nav .lbl{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--text-dim);font-weight:700}
.post-nav .ttl{font-size:15px;font-weight:600;color:var(--heading);margin-top:6px;display:block}
.post-nav .next{text-align:right}

/* pagination */
.pagination{display:flex;justify-content:center;gap:8px;margin:44px 0 10px;flex-wrap:wrap}
.pagination .page-numbers{min-width:42px;height:42px;padding:0 14px;display:inline-flex;align-items:center;
  justify-content:center;border-radius:11px;background:var(--surface);border:1px solid var(--border);
  color:var(--text-muted);font-weight:600;font-size:14px;transition:.2s}
.pagination .page-numbers:hover{border-color:var(--border-strong);color:var(--text)}
.pagination .page-numbers.current{background:var(--grad);color:#fff;border-color:transparent}
.pagination .dots{background:none;border:none}

/* sidebar / widgets */
.sidebar{display:flex;flex-direction:column;gap:24px;position:sticky;top:90px}
.widget{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:24px}
.widget-title{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--heading);margin-bottom:16px}
.widget ul{list-style:none;display:flex;flex-direction:column;gap:11px}
.widget ul li a{font-size:14px;color:var(--text-muted);transition:color .2s}
.widget ul li a:hover{color:var(--primary)}
.widget ul li{font-size:14px;color:var(--text-muted);display:flex;justify-content:space-between;gap:10px}
.widget select{width:100%;padding:10px 12px;border-radius:10px;background:var(--input);border:1px solid var(--border);color:var(--text);font-family:inherit}
.widget_search .foot-input{margin-top:0}
.widget img{border-radius:10px}
.tagcloud{display:flex;flex-wrap:wrap;gap:8px}
.tagcloud a{font-size:12.5px!important;color:var(--text-muted);background:var(--surface-3);border:1px solid var(--border);
  padding:6px 12px;border-radius:30px;transition:.2s}
.tagcloud a:hover{color:var(--primary);border-color:var(--border-strong)}

/* comments */
.comments-area{margin-top:36px;background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:34px clamp(22px,5vw,44px)}
.comments-title,.comment-reply-title{font-size:22px;font-weight:800;color:var(--heading);margin-bottom:24px;letter-spacing:-.01em}
.comment-list{list-style:none;display:flex;flex-direction:column;gap:24px}
.comment-list .children{list-style:none;margin-top:24px;padding-left:28px;border-left:1px solid var(--border);
  display:flex;flex-direction:column;gap:24px}
.comment-body{display:grid;grid-template-columns:48px 1fr;gap:14px}
.comment-author img{width:48px;height:48px;border-radius:50%}
.comment-author .fn{font-weight:700;color:var(--heading);font-style:normal;font-size:14.5px}
.comment-metadata{font-size:12px;color:var(--text-dim);margin:2px 0 8px}
.comment-content{font-size:14.5px;color:var(--text-muted);line-height:1.65}
.comment-content p{margin-bottom:.6em}
.reply a{font-size:12.5px;font-weight:600;color:var(--primary)}
.comment-respond{margin-top:30px}
.comment-form{display:flex;flex-direction:column;gap:16px}
.comment-form p{display:flex;flex-direction:column;gap:7px}
.comment-form label{font-size:13px;font-weight:600;color:var(--text)}
.comment-form input[type=text],.comment-form input[type=email],.comment-form input[type=url],.comment-form textarea{
  width:100%;padding:12px 15px;border-radius:11px;background:var(--input);border:1px solid var(--border);
  color:var(--text);font-family:inherit;font-size:14.5px;outline:none}
.comment-form input:focus,.comment-form textarea:focus{border-color:var(--primary)}
.comment-form .form-submit input{align-self:flex-start;padding:13px 28px;border-radius:11px;background:var(--grad);
  color:#fff;font-weight:600;font-size:14.5px;cursor:pointer;width:auto}

/* 404 / no results */
.notice-block{text-align:center;padding:70px 20px;background:var(--surface);border:1px solid var(--border);border-radius:18px}
.notice-block .big{font-size:72px;font-weight:900;background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent;line-height:1}
.notice-block h1{font-size:26px;font-weight:800;color:var(--heading);margin:14px 0 10px}
.notice-block p{color:var(--text-muted);max-width:440px;margin:0 auto 26px}
.notice-block .foot-input{max-width:380px;margin:0 auto}

@media (max-width:900px){
  .content-area{grid-template-columns:1fr;gap:34px}
  .sidebar{position:static}
  .post-grid{grid-template-columns:1fr}
  .post-nav{grid-template-columns:1fr}
}

/* ============================================================
   MOBILE NAV PANEL
   ============================================================ */
@media (max-width:880px){
  #site-navigation.is-open .nav-links{
    display:flex;flex-direction:column;gap:4px;position:absolute;top:68px;left:0;right:0;
    background:var(--surface);border-bottom:1px solid var(--border);padding:14px 24px 20px;
    box-shadow:var(--shadow);z-index:60;
  }
  #site-navigation.is-open .nav-links a{padding:11px 0;font-size:15px;width:100%}
  #site-navigation.is-open .nav-links a.active::after{display:none}
}

/* ============================================================
   HEADER SEARCH PANEL + CUSTOM LOGO
   ============================================================ */
.header-search{max-height:0;overflow:hidden;transition:max-height .3s ease;border-bottom:1px solid transparent}
.header-search.open{max-height:120px;border-bottom-color:var(--border);background:color-mix(in srgb,var(--bg) 80%,transparent)}
.header-search .wrap{padding-top:14px;padding-bottom:14px}
.custom-logo{max-height:40px;width:auto}
.site-branding .custom-logo-link{display:inline-flex;align-items:center}
.search-form,.foot-input{display:flex;background:var(--input);border:1px solid var(--border);border-radius:11px;padding:5px;gap:5px;margin-top:0}
.search-form .search-field{flex:1;border:none;outline:none;background:transparent;color:var(--text);
  padding:11px 14px;font-size:14.5px;font-family:inherit}
.search-form .search-submit{background:var(--grad);color:#fff;border-radius:8px;padding:0 22px;font-weight:600;
  font-size:14px;cursor:pointer}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-wrap{margin-top:34px}
.contact-form{display:flex;flex-direction:column;gap:18px}
.contact-form .cf-row{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.contact-form p{display:flex;flex-direction:column;gap:8px;margin:0}
.contact-form label{font-size:13.5px;font-weight:600;color:var(--text)}
.contact-form label span{color:var(--primary)}
.contact-form input,.contact-form textarea{width:100%;padding:13px 15px;border-radius:11px;background:var(--input);
  border:1px solid var(--border);color:var(--text);font-family:inherit;font-size:14.5px;outline:none;transition:border-color .2s}
.contact-form input:focus,.contact-form textarea:focus{border-color:var(--primary)}
.contact-form textarea{resize:vertical;min-height:140px}
.contact-form .hp{position:absolute;left:-9999px;height:0;overflow:hidden}
.contact-form .cf-submit{margin-top:4px}
.contact-form .btn-sub{border:none;cursor:pointer;font-size:14.5px}
.form-notice{padding:14px 18px;border-radius:12px;margin-bottom:22px;font-size:14.5px;font-weight:500}
.form-notice.ok{background:color-mix(in srgb,#22c55e 16%,transparent);border:1px solid color-mix(in srgb,#22c55e 45%,transparent);color:#4ade80}
.form-notice.err{background:color-mix(in srgb,#ef4444 14%,transparent);border:1px solid color-mix(in srgb,#ef4444 45%,transparent);color:#f87171}
@media (max-width:640px){.contact-form .cf-row{grid-template-columns:1fr}}

/* ============================================================
   SINGLE POST: TWO-COLUMN LAYOUT + ARTICLE SIDEBAR
   ============================================================ */
html{scroll-behavior:smooth}
.entry-content h2,.entry-content h3{scroll-margin-top:90px}

.single-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:40px;align-items:start}
.single-grid.sidebar-left{grid-template-columns:320px minmax(0,1fr)}
.single-grid.sidebar-left .single-main{order:2}
.single-grid.sidebar-left .single-sidebar{order:1}
.single-main{min-width:0}

.single-sidebar-inner{position:sticky;top:88px;display:flex;flex-direction:column;gap:22px}
.s-widget{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:20px}
.s-widget-label{display:block;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:var(--text-dim);margin-bottom:14px}

/* Banner */
.s-banner{padding:16px}
.s-banner .s-widget-label{padding:0 4px}
.s-banner-link{display:block}
.s-banner img{width:100%;height:auto;border-radius:10px;display:block}

/* Table of contents */
.s-toc .toc-list{list-style:none;display:flex;flex-direction:column;gap:2px;border-left:2px solid var(--border)}
.s-toc .toc-list li{margin:0}
.s-toc .toc-list a{display:block;padding:7px 14px;font-size:13.5px;color:var(--text-muted);line-height:1.4;
  border-left:2px solid transparent;margin-left:-2px;transition:.18s}
.s-toc .toc-list a:hover{color:var(--text)}
.s-toc .toc-list .toc-sub a{padding-left:26px;font-size:13px;color:var(--text-dim)}
.s-toc .toc-list a.is-active{color:var(--primary);border-left-color:var(--primary);font-weight:600}

/* Related posts */
.related-list{list-style:none;display:flex;flex-direction:column;gap:16px}
.related-item{display:grid;grid-template-columns:64px 1fr;gap:12px;align-items:center}
.related-thumb{display:block;width:64px;height:64px;border-radius:10px;background-size:cover;background-position:center;
  background-color:var(--surface-3);flex-shrink:0}
.related-thumb.placeholder{background-image:radial-gradient(60px 50px at 70% 30%,rgba(99,102,241,.45),transparent),linear-gradient(135deg,#1e1b4b,#0f1525)}
.related-body a{font-size:13.5px;font-weight:600;color:var(--heading);line-height:1.35;display:block}
.related-body a:hover{color:var(--primary)}
.related-meta{font-size:11.5px;color:var(--text-dim);margin-top:5px;display:block}

@media (max-width:900px){
  .single-grid,.single-grid.sidebar-left{grid-template-columns:1fr;gap:28px}
  .single-grid.sidebar-left .single-main,.single-grid.sidebar-left .single-sidebar{order:0}
  .single-sidebar-inner{position:static}
}

/* All Categories page */
.cat-grid.all-cats{margin-top:8px}
.cat-card .cat-desc{font-size:13px;color:var(--text-muted);line-height:1.55;margin-top:2px}
