/*
Theme Name: Tutorial1001
Theme URI: https://tutorial1001.com
Author: Tutorial1001
Author URI: https://tutorial1001.com
Description: Tema minimalis profesional untuk blog teknologi dan tutorial digital. Dioptimalkan untuk AdSense dan SEO.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tutorial1001
Tags: blog, technology, minimal, responsive, custom-menu, featured-images, translation-ready
*/

/* ============================================================
   CSS VARIABLES & RESET
   ============================================================ */
:root {
  /* Brand Colors */
  --color-primary:       #1D4ED8;
  --color-primary-dark:  #1E3A8A;
  --color-primary-light: #3B82F6;
  --color-accent:        #06B6D4;

  /* Neutrals */
  --color-navy:          #0F172A;
  --color-slate-900:     #1E293B;
  --color-slate-700:     #334155;
  --color-slate-500:     #64748B;
  --color-slate-300:     #CBD5E1;
  --color-slate-100:     #F1F5F9;
  --color-white:         #FFFFFF;

  /* Semantic */
  --color-bg:            #FAFBFC;
  --color-bg-card:       #FFFFFF;
  --color-text:          #1E293B;
  --color-text-muted:    #64748B;
  --color-text-light:    #94A3B8;
  --color-border:        #E2E8F0;
  --color-border-light:  #F1F5F9;

  /* Typography */
  --font-sans:  'Plus Jakarta Sans', 'Noto Sans', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;
  --font-display: 'Sora', 'Plus Jakarta Sans', sans-serif;

  /* Sizing */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md:  0 4px 16px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.05);
  --shadow-lg:  0 10px 40px rgba(15,23,42,.12), 0 4px 12px rgba(15,23,42,.07);

  --container:  1200px;
  --sidebar-w:  300px;
  --gap:        28px;
  --transition: .2s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }
ul, ol { padding-left: 1.5rem; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; padding: 3px 10px;
  border-radius: var(--radius-full);
}
.badge-blue  { background: #DBEAFE; color: var(--color-primary); }
.badge-cyan  { background: #CFFAFE; color: #0E7490; }
.badge-green { background: #DCFCE7; color: #15803D; }
.badge-orange{ background: #FED7AA; color: #C2410C; }
.badge-slate { background: var(--color-slate-100); color: var(--color-slate-700); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: -.02em;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.view-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.view-all:hover { gap: 8px; }
.view-all::after { content: '→'; transition: margin var(--transition); }

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 0 rgba(15,23,42,.04);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 60px;
  gap: 0;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 32px;
  flex-shrink: 0;
}

.logo-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: #fff;
  font-family: var(--font-display);
  letter-spacing: -.03em;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: -.03em;
}
.logo-text span { color: var(--color-primary); }

/* Main Nav */
#main-nav {
  flex: 1;
  overflow: hidden;
}

.nav-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  align-items: stretch;
  height: 60px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }

.nav-list > li {
  position: relative;
  flex-shrink: 0;
}

.nav-list > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 60px;
  padding: 0 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-slate-700);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all var(--transition);
}

.nav-list > li > a:hover,
.nav-list > li.current-menu-item > a,
.nav-list > li.current-menu-ancestor > a {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background: #F8FAFF;
}

.nav-list > li > a .nav-arrow {
  font-size: 10px;
  opacity: .5;
  transition: transform var(--transition);
}
.nav-list > li:hover > a .nav-arrow { transform: rotate(180deg); }

/* Mega Menu */
.mega-menu {
  position: absolute;
  top: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 480px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: all var(--transition);
  pointer-events: none;
  z-index: 200;
}

.nav-list > li:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.mega-menu-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border-light);
}

.mega-menu-icon {
  font-size: 18px;
}

.mega-menu-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-navy);
}

.mega-menu-desc {
  font-size: 12px;
  color: var(--color-text-muted);
}

.mega-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.mega-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--color-slate-700);
  transition: all var(--transition);
  font-weight: 500;
}

.mega-link:hover {
  background: var(--color-slate-100);
  color: var(--color-primary);
}

