/*
Theme Name:        MUSAMU
Theme URI:         https://musamu.com
Author:            MUSAMU Team
Author URI:        https://musamu.com
Description:       Professional technology blog theme for Cloud Computing, Artificial Intelligence, and Python. Features light/dark mode, 8 AdSense ad slots, affiliate link system, rich article content blocks (charts, tables, callouts, code), and full monetisation support.
Version:           2.0.0
Requires at least: 6.2
Tested up to:      6.7
Requires PHP:      8.0
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       musamu
Tags:              blog, two-columns, right-sidebar, custom-menu, featured-images, custom-logo, dark-mode, translation-ready, full-site-editing
*/

/* ═══════════════════════════════════════════════════════════
   MUSAMU THEME — Master Stylesheet
   Brand: MUSAMU.com · Cloud · AI · Python
   Design: Premium editorial tech magazine
   ═══════════════════════════════════════════════════════════ */

/* ── GOOGLE FONTS IMPORT ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ══════════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ══════════════════════════════════════════════ */

/* Light Mode — Default */
:root {
  /* Blues */
  --blue-950:    #03142e;
  --blue-900:    #0a1f44;
  --blue-800:    #0f3272;
  --blue-700:    #1447a6;
  --blue-600:    #1a5dcc;
  --blue-500:    #2272f0;
  --blue-400:    #4d90f5;
  --blue-300:    #7db3f8;
  --blue-200:    #b8d6fc;
  --blue-100:    #deeafd;
  --blue-50:     #f0f6ff;

  /* Category Colors */
  --cloud-color: #2272f0;
  --ai-color:    #7c3aed;
  --py-color:    #059669;
  --azure:       #0ea5e9;
  --azure-light: #38bdf8;
  --azure-dark:  #0284c7;

  /* Surfaces — Light Mode */
  --bg:             #f8faff;
  --bg-2:           #ffffff;
  --bg-3:           #f0f5fe;
  --bg-4:           #e4eefb;
  --border:         #d0e2f7;
  --border-2:       #b8d0f0;

  /* Text — Light Mode */
  --text-primary:   #0a1525;
  --text-secondary: #1e3a5f;
  --text-muted:     #4a6fa5;
  --text-faint:     #7898c5;

  /* Shadows — Light Mode */
  --shadow-sm:   0 1px 4px rgba(14,42,100,.08), 0 1px 2px rgba(14,42,100,.05);
  --shadow:      0 4px 16px rgba(14,42,100,.10), 0 2px 6px rgba(14,42,100,.06);
  --shadow-lg:   0 12px 40px rgba(14,42,100,.14), 0 4px 12px rgba(14,42,100,.08);
  --shadow-blue: 0 4px 20px rgba(34,114,240,.25);

  /* Typography */
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;
  --font-serif:   'Source Serif 4', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Radius */
  --r-xs: 4px;
  --r-sm: 6px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* Transitions */
  --t:      all .2s cubic-bezier(.4,0,.2,1);
  --t-slow: all .35s cubic-bezier(.4,0,.2,1);

  /* Layout */
  --container:      1200px;
  --container-wide: 1400px;
  --sidebar-width:  308px;
}

/* Dark Mode — Override Variables */
[data-theme="dark"] {
  --bg:             #06111f;
  --bg-2:           #0a1c30;
  --bg-3:           #0f2540;
  --bg-4:           #153050;
  --border:         #1e3d5c;
  --border-2:       #2a4f72;
  --text-primary:   #e8f1fc;
  --text-secondary: #b8d0f0;
  --text-muted:     #7098c0;
  --text-faint:     #4a6f9a;
  --shadow-sm:      0 1px 4px rgba(0,0,0,.3);
  --shadow:         0 4px 16px rgba(0,0,0,.4);
  --shadow-lg:      0 12px 40px rgba(0,0,0,.5);
  --shadow-blue:    0 4px 20px rgba(34,114,240,.3);
  --blue-50:        #0a1c30;
  --blue-100:       #0f2540;
  --blue-200:       #153358;
}

/* ══════════════════════════════════════════════
   2. RESET & BASE
   ══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .3s ease, color .3s ease;
}
a { color: var(--blue-600); text-decoration: none; transition: var(--t); }
a:hover { color: var(--blue-500); }
[data-theme="dark"] a { color: var(--blue-400); }
[data-theme="dark"] a:hover { color: var(--blue-300); }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); line-height: 1.25; color: var(--text-primary); font-weight: 700; }
ul, ol { padding-left: 1.5em; }
button { cursor: pointer; font-family: var(--font-body); }
input, textarea, select { font-family: var(--font-body); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ══════════════════════════════════════════════
   3. LAYOUT UTILITIES
   ══════════════════════════════════════════════ */
.container      { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 24px; }
.section        { padding: 72px 0; }
.section-sm     { padding: 48px 0; }
.text-center    { text-align: center; }
.text-muted     { color: var(--text-muted); }

/* ══════════════════════════════════════════════
   4. BUTTONS
   ══════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r-sm);
  font-size: .88rem; font-weight: 600; font-family: var(--font-body);
  border: none; cursor: pointer; transition: var(--t);
  text-decoration: none; white-space: nowrap; line-height: 1;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff; box-shadow: var(--shadow-blue);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
  transform: translateY(-1px); color: #fff;
  box-shadow: 0 6px 24px rgba(34,114,240,.4);
}
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--blue-500); color: var(--blue-600);
}
.btn-ghost:hover { background: var(--blue-500); color: #fff; transform: translateY(-1px); }
[data-theme="dark"] .btn-ghost { border-color: var(--blue-400); color: var(--blue-300); }
[data-theme="dark"] .btn-ghost:hover { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }
.btn-outline {
  background: transparent; border: 1.5px solid var(--border-2); color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--blue-400); color: var(--blue-600); }
.btn-sm { padding: 7px 16px; font-size: .82rem; }
.btn-xs { padding: 5px 12px; font-size: .76rem; }

/* ══════════════════════════════════════════════
   5. AD ZONES
   ══════════════════════════════════════════════ */
