:root {
  --primary: #6D28D9;
  --primary-dark: #5B21B6;
  --secondary: #7C3AED;
  --accent: #A855F7;
  --accent-soft: #EDE9FE;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --text: #111827;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 4px 16px rgba(109, 40, 217, 0.08);
  --shadow-lg: 0 12px 40px rgba(109, 40, 217, 0.12);
  --radius: 12px;
  --radius-lg: 16px;
  --font: Inter, system-ui, -apple-system, sans-serif;
  --font-display: Poppins, Inter, system-ui, sans-serif;
  --wrap: 1200px;
  --header-h: 72px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--secondary); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 0.75rem;
}
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1rem; }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.hidden { display: none !important; }
.meta { color: var(--text-muted); font-size: 0.9375rem; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

.site-nav-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.site-nav-sticky.is-scrolled { box-shadow: var(--shadow-md); }
.site-header { height: var(--header-h); }
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  flex-shrink: 0;
}
.site-logo:hover { color: var(--text); }
.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 4px 12px rgba(109,40,217,0.35);
}
.logo-text { font-family: var(--font-display); font-size: 1.125rem; }
.logo-accent { color: var(--primary); }
.logo-tagline {
  display: none;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.top-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.top-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9375rem;
}
.top-nav a:hover, .top-nav a.active {
  color: var(--primary);
  background: var(--accent-soft);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.icon-btn:hover {
  color: var(--primary);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border: none;
  background: none;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.search-overlay[hidden] { display: none; }
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}
.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17,24,39,0.45);
  backdrop-filter: blur(4px);
}
.search-overlay-panel {
  position: relative;
  width: min(92%, 640px);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
}
.search-overlay-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.search-overlay-form input {
  flex: 1;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
}
.search-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 14px rgba(109,40,217,0.35);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(109,40,217,0.45);
}
.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.875rem; }
.btn-card {
  padding: 0.5rem 0;
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9375rem;
}