.mega-link-icon {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--color-slate-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: background var(--transition);
}
.mega-link:hover .mega-link-icon { background: #DBEAFE; }

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 16px;
  flex-shrink: 0;
}

.btn-search {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 15px;
  color: var(--color-slate-500);
  transition: all var(--transition);
}
.btn-search:hover { background: var(--color-slate-100); color: var(--color-navy); }

/* Mobile menu toggle */
.btn-menu-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px;
  color: var(--color-slate-700);
}

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.6);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-box {
  width: 100%;
  max-width: 600px;
  margin: 0 24px;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--color-border);
}

.search-icon { font-size: 18px; color: var(--color-slate-400); flex-shrink: 0; }

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 18px 14px;
  font-size: 16px;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: transparent;
}

.search-input::placeholder { color: var(--color-slate-400); }

.search-close {
  font-size: 12px;
  color: var(--color-slate-400);
  cursor: pointer;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-slate-100);
}

.search-shortcuts {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-hint {
  font-size: 12px;
  color: var(--color-slate-400);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: linear-gradient(160deg, #0F172A 0%, #1D4ED8 50%, #0F172A 100%);
  position: relative;
  overflow: hidden;
  padding: 72px 0 80px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 40%, rgba(6,182,212,.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 20% 70%, rgba(29,78,216,.25) 0%, transparent 60%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-badge span { color: var(--color-accent); }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.15;
  letter-spacing: -.035em;
  margin-bottom: 20px;
}

.hero-title .highlight {
  background: linear-gradient(90deg, var(--color-accent), #60A5FA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 16px;
  color: rgba(255,255,255,.7);
  line-height: 1.75;
  margin-bottom: 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-search {
  display: flex;
  gap: 0;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-full);
  padding: 5px 5px 5px 20px;
  max-width: 480px;
  margin: 0 auto 40px;
  backdrop-filter: blur(8px);
}

.hero-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--color-white);
  font-family: var(--font-sans);
}
.hero-search-input::placeholder { color: rgba(255,255,255,.45); }

.hero-search-btn {
  background: var(--color-white);
  color: var(--color-primary);
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
  white-space: nowrap;
}
.hero-search-btn:hover { background: var(--color-accent); color: var(--color-white); }

.hero-cats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-cat {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,.8);
  transition: all var(--transition);
}
.hero-cat:hover {
  background: rgba(255,255,255,.15);
  color: var(--color-white);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.site-main {
  padding: 48px 0 80px;
}

.main-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--gap);
  align-items: start;
}

/* ============================================================
   ARTICLE CARDS
   ============================================================ */
.post-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-slate-300);
  transform: translateY(-2px);
}

.post-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-slate-100);
  position: relative;
}

.post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.04); }

.post-card-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  background: linear-gradient(135deg, var(--color-slate-100) 0%, var(--color-border) 100%);
}

.post-card-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.post-card-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.post-card-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--color-slate-300);
}

.post-card-date {
  font-size: 11.5px;
  color: var(--color-text-light);
}

.post-card-read {
  font-size: 11.5px;
  color: var(--color-text-light);
  margin-left: auto;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.45;
  letter-spacing: -.01em;
  margin-bottom: 8px;
  transition: color var(--transition);
  flex: 1;
}
.post-card:hover .post-card-title { color: var(--color-primary); }

.post-card-excerpt {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
  margin-top: auto;
}

.post-card-author {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.post-card-author img {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.post-card-author-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

.post-card-read-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-card-read-link:hover { gap: 8px; }

/* Card Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.posts-grid.three-col {
  grid-template-columns: repeat(3, 1fr);
}

/* Featured card - full width */
.post-card-featured {
  flex-direction: row;
  grid-column: 1 / -1;
}

.post-card-featured .post-card-thumb {
  width: 340px;
  flex-shrink: 0;
  aspect-ratio: unset;
}

.post-card-featured .post-card-title {
  font-size: 20px;
}

.post-card-featured .post-card-excerpt {
  -webkit-line-clamp: 3;
}

/* ============================================================
   CONTENT SECTIONS
   ============================================================ */
.content-section {
  margin-bottom: 48px;
}

/* ============================================================
   ADSENSE SLOTS
   ============================================================ */
.adsense-slot {
  background: var(--color-slate-100);
  border: 1px dashed var(--color-slate-300);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: .02em;
  text-align: center;
  gap: 4px;
  padding: 10px;
  overflow: hidden;
}

.adsense-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-slate-400);
}