.musamu-ad-wrap {
  text-align: center; padding: 10px 0;
  background: var(--bg-3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.musamu-ad-wrap.ad-top {
  position: sticky; top: 0; z-index: 999; background: var(--bg-2);
}
.ad-label {
  font-size: .6rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 6px; font-family: var(--font-mono);
  display: block;
}
.ad-placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-3); border: 1.5px dashed var(--border-2);
  color: var(--text-faint); font-size: .76rem; border-radius: var(--r-sm);
  font-family: var(--font-mono); transition: var(--t);
}
.ad-leaderboard .ad-placeholder,
.ad-leaderboard ins.adsbygoogle { width: 728px; height: 90px; max-width: 100%; }
.ad-medium-rect .ad-placeholder,
.ad-medium-rect ins.adsbygoogle  { width: 300px; height: 250px; }
.ad-half-page .ad-placeholder,
.ad-half-page ins.adsbygoogle    { width: 300px; height: 600px; }
.ad-in-feed .ad-placeholder,
.ad-in-feed ins.adsbygoogle      { width: 336px; height: 280px; }
.ad-sidebar-top   { margin-bottom: 24px; text-align: center; }
.ad-sidebar-sticky { position: sticky; top: 90px; text-align: center; margin-bottom: 24px; }
.ad-in-article    { margin: 32px 0; text-align: center; }
.ad-in-feed-wrap  { margin: 32px 0; text-align: center; }

/* ══════════════════════════════════════════════
   6. SITE HEADER
   ══════════════════════════════════════════════ */
.site-header {
  background: var(--bg-2); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: background .3s ease, border-color .3s ease;
}
.header-inner {
  display: flex; align-items: center; gap: 24px; height: 66px;
}

/* Brand */
.site-brand { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; text-decoration: none; }
.logo-wrap { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue-600), var(--azure));
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-blue); overflow: hidden;
}
.logo-icon img { width: 100%; height: 100%; object-fit: cover; }
.logo-icon-text {
  font-size: .9rem; font-weight: 800; color: #fff;
  font-family: var(--font-display); letter-spacing: -.02em;
}
.logo-name {
  font-size: 1.3rem; font-weight: 800; color: var(--text-primary);
  font-family: var(--font-display); letter-spacing: -.03em; line-height: 1;
}
.logo-name .logo-dot { color: var(--blue-500); }
.logo-tagline {
  font-size: .62rem; color: var(--text-faint); letter-spacing: .14em;
  text-transform: uppercase; padding-left: 2px;
}

/* Primary Navigation */
.primary-nav { flex: 1; }
.primary-nav > ul {
  display: flex; gap: 2px; list-style: none; align-items: center;
  margin: 0; padding: 0;
}
.primary-nav > ul > li > a {
  padding: 7px 13px; border-radius: var(--r-sm);
  color: var(--text-muted); font-size: .875rem; font-weight: 500;
  white-space: nowrap; transition: var(--t); display: block;
}
.primary-nav > ul > li > a:hover,
.primary-nav > ul > li.current-menu-item > a,
.primary-nav > ul > li.current_page_item > a {
  color: var(--text-primary); background: var(--bg-3);
}
.primary-nav > ul > li.current-menu-item > a {
  color: var(--blue-600); background: var(--blue-50); font-weight: 600;
}
[data-theme="dark"] .primary-nav > ul > li.current-menu-item > a {
  color: var(--blue-300); background: var(--bg-3);
}
/* Dropdowns */
.primary-nav li.menu-item-has-children { position: relative; }
.primary-nav .sub-menu {
  display: none; position: absolute; top: calc(100% + 10px); left: 0;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r); min-width: 210px; padding: 6px; z-index: 300;
  box-shadow: var(--shadow-lg); list-style: none; margin: 0; padding: 6px;
  animation: dropFade .15s ease;
}
@keyframes dropFade { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.primary-nav li.menu-item-has-children:hover > .sub-menu { display: block; }
.primary-nav .sub-menu li a {
  display: block; padding: 8px 12px; border-radius: var(--r-sm);
  font-size: .84rem; color: var(--text-secondary); font-weight: 500; transition: var(--t);
}
.primary-nav .sub-menu li a:hover { background: var(--bg-3); color: var(--blue-600); }

/* Header Actions */
.header-actions { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.theme-toggle {
  display: flex; align-items: center; gap: 5px;
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text-muted); padding: 6px 12px; border-radius: var(--r-sm);
  font-size: .78rem; font-weight: 600; transition: var(--t);
}
.theme-toggle:hover { border-color: var(--blue-400); color: var(--blue-600); background: var(--blue-50); }
.theme-toggle .t-sun  { display: block; }
.theme-toggle .t-moon { display: none; }
[data-theme="dark"] .theme-toggle .t-sun  { display: none; }
[data-theme="dark"] .theme-toggle .t-moon { display: block; }
.search-toggle {
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text-muted); padding: 7px 10px; border-radius: var(--r-sm);
  transition: var(--t); display: flex; align-items: center; justify-content: center;
}
.search-toggle:hover { border-color: var(--blue-400); color: var(--blue-600); background: var(--blue-50); }
.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: var(--bg-3); border: 1px solid var(--border);
  padding: 10px; border-radius: var(--r-sm);
}
.menu-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--text-muted); border-radius: 2px; transition: .3s;
}
/* Search Bar */
.site-search-bar {
  display: none; background: var(--bg-3);
  border-bottom: 1px solid var(--border); padding: 10px 0;
}
.site-search-bar.is-open { display: block; }
.site-search-bar .container { display: flex; gap: 10px; align-items: center; }
.site-search-bar input {
  flex: 1; background: var(--bg-2); border: 1.5px solid var(--border-2);
  border-radius: var(--r-sm); padding: 9px 14px;
  color: var(--text-primary); font-size: .9rem; font-family: var(--font-body);
  transition: var(--t);
}
.site-search-bar input:focus {
  outline: none; border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(34,114,240,.12);
}
.search-close-btn {
  background: none; border: none; color: var(--text-muted); font-size: 1.1rem; padding: 4px 8px;
}

/* ══════════════════════════════════════════════
   7. HERO SECTION
   ══════════════════════════════════════════════ */