.hero-home {
  background: linear-gradient(135deg, #6D28D9 0%, #7C3AED 50%, #A855F7 100%);
  color: #fff;
  padding: clamp(3rem, 8vw, 5rem) 0;
  overflow: hidden;
}
.hero-home-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-home .hero-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.75rem;
}
.hero-home h1 { color: #fff; margin-bottom: 1rem; }
.hero-home .hero-sub { color: rgba(255,255,255,0.88); font-size: 1.125rem; max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }
.hero-home .btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.25);
}
.hero-home .btn-secondary:hover { background: rgba(255,255,255,0.2); color: #fff; }
.hero-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.hero-stat-pill {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  backdrop-filter: blur(8px);
}
.hero-stat-pill strong { display: block; font-size: 1.25rem; color: #fff; }
.hero-stat-pill span { font-size: 0.8125rem; opacity: 0.85; }
.hero-visual-frame { position: relative; }
.hero-board-svg { width: 100%; max-width: 280px; margin: 0 auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.2)); }
.hero-float-stack { position: absolute; inset: 0; pointer-events: none; }
.hero-float-card {
  position: absolute;
  background: rgba(255,255,255,0.95);
  color: var(--text);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.8125rem;
  animation: float 4s ease-in-out infinite;
}
.hero-float-card-a { top: 8%; right: 0; animation-delay: 0s; }
.hero-float-card-b { bottom: 30%; left: -5%; animation-delay: 1s; }
.hero-float-card-c { bottom: 5%; right: 10%; animation-delay: 2s; }
.hero-float-label { display: block; color: var(--text-muted); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; }
.hero-float-card strong { font-size: 1rem; color: var(--primary); }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.category-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 45%, var(--accent) 100%);
  color: #fff;
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.category-banner-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}
.category-banner h1 { color: #fff; }
.category-banner .hero-sub { color: rgba(255,255,255,0.9); font-size: 1.0625rem; }
.category-banner .hero-eyebrow { opacity: 0.85; font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; }
.breadcrumb-light a { color: rgba(255,255,255,0.85); }
.breadcrumb-light a:hover { color: #fff; }
.breadcrumb-light li:not(:last-child)::after { color: rgba(255,255,255,0.5); }
.category-banner-visual {
  width: 180px;
  height: 180px;
  margin-left: auto;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
}
.category-banner-visual svg { width: 80px; height: 80px; color: #fff; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.badge-light {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}

.layout-with-sidebar {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  padding: 2rem 0 3rem;
  align-items: start;
}
.sidebar-categories {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}
.sidebar-categories-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.sidebar-title {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.sidebar-cat-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-cat-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all var(--transition);
}
.sidebar-cat-nav a:hover { background: var(--accent-soft); color: var(--primary); }
.sidebar-cat-nav a.is-active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 12px rgba(109,40,217,0.3);
}
.sidebar-cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.sidebar-cat-nav a.is-active .sidebar-cat-dot { background: #fff; }

.filters-sticky {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: rgba(248,250,252,0.95);
  backdrop-filter: blur(8px);
  padding: 1rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.filters-bar .search-panel {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0.65rem;
}
.filters-bar input, .filters-bar select {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9375rem;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}
.filter-meta { margin-top: 0.65rem; }

.section-premium, .portal-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.section-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 0.35rem;
}
.section-sub { color: var(--text-muted); max-width: 36rem; margin-top: 0.35rem; }

.grid-projects, .post-grid-4, .grid-compact {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.project-card-item, .modern-card, .post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.project-card-item:hover, .modern-card:hover, .post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
  color: var(--text);
}
.card-media, .post-thumb, .card-thumb {
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-soft), #F5F3FF);
}
.card-thumb svg, .post-thumb svg { width: 56px; height: 56px; color: var(--primary); }
.card-body { padding: 1.15rem; flex: 1; display: flex; flex-direction: column; }
.card-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.65rem; }
.card-body h3 { font-size: 1.0625rem; margin-bottom: 0.5rem; line-height: 1.35; }
.card-desc { color: var(--text-muted); font-size: 0.9375rem; margin-bottom: 0.75rem; flex: 1; }
.card-footer { margin-top: auto; }

.badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-cat { background: var(--accent-soft); color: var(--primary); }
.badge-beginner { background: #DCFCE7; color: #166534; }
.badge-intermediate { background: #FEF3C7; color: #92400E; }
.badge-advanced { background: #FEE2E2; color: #991B1B; }
.badge-time { background: #F3F4F6; color: var(--text-muted); }
.badge-featured { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }

.t-iot { background: linear-gradient(135deg, #EDE9FE, #DDD6FE); }
.t-home { background: linear-gradient(135deg, #FCE7F3, #FBCFE8); }
.t-cam { background: linear-gradient(135deg, #E0E7FF, #C7D2FE); }
.t-robot { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); }
.t-sensor { background: linear-gradient(135deg, #FEF3C7, #FDE68A); }
.t-ai { background: linear-gradient(135deg, #F3E8FF, #E9D5FF); }
.t-security { background: linear-gradient(135deg, #FEE2E2, #FECACA); }
.t-led { background: linear-gradient(135deg, #FFEDD5, #FED7AA); }
.t-agriculture { background: linear-gradient(135deg, #DCFCE7, #BBF7D0); }
.t-default { background: linear-gradient(135deg, var(--accent-soft), #F5F3FF); }

.guide-tracks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.guide-track-card, .guide-home-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  color: var(--text);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.guide-track-card:hover, .guide-home-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--text);
}
.guide-track-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.guide-home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.carousel-shell { overflow: hidden; }
.carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}
.carousel-card {
  flex: 0 0 min(300px, 85vw);
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  gap: 1rem;
  color: var(--text);
  transition: all var(--transition);
}
.carousel-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); color: var(--text); }
.carousel-card-thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.carousel-controls { display: flex; align-items: center; gap: 0.5rem; }
.carousel-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--primary);
}

.portal-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.tutorial-list { display: flex; flex-direction: column; gap: 0.5rem; }
.tutorial-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: all var(--transition);
}
.tutorial-row:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); color: var(--text); }
.tutorial-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tutorial-meta strong { display: block; font-size: 0.9375rem; }
.tutorial-cat { font-size: 0.8125rem; color: var(--text-muted); }
.tutorial-arrow { margin-left: auto; color: var(--primary); }
.pop-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}
.tech-cat-card, .pop-cat {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text);
  transition: all var(--transition);
}
.tech-cat-card:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--primary); }
.pop-cat-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }

.roadmap-track-premium { display: flex; flex-direction: column; gap: 0; }
.roadmap-node-premium {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.roadmap-num { font-family: var(--font-display); font-weight: 800; color: var(--primary); font-size: 1.25rem; }
.roadmap-connector-premium { width: 2px; height: 16px; background: var(--accent); margin-left: 1.75rem; }
.portal-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.portal-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.portal-stat strong { display: block; font-size: 1.5rem; color: var(--primary); font-family: var(--font-display); }
.why-grid-premium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.why-card-premium {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--transition);
}
.why-card-premium:hover { box-shadow: var(--shadow-md); border-color: var(--accent); }
.why-icon { font-size: 1.5rem; display: block; margin-bottom: 0.5rem; }

.community-panel {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.community-panel h2 { color: #fff; }
.community-lead { color: rgba(255,255,255,0.88); }
.community-panel-actions { margin-left: auto; display: flex; gap: 0.75rem; flex-wrap: wrap; }

.portal-cta, .portal-cta-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}
.portal-cta-inner { border: none; padding: 0; box-shadow: none; background: transparent; }

.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.85);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand strong { color: #fff; font-size: 1.125rem; font-family: var(--font-display); }
.footer-tagline { color: var(--accent); font-weight: 600; font-size: 0.875rem; margin: 0.35rem 0 0.75rem; }
.footer-brand p { font-size: 0.9375rem; line-height: 1.6; }
.footer-social { display: flex; gap: 0.65rem; margin-top: 1rem; }
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  transition: background var(--transition);
}
.footer-social a:hover { background: var(--primary); color: #fff; }
.footer-col h4 { color: #fff; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.footer-col a {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 0.9375rem;
  padding: 0.25rem 0;
}
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.25rem; font-size: 0.875rem; color: rgba(255,255,255,0.5); }

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; padding: 0; margin: 0 0 1rem; font-size: 0.875rem; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 0.35rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb [aria-current="page"] { color: var(--text); }

.article-shell {
  display: grid;
  grid-template-columns: 220px 1fr 240px;
  gap: 2rem;
  padding: 2rem 0 3rem;
  align-items: start;
}
.sidebar-left, .sidebar-right { position: sticky; top: calc(var(--header-h) + 1rem); }
.sidebar-sticky {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
}
.sidebar-sticky h3 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.65rem; }
.side-list { list-style: none; padding: 0; margin: 0; }
.side-list a {
  display: block;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  transition: all var(--transition);
}
.side-list a:hover, .side-list a.is-active { background: var(--accent-soft); color: var(--primary); }
.sidebar-divider { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

.article-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
}
.project-hero-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.project-hero-image {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-hero-image svg { width: 72px; height: 72px; color: var(--primary); }
.article-lead { font-size: 1.125rem; color: var(--text-muted); line-height: 1.6; }
.article-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.75rem 0; }

.difficulty-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.difficulty-tab {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--transition);
}
.difficulty-switcher #level-radio-beginner:checked ~ .difficulty-tabs label[for="level-radio-beginner"],
.difficulty-switcher #level-radio-intermediate:checked ~ .difficulty-tabs label[for="level-radio-intermediate"],
.difficulty-switcher #level-radio-advanced:checked ~ .difficulty-tabs label[for="level-radio-advanced"] {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-color: transparent;
}

.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.65rem;
  overflow: hidden;
}
.accordion-header {
  padding: 0.85rem 1rem;
  font-weight: 600;
  background: var(--bg);
  cursor: pointer;
}
.accordion-content { padding: 1rem; }
.wiring-table-wrap { overflow-x: auto; }
.wiring-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.wiring-table th, .wiring-table td { padding: 0.65rem; border: 1px solid var(--border); text-align: left; }
.wiring-table th { background: var(--accent-soft); color: var(--primary); }

.code-block {
  background: #1E1B4B;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0.75rem 0;
}
.code-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.85rem;
  background: #312E81;
  color: rgba(255,255,255,0.8);
  font-size: 0.8125rem;
}
.copy-btn {
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #fff;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8125rem;
}
.level-code, pre {
  padding: 1rem;
  margin: 0;
  overflow-x: auto;
  color: #E9D5FF;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  border: none;
  background: none;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9375rem;
}
.faq-a { display: none; padding-bottom: 0.85rem; color: var(--text-muted); }
.faq-item.is-open .faq-a { display: block; }
.faq-item.is-open .plus { transform: rotate(45deg); }

.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.related-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: all var(--transition);
}
.related-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); color: var(--text); }
.related-thumb { width: 48px; height: 48px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.guide-page, .static-page, .guide-index-page { padding: 2rem 0 3rem; }
.guide-index-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.guide-index-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  color: var(--text);
  transition: all var(--transition);
}
.guide-index-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); color: var(--text); }