/* Responsive AdSense unit sizes */
.ad-leaderboard { min-height: 90px; }   /* 728x90 */
.ad-rectangle  { min-height: 250px; }   /* 300x250 */
.ad-large-rect { min-height: 280px; }   /* 336x280 */
.ad-in-article { min-height: 100px; margin: 28px 0; } /* responsive */

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-widget {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.widget-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border-light);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 7px;
}

.widget-header-icon { font-size: 14px; }

/* Categories widget */
.cat-list { list-style: none; padding: 8px 0; }
.cat-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 18px;
  font-size: 13px;
  color: var(--color-slate-700);
  font-weight: 500;
  transition: all var(--transition);
}
.cat-list li a:hover {
  background: var(--color-slate-100);
  color: var(--color-primary);
  padding-left: 22px;
}
.cat-count {
  font-size: 11px;
  background: var(--color-slate-100);
  color: var(--color-slate-500);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* Popular posts widget */
.popular-posts { padding: 4px 0; }
.popular-post {
  display: flex;
  gap: 12px;
  padding: 10px 18px;
  align-items: flex-start;
  transition: background var(--transition);
  text-decoration: none;
}
.popular-post:hover { background: var(--color-slate-100); }
.popular-num {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--color-border);
  line-height: 1.2;
  min-width: 22px;
  transition: color var(--transition);
}
.popular-post:hover .popular-num { color: var(--color-primary); }
.popular-post-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-slate-700);
  line-height: 1.5;
}
.popular-post-meta {
  font-size: 11px;
  color: var(--color-text-light);
  margin-top: 2px;
}

/* Tags widget */
.tags-cloud {
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-item {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-slate-700);
  background: var(--color-slate-100);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  transition: all var(--transition);
}
.tag-item:hover {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* ============================================================
   CATEGORY ARCHIVE PAGE
   ============================================================ */
.category-hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-primary-dark) 100%);
  padding: 40px 0;
  margin-bottom: 40px;
}

.category-hero-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.category-hero-icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.category-hero-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--color-white);
  letter-spacing: -.03em;
  margin-bottom: 6px;
}

.category-hero-desc {
  font-size: 14px;
  color: rgba(255,255,255,.65);
  line-height: 1.6;
}

.category-hero-count {
  margin-left: auto;
  text-align: center;
  flex-shrink: 0;
}

.count-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--color-white);
  line-height: 1;
}

.count-label {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Subcategory filter tabs */
.subcat-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.subcat-btn {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-slate-700);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.subcat-btn:hover,
.subcat-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--gap);
  align-items: start;
}

.post-header {
  margin-bottom: 28px;
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.post-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1.25;
  letter-spacing: -.035em;
  margin-bottom: 16px;
}

.post-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-slate-100);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.byline-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: #fff;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.byline-info { flex: 1; }
.byline-name { font-size: 13px; font-weight: 700; color: var(--color-navy); }
.byline-meta { font-size: 12px; color: var(--color-text-light); }

.byline-share {
  display: flex;
  gap: 6px;
}

.share-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  cursor: pointer;
  text-decoration: none;
  color: var(--color-slate-600);
  transition: all var(--transition);
}
.share-btn:hover { background: var(--color-primary); color: var(--color-white); border-color: var(--color-primary); }

/* Featured image */
.post-feat-img {
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 32px;
  aspect-ratio: 16/8;
}
.post-feat-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Post content */
.post-content {
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--color-slate-700);
}

.post-content h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -.025em;
  margin: 36px 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border-light);
}

.post-content h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: -.02em;
  margin: 28px 0 12px;
}

.post-content h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-slate-800);
  margin: 22px 0 8px;
}

.post-content p { margin-bottom: 20px; }

.post-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content ul, .post-content ol {
  margin-bottom: 20px;
}

.post-content li { margin-bottom: 6px; }