.site-hero {
  background: linear-gradient(160deg, #0a1f44 0%, #0f3272 45%, #0f2a5c 100%);
  padding: 88px 0 72px; overflow: hidden; position: relative;
}
.site-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 70% at 72% 50%, rgba(14,165,233,.14) 0%, transparent 65%),
    radial-gradient(ellipse 25% 35% at 8% 85%, rgba(34,114,240,.1) 0%, transparent 60%);
}
.site-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 52px 52px;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 380px;
  gap: 60px; align-items: center; position: relative; z-index: 1;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(56,189,248,.15); border: 1px solid rgba(56,189,248,.3);
  color: var(--azure-light); font-size: .74rem; letter-spacing: .1em;
  text-transform: uppercase; padding: 5px 14px; border-radius: 100px;
  margin-bottom: 22px;
}
.hero-badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #10b981; animation: heroPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes heroPulse { 0%,100%{ opacity:1; transform:scale(1); } 50%{ opacity:.5; transform:scale(.85); } }
.hero-h1 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  color: #fff; line-height: 1.1; margin-bottom: 18px; letter-spacing: -.025em;
}
.hero-h1 em { color: var(--azure-light); font-style: normal; }
.hero-sub {
  font-size: 1.05rem; color: rgba(255,255,255,.68);
  max-width: 500px; margin-bottom: 34px; line-height: 1.75;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-cta .btn-primary {
  background: linear-gradient(135deg, var(--azure-dark), var(--blue-500));
}
.hero-cta .btn-ghost {
  border-color: rgba(255,255,255,.38); color: rgba(255,255,255,.88);
}
.hero-cta .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.hero-stats { display: flex; gap: 36px; }
.hero-stat strong {
  display: block; font-size: 1.65rem; font-weight: 800;
  color: #fff; line-height: 1; font-family: var(--font-display);
}
.hero-stat span {
  font-size: .7rem; color: rgba(255,255,255,.48);
  text-transform: uppercase; letter-spacing: .12em;
}
/* Hex Grid Animation */
.hero-hexgrid { position: relative; width: 380px; height: 320px; }
.hex-card {
  position: absolute; width: 86px; height: 86px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px; display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem; animation: hexFloat 6s ease-in-out infinite;
  backdrop-filter: blur(4px); transition: var(--t); cursor: default;
}
.hex-card:hover { border-color: rgba(56,189,248,.5); background: rgba(56,189,248,.12); }
.hex-card:nth-child(1) { top: 0;    left: 148px; animation-delay: 0s; }
.hex-card:nth-child(2) { top: 44px; left: 32px;  animation-delay: .9s; }
.hex-card:nth-child(3) { top: 44px; left: 264px; animation-delay: 1.8s; }
.hex-card:nth-child(4) { top: 146px;left: 0;     animation-delay: 2.7s; }
.hex-card:nth-child(5) { top: 146px;left: 148px; animation-delay: .45s; }
.hex-card:nth-child(6) { top: 146px;left: 294px; animation-delay: 1.35s; }
.hex-card:nth-child(7) { top: 244px;left: 74px;  animation-delay: 2.25s; }
@keyframes hexFloat { 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-11px); } }

/* ══════════════════════════════════════════════
   8. SECTION HEADERS
   ══════════════════════════════════════════════ */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 32px;
}
.section-header h2 { font-size: 1.65rem; }
.section-see-all {
  font-size: .86rem; color: var(--blue-600); font-weight: 600;
  display: flex; align-items: center; gap: 4px; transition: var(--t);
}
.section-see-all:hover { gap: 7px; color: var(--blue-500); }
[data-theme="dark"] .section-see-all { color: var(--blue-400); }
.section-title-center { text-align: center; font-size: 1.9rem; margin-bottom: 40px; }

/* ══════════════════════════════════════════════
   9. POST CARDS
   ══════════════════════════════════════════════ */