.promo-box { background: linear-gradient(135deg, var(--accent-soft), #F5F3FF); border-radius: var(--radius); padding: 1rem; }
.promo-box strong { color: var(--primary); }

.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1.5rem 0; }
.pagination-current { font-weight: 700; color: var(--primary); }
.filter-hidden, .page-hidden { display: none !important; }
.section-actions { text-align: center; padding: 1rem 0; }

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  padding: 1rem;
}
.cookie-consent-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: var(--wrap);
  margin: 0 auto;
}
.cookie-actions { display: flex; gap: 0.5rem; }

.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 90;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }

.mobile-section-nav { display: none; margin-bottom: 1rem; }
.mobile-nav-select { width: 100%; padding: 0.65rem; border-radius: 8px; border: 1px solid var(--border); }

@media (max-width: 1024px) {
  .grid-projects, .post-grid-4, .guide-tracks-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-home-inner, .category-banner-inner { grid-template-columns: 1fr; }
  .category-banner-visual { margin: 0 auto; }
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .sidebar-categories { position: static; }
  .article-shell { grid-template-columns: 1fr; }
  .sidebar-left, .sidebar-right { position: static; }
  .why-grid-premium { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .filters-bar .search-panel { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .logo-tagline { display: none; }
  .nav-toggle { display: flex; }
  .top-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
  }
  .top-nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .header-actions { margin-left: 0; }
  .header-inner { flex-wrap: wrap; }
  .grid-projects, .guide-home-grid, .guide-index-grid, .portal-duo, .why-grid-premium { grid-template-columns: 1fr; }
  .guide-tracks-grid { grid-template-columns: 1fr; }
  .project-hero-banner { grid-template-columns: 1fr; }
  .project-hero-image { width: 100%; height: 120px; }
  .footer-grid { grid-template-columns: 1fr; }
  .mobile-section-nav { display: block; }
  .sidebar-left { display: none; }
  .filters-bar .search-panel { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  .logo-tagline { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