.post-content img {
  border-radius: var(--radius-lg);
  margin: 8px 0 20px;
}

.post-content blockquote {
  border-left: 3px solid var(--color-primary);
  margin: 28px 0;
  padding: 16px 20px;
  background: #F0F7FF;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-slate-600);
}

.post-content pre {
  background: var(--color-navy);
  color: #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  margin: 20px 0;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--color-slate-100);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--color-primary-dark);
}

.post-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Table of contents */
.toc-box {
  background: var(--color-slate-100);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin: 28px 0;
}

.toc-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.toc-list {
  list-style: none;
  padding: 0;
  counter-reset: toc;
}

.toc-list li {
  counter-increment: toc;
  margin-bottom: 6px;
}

.toc-list li a {
  font-size: 13px;
  color: var(--color-slate-700);
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.toc-list li a:hover { color: var(--color-primary); }
.toc-list li a::before {
  content: counter(toc) ".";
  font-size: 11px;
  font-weight: 700;
  color: var(--color-slate-400);
  min-width: 18px;
}

/* Info/warning boxes */
.info-box {
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin: 24px 0;
  display: flex;
  gap: 12px;
}

.info-box-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.info-box-content { flex: 1; }
.info-box-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.info-box-text { font-size: 13px; line-height: 1.65; }

.info-box.info    { background: #EFF6FF; border-left: 3px solid var(--color-primary); }
.info-box.warning { background: #FFFBEB; border-left: 3px solid #F59E0B; }
.info-box.success { background: #F0FDF4; border-left: 3px solid #22C55E; }
.info-box.tip     { background: #FDF4FF; border-left: 3px solid #A855F7; }

/* Post tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 32px 0;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

/* Related posts */
.related-posts { margin-top: 48px; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
}

.page-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-slate-700);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.page-btn:hover { background: var(--color-slate-100); }
.page-btn.active { background: var(--color-primary); color: var(--color-white); border-color: var(--color-primary); }
.page-btn.prev, .page-btn.next { width: auto; padding: 0 14px; gap: 6px; }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--color-navy);
  color: rgba(255,255,255,.7);
  padding: 56px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand .logo-mark { margin-bottom: 14px; }

.footer-tagline {
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(255,255,255,.5);
  margin-bottom: 20px;
  max-width: 260px;
}

.footer-social {
  display: flex;
  gap: 8px;
}

.social-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  color: rgba(255,255,255,.6);
  transition: all var(--transition);
  text-decoration: none;
}
.social-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--color-white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 12.5px;
  color: rgba(255,255,255,.35);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  font-size: 12.5px;
  color: rgba(255,255,255,.35);
  transition: color var(--transition);
}
.footer-legal a:hover { color: rgba(255,255,255,.7); }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--color-text-light);
  margin-bottom: 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.breadcrumb a { color: var(--color-text-light); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb-sep { color: var(--color-slate-300); }
.breadcrumb-current { color: var(--color-slate-600); font-weight: 500; }

/* ============================================================
   BACK TO TOP
   ============================================================ */
#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--transition);
  z-index: 300;
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#back-to-top:hover { background: var(--color-primary-dark); transform: translateY(-2px); }

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  z-index: 999;
  width: 0%;
  transition: width .1s linear;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .main-layout, .single-layout {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; }
  .posts-grid.three-col { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .post-card-featured { flex-direction: column; }
  .post-card-featured .post-card-thumb { width: 100%; aspect-ratio: 16/9; }
}

@media (max-width: 768px) {
  :root { --gap: 20px; }

  .nav-list > li > a { padding: 0 10px; font-size: 13px; }
  .logo-text { display: none; }

  .hero { padding: 48px 0 56px; }
  .hero-search { display: none; }

  .posts-grid, .posts-grid.three-col { grid-template-columns: 1fr; }
  .post-card-featured { grid-column: 1; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  .btn-menu-toggle { display: flex; }

  .category-hero-inner { flex-wrap: wrap; }
  .category-hero-count { margin-left: 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-cats { gap: 6px; }
  .hero-cat { font-size: 11px; padding: 5px 10px; }
}