.post-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  transition: var(--t-slow); box-shadow: var(--shadow-sm);
}
.post-card:hover {
  transform: translateY(-3px); border-color: var(--blue-300);
  box-shadow: var(--shadow), 0 0 0 1px var(--blue-200);
}
[data-theme="dark"] .post-card:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
/* Card image area */
.card-img-wrap { position: relative; overflow: hidden; }
.card-img-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; border-bottom: 1px solid var(--border);
}
.card-img-placeholder img,
.card-img-wrap img.wp-post-image {
  width: 100%; object-fit: cover; display: block;
  border-bottom: 1px solid var(--border);
}
.card-featured .card-img-placeholder,
.card-featured .card-img-wrap > img { height: 260px; }
.card-medium .card-img-placeholder,
.card-medium .card-img-wrap > img   { height: 160px; }
.card-small .card-img-placeholder,
.card-small .card-img-wrap > img    { height: 124px; }
/* Category gradients */
.bg-cloud  { background: linear-gradient(135deg, #0f3272, #1a5dcc, #1e6bdd); }
.bg-ai     { background: linear-gradient(135deg, #2e1065, #5b21b6, #6d28d9); }
.bg-python { background: linear-gradient(135deg, #064e3b, #065f46, #047857); }
.bg-default{ background: linear-gradient(135deg, #0f3272, #1a5dcc); }
/* Category badge */
.cat-badge {
  position: absolute; bottom: 10px; left: 12px;
  padding: 3px 10px; border-radius: 100px;
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
}
.cat-badge-cloud  { background: rgba(34,114,240,.22);  color: #7db3f8; border: 1px solid rgba(34,114,240,.35); }
.cat-badge-ai     { background: rgba(139,92,246,.22);  color: #c4b5fd; border: 1px solid rgba(139,92,246,.35); }
.cat-badge-python { background: rgba(5,150,105,.22);   color: #6ee7b7; border: 1px solid rgba(5,150,105,.35); }
.cat-badge-default{ background: rgba(34,114,240,.22);  color: #7db3f8; border: 1px solid rgba(34,114,240,.35); }
/* Sponsored badge */
.sponsored-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(245,158,11,.9); color: #fff;
  font-size: .66rem; font-weight: 700; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--r-xs); letter-spacing: .06em;
}
/* Card body */
.card-body { padding: 20px; }
.card-meta {
  font-size: .76rem; color: var(--text-faint);
  margin-bottom: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.card-read-time { color: var(--blue-500); font-weight: 600; }
.card-body h2 { font-size: 1.28rem; margin-bottom: 10px; line-height: 1.35; color: var(--text-primary); }
.card-body h3 { font-size: 1.02rem; margin-bottom: 8px; line-height: 1.4; color: var(--text-primary); }
.card-excerpt { font-size: .875rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 14px; }
.card-read-more {
  font-size: .82rem; font-weight: 600; color: var(--blue-600);
  display: inline-flex; align-items: center; gap: 4px; transition: var(--t);
}
.card-read-more:hover { gap: 7px; color: var(--blue-500); }
[data-theme="dark"] .card-read-more { color: var(--blue-400); }

/* Featured Grid */
.featured-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 22px;
}
.card-featured { grid-row: span 2; }

/* Posts Grid */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

/* Filter Tabs */
.filter-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-tab {
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text-muted); padding: 7px 16px; border-radius: 100px;
  font-size: .83rem; font-weight: 600; transition: var(--t);
  font-family: var(--font-body);
}
.filter-tab:hover { border-color: var(--blue-400); color: var(--blue-600); background: var(--blue-50); }
.filter-tab.is-active {
  background: var(--blue-600); border-color: var(--blue-600);
  color: #fff; box-shadow: var(--shadow-blue);
}
[data-theme="dark"] .filter-tab.is-active { background: var(--blue-700); border-color: var(--blue-700); }

/* ══════════════════════════════════════════════
   10. POSTS LAYOUT (main + sidebar)
   ══════════════════════════════════════════════ */
.posts-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 40px; align-items: start;
}
.posts-main { min-width: 0; }
.site-sidebar { min-width: 0; }
/* Pagination */
.pagination-wrap { margin-top: 40px; text-align: center; }
.wp-pagenavi,
.pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.wp-pagenavi a, .wp-pagenavi span,
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r-sm);
  font-size: .86rem; font-weight: 600;
  border: 1px solid var(--border); color: var(--text-muted);
  background: var(--bg-2); transition: var(--t);
}
.wp-pagenavi a:hover, .pagination .page-numbers:hover,
.wp-pagenavi .current, .pagination .page-numbers.current {
  background: var(--blue-600); border-color: var(--blue-600); color: #fff;
}
.pagination .page-numbers.dots { border: none; background: none; width: auto; }

/* ══════════════════════════════════════════════
   11. SIDEBAR WIDGETS
   ══════════════════════════════════════════════ */
.sidebar-widget {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px; margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.widget-title, .widgettitle {
  font-size: .73rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-faint);
  margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
  font-family: var(--font-body);
}
/* Popular posts */
.popular-posts-list { display: flex; flex-direction: column; gap: 14px; }
.popular-post-item { display: flex; gap: 12px; align-items: flex-start; }
.popular-post-num {
  font-size: 1.35rem; font-weight: 800; color: var(--border-2);
  font-family: var(--font-display); flex-shrink: 0; line-height: 1;
}
.popular-post-title {
  font-size: .83rem; color: var(--text-secondary); line-height: 1.45;
  font-weight: 500; display: block;
}
.popular-post-title:hover { color: var(--blue-600); }
.popular-post-meta { font-size: .72rem; color: var(--text-faint); margin-top: 2px; }
/* Categories */
.sidebar-cat-list { list-style: none; padding: 0; margin: 0; }
.sidebar-cat-list li { margin-bottom: 3px; }
.sidebar-cat-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 10px; border-radius: var(--r-sm);
  color: var(--text-secondary); font-size: .86rem; transition: var(--t);
}
.sidebar-cat-list a:hover { background: var(--bg-3); color: var(--blue-600); }
.sidebar-cat-list a em { color: var(--text-faint); font-style: normal; font-size: .8rem; }
.cat-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; margin-right: 8px; flex-shrink: 0;
}
.cat-dot-cloud  { background: var(--cloud-color); }
.cat-dot-ai     { background: var(--ai-color); }
.cat-dot-python { background: var(--py-color); }
/* Newsletter widget */
.newsletter-widget-sub { font-size: .84rem; color: var(--text-muted); margin-bottom: 12px; }
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-input {
  background: var(--bg-3); border: 1.5px solid var(--border);
  color: var(--text-primary); padding: 9px 14px; border-radius: var(--r-sm);
  font-family: var(--font-body); font-size: .87rem; width: 100%; transition: var(--t);
}
.newsletter-input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(34,114,240,.1); }
.newsletter-success { font-size: .84rem; color: #059669; font-weight: 600; padding: 8px 0; }
/* Tags cloud */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tags-cloud a, .tagcloud a {
  background: var(--bg-3) !important; border: 1px solid var(--border);
  color: var(--text-muted) !important; padding: 4px 11px; border-radius: 100px;
  font-size: .76rem !important; font-weight: 500; transition: var(--t);
  display: inline-block; text-decoration: none;
}
.tags-cloud a:hover, .tagcloud a:hover {
  background: var(--blue-600) !important; border-color: var(--blue-600);
  color: #fff !important;
}
/* Affiliate / Recommended Tools */
.affiliate-card {
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 14px; margin-bottom: 10px; transition: var(--t);
  background: var(--bg-3);
}
.affiliate-card:hover { border-color: var(--blue-300); box-shadow: var(--shadow-sm); }
.affiliate-card-inner { display: flex; gap: 10px; align-items: flex-start; }
.affiliate-logo {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.affiliate-logo img { width: 100%; height: 100%; object-fit: cover; }
.affiliate-name { font-size: .86rem; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.affiliate-desc { font-size: .78rem; color: var(--text-muted); line-height: 1.45; }
.affiliate-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--blue-600); color: #fff; padding: 5px 12px;
  border-radius: var(--r-xs); font-size: .74rem; font-weight: 700;
  text-decoration: none; margin-top: 8px; transition: var(--t);
}
.affiliate-btn:hover { background: var(--blue-700); color: #fff; }
.affiliate-disclosure {
  font-size: .65rem; color: var(--text-faint);
  margin-top: 4px; display: block;
}

/* ══════════════════════════════════════════════
   12. CATEGORY HEADER (ARCHIVE PAGES)
   ══════════════════════════════════════════════ */
.category-hero {
  background: linear-gradient(160deg, #0a1f44, #0f3272);
  padding: 48px 0; border-bottom: 1px solid var(--border);
}
.category-hero-inner { display: flex; align-items: flex-start; gap: 24px; }
.category-hero-icon {
  width: 80px; height: 80px; border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.07);
}
.category-hero h1 { font-size: 2rem; color: #fff; margin-bottom: 6px; }
.category-hero .cat-desc { font-size: .92rem; color: rgba(255,255,255,.62); max-width: 580px; }
.sub-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.sub-cat-btn {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.8); padding: 5px 14px; border-radius: 100px;
  font-size: .79rem; font-weight: 600; cursor: pointer;
  transition: var(--t); text-decoration: none; display: inline-block;
  font-family: var(--font-body);
}
.sub-cat-btn:hover, .sub-cat-btn.is-active { background: var(--azure); border-color: var(--azure); color: #fff; }

/* ══════════════════════════════════════════════
   13. BREADCRUMB
   ══════════════════════════════════════════════ */
.breadcrumb-bar { background: var(--bg-3); border-bottom: 1px solid var(--border); padding: 10px 0; }
.breadcrumb { font-size: .8rem; color: var(--text-faint); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--blue-600); }
.breadcrumb-sep { margin: 0 6px; }

/* ══════════════════════════════════════════════
   14. SINGLE ARTICLE PAGE
   ══════════════════════════════════════════════ */
.article-layout {
  display: grid; grid-template-columns: 1fr var(--sidebar-width);
  gap: 48px; align-items: start; padding: 48px 0 80px;
}
.article-main { min-width: 0; }
/* Article Header */
.article-header { margin-bottom: 32px; }
.article-cats { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.article-cat-link {
  padding: 3px 12px; border-radius: 100px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; text-decoration: none; transition: var(--t);
}
.article-cat-link.cat-cloud {
  background: var(--blue-100); color: var(--blue-700);
  border: 1px solid var(--blue-200);
}
.article-cat-link.cat-ai {
  background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe;
}
.article-cat-link.cat-python {
  background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0;
}
[data-theme="dark"] .article-cat-link.cat-cloud  { background: var(--bg-4); color: var(--blue-300); border-color: var(--border); }
[data-theme="dark"] .article-cat-link.cat-ai     { background: var(--bg-4); color: #a78bfa; border-color: var(--border); }
[data-theme="dark"] .article-cat-link.cat-python { background: var(--bg-4); color: #34d399; border-color: var(--border); }
.article-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.2; margin-bottom: 14px; letter-spacing: -.02em;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 14px; color: var(--text-faint);
  font-size: .82rem; align-items: center; margin-bottom: 24px;
  padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.article-meta span { display: flex; align-items: center; gap: 5px; }
/* Featured image */
.article-featured-img {
  width: 100%; max-height: 440px; object-fit: cover;
  border-radius: var(--r-lg); margin-bottom: 32px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.article-thumb-placeholder {
  width: 100%; height: 320px; border-radius: var(--r-lg);
  margin-bottom: 32px; display: flex; align-items: center;
  justify-content: center; font-size: 5rem;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
/* Sponsored disclosure */
.sponsored-disclosure {
  background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.35);
  border-radius: var(--r); padding: 12px 16px; margin-bottom: 24px;
  font-size: .84rem; color: var(--text-secondary);
}
.sponsored-disclosure strong { color: #d97706; }
/* Affiliate disclosure banner */
.affiliate-disclosure-banner {
  background: var(--blue-50); border: 1px solid var(--blue-200);
  border-left: 3px solid var(--blue-500);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 12px 16px; margin-bottom: 24px;
  font-size: .84rem; color: var(--text-secondary);
  position: relative;
}
[data-theme="dark"] .affiliate-disclosure-banner {
  background: var(--bg-3); border-color: var(--border); border-left-color: var(--blue-500);
}
.disclosure-dismiss {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; color: var(--text-faint);
  font-size: .9rem; cursor: pointer; padding: 2px 6px;
}

/* ── TABLE OF CONTENTS ── */
.toc-wrap {
  background: var(--blue-50); border: 1px solid var(--blue-200);
  border-left: 3px solid var(--blue-500);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 18px 22px; margin-bottom: 32px;
}
[data-theme="dark"] .toc-wrap { background: var(--bg-3); border-color: var(--border); border-left-color: var(--blue-500); }
.toc-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.toc-title { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--blue-600); font-family: var(--font-body); font-weight: 700; }
[data-theme="dark"] .toc-title { color: var(--blue-400); }
.toc-toggle-btn { background: none; border: none; color: var(--text-faint); font-size: .8rem; padding: 2px 6px; }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin-bottom: 5px; }
.toc-list a { font-size: .87rem; color: var(--text-secondary); display: flex; align-items: baseline; gap: 7px; }
.toc-list a:hover { color: var(--blue-600); }
.toc-list a.toc-active { color: var(--blue-600); font-weight: 600; }
.toc-num { font-size: .72rem; color: var(--text-faint); font-family: var(--font-mono); flex-shrink: 0; }
.toc-list .toc-h3 > a { padding-left: 18px; font-size: .84rem; }

/* ── ARTICLE BODY / ENTRY CONTENT ── */
.entry-content, .article-body {
  font-family: var(--font-serif); font-size: 1.05rem; max-width: 760px;
}
.entry-content p, .article-body p {
  color: var(--text-secondary); line-height: 1.9; margin-bottom: 22px;
}
.entry-content h2, .article-body h2 {
  font-family: var(--font-display); font-size: 1.55rem;
  margin: 42px 0 16px; padding-bottom: 10px;
  border-bottom: 2px solid var(--border); color: var(--text-primary); letter-spacing: -.01em;
}
.entry-content h3, .article-body h3 {
  font-family: var(--font-display); font-size: 1.2rem;
  margin: 30px 0 12px; color: var(--blue-700); font-weight: 600;
}
[data-theme="dark"] .entry-content h3,
[data-theme="dark"] .article-body h3 { color: var(--blue-300); }
.entry-content h4, .article-body h4 {
  font-family: var(--font-display); font-size: 1rem;
  margin: 24px 0 10px; color: var(--text-primary); font-weight: 700;
}
.entry-content ul, .entry-content ol,
.article-body ul, .article-body ol {
  color: var(--text-secondary); line-height: 1.85;
  margin-bottom: 22px; padding-left: 26px;
}
.entry-content li, .article-body li { margin-bottom: 6px; }
.entry-content strong, .article-body strong { color: var(--text-primary); font-weight: 700; }
.entry-content em { font-style: italic; }
.entry-content a, .article-body a {
  color: var(--blue-600); text-decoration: underline;
  text-decoration-color: var(--blue-200); text-underline-offset: 3px;
}
.entry-content a:hover, .article-body a:hover { text-decoration-color: var(--blue-500); }
/* Blockquote */
.entry-content blockquote, .article-body blockquote,
.wp-block-quote {
  border-left: 3px solid var(--blue-500); background: var(--blue-50);
  padding: 16px 22px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--text-secondary); font-style: italic; margin-bottom: 24px;
}
[data-theme="dark"] .entry-content blockquote,
[data-theme="dark"] .article-body blockquote,
[data-theme="dark"] .wp-block-quote { background: var(--bg-3); }

/* ── CODE BLOCKS ── */
.entry-content code, .article-body code {
  font-family: var(--font-mono); font-size: .83rem;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 2px 6px; color: var(--blue-700);
  font-style: normal;
}
[data-theme="dark"] .entry-content code,
[data-theme="dark"] .article-body code { color: var(--azure-light); }
.entry-content pre, .article-body pre,
.wp-block-code {
  background: #03142e !important; border: 1px solid rgba(34,114,240,.2);
  border-radius: var(--r); padding: 22px 24px; overflow-x: auto;
  margin-bottom: 26px; position: relative; box-shadow: var(--shadow);
}
.entry-content pre::before, .article-body pre::before {
  content: attr(data-lang);
  position: absolute; top: 10px; right: 44px;
  font-family: var(--font-mono); font-size: .65rem;
  color: rgba(255,255,255,.3); text-transform: uppercase; letter-spacing: .1em;
}
.entry-content pre code, .article-body pre code,
.wp-block-code code {
  background: none !important; border: none !important; padding: 0;
  color: #e2e8f0; font-size: .86rem; line-height: 1.75; font-style: normal;
}
/* Copy button */
.copy-code-btn {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.6); padding: 4px 10px; border-radius: var(--r-xs);
  font-size: .7rem; font-family: var(--font-mono); cursor: pointer; transition: var(--t);
}
.copy-code-btn:hover { background: rgba(255,255,255,.2); color: #fff; }
.copy-code-btn.copied { color: #34d399; border-color: rgba(52,211,153,.4); }

/* ── DATA TABLES ── */
.entry-content table, .article-body table,
.data-table {
  width: 100%; border-collapse: collapse; margin-bottom: 28px;
  font-size: .9rem; font-family: var(--font-body);
  border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.entry-content thead th, .article-body thead th,
.data-table thead th {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
  color: #fff; padding: 12px 16px; text-align: left;
  font-weight: 600; font-size: .82rem; letter-spacing: .03em;
}
.entry-content tbody tr, .article-body tbody tr,
.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background .15s; }
.entry-content tbody tr:last-child,
.article-body tbody tr:last-child { border-bottom: none; }
.entry-content tbody tr:hover, .article-body tbody tr:hover { background: var(--bg-3); }
.entry-content tbody td, .article-body tbody td,
.data-table tbody td { padding: 11px 16px; color: var(--text-secondary); vertical-align: top; }
.table-responsive {
  overflow-x: auto; margin-bottom: 28px;
  border-radius: var(--r); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.table-responsive table { margin-bottom: 0; border: none; box-shadow: none; border-radius: 0; }
.table-striped tbody tr:nth-child(even) { background: var(--bg-3); }
.table-caption { text-align: center; font-size: .8rem; color: var(--text-faint); margin-top: -20px; margin-bottom: 28px; font-style: italic; font-family: var(--font-body); }
/* Comparison table */
.comparison-table td:first-child { font-weight: 700; color: var(--text-primary); }
.comparison-table td.yes  { color: #059669; font-weight: 700; }
.comparison-table td.no   { color: #dc2626; }
.comparison-table td.partial { color: #d97706; }

/* ── CHART CONTAINERS ── */
.chart-container {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px; margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.chart-title    { font-family: var(--font-display); font-size: .96rem; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.chart-subtitle { font-size: .78rem; color: var(--text-muted); margin-bottom: 16px; }
.chart-wrapper  { position: relative; width: 100%; min-height: 200px; }
.chart-wrapper canvas { max-width: 100%; }
.chart-footer   { font-size: .76rem; color: var(--text-faint); margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-style: italic; font-family: var(--font-body); }
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }

/* ── CALLOUT BOXES ── */
.callout {
  padding: 16px 20px; border-radius: var(--r); margin-bottom: 26px;
  display: flex; gap: 14px; align-items: flex-start; font-family: var(--font-body);
}
.callout-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.callout-body h4 { font-size: .88rem; font-weight: 700; margin-bottom: 4px; color: inherit; }
.callout-body p  { margin: 0; font-size: .87rem; line-height: 1.6; color: inherit; }
.callout-info    { background: var(--blue-50); border: 1px solid var(--blue-200); color: var(--blue-900); }
.callout-tip     { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }
.callout-warning { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; }
.callout-danger  { background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; }
[data-theme="dark"] .callout-info    { background: var(--bg-3); border-color: var(--border); color: var(--blue-200); }
[data-theme="dark"] .callout-tip     { background: var(--bg-3); border-color: #064e3b; color: #a7f3d0; }
[data-theme="dark"] .callout-warning { background: var(--bg-3); border-color: #92400e; color: #fde68a; }
[data-theme="dark"] .callout-danger  { background: var(--bg-3); border-color: #7f1d1d; color: #fca5a5; }

/* ── FIGURES ── */
.figure { margin: 32px 0; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.figure img { width: 100%; display: block; border-bottom: 1px solid var(--border); }
.figure-caption {
  background: var(--bg-3); padding: 10px 16px;
  font-size: .8rem; color: var(--text-muted); font-style: italic;
  font-family: var(--font-body); display: flex; align-items: center; gap: 8px;
}
.figure-caption::before {
  content: 'Figure'; background: var(--blue-600); color: #fff;
  font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 100px;
  text-transform: uppercase; letter-spacing: .07em; font-style: normal; flex-shrink: 0;
}
.figure-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0; }
.figure-grid .figure { margin: 0; }
/* Lightbox */
.musamu-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; animation: lbFade .2s ease;
}
@keyframes lbFade { from{opacity:0} to{opacity:1} }
.musamu-lightbox img { max-width: 90vw; max-height: 90vh; border-radius: var(--r); box-shadow: 0 0 60px rgba(0,0,0,.8); }

/* ── METRICS GRID ── */
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 16px; margin-bottom: 28px; }
.metric-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px 20px; text-align: center;
  box-shadow: var(--shadow-sm); transition: var(--t);
}
.metric-card:hover { border-color: var(--blue-300); box-shadow: var(--shadow); }
.metric-value { font-size: 1.85rem; font-weight: 800; font-family: var(--font-display); color: var(--blue-600); line-height: 1; margin-bottom: 4px; }
[data-theme="dark"] .metric-value { color: var(--blue-400); }
.metric-label  { font-size: .73rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.metric-change { font-size: .75rem; margin-top: 4px; font-weight: 700; }
.metric-up   { color: #059669; }
.metric-down { color: #dc2626; }

/* ── KEY TAKEAWAYS ── */
.takeaways {
  background: var(--blue-50); border: 1px solid var(--blue-200);
  border-left: 3px solid var(--blue-600); border-radius: 0 var(--r) var(--r) 0;
  padding: 20px 24px; margin: 32px 0; font-family: var(--font-body);
}
[data-theme="dark"] .takeaways { background: var(--bg-3); border-color: var(--border); border-left-color: var(--blue-500); }
.takeaways h4 { font-size: .88rem; font-weight: 700; color: var(--blue-700); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .06em; }
[data-theme="dark"] .takeaways h4 { color: var(--blue-300); }
.takeaways ul { margin-bottom: 0; color: var(--text-secondary); }

/* ── AUTHOR BOX ── */
.author-box {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px; margin-top: 48px;
  display: flex; gap: 18px; align-items: flex-start; box-shadow: var(--shadow-sm);
}
.author-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-600), var(--azure));
  border: 2px solid var(--blue-300); overflow: hidden; flex-shrink: 0;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-info h4 { font-family: var(--font-body); font-weight: 700; margin-bottom: 4px; font-size: .96rem; }
.author-info p  { font-size: .85rem; color: var(--text-muted); font-family: var(--font-body); line-height: 1.6; margin-bottom: 0; }
.author-social { display: flex; gap: 8px; margin-top: 8px; }
.author-social a {
  font-size: .76rem; color: var(--blue-600); font-weight: 600;
  background: var(--blue-50); border: 1px solid var(--blue-200);
  padding: 3px 10px; border-radius: 100px; text-decoration: none; transition: var(--t);
}
.author-social a:hover { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }

/* ── RELATED POSTS ── */
.related-posts { margin-top: 48px; }
.related-posts h3 { font-size: 1.25rem; margin-bottom: 20px; padding-top: 32px; border-top: 1px solid var(--border); }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

/* Post Navigation */
.post-navigation { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.nav-post { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 20px; transition: var(--t); }
.nav-post:hover { border-color: var(--blue-300); box-shadow: var(--shadow); }
.nav-post-direction { font-size: .72rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; font-weight: 600; display: block; font-family: var(--font-body); }
.nav-post-title { font-size: .88rem; color: var(--blue-600); font-weight: 600; font-family: var(--font-body); }
.nav-next { text-align: right; }

/* ── COMMENTS ── */
.comments-section { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.comments-title { font-size: 1.25rem; margin-bottom: 24px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px; margin-bottom: 16px;
}
.comment-author-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.comment-author-wrap img { width: 40px; height: 40px; border-radius: 50%; }
.comment-fn { font-weight: 700; font-size: .9rem; color: var(--text-primary); }
.comment-meta { font-size: .76rem; color: var(--text-faint); }
.comment-text p { font-size: .9rem; color: var(--text-secondary); margin-bottom: 0; font-family: var(--font-body); line-height: 1.7; }
.comment-reply-link { font-size: .78rem; color: var(--blue-600); font-weight: 600; display: inline-block; margin-top: 8px; }
/* Comment form */
.comment-form label { font-size: .82rem; font-weight: 600; color: var(--text-secondary); display: block; margin-bottom: 4px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; background: var(--bg-3); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 10px 14px; color: var(--text-primary);
  font-family: var(--font-body); font-size: .9rem; margin-bottom: 14px; transition: var(--t);
}
.comment-form input:focus, .comment-form textarea:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(34,114,240,.1);
}
.comment-form input[type="submit"] {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff; border: none; border-radius: var(--r-sm);
  padding: 11px 24px; font-family: var(--font-body);
  font-size: .88rem; font-weight: 600; cursor: pointer;
  transition: var(--t); box-shadow: var(--shadow-blue);
}
.comment-form input[type="submit"]:hover { background: linear-gradient(135deg, var(--blue-700), var(--blue-600)); }

/* ══════════════════════════════════════════════
   15. CATEGORY SHOWCASE
   ══════════════════════════════════════════════ */
.category-showcase { background: var(--bg-3); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.showcase-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.showcase-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 32px 26px;
  display: flex; flex-direction: column; gap: 10px;
  transition: var(--t-slow); text-decoration: none;
  position: relative; overflow: hidden; box-shadow: var(--shadow-sm);
}
.showcase-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.showcase-card-cloud::before  { background: linear-gradient(90deg, var(--blue-600), var(--azure)); }
.showcase-card-ai::before     { background: linear-gradient(90deg, #7c3aed, #a855f7); }
.showcase-card-python::before { background: linear-gradient(90deg, #059669, #10b981); }
.showcase-card:hover { transform: translateY(-4px); border-color: var(--blue-300); box-shadow: var(--shadow-lg); }
.showcase-icon   { font-size: 2.1rem; }
.showcase-card h3 { font-size: 1.15rem; color: var(--text-primary); }
.showcase-card p  { font-size: .87rem; color: var(--text-muted); flex: 1; line-height: 1.6; }
.showcase-count  { font-size: .83rem; font-weight: 700; }
.showcase-card-cloud  .showcase-count { color: var(--blue-600); }
.showcase-card-ai     .showcase-count { color: #7c3aed; }
.showcase-card-python .showcase-count { color: #059669; }
[data-theme="dark"] .showcase-card-cloud  .showcase-count { color: var(--blue-400); }
[data-theme="dark"] .showcase-card-ai     .showcase-count { color: #a78bfa; }
[data-theme="dark"] .showcase-card-python .showcase-count { color: #34d399; }

/* ══════════════════════════════════════════════
   16. NEWSLETTER SECTION (homepage full-width)
   ══════════════════════════════════════════════ */
.newsletter-section { background: var(--bg-3); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 64px 0; text-align: center; }
.newsletter-section h2 { font-size: 1.7rem; margin-bottom: 8px; }
.newsletter-section p  { color: var(--text-muted); margin-bottom: 28px; }
.newsletter-form-wide {
  display: flex; gap: 10px; max-width: 440px; margin: 0 auto;
}
.newsletter-form-wide input {
  flex: 1; background: var(--bg-2); border: 1.5px solid var(--border-2);
  border-radius: var(--r-sm); padding: 11px 16px;
  color: var(--text-primary); font-family: var(--font-body); font-size: .9rem;
  transition: var(--t);
}
.newsletter-form-wide input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(34,114,240,.1); }

/* ══════════════════════════════════════════════
   17. SITE FOOTER
   ══════════════════════════════════════════════ */
.site-footer { background: var(--blue-950); color: rgba(255,255,255,.7); padding-top: 64px; }
[data-theme="dark"] .site-footer { background: #030c18; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 60px; padding-bottom: 48px; }
.footer-brand p { font-size: .86rem; color: rgba(255,255,255,.5); margin: 12px 0 20px; max-width: 270px; line-height: 1.65; }
.footer-brand .logo-name { color: #fff; }
.footer-brand .logo-tagline { color: rgba(255,255,255,.4); }
.social-links { display: flex; gap: 10px; }
.social-links a {
  width: 34px; height: 34px; background: rgba(255,255,255,.07);
  border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); font-size: .8rem; font-weight: 700;
  transition: var(--t); border: 1px solid rgba(255,255,255,.09); text-decoration: none;
}
.social-links a:hover { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }
.footer-nav-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 28px; }
.footer-col h4 {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .12em;
  color: rgba(255,255,255,.35); margin-bottom: 14px;
  font-family: var(--font-body); font-weight: 700;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,.5); font-size: .84rem; transition: color .2s; }
.footer-col ul li a:hover { color: var(--azure-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.07); padding: 18px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { font-size: .76rem; color: rgba(255,255,255,.3); }
.footer-bottom a { color: rgba(255,255,255,.45); }
.footer-bottom a:hover { color: var(--azure-light); }
.footer-disclosure { font-style: italic; }

/* ══════════════════════════════════════════════
   18. STATIC PAGES
   ══════════════════════════════════════════════ */
.page-content-wrap { max-width: 860px; padding: 56px 0 80px; }
.page-content-wrap h1 { font-size: 2.2rem; margin-bottom: 28px; }
/* Contact form */
.page-contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; padding: 56px 0 80px; align-items: start; }
.contact-info-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; margin-bottom: 12px; display: flex; align-items: flex-start; gap: 14px; box-shadow: var(--shadow-sm); }
.contact-info-icon { width: 40px; height: 40px; background: var(--blue-50); border: 1px solid var(--blue-200); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
[data-theme="dark"] .contact-info-icon { background: var(--bg-4); border-color: var(--border); }
/* Search page */
.search-page-header { background: var(--bg-3); border-bottom: 1px solid var(--border); padding: 32px 0; margin-bottom: 0; }
.search-page-header h1 { font-size: 1.6rem; margin-bottom: 8px; }
.search-form-big { display: flex; gap: 10px; max-width: 500px; margin-top: 14px; }
.search-form-big input { flex: 1; background: var(--bg-2); border: 1.5px solid var(--border-2); border-radius: var(--r-sm); padding: 11px 16px; color: var(--text-primary); font-family: var(--font-body); font-size: .9rem; }
.search-form-big input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(34,114,240,.1); }
.search-form-big button { background: var(--blue-600); color: #fff; border: none; border-radius: var(--r-sm); padding: 11px 22px; font-family: var(--font-body); font-size: .88rem; font-weight: 600; cursor: pointer; transition: var(--t); }
/* 404 page */
.error-404-page { text-align: center; padding: 80px 24px; max-width: 560px; margin: 0 auto; }
.error-code { font-size: 7rem; font-weight: 800; color: var(--blue-200); line-height: 1; font-family: var(--font-display); }
[data-theme="dark"] .error-code { color: var(--bg-4); }

/* ══════════════════════════════════════════════
   19. GUTENBERG BLOCK STYLES
   ══════════════════════════════════════════════ */
.wp-block-pullquote { border-top: 3px solid var(--blue-500); border-bottom: 3px solid var(--blue-500); padding: 24px; text-align: center; font-size: 1.2rem; font-family: var(--font-serif); font-style: italic; margin-bottom: 28px; color: var(--text-primary); }
.wp-block-separator { border-color: var(--border); margin: 32px 0; }
.wp-block-button .wp-block-button__link { background: linear-gradient(135deg, var(--blue-600), var(--blue-500)) !important; color: #fff !important; border-radius: var(--r-sm) !important; padding: 11px 22px !important; font-family: var(--font-body) !important; font-weight: 600 !important; box-shadow: var(--shadow-blue); }
.wp-block-image img { border-radius: var(--r); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.wp-block-image figcaption { font-size: .8rem; color: var(--text-faint); text-align: center; font-style: italic; margin-top: 8px; font-family: var(--font-body); }
.wp-block-group { padding: 24px; background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 28px; }

/* ══════════════════════════════════════════════
   20. AFFILIATE SHORTCODE OUTPUT
   ══════════════════════════════════════════════ */
.musamu-affiliate-wrap { display: inline-flex; flex-direction: column; gap: 4px; margin: 4px 0; }
.musamu-affiliate-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff; padding: 9px 18px; border-radius: var(--r-sm);
  font-size: .86rem; font-weight: 700; text-decoration: none;
  transition: var(--t); box-shadow: var(--shadow-blue);
}
.musamu-affiliate-btn:hover { background: linear-gradient(135deg, var(--blue-700), var(--blue-600)); transform: translateY(-1px); color: #fff; }
.musamu-affiliate-label { font-size: .65rem; color: var(--text-faint); text-align: center; font-style: italic; }

/* ══════════════════════════════════════════════
   21. RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 1400px) { .container-wide { padding: 0 28px; } }
@media (max-width: 1100px) {
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .card-featured { grid-row: span 1; grid-column: span 2; }
  .posts-layout  { grid-template-columns: 1fr 270px; }
  .article-layout{ grid-template-columns: 1fr 270px; }
  .charts-grid   { grid-template-columns: 1fr; }
  :root { --sidebar-width: 270px; }
}
@media (max-width: 900px) {
  .posts-grid    { grid-template-columns: 1fr 1fr; }
  .posts-layout  { grid-template-columns: 1fr; }
  .article-layout{ grid-template-columns: 1fr; }
  .site-sidebar  { display: none; }
  .footer-inner  { grid-template-columns: 1fr; }
  .footer-nav-grid { grid-template-columns: repeat(2,1fr); }
  .hero-inner    { grid-template-columns: 1fr; }
  .hero-hexgrid  { display: none; }
  .showcase-grid { grid-template-columns: 1fr; }
  .related-grid  { grid-template-columns: 1fr 1fr; }
  .figure-grid   { grid-template-columns: 1fr; }
  .post-navigation { grid-template-columns: 1fr; }
  .page-contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .primary-nav { display: none; }
  .primary-nav.is-open {
    display: block; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-2); z-index: 300; overflow-y: auto; padding: 24px;
  }
  .primary-nav.is-open > ul { flex-direction: column; gap: 0; padding-top: 60px; }
  .primary-nav.is-open > ul > li > a { padding: 12px 0; font-size: 1rem; }
  .primary-nav.is-open .sub-menu { position: static; display: block; box-shadow: none; border: none; background: var(--bg-3); border-radius: var(--r); margin: 4px 0 8px 12px; animation: none; }
  .menu-toggle  { display: flex; }
  .featured-grid{ grid-template-columns: 1fr; }
  .card-featured{ grid-column: auto; }
  .posts-grid   { grid-template-columns: 1fr; }
  .section      { padding: 48px 0; }
  .site-hero    { padding: 60px 0 44px; }
  .hero-cta     { flex-direction: column; }
  .hero-stats   { gap: 20px; }
  .newsletter-form-wide { flex-direction: column; }
  .ad-leaderboard .ad-placeholder,
  .ad-leaderboard ins.adsbygoogle { width: 320px; height: 50px; }
}
@media (max-width: 480px) {
  .related-grid    { grid-template-columns: 1fr; }
  .metrics-grid    { grid-template-columns: 1fr 1fr; }
  .footer-nav-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats      { gap: 16px; }
}

/* ══════════════════════════════════════════════
   22. ANIMATIONS & UTILITIES
   ══════════════════════════════════════════════ */
@keyframes fadeInUp { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:translateY(0); } }
.fade-in-up { animation: fadeInUp .5s ease both; }

/* WordPress-specific resets */
.wp-block-image { margin-bottom: 28px; }
.alignwide  { margin-left: -80px; margin-right: -80px; max-width: calc(100% + 160px); }
.alignfull  { margin-left: calc(-24px); margin-right: calc(-24px); max-width: calc(100% + 48px); }
img.alignleft  { float: left; margin: 4px 20px 16px 0; }
img.alignright { float: right; margin: 4px 0 16px 20px; }
img.aligncenter { display: block; margin: 0 auto 20px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .8rem; color: var(--text-faint); text-align: center; margin-top: 6px; font-family: var(--font-body); }
