/**
 * ============================================
 * NINE LIVES, ZERO TRUST - Main Stylesheet
 * ============================================
 *
 * Author: Jerrad Dahlager
 * Site: https://nine-lives-zero-trust.pages.dev
 *
 * A dark-first theme with amber/gold accents.
 * Supports automatic light/dark theme switching.
 *
 * COLOR PALETTE:
 * - Accent: #f59e0b (amber) / #d97706 (dark amber)
 * - Dark BG: #0a0a0b, #111113, #16161a
 * - Light BG: #fafafa, #f0f0f0, #ffffff
 *
 * FONTS (loaded via HTML <link> tags):
 * - Display: Outfit (with system-ui fallback stack)
 * - Mono: JetBrains Mono (for code blocks)
 *
 * ============================================
 * TABLE OF CONTENTS (Ctrl+F to jump)
 * ============================================
 *
 * FOUNDATION
 *   Line 100   Theme Variables
 *   Line 147   Performance Optimizations
 *   Line 276   Matrix Background
 *
 * LAYOUT
 *   Line 931   Header
 *   Line 1011  Hero
 *   Line 1072  Buttons
 *   Line 1095  Sections & Cards
 *   Line 1130  Page Layouts
 *   Line 1291  Footer
 *
 * COMPONENTS
 *   Line 299   Theme Toggle
 *   Line 326   Command Palette
 *   Line 494   Reading Progress & Time Float
 *   Line 549   Newsletter Signup
 *   Line 624   Widgets Row
 *   Line 702   Ask The Cat Widget
 *   Line 842   Zero Trust Diagram
 *   Line 895   Back To Top
 *   Line 1430  Table of Contents
 *   Line 1556  Mobile TOC
 *   Line 1647  Series Navigation
 *   Line 1748  Related Posts
 *   Line 1818  Comments Section
 *   Line 1849  Keyboard Shortcuts
 *   Line 2476  Reading List
 *   Line 2560  Post Reactions
 *   Line 2605  Coffee Cups
 *   Line 2906  Toast Notifications
 *
 * PAGES
 *   Line 1159  Error Page
 *   Line 1173  Single Post
 *   Line 1205  Contact & Certs
 *   Line 2047  Glossary Page
 *   Line 2942  Threat Feeds
 *   Line 3610  Homepage Widget
 *
 * EFFECTS & EASTER EGGS
 *   Line 458   Konami Overlay
 *   Line 1984  Cat Burglar Mode
 *   Line 2177  Animated Links
 *   Line 2201  Scroll Animations
 *   Line 2379  Gradient Hero
 *   Line 2419  3D Tilt Cards
 *   Line 2439  Magnetic Buttons
 *   Line 2447  Cursor Trail
 *   Line 2630  Glitch Text
 *   Line 2679  Decrypt Animation
 *   Line 2703  Verified Badge
 *   Line 2724  Threat Level
 *   Line 2799  View Transitions
 *
 * UTILITIES & RESPONSIVE
 *   Line 2122  Browser Fallbacks
 *   Line 2148  Custom Scrollbar
 *   Line 2337  Focus States
 *   Line 2811  Print Styles
 *   Line 1303  Responsive (768px, 480px)
 *
 * ============================================
 */

/* Google Fonts loaded via <link> tag in HTML head to avoid CORS issues with Cloudflare */

/* ============================================
   THEME VARIABLES
   ============================================ */
:root, [data-theme="dark"] {
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-card: #16161a;
  --bg-card-hover: #1c1c21;
  --text-primary: #ececf1;
  --text-secondary: #a0a0a8;
  --text-muted: #6b6b73;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-glow: rgba(245, 158, 11, 0.15);
  --accent-rgb: 245, 158, 11;
  --cursor-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cellipse cx='7' cy='18' rx='2.8' ry='2.2' fill='%23fbbf24'/%3E%3Ccircle cx='4.5' cy='14' r='1.4' fill='%23fbbf24'/%3E%3Ccircle cx='6.5' cy='12.5' r='1.2' fill='%23fbbf24'/%3E%3Ccircle cx='8.5' cy='12.5' r='1.2' fill='%23fbbf24'/%3E%3Ccircle cx='10' cy='14' r='1.4' fill='%23fbbf24'/%3E%3Cellipse cx='17' cy='9' rx='2.8' ry='2.2' fill='%23fbbf24'/%3E%3Ccircle cx='14.5' cy='5' r='1.4' fill='%23fbbf24'/%3E%3Ccircle cx='16.5' cy='3.5' r='1.2' fill='%23fbbf24'/%3E%3Ccircle cx='18.5' cy='3.5' r='1.2' fill='%23fbbf24'/%3E%3Ccircle cx='20' cy='5' r='1.4' fill='%23fbbf24'/%3E%3C/svg%3E") 12 12, pointer;
  --border: #2a2a2e;
  --border-light: #3a3a3e;
  --header-bg: rgba(10, 10, 11, 0.85);
  /* Fix #10: Added intermediate font fallbacks for better degradation */
  --font-display: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
  --container-width: 1200px;
  --section-padding: 6rem;
}

html[data-theme="light"] {
  --bg-primary: #fafafa;
  --bg-secondary: #f0f0f0;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f5f5;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #7a7a7a;
  --accent: #d97706;
  --accent-hover: #b45309;
  --accent-glow: rgba(217, 119, 6, 0.12);
  --accent-rgb: 217, 119, 6;
  --cursor-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cellipse cx='7' cy='18' rx='2.8' ry='2.2' fill='%23d97706'/%3E%3Ccircle cx='4.5' cy='14' r='1.4' fill='%23d97706'/%3E%3Ccircle cx='6.5' cy='12.5' r='1.2' fill='%23d97706'/%3E%3Ccircle cx='8.5' cy='12.5' r='1.2' fill='%23d97706'/%3E%3Ccircle cx='10' cy='14' r='1.4' fill='%23d97706'/%3E%3Cellipse cx='17' cy='9' rx='2.8' ry='2.2' fill='%23d97706'/%3E%3Ccircle cx='14.5' cy='5' r='1.4' fill='%23d97706'/%3E%3Ccircle cx='16.5' cy='3.5' r='1.2' fill='%23d97706'/%3E%3Ccircle cx='18.5' cy='3.5' r='1.2' fill='%23d97706'/%3E%3Ccircle cx='20' cy='5' r='1.4' fill='%23d97706'/%3E%3C/svg%3E") 12 12, pointer;
  --border: #e0e0e0;
  --border-light: #d0d0d0;
  --header-bg: rgba(250, 250, 250, 0.9);
}

html[data-theme="light"] .cyber-cat { filter: drop-shadow(0 20px 40px rgba(var(--accent-rgb), 0.25)); }
html.can-hover[data-theme="light"] .cyber-cat:hover,
html[data-theme="light"] .cyber-cat.mobile-glow { filter: drop-shadow(0 0 40px rgba(var(--accent-rgb), 0.7)) drop-shadow(0 0 80px rgba(var(--accent-rgb), 0.4)); }
html[data-theme="light"] .post-card:hover { box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); }
html[data-theme="light"] .matrix-background { opacity: 0.55; }

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

/* Form elements don't inherit font by default - this fixes theme picker fonts */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

html { scroll-behavior: smooth; }

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
/* Reduce repaints for fixed/sticky elements */
.site-header,
.back-to-top,
.theme-toggle,
.command-palette,
.command-palette-overlay {
  will-change: transform;
  contain: layout style;
}

/* Content containment for heavy sections */
.post-card,
.glossary-item,
.widget {
  contain: layout style paint;
}

/* GPU acceleration hint for animations */
.fade-in-up,
.fade-in-left,
.fade-in-right,
.stagger-children > * {
  will-change: opacity, transform;
}

/* Remove will-change after animation completes for memory */
.fade-in-up.visible,
.fade-in-left.visible,
.fade-in-right.visible {
  will-change: auto;
}

/* GPU layer promotion for filter animations (mobile performance) */
.cyber-cat,
.logo-cat,
.newsletter-cat-icon {
  will-change: filter;
  transform: translateZ(0); /* Force GPU layer */
}

/* Ensure logo cat is tappable on iOS Safari */
.logo-cat {
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Matrix canvas isolation and GPU hints */
.matrix-background {
  contain: strict;
  will-change: contents;
}

/* Reduced motion: disable animations for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .cyber-cat {
    animation: none !important;
  }
  .matrix-background {
    display: none !important;
  }
  .fade-in-up,
  .fade-in-left,
  .fade-in-right,
  .stagger-children > * {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

::selection { background: rgba(245, 158, 11, 0.3); color: var(--text-primary); }
::-moz-selection { background: rgba(245, 158, 11, 0.3); color: var(--text-primary); }

/* Accessibility: visually hidden but accessible to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip to content link - visible only on focus for keyboard users */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  padding: 1rem 2rem;
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 0;
  outline: 3px solid var(--text-primary);
  outline-offset: 2px;
}

body {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Only transition background, not color - color transitions cause weird
     intermediate colors when switching between themes with different palettes */
  transition: background-color 0.3s ease;
}

/* Custom Cursor - Paw prints using theme variable (consolidated from 11 duplicate rules) */
/* Applied to ALL interactive elements: links, buttons, form inputs, cards, navigation, etc. */
a, button, input, select, textarea,
.post-card, .contact-card, .cert-item,
[role="button"], .cyber-cat, .btn,
.nav-toggle, .nav-search-btn, .command-item,
.logo-cat, kbd, .share-btn, .toc-nav a,
.related-card, .copy-link-btn, label[for],
.hero-mascot, .newsletter-section, .newsletter-cat-icon,
.newsletter-form, .social-links a,
.theme-toggle, .back-to-top, .zt-layer,
.ask-cat-btn, .ask-cat-close, .copy-btn,
.shortcuts-close, .glossary-item, .theme-card {
  cursor: var(--cursor-paw);
}

body.meow-mode * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ctext y='24' font-size='24'%3E😺%3C/text%3E%3C/svg%3E") 16 16, auto !important;
}

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 2rem; }

/* ============================================
   MATRIX BACKGROUND - CRITICAL FIX
   ============================================ */
.matrix-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  /* Safari-specific rendering fixes */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  /* Improve canvas rendering performance */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* ============================================
   THEME TOGGLE (in header)
   ============================================ */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  color: var(--text-secondary);
  /* Only transition hover effects, not theme color changes */
  transition: border-color 0.2s ease, background 0.2s ease;
  /* cursor handled by global paw print cursor rule */
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }
[data-theme="light"] .theme-toggle .sun-icon { display: block; }
[data-theme="light"] .theme-toggle .moon-icon { display: none; }

/* ============================================
   COMMAND PALETTE
   ============================================ */
.command-palette-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.command-palette-overlay.active { opacity: 1; visibility: visible; }

.command-palette {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  width: 90%;
  max-width: 600px;
  max-height: 70vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  z-index: 201;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.command-palette.active { opacity: 1; visibility: visible; transform: translateX(-50%) scale(1); }

.command-palette-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.command-palette-header svg { color: var(--text-muted); flex-shrink: 0; }

.command-palette-header input {
  flex: 1;
  background: none;
  border: none;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
}

.command-palette-header input::placeholder { color: var(--text-muted); }

.command-palette-header kbd, .command-palette-footer kbd {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.command-palette-results { flex: 1; overflow-y: auto; padding: 0.5rem; }
.command-group { margin-bottom: 0.5rem; }

.command-group-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
}

.command-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  background: none;
  border: none;
  width: 100%;
  font-family: var(--font-display);
  font-size: 0.95rem;
  /* cursor handled by global paw print cursor rule */
  transition: background 0.15s ease;
}

/* Only apply hover on devices that support it (not touch) */
.can-hover .command-item:hover { background: var(--accent-glow); }
.command-item.selected { background: var(--accent-glow); outline: 1px solid var(--accent); }
.command-icon { font-size: 1.1rem; }
.command-text { flex: 1; text-align: left; }
.command-meta { font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); }

.command-palette-tip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--accent-glow);
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.command-palette-tip .tip-icon { font-size: 0.9rem; }
.command-palette-tip strong { color: var(--accent); }

.command-palette-footer {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================
   KONAMI OVERLAY
   ============================================ */
.konami-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(135deg, rgba(10, 10, 11, 0.98), rgba(245, 158, 11, 0.1));
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.konami-overlay.active { opacity: 1; visibility: visible; }
.konami-content { text-align: center; animation: konami-bounce 0.6s ease-out; }

@keyframes konami-bounce {
  0% { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  50% { transform: scale(1.1) rotate(5deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.konami-cat { font-size: 8rem; animation: konami-cat-dance 0.5s ease-in-out infinite alternate; }

@keyframes konami-cat-dance {
  from { transform: translateY(0) rotate(-5deg); }
  to { transform: translateY(-20px) rotate(5deg); }
}

.konami-content h2 { font-size: 2.5rem; color: var(--accent); margin: 1rem 0; text-shadow: 0 0 30px rgba(245, 158, 11, 0.5); }
.konami-content p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 0.5rem; }
.konami-content .cat-fact { color: var(--text-primary); font-size: 1.2rem; font-style: italic; max-width: 500px; margin: 1rem auto 2rem; }

/* ============================================
   READING PROGRESS & TIME FLOAT
   ============================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  z-index: 1000;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px var(--accent);
}

.reading-time-float {
  position: fixed;
  top: 80px;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 98;
}

.reading-time-float.visible { opacity: 1; transform: translateY(0); }
.rtf-icon { font-size: 1rem; }

/* Verified Badge */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.4rem 0.8rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #22c55e;
}

.verified-badge svg { color: #22c55e; }

/* ============================================
   NEWSLETTER SIGNUP
   ============================================ */
.newsletter-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.newsletter-section h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.newsletter-cat-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
  transition: filter 0.3s ease;
}

.newsletter-section h4:hover .newsletter-cat-icon {
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.9));
}

/* Theme-specific footer newsletter cat glow colors */
[data-theme="light"] .newsletter-cat-icon { filter: drop-shadow(0 0 8px rgba(217, 119, 6, 0.6)); }
[data-theme="light"] .newsletter-section h4:hover .newsletter-cat-icon { filter: drop-shadow(0 0 12px rgba(217, 119, 6, 0.9)); }

[data-theme="cyberpunk"] .newsletter-cat-icon { filter: drop-shadow(0 0 8px rgba(255, 45, 149, 0.6)); }
[data-theme="cyberpunk"] .newsletter-section h4:hover .newsletter-cat-icon { filter: drop-shadow(0 0 12px rgba(255, 45, 149, 0.9)); }

[data-theme="ocean"] .newsletter-cat-icon { filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.6)); }
[data-theme="ocean"] .newsletter-section h4:hover .newsletter-cat-icon { filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.9)); }

[data-theme="sunset"] .newsletter-cat-icon { filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.6)); }
[data-theme="sunset"] .newsletter-section h4:hover .newsletter-cat-icon { filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.9)); }

[data-theme="terminal"] .newsletter-cat-icon { filter: drop-shadow(0 0 8px rgba(51, 255, 51, 0.6)); }
[data-theme="terminal"] .newsletter-section h4:hover .newsletter-cat-icon { filter: drop-shadow(0 0 12px rgba(51, 255, 51, 0.9)); }

[data-theme="highcontrast"] .newsletter-cat-icon { filter: drop-shadow(0 0 8px rgba(255, 255, 0, 0.6)); }
[data-theme="highcontrast"] .newsletter-section h4:hover .newsletter-cat-icon { filter: drop-shadow(0 0 12px rgba(255, 255, 0, 0.9)); }

[data-theme="winter"] .newsletter-cat-icon { filter: drop-shadow(0 0 8px rgba(77, 208, 225, 0.6)); }
[data-theme="winter"] .newsletter-section h4:hover .newsletter-cat-icon { filter: drop-shadow(0 0 12px rgba(77, 208, 225, 0.9)); }

[data-theme="christmas"] .newsletter-cat-icon { filter: drop-shadow(0 0 8px rgba(198, 40, 40, 0.6)); }
[data-theme="christmas"] .newsletter-section h4:hover .newsletter-cat-icon { filter: drop-shadow(0 0 12px rgba(198, 40, 40, 0.9)); }

[data-theme="halloween"] .newsletter-cat-icon { filter: drop-shadow(0 0 8px rgba(255, 111, 0, 0.6)); }
[data-theme="halloween"] .newsletter-section h4:hover .newsletter-cat-icon { filter: drop-shadow(0 0 12px rgba(255, 111, 0, 0.9)); }

[data-theme="catburglar"] .newsletter-cat-icon { filter: drop-shadow(0 0 8px rgba(0, 255, 65, 0.6)); }
[data-theme="catburglar"] .newsletter-section h4:hover .newsletter-cat-icon { filter: drop-shadow(0 0 12px rgba(0, 255, 65, 0.9)); }

[data-theme="spring"] .newsletter-cat-icon { filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.6)); }
[data-theme="spring"] .newsletter-section h4:hover .newsletter-cat-icon { filter: drop-shadow(0 0 12px rgba(34, 197, 94, 0.9)); }

[data-theme="summer"] .newsletter-cat-icon { filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6)); }
[data-theme="summer"] .newsletter-section h4:hover .newsletter-cat-icon { filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.9)); }

[data-theme="fall"] .newsletter-cat-icon { filter: drop-shadow(0 0 8px rgba(220, 118, 51, 0.6)); }
[data-theme="fall"] .newsletter-section h4:hover .newsletter-cat-icon { filter: drop-shadow(0 0 12px rgba(220, 118, 51, 0.9)); }

[data-theme="easter"] .newsletter-cat-icon { filter: drop-shadow(0 0 8px rgba(232, 121, 169, 0.6)); }
[data-theme="easter"] .newsletter-section h4:hover .newsletter-cat-icon { filter: drop-shadow(0 0 12px rgba(232, 121, 169, 0.9)); }

[data-theme="synthwave"] .newsletter-cat-icon { filter: drop-shadow(0 0 8px rgba(255, 106, 213, 0.6)) drop-shadow(0 0 12px rgba(0, 255, 255, 0.3)); }
[data-theme="synthwave"] .newsletter-section h4:hover .newsletter-cat-icon { filter: drop-shadow(0 0 12px rgba(255, 106, 213, 0.9)) drop-shadow(0 0 16px rgba(0, 255, 255, 0.5)); }

.newsletter-section p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 450px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}

.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form input::placeholder { color: var(--text-muted); }

.newsletter-form button {
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: #0a0a0b;
  /* cursor handled by global paw print cursor rule */
  transition: all 0.2s ease;
}

.newsletter-form button:hover { background: var(--accent-hover); transform: translateY(-2px); }

/* ============================================
   WIDGETS ROW (About Page)
   ============================================ */
.widgets-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.widget-header svg { color: var(--accent); }
.widget-header h4 { font-size: 1rem; font-weight: 600; margin: 0; }

/* Fix #5: Removed empty .widget-content rule - add styles here if needed */
.widget-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.75rem; }

/* Security Badge */
.security-badge img {
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.security-badge:hover img { transform: scale(1.05); }

/* GitHub Widget */
.github-chart {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.github-stats {
  display: flex;
  gap: 1rem;
}

.github-stat {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.github-stat:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.stat-icon { font-size: 1.1rem; }

.github-profile-link {
  display: block;
  text-decoration: none;
}

/* ============================================
   ASK THE CAT WIDGET
   ============================================ */
.ask-cat-btn {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  font-size: 1.75rem;
  /* cursor handled by global paw print cursor rule */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: all 0.3s ease;
  z-index: 98;
}

.ask-cat-btn:hover { transform: scale(1.1); box-shadow: 0 8px 30px var(--accent-glow); }

.ask-cat-modal {
  position: fixed;
  bottom: 10rem;
  right: 2rem;
  width: 360px;
  max-height: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  z-index: 150;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s ease;
}

.ask-cat-modal.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.ask-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.ask-cat-header h4 { font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.ask-cat-close { background: none; border: none; color: var(--text-muted); font-size: 1.25rem; padding: 0.25rem; /* cursor: paw print */ }
.ask-cat-close:hover { color: var(--text-primary); }

.ask-cat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 200px;
  max-height: 300px;
}

.cat-message, .user-message {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cat-message { background: var(--accent-glow); align-self: flex-start; border-bottom-left-radius: 4px; }
.user-message { background: var(--bg-secondary); align-self: flex-end; border-bottom-right-radius: 4px; }

.cat-typing {
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem;
  background: var(--accent-glow);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.cat-typing span {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: typing-bounce 1.4s ease-in-out infinite;
}

.cat-typing span:nth-child(2) { animation-delay: 0.2s; }
.cat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
}

.ask-cat-input {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.ask-cat-input input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
}

.ask-cat-input input:focus { border-color: var(--accent); }
.ask-cat-input input::placeholder { color: var(--text-muted); }

.ask-cat-input button {
  padding: 0.75rem 1rem;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #0a0a0b;
  font-weight: 500;
  /* cursor handled by global paw print cursor rule */
  transition: background 0.2s ease;
}

.ask-cat-input button:hover { background: var(--accent-hover); }

/* ============================================
   ZERO TRUST DIAGRAM
   ============================================ */
.zt-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
}

.zt-diagram h3 { text-align: center; margin-bottom: 1.5rem; font-size: 1.25rem; }

.zt-layers {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.zt-layer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  /* cursor handled by global paw print cursor rule */
  transition: all 0.2s ease;
}

.zt-layer:hover { border-color: var(--accent); transform: translateX(4px); }
.zt-layer.active { border-color: var(--accent); background: var(--accent-glow); }

.zt-icon { font-size: 1.5rem; width: 40px; text-align: center; }
.zt-info { flex: 1; }
.zt-info strong { display: block; color: var(--text-primary); margin-bottom: 0.25rem; }
.zt-info span { font-size: 0.85rem; color: var(--text-muted); }

.zt-detail {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: none;
}

.zt-detail.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  /* cursor handled by global paw print cursor rule */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 99;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.back-to-top.visible { opacity: 0.5; visibility: visible; transform: translateY(0); }
.back-to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.3);
  opacity: 1;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

/* Desktop header: logo left, title centered, nav + actions right */
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1rem;
}

.site-logo { display: contents; text-decoration: none; color: var(--text-primary); }
.logo-icon { grid-column: 1; width: 48px; height: 48px; flex-shrink: 0; }
.logo-icon svg, .logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6)); transition: filter 0.3s ease; }
.site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.9)); }

/* Theme-specific header logo cat glow colors */
[data-theme="light"] .logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(217, 119, 6, 0.6)); }
[data-theme="light"] .site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(217, 119, 6, 0.9)); }

[data-theme="cyberpunk"] .logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(255, 45, 149, 0.6)); }
[data-theme="cyberpunk"] .site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(255, 45, 149, 0.9)); }

[data-theme="ocean"] .logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.6)) hue-rotate(180deg) saturate(1.2) brightness(1.05); }
[data-theme="ocean"] .site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.9)) hue-rotate(180deg) saturate(1.3) brightness(1.1); }

[data-theme="sunset"] .logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.6)); }
[data-theme="sunset"] .site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.9)); }

[data-theme="terminal"] .logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(51, 255, 51, 0.6)); }
[data-theme="terminal"] .site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(51, 255, 51, 0.9)); }

[data-theme="highcontrast"] .logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(255, 255, 0, 0.6)); }
[data-theme="highcontrast"] .site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(255, 255, 0, 0.9)); }

[data-theme="winter"] .logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(77, 208, 225, 0.6)) hue-rotate(180deg) saturate(1.1) brightness(1.1); }
[data-theme="winter"] .site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(77, 208, 225, 0.9)) hue-rotate(180deg) saturate(1.2) brightness(1.15); }

[data-theme="christmas"] .logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(198, 40, 40, 0.6)); }
[data-theme="christmas"] .site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(198, 40, 40, 0.9)); }

[data-theme="halloween"] .logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(255, 111, 0, 0.6)); }
[data-theme="halloween"] .site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(255, 111, 0, 0.9)); }

[data-theme="catburglar"] .logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(0, 255, 65, 0.6)); }
[data-theme="catburglar"] .site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(0, 255, 65, 0.9)); }

[data-theme="spring"] .logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.6)); }
[data-theme="spring"] .site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(34, 197, 94, 0.9)); }

[data-theme="summer"] .logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6)); }
[data-theme="summer"] .site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.9)); }

[data-theme="fall"] .logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(220, 118, 51, 0.6)); }
[data-theme="fall"] .site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(220, 118, 51, 0.9)); }

[data-theme="easter"] .logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(232, 121, 169, 0.6)); }
[data-theme="easter"] .site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(232, 121, 169, 0.9)); }

[data-theme="synthwave"] .logo-icon .logo-cat { filter: drop-shadow(0 0 8px rgba(255, 106, 213, 0.6)) drop-shadow(0 0 12px rgba(0, 255, 255, 0.3)) hue-rotate(-25deg) saturate(1.3); }
[data-theme="synthwave"] .site-logo:hover .logo-cat { filter: drop-shadow(0 0 12px rgba(255, 106, 213, 0.9)) drop-shadow(0 0 16px rgba(0, 255, 255, 0.5)) hue-rotate(-25deg) saturate(1.4); }

.logo-text { grid-column: 2; text-align: center; font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; }
.logo-text .accent { color: var(--accent); }

.main-nav { grid-column: 3; }
.header-actions { grid-column: 4; }
.main-nav ul { display: flex; align-items: center; gap: 2rem; list-style: none; }
.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}
.main-nav a:hover { color: var(--text-primary); }
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}
.main-nav a:hover::after { width: 100%; }

.nav-toggle { display: none; background: none; border: none; border-radius: 8px; color: var(--text-primary); padding: 0.5rem; transition: color 0.2s ease, background 0.2s ease; }
.nav-toggle:hover { color: var(--accent); background: var(--accent-glow); }
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header Actions (theme toggle + nav toggle container) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Nav Search Button */
.nav-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}
.nav-search-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* Nav utility icons container (theme picker + search) */
.nav-utility-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* RSS link in nav - hidden on desktop, visible in mobile menu */
.nav-rss-link {
  display: none;
}

.nav-rss-link a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav-rss-link a:hover {
  color: var(--accent);
}

.nav-rss-link svg {
  fill: currentColor;
}

/* ============================================
   HERO
   ============================================ */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 80px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; position: relative; z-index: 1; }
.hero-content { max-width: 600px; position: relative; z-index: 2; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent-glow);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 100px;
}

.hero h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 0.75rem; }
.hero h1 .highlight { color: var(--accent); }
.hero-tagline { font-family: var(--font-mono); font-size: 1.1rem; color: var(--accent); margin-bottom: 1.5rem; }
.hero-description { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 2.5rem; line-height: 1.6; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-mascot { position: relative; height: 650px; display: block; z-index: 2; }

/* Base state for theme animations - resets when switching themes */
/* Note: Don't set opacity here - themed animations control visibility via opacity or color alpha */
.hero-mascot::before {
  content: none;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 10;
  animation: none;
}

.cyber-cat {
  display: block;
  width: 100%;
  max-width: 620px;
  height: auto;
  margin: 40px auto 0;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(var(--accent-rgb), 0.25));
  /* cursor handled by global paw print cursor rule */
  transition: filter 0.3s ease;
}

@keyframes float { 0%, 100% { margin-top: 40px; } 50% { margin-top: 20px; } }
/* Hover glow - only on devices with hover capability to prevent stuck states on mobile */
.can-hover .cyber-cat:hover { filter: drop-shadow(0 0 40px rgba(var(--accent-rgb), 0.6)) drop-shadow(0 0 80px rgba(var(--accent-rgb), 0.4)) drop-shadow(0 20px 60px rgba(var(--accent-rgb), 0.3)); }
/* Mobile tap-to-toggle glow - JS adds/removes this class on tap */
.cyber-cat.mobile-glow { filter: drop-shadow(0 0 40px rgba(var(--accent-rgb), 0.6)) drop-shadow(0 0 80px rgba(var(--accent-rgb), 0.4)) drop-shadow(0 20px 60px rgba(var(--accent-rgb), 0.3)); }
.cyber-cat.activated { animation: float 6s ease-in-out infinite, glow-pulse 1s ease-in-out 3; }
@keyframes glow-pulse { 0%, 100% { filter: drop-shadow(0 20px 40px rgba(var(--accent-rgb), 0.2)); } 50% { filter: drop-shadow(0 0 80px rgba(var(--accent-rgb), 0.8)); } }

.easter-egg-msg {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 2rem 3rem;
  text-align: center;
  z-index: 1000;
  animation: pop-in 0.4s ease-out;
}
.easter-egg-msg h3 { font-size: 1.5rem; color: var(--accent); margin-bottom: 0.5rem; }
.easter-egg-msg p { color: var(--text-secondary); }
@keyframes pop-in { 0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  /* cursor: pointer; - removed to allow paw print cursor from line 99 */
  border: none;
}

.btn-primary { background: var(--accent); color: #0a0a0b; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--border-light); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================
   SECTIONS & CARDS
   ============================================ */
.section { padding: var(--section-padding) 0; position: relative; z-index: 1; background: var(--bg-primary); transition: background 0.3s ease; }
.section-flush-top { padding-top: 0; }
.section-header { margin-bottom: 3rem; }
.section-title { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.section-subtitle { color: var(--text-secondary); font-size: 1.1rem; }

.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover { background: var(--bg-card-hover); border-color: var(--border-light); transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); }

.post-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; font-size: 0.85rem; color: var(--text-muted); font-family: var(--font-mono); }
.post-category { color: var(--accent); background: var(--accent-glow); padding: 0.25rem 0.75rem; border-radius: 100px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.post-card h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; margin-bottom: 0.75rem; }
.post-card:hover h3 { color: var(--accent); }
.post-excerpt { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; flex-grow: 1; }
.post-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.read-time { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.post-footer .coffee-time { color: var(--accent); } /* Match accent color like post header */
.read-more { font-size: 0.9rem; color: var(--accent); }

/* ============================================
   PAGE LAYOUTS
   ============================================ */
.page-header { padding: calc(80px + 4rem) 0 3rem; border-bottom: 1px solid var(--border); margin-bottom: 3rem; text-align: center; }
.page-title { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.page-subtitle { color: var(--text-secondary); font-size: 1.15rem; max-width: 600px; margin: 0 auto; }

.content { max-width: 900px; }
.post-content.content { max-width: none; } /* Blog posts use grid layout instead */
.content h2 { font-size: 1.5rem; font-weight: 600; margin-top: 2.5rem; margin-bottom: 1rem; color: var(--text-primary); }
.content p { margin-bottom: 1.25rem; color: var(--text-secondary); }
.content a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s ease; }
.content a:hover { border-bottom-color: var(--accent); }
.content ul, .content ol { margin-bottom: 1.25rem; padding-left: 1.5rem; color: var(--text-secondary); }
.content li { margin-bottom: 0.5rem; }
.content code { font-family: var(--font-mono); font-size: 0.9em; background: var(--bg-card); padding: 0.2em 0.4em; border-radius: 4px; }
.content pre { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; overflow-x: auto; margin-bottom: 1.5rem; position: relative; }
.content pre code { background: none; padding: 0; }
.content blockquote { border-left: 3px solid var(--accent); padding-left: 1.25rem; margin: 1.5rem 0; color: var(--text-secondary); font-style: italic; }

/* Share Buttons */
.share-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.share-section h4 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; font-weight: 500; }
.share-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.share-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); text-decoration: none; font-family: var(--font-display); font-size: 0.85rem; font-weight: 500; transition: all 0.2s ease; /* cursor: paw print */ }
.share-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.share-btn svg { width: 16px; height: 16px; }
.share-btn.copied { background: #22c55e; border-color: #22c55e; color: white; }

/* ============================================
   ERROR PAGE & LIVES COUNTER
   ============================================ */
.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem; }
.error-content { max-width: 500px; }
.error-cat { width: 150px; height: 150px; margin: 0 auto 2rem; animation: float 4s ease-in-out infinite; }
.error-code { font-size: 8rem; font-weight: 700; line-height: 1; color: var(--accent); text-shadow: 0 0 60px rgba(245, 158, 11, 0.3); margin-bottom: 1rem; }
.error-title { font-size: 1.5rem; font-weight: 600; color: var(--text-primary); margin-bottom: 1rem; }
.error-description { color: var(--text-secondary); margin-bottom: 2.5rem; line-height: 1.6; }
.error-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.lives-counter { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.5rem; padding: 0.5rem 1rem; background: var(--accent-glow); border: 1px solid rgba(245, 158, 11, 0.3); border-radius: 100px; font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); }
.lives-counter .hearts { letter-spacing: 2px; }

/* ============================================
   SINGLE POST
   ============================================ */
.post-header { padding: calc(80px + 4rem) 0 2rem; }
.post-header .container { max-width: 720px; margin: 0 auto; text-align: center; position: relative; }
.post-header .post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  row-gap: 0.5rem;
  margin-bottom: 0;
  font-size: 0.9rem;
}
.post-header h1 { font-size: 2.25rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 1rem; }

/* Date - subtle muted color */
.post-header time { color: var(--text-muted); opacity: 0.7; }

/* Reading time - accent color to pop */
.post-header .coffee-time { color: var(--accent); }

/* Save button on its own line, centered below meta */
.post-header .bookmark-btn {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-top: 1rem;
}
.post-content { max-width: 720px; margin: 0 auto; padding-bottom: 4rem; }

/* ============================================
   CONTACT & CERTIFICATIONS
   ============================================ */
.contact-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.contact-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; text-decoration: none; color: inherit; transition: all 0.25s ease; }
.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.contact-card p { color: var(--text-secondary); font-size: 0.95rem; }
.contact-card .icon { width: 40px; height: 40px; background: var(--accent-glow); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; color: var(--accent); }

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-form {
  max-width: 600px;
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn-primary {
  margin-top: 0.5rem;
}

/* ============================================
   CERTIFICATIONS
   ============================================ */
.cert-list { display: flex; flex-direction: column; gap: 0.75rem; margin: 1.5rem 0; }
.cert-item { display: flex; justify-content: space-between; align-items: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem 1.5rem; text-decoration: none; transition: all 0.25s ease; }
.cert-item:hover { border-color: var(--accent); transform: translateX(4px); }
.cert-info { flex: 1; }
.cert-info strong { display: block; color: var(--text-primary); margin-bottom: 0.25rem; transition: color 0.2s ease; }
.cert-item:hover .cert-info strong { color: var(--accent); }
.cert-issuer { display: block; color: var(--text-secondary); font-size: 0.9rem; }
.cert-dates { display: block; color: var(--text-muted); font-size: 0.8rem; font-family: var(--font-mono); margin-top: 0.25rem; }
.cert-verify { color: var(--accent); font-size: 0.9rem; font-weight: 500; margin-left: 1.5rem; opacity: 0.7; transition: opacity 0.2s ease; }
.cert-item:hover .cert-verify { opacity: 1; }

/* Education List */
.edu-list { margin: 1.5rem 0; }
.edu-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem 1.5rem; margin-bottom: 0.75rem; }
.edu-item strong { display: block; color: var(--text-primary); margin-bottom: 0.25rem; }
.edu-school { display: block; color: var(--text-secondary); font-size: 0.9rem; }
.edu-date { display: block; color: var(--text-muted); font-size: 0.8rem; font-family: var(--font-mono); margin-top: 0.25rem; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer { border-top: 1px solid var(--border); padding: 3rem 0; margin-top: 4rem; position: relative; z-index: 1; background: var(--bg-primary); transition: background 0.3s ease; }
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.5rem; }
.footer-text { color: var(--text-muted); font-size: 0.9rem; }
.footer-text a { color: var(--text-secondary); text-decoration: none; }
.footer-text a:hover { color: var(--accent); }
.footer-text kbd { background: var(--bg-card); border: 1px solid var(--border); padding: 0.2rem 0.4rem; border-radius: 4px; font-size: 0.75rem; }
.footer-legal { font-size: 0.8rem; margin-top: 0.5rem; opacity: 0.8; }
.footer-legal a { color: var(--text-muted); }
.footer-legal a:hover { color: var(--accent); }
.social-links { display: flex; gap: 1rem; }
.social-links a { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); transition: all 0.2s ease; }
.social-links a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
  .hero-content { max-width: 100%; order: 2; }
  .hero-mascot { order: 1; height: 450px; }
  .cyber-cat { max-width: 400px; margin-top: 30px; }
  @keyframes float { 0%, 100% { margin-top: 30px; } 50% { margin-top: 15px; } }
  .hero-cta { justify-content: center; }
  .widgets-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --section-padding: 4rem; }

  /* Mobile header: logo left, title centered, actions right */
  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0;
  }
  .site-logo {
    display: contents; /* Let children participate in parent grid */
  }
  .logo-icon {
    grid-column: 1;
    width: 40px;
    height: 40px;
  }
  .logo-text {
    grid-column: 2;
    text-align: center;
    font-size: 1.1rem;
    margin-left: 0;
  }
  .header-actions {
    grid-column: 3;
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
  /* Hide dark/light toggle on mobile - theme picker has all themes */
  .theme-toggle {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .main-nav { position: fixed; top: 70px; left: 0; right: 0; z-index: 101; background: var(--header-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); padding: 1.5rem; display: none; }
  .main-nav.active { display: block; }
  .main-nav ul { flex-direction: column; gap: 1rem; }
  /* RSS link - show in mobile nav menu */
  .nav-rss-link {
    display: block;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
  }
  .nav-rss-link a {
    justify-content: center;
    font-size: 0.9rem;
  }
  /* Mobile nav utility icons - search button at bottom of nav menu */
  .nav-utility-icons {
    flex-direction: row;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
  }
  /* Theme picker in header on mobile - dropdown positioning */
  .header-actions .theme-picker-wrap {
    position: relative;
  }
  .header-actions .theme-picker-dropdown {
    position: fixed;
    top: 70px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-height: 60vh;
  }
  .header-actions .theme-picker-wrap.active .theme-picker-dropdown {
    transform: translateX(-50%);
  }
  /* Lock body scroll when theme picker dropdown is open on mobile */
  body.theme-picker-open {
    overflow: hidden;
    touch-action: none;
  }
  /* Lock body scroll when hamburger menu is open on mobile */
  body.mobile-nav-open {
    overflow: hidden;
    touch-action: none;
  }
  .hero h1 { font-size: 2.25rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .cert-item { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .cert-verify { margin-left: 0; }
  .hero-mascot { height: 380px; }
  .cyber-cat { max-width: 320px; margin-top: 20px; }
  @keyframes float { 0%, 100% { margin-top: 20px; } 50% { margin-top: 8px; } }
  
  /* ============================================
     MOBILE BACK-TO-TOP BUTTON
     ============================================
     Theme toggle moved to header - only back-to-top remains as floating button.
     ============================================ */
  .back-to-top {
    /* Use bottom positioning - standard mobile pattern */
    top: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
    right: 1rem;
    width: 44px;  /* Minimum recommended touch target size */
    height: 44px;
    opacity: 0.5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease, bottom 0.15s ease;
  }
  .back-to-top:hover, .back-to-top:active {
    opacity: 1;
  }
  .back-to-top.visible { opacity: 0.5; }
  .back-to-top.visible:hover, .back-to-top.visible:active { opacity: 1; }

  /* Hide back-to-top while actively scrolling */
  body.scroll-active .back-to-top.visible {
    opacity: 0;
    pointer-events: none;
  }

  .reading-time-float { display: none; }
  .ask-cat-btn { bottom: 5rem; right: 1.5rem; width: 50px; height: 50px; }
  .ask-cat-modal { right: 1rem; left: 1rem; width: auto; bottom: 8rem; }
  .error-code { font-size: 5rem; }
  .command-palette { top: 10%; max-height: 80vh; }
  .konami-cat { font-size: 5rem; }
  .konami-content h2 { font-size: 1.75rem; }
  .newsletter-form { flex-direction: column; }
  .github-stats { flex-direction: column; }
  .contact-form { max-width: 100%; }

  /* Blog post header mobile improvements */
  .post-header { padding: calc(70px + 2rem) 0 1.5rem; }
  .post-header .post-meta {
    gap: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  .post-header h1 { font-size: 1.75rem; }

  /* Center bookmark button below title on mobile */
  .post-header .bookmark-btn {
    position: static;
    transform: none;
    margin-top: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Extra small screens - Smaller back-to-top button */
@media (max-width: 480px) {
  .back-to-top {
    width: 36px;
    height: 36px;
    right: 1rem;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
  }
  .back-to-top.visible { opacity: 0.4; }
}

/* ============================================
   TABLE OF CONTENTS (Sticky Sidebar)
   ============================================ */
.post-container {
  display: grid;
  grid-template-columns: minmax(0, 850px) 240px;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  align-items: start;
  justify-content: center;
}

.post-body {
  grid-column: 1;
  min-width: 0; /* Prevent grid blowout with images */
}

.toc-sidebar {
  grid-column: 2;
  position: relative;
  height: fit-content;
}

.toc-wrapper {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.toc-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--accent);
  transition: all 0.2s ease;
}

.toc-toggle:hover {
  background: var(--bg-hover);
}

.toc-toggle .toc-icon-chevron {
  transition: transform 0.3s ease;
}

.toc-sidebar.collapsed .toc-toggle .toc-icon-chevron {
  transform: rotate(180deg);
}

.toc-content {
  padding: 0 1.25rem 1.25rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.toc-sidebar.collapsed .toc-content {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

.toc-sidebar.collapsed .toc-wrapper {
  width: auto;
}

.toc-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.toc-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-nav li { margin-bottom: 0.5rem; }

.toc-nav a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.35rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  transition: all 0.2s ease;
}

.toc-nav a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}

.toc-nav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

.toc-nav ul ul { padding-left: 0.75rem; }
.toc-nav ul ul a { font-size: 0.8rem; }

@media (max-width: 1024px) {
  .post-container { grid-template-columns: 1fr; }
  .toc-sidebar { display: none; }
}

/* ============================================
   MOBILE TABLE OF CONTENTS (Collapsible)
   ============================================ */
.toc-mobile {
  display: none; /* Hidden on desktop */
  margin-bottom: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .toc-mobile {
    display: block;
  }
}

.toc-mobile-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none; /* Remove default marker */
}

.toc-mobile-toggle::-webkit-details-marker {
  display: none; /* Remove default marker in Safari */
}

.toc-mobile-toggle svg {
  color: var(--accent);
  flex-shrink: 0;
}

.toc-mobile-toggle span {
  flex: 1;
}

.toc-mobile-chevron {
  transition: transform 0.2s ease;
}

.toc-mobile[open] .toc-mobile-chevron {
  transform: rotate(180deg);
}

.toc-mobile-nav {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
}

.toc-mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-mobile-nav li {
  margin-top: 0.5rem;
}

.toc-mobile-nav a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.35rem 0;
  padding-left: 0.75rem;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.toc-mobile-nav a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}

.toc-mobile-nav ul ul {
  padding-left: 0.75rem;
}

.toc-mobile-nav ul ul a {
  font-size: 0.8rem;
}

/* ============================================
   SERIES NAVIGATION
   ============================================ */
.post-series-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-left: 0.5rem;
}

.series-nav {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.series-nav h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.series-nav h4 svg { color: var(--accent); }

.series-posts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.series-post-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.series-post-item:hover {
  border-color: var(--accent);
  background: var(--bg-tertiary);
}

.series-post-item.current {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.series-part-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bg-primary);
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.series-post-item.current .series-part-num {
  background: var(--text-primary);
}

.series-post-title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.series-post-item:hover .series-post-title { color: var(--accent); }
.series-post-item.current .series-post-title { color: var(--accent); }

.series-current-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--bg-primary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* ============================================
   RELATED POSTS
   ============================================ */
.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-posts h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.related-posts h4 svg { color: var(--accent); }

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.related-card {
  display: block;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.related-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.related-card h5 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.related-card:hover h5 { color: var(--accent); }

.related-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ============================================
   COMMENTS SECTION (Giscus)
   ============================================ */
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  /* Performance: skip rendering until scrolled into view */
  content-visibility: auto;
  contain-intrinsic-size: 0 400px;
}

.comments-section h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.comments-section h4 svg { color: var(--accent); }

.comments-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.giscus { margin-top: 1rem; }

/* ============================================
   KEYBOARD SHORTCUTS OVERLAY
   ============================================ */
.shortcuts-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.shortcuts-overlay.active { opacity: 1; visibility: visible; }

.shortcuts-modal {
  width: 90%;
  max-width: 550px;
  max-height: 85vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.shortcuts-overlay.active .shortcuts-modal { transform: scale(1); }

.shortcuts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.shortcuts-header h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.shortcuts-header svg { color: var(--accent); }

.shortcuts-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  /* cursor handled by global paw print cursor rule */
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

.shortcuts-close:hover { color: var(--text-primary); }

.shortcuts-content {
  padding: 1rem 1.5rem;
  overflow-y: auto;
  max-height: 60vh;
}

.shortcuts-group { margin-bottom: 1.5rem; }
.shortcuts-group:last-child { margin-bottom: 0; }

.shortcuts-group-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.shortcut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.shortcut-item:last-child { border-bottom: none; }

.shortcut-keys {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.shortcut-keys kbd {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  min-width: 24px;
  text-align: center;
}

.shortcut-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.shortcuts-footer {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.shortcuts-footer kbd {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* ============================================
   CAT BURGLAR MODE (Secret Hacker Theme)
   ============================================ */
html[data-theme="catburglar"] {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #21262d;
  --bg-card-hover: #30363d;
  --text-primary: #00ff41;
  --text-secondary: #39d353;
  --text-muted: #238636;
  --accent: #00ff41;
  --accent-hover: #39d353;
  --accent-glow: rgba(0, 255, 65, 0.15);
  --accent-rgb: 0, 255, 65;
  --cursor-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cellipse cx='7' cy='18' rx='2.8' ry='2.2' fill='%2300ff41'/%3E%3Ccircle cx='4.5' cy='14' r='1.4' fill='%2300ff41'/%3E%3Ccircle cx='6.5' cy='12.5' r='1.2' fill='%2300ff41'/%3E%3Ccircle cx='8.5' cy='12.5' r='1.2' fill='%2300ff41'/%3E%3Ccircle cx='10' cy='14' r='1.4' fill='%2300ff41'/%3E%3Cellipse cx='17' cy='9' rx='2.8' ry='2.2' fill='%2300ff41'/%3E%3Ccircle cx='14.5' cy='5' r='1.4' fill='%2300ff41'/%3E%3Ccircle cx='16.5' cy='3.5' r='1.2' fill='%2300ff41'/%3E%3Ccircle cx='18.5' cy='3.5' r='1.2' fill='%2300ff41'/%3E%3Ccircle cx='20' cy='5' r='1.4' fill='%2300ff41'/%3E%3C/svg%3E") 12 12, pointer;
  --border: #30363d;
  --border-light: #484f58;
  --header-bg: rgba(13, 17, 23, 0.9);
}

/* Catburglar: Stealthy neon green with matrix-style inner glow */
[data-theme="catburglar"] .cyber-cat {
  filter: drop-shadow(0 20px 40px rgba(0, 255, 65, 0.25)) hue-rotate(75deg);
}

.can-hover[data-theme="catburglar"] .cyber-cat:hover,
[data-theme="catburglar"] .cyber-cat.mobile-glow {
  filter: drop-shadow(0 0 50px rgba(0, 255, 65, 0.9)) drop-shadow(0 0 15px rgba(0, 255, 65, 1)) drop-shadow(0 0 100px rgba(0, 200, 50, 0.6)) hue-rotate(75deg);
}

[data-theme="catburglar"] .matrix-background { opacity: 0.5; }

[data-theme="catburglar"] .konami-content h2,
[data-theme="catburglar"] .post-category,
[data-theme="catburglar"] .toc-title svg,
[data-theme="catburglar"] .related-posts h4 svg,
[data-theme="catburglar"] .comments-section h4 svg,
[data-theme="catburglar"] .shortcuts-header svg {
  color: #00ff41;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* Cat Burglar mode notification */
.catburglar-toast {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #21262d;
  border: 1px solid #00ff41;
  border-radius: 12px;
  padding: 1rem 2rem;
  color: #00ff41;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
}

.catburglar-toast.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.catburglar-toast span { margin-right: 0.5rem; }

/* ============================================
   ADDITIONAL THEMES
   ============================================ */

/* Cyberpunk Pink - Hot pink neon with deep purple */
html[data-theme="cyberpunk"] {
  --bg-primary: #0f0a1a;
  --bg-secondary: #1a1025;
  --bg-card: #251a35;
  --bg-card-hover: #321f48;
  --text-primary: #ff2d95;
  --text-secondary: #ff69b4;
  --text-muted: #b8528a;
  --accent: #ff2d95;
  --accent-hover: #ff69b4;
  --accent-glow: rgba(255, 45, 149, 0.2);
  --accent-rgb: 255, 45, 149;
  --cursor-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cellipse cx='7' cy='18' rx='2.8' ry='2.2' fill='%23ff2d95'/%3E%3Ccircle cx='4.5' cy='14' r='1.4' fill='%23ff2d95'/%3E%3Ccircle cx='6.5' cy='12.5' r='1.2' fill='%23ff2d95'/%3E%3Ccircle cx='8.5' cy='12.5' r='1.2' fill='%23ff2d95'/%3E%3Ccircle cx='10' cy='14' r='1.4' fill='%23ff2d95'/%3E%3Cellipse cx='17' cy='9' rx='2.8' ry='2.2' fill='%23ff2d95'/%3E%3Ccircle cx='14.5' cy='5' r='1.4' fill='%23ff2d95'/%3E%3Ccircle cx='16.5' cy='3.5' r='1.2' fill='%23ff2d95'/%3E%3Ccircle cx='18.5' cy='3.5' r='1.2' fill='%23ff2d95'/%3E%3Ccircle cx='20' cy='5' r='1.4' fill='%23ff2d95'/%3E%3C/svg%3E") 12 12, pointer;
  --border: #3d2a54;
  --border-light: #4d3a64;
  --header-bg: rgba(15, 10, 26, 0.92);
}

/* Cyberpunk: Hot pink neon with electric blue accent - neon city vibes */
[data-theme="cyberpunk"] .cyber-cat {
  filter: drop-shadow(0 20px 40px rgba(255, 45, 149, 0.25)) hue-rotate(-30deg) saturate(1.3);
}

.can-hover[data-theme="cyberpunk"] .cyber-cat:hover,
[data-theme="cyberpunk"] .cyber-cat.mobile-glow {
  filter: drop-shadow(0 0 40px rgba(255, 45, 149, 1)) drop-shadow(0 0 80px rgba(0, 255, 255, 0.5)) drop-shadow(0 0 120px rgba(255, 45, 149, 0.6)) hue-rotate(-30deg) saturate(1.5);
}

[data-theme="cyberpunk"] .matrix-background { opacity: 0.4; }

[data-theme="cyberpunk"] .konami-content h2,
[data-theme="cyberpunk"] .post-category,
[data-theme="cyberpunk"] .toc-title svg,
[data-theme="cyberpunk"] .related-posts h4 svg,
[data-theme="cyberpunk"] .comments-section h4 svg,
[data-theme="cyberpunk"] .shortcuts-header svg {
  color: #ff2d95;
  text-shadow: 0 0 15px rgba(255, 45, 149, 0.6);
}

/* Ocean - Deep blues and teals, calming */
html[data-theme="ocean"] {
  --bg-primary: #0a1628;
  --bg-secondary: #0d1e33;
  --bg-card: #122740;
  --bg-card-hover: #183350;
  --text-primary: #7dd3fc;
  --text-secondary: #38bdf8;
  --text-muted: #0ea5e9;
  --accent: #06b6d4;
  --accent-hover: #22d3ee;
  --accent-glow: rgba(6, 182, 212, 0.2);
  --accent-rgb: 6, 182, 212;
  --cursor-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cellipse cx='7' cy='18' rx='2.8' ry='2.2' fill='%2306b6d4'/%3E%3Ccircle cx='4.5' cy='14' r='1.4' fill='%2306b6d4'/%3E%3Ccircle cx='6.5' cy='12.5' r='1.2' fill='%2306b6d4'/%3E%3Ccircle cx='8.5' cy='12.5' r='1.2' fill='%2306b6d4'/%3E%3Ccircle cx='10' cy='14' r='1.4' fill='%2306b6d4'/%3E%3Cellipse cx='17' cy='9' rx='2.8' ry='2.2' fill='%2306b6d4'/%3E%3Ccircle cx='14.5' cy='5' r='1.4' fill='%2306b6d4'/%3E%3Ccircle cx='16.5' cy='3.5' r='1.2' fill='%2306b6d4'/%3E%3Ccircle cx='18.5' cy='3.5' r='1.2' fill='%2306b6d4'/%3E%3Ccircle cx='20' cy='5' r='1.4' fill='%2306b6d4'/%3E%3C/svg%3E") 12 12, pointer;
  --border: #1e3a5f;
  --border-light: #2a4a70;
  --header-bg: rgba(10, 22, 40, 0.92);
}

/* Ocean: Deep teal with bioluminescent shimmer - underwater mystery */
[data-theme="ocean"] .cyber-cat {
  filter: drop-shadow(0 20px 40px rgba(6, 182, 212, 0.35)) hue-rotate(180deg) saturate(1.2) brightness(1.05);
}

.can-hover[data-theme="ocean"] .cyber-cat:hover,
[data-theme="ocean"] .cyber-cat.mobile-glow {
  filter: drop-shadow(0 0 35px rgba(6, 182, 212, 0.9)) drop-shadow(0 0 70px rgba(56, 189, 248, 0.6)) drop-shadow(0 0 100px rgba(34, 211, 238, 0.4)) hue-rotate(180deg) saturate(1.3) brightness(1.1);
}

[data-theme="ocean"] .matrix-background { opacity: 0.3; }

[data-theme="ocean"] .konami-content h2,
[data-theme="ocean"] .post-category,
[data-theme="ocean"] .toc-title svg,
[data-theme="ocean"] .related-posts h4 svg,
[data-theme="ocean"] .comments-section h4 svg,
[data-theme="ocean"] .shortcuts-header svg {
  color: #06b6d4;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

/* Sunset - Warm oranges and purples */
html[data-theme="sunset"] {
  --bg-primary: #1a0f1f;
  --bg-secondary: #251525;
  --bg-card: #2f1a2f;
  --bg-card-hover: #3d223d;
  --text-primary: #fbbf24;
  --text-secondary: #f59e0b;
  --text-muted: #d97706;
  --accent: #f97316;
  --accent-hover: #fb923c;
  --accent-glow: rgba(249, 115, 22, 0.2);
  --accent-rgb: 249, 115, 22;
  --cursor-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cellipse cx='7' cy='18' rx='2.8' ry='2.2' fill='%23f97316'/%3E%3Ccircle cx='4.5' cy='14' r='1.4' fill='%23f97316'/%3E%3Ccircle cx='6.5' cy='12.5' r='1.2' fill='%23f97316'/%3E%3Ccircle cx='8.5' cy='12.5' r='1.2' fill='%23f97316'/%3E%3Ccircle cx='10' cy='14' r='1.4' fill='%23f97316'/%3E%3Cellipse cx='17' cy='9' rx='2.8' ry='2.2' fill='%23f97316'/%3E%3Ccircle cx='14.5' cy='5' r='1.4' fill='%23f97316'/%3E%3Ccircle cx='16.5' cy='3.5' r='1.2' fill='%23f97316'/%3E%3Ccircle cx='18.5' cy='3.5' r='1.2' fill='%23f97316'/%3E%3Ccircle cx='20' cy='5' r='1.4' fill='%23f97316'/%3E%3C/svg%3E") 12 12, pointer;
  --border: #4a2c4a;
  --border-light: #5a3c5a;
  --header-bg: rgba(26, 15, 31, 0.92);
}

/* Sunset: Warm gradient from golden orange to magenta - horizon glow */
[data-theme="sunset"] .cyber-cat {
  filter: drop-shadow(0 20px 40px rgba(249, 115, 22, 0.25)) saturate(1.2);
}

.can-hover[data-theme="sunset"] .cyber-cat:hover,
[data-theme="sunset"] .cyber-cat.mobile-glow {
  filter: drop-shadow(0 0 35px rgba(249, 115, 22, 0.9)) drop-shadow(-30px 0 60px rgba(251, 191, 36, 0.5)) drop-shadow(30px 0 60px rgba(190, 24, 93, 0.5)) saturate(1.4);
}

[data-theme="sunset"] .matrix-background { opacity: 0.35; }

[data-theme="sunset"] .konami-content h2,
[data-theme="sunset"] .post-category,
[data-theme="sunset"] .toc-title svg,
[data-theme="sunset"] .related-posts h4 svg,
[data-theme="sunset"] .comments-section h4 svg,
[data-theme="sunset"] .shortcuts-header svg {
  color: #f97316;
  text-shadow: 0 0 12px rgba(249, 115, 22, 0.5);
}

/* Terminal - Classic phosphor green CRT aesthetic */
html[data-theme="terminal"] {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #1a1a1a;
  --text-primary: #33ff33;
  --text-secondary: #22cc22;
  --text-muted: #119911;
  --accent: #33ff33;
  --accent-hover: #55ff55;
  --accent-glow: rgba(51, 255, 51, 0.15);
  --accent-rgb: 51, 255, 51;
  --cursor-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cellipse cx='7' cy='18' rx='2.8' ry='2.2' fill='%2333ff33'/%3E%3Ccircle cx='4.5' cy='14' r='1.4' fill='%2333ff33'/%3E%3Ccircle cx='6.5' cy='12.5' r='1.2' fill='%2333ff33'/%3E%3Ccircle cx='8.5' cy='12.5' r='1.2' fill='%2333ff33'/%3E%3Ccircle cx='10' cy='14' r='1.4' fill='%2333ff33'/%3E%3Cellipse cx='17' cy='9' rx='2.8' ry='2.2' fill='%2333ff33'/%3E%3Ccircle cx='14.5' cy='5' r='1.4' fill='%2333ff33'/%3E%3Ccircle cx='16.5' cy='3.5' r='1.2' fill='%2333ff33'/%3E%3Ccircle cx='18.5' cy='3.5' r='1.2' fill='%2333ff33'/%3E%3Ccircle cx='20' cy='5' r='1.4' fill='%2333ff33'/%3E%3C/svg%3E") 12 12, pointer;
  --border: #1a1a1a;
  --border-light: #222222;
  --header-bg: rgba(0, 0, 0, 0.95);
}

/* Terminal: Classic phosphor green with CRT scanline edge - retro computing */
[data-theme="terminal"] .cyber-cat {
  filter: drop-shadow(0 20px 40px rgba(51, 255, 51, 0.25)) hue-rotate(60deg) brightness(1.1) contrast(1.05);
}

.can-hover[data-theme="terminal"] .cyber-cat:hover,
[data-theme="terminal"] .cyber-cat.mobile-glow {
  filter: drop-shadow(0 0 30px rgba(51, 255, 51, 1)) drop-shadow(0 0 60px rgba(51, 255, 51, 0.7)) drop-shadow(0 3px 0 rgba(51, 255, 51, 0.5)) hue-rotate(60deg) brightness(1.2) contrast(1.1);
}

[data-theme="terminal"] .matrix-background { opacity: 0.6; }

[data-theme="terminal"] .konami-content h2,
[data-theme="terminal"] .post-category,
[data-theme="terminal"] .toc-title svg,
[data-theme="terminal"] .related-posts h4 svg,
[data-theme="terminal"] .comments-section h4 svg,
[data-theme="terminal"] .shortcuts-header svg {
  color: #33ff33;
  text-shadow: 0 0 8px rgba(51, 255, 51, 0.7);
}

/* Add scanline effect for Terminal theme */
[data-theme="terminal"] body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.1) 0px,
    rgba(0, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 9998;
}

/* High Contrast - Accessibility focused */
html[data-theme="highcontrast"] {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-card: #1a1a1a;
  --bg-card-hover: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-muted: #b0b0b0;
  --accent: #ffff00;
  --accent-hover: #ffff66;
  --accent-glow: rgba(255, 255, 0, 0.2);
  --accent-rgb: 255, 255, 0;
  --cursor-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cellipse cx='7' cy='18' rx='2.8' ry='2.2' fill='%23ffff00'/%3E%3Ccircle cx='4.5' cy='14' r='1.4' fill='%23ffff00'/%3E%3Ccircle cx='6.5' cy='12.5' r='1.2' fill='%23ffff00'/%3E%3Ccircle cx='8.5' cy='12.5' r='1.2' fill='%23ffff00'/%3E%3Ccircle cx='10' cy='14' r='1.4' fill='%23ffff00'/%3E%3Cellipse cx='17' cy='9' rx='2.8' ry='2.2' fill='%23ffff00'/%3E%3Ccircle cx='14.5' cy='5' r='1.4' fill='%23ffff00'/%3E%3Ccircle cx='16.5' cy='3.5' r='1.2' fill='%23ffff00'/%3E%3Ccircle cx='18.5' cy='3.5' r='1.2' fill='%23ffff00'/%3E%3Ccircle cx='20' cy='5' r='1.4' fill='%23ffff00'/%3E%3C/svg%3E") 12 12, pointer;
  --border: #ffffff;
  --border-light: #cccccc;
  --header-bg: rgba(0, 0, 0, 0.98);
}

/* High Contrast: Sharp yellow with white edge - maximum visibility for accessibility */
[data-theme="highcontrast"] .cyber-cat {
  filter: drop-shadow(0 20px 40px rgba(255, 255, 0, 0.25)) contrast(1.2);
}

.can-hover[data-theme="highcontrast"] .cyber-cat:hover,
[data-theme="highcontrast"] .cyber-cat.mobile-glow {
  filter: drop-shadow(0 0 25px rgba(255, 255, 0, 1)) drop-shadow(0 0 50px rgba(255, 255, 0, 0.6)) drop-shadow(0 0 5px rgba(255, 255, 255, 1)) contrast(1.3);
}

[data-theme="highcontrast"] .matrix-background { opacity: 0.2; }

[data-theme="highcontrast"] a { text-decoration: underline; }
[data-theme="highcontrast"] .btn { border: 2px solid currentColor; }

[data-theme="highcontrast"] .konami-content h2,
[data-theme="highcontrast"] .post-category,
[data-theme="highcontrast"] .toc-title svg,
[data-theme="highcontrast"] .related-posts h4 svg,
[data-theme="highcontrast"] .comments-section h4 svg,
[data-theme="highcontrast"] .shortcuts-header svg {
  color: #ffff00;
}

/* Winter - Icy blues and silver, with subtle snow */
html[data-theme="winter"] {
  --bg-primary: #0d1b2a;
  --bg-secondary: #1b263b;
  --bg-card: #243447;
  --bg-card-hover: #2d3e50;
  --text-primary: #e0f7fa;
  --text-secondary: #b2ebf2;
  --text-muted: #80deea;
  --accent: #4dd0e1;
  --accent-hover: #80deea;
  --accent-glow: rgba(77, 208, 225, 0.25);
  --accent-rgb: 77, 208, 225;
  --cursor-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cellipse cx='7' cy='18' rx='2.8' ry='2.2' fill='%234dd0e1'/%3E%3Ccircle cx='4.5' cy='14' r='1.4' fill='%234dd0e1'/%3E%3Ccircle cx='6.5' cy='12.5' r='1.2' fill='%234dd0e1'/%3E%3Ccircle cx='8.5' cy='12.5' r='1.2' fill='%234dd0e1'/%3E%3Ccircle cx='10' cy='14' r='1.4' fill='%234dd0e1'/%3E%3Cellipse cx='17' cy='9' rx='2.8' ry='2.2' fill='%234dd0e1'/%3E%3Ccircle cx='14.5' cy='5' r='1.4' fill='%234dd0e1'/%3E%3Ccircle cx='16.5' cy='3.5' r='1.2' fill='%234dd0e1'/%3E%3Ccircle cx='18.5' cy='3.5' r='1.2' fill='%234dd0e1'/%3E%3Ccircle cx='20' cy='5' r='1.4' fill='%234dd0e1'/%3E%3C/svg%3E") 12 12, pointer;
  --border: #37474f;
  --border-light: #455a64;
  --header-bg: rgba(13, 27, 42, 0.95);
}

/* Winter: Icy blue with silver frost sparkle - cold and magical */
[data-theme="winter"] .cyber-cat {
  filter: drop-shadow(0 20px 40px rgba(77, 208, 225, 0.25)) hue-rotate(180deg) brightness(1.1);
}

.can-hover[data-theme="winter"] .cyber-cat:hover,
[data-theme="winter"] .cyber-cat.mobile-glow {
  filter: drop-shadow(0 0 35px rgba(77, 208, 225, 0.9)) drop-shadow(0 0 70px rgba(224, 247, 250, 0.5)) drop-shadow(0 0 100px rgba(178, 235, 242, 0.4)) hue-rotate(180deg) brightness(1.2);
}

/* ============================================
   THEME ANIMATIONS - TEMPORARILY DISABLED
   The falling symbol animations (snowflakes, stars, flowers, etc.)
   have inconsistent behavior on mobile devices. Disabling all of them
   while we test themes and plan a different animation approach.
   See Known Issues in README.md for details.

   Note: Only disabling the ::before pseudo-element content/animations.
   The cat hover GLOW effect (.cyber-cat:hover filter) is preserved.
   ============================================ */

/* Master override to disable all theme ::before animations */
/* Uses attribute selectors to only affect seasonal theme animations */
[data-theme="winter"] .hero-mascot::before,
[data-theme="christmas"] .hero-mascot::before,
[data-theme="halloween"] .hero-mascot::before,
[data-theme="easter"] .hero-mascot::before,
[data-theme="summer"] .hero-mascot::before,
[data-theme="fall"] .hero-mascot::before,
[data-theme="spring"] .hero-mascot::before {
  content: none !important;
  display: none !important;
}

/* Winter snowfall animation on cat hover */
[data-theme="winter"] .hero-mascot::before {
  content: "❄ ❅ ❆ ❄ ❅ ❆ ❄ ❅";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  letter-spacing: 0.8rem;
  color: rgba(224, 247, 250, 0);
  text-shadow: none;
  pointer-events: none;
  z-index: 10;
  transition: none;
}

/* Theme-activated works on all devices (triggered by JS on theme selection) */
[data-theme="winter"] .hero-mascot.theme-activated::before {
  animation: winter-snowfall 2.5s ease-out forwards;
}
/* Hover only on devices with hover capability - uses JS-added .can-hover class */
.can-hover[data-theme="winter"] .hero-mascot:hover::before {
  animation: winter-snowfall 2.5s ease-out forwards;
}

@keyframes winter-snowfall {
  0% {
    opacity: 0;
    color: rgba(224, 247, 250, 0);
    transform: translateX(-50%) translateY(-20px) scale(0.5);
    text-shadow: 0 0 10px rgba(77, 208, 225, 0);
  }
  15% {
    opacity: 1;
    color: rgba(224, 247, 250, 0.9);
    transform: translateX(-45%) translateY(10px) scale(1.1);
    text-shadow: 0 0 15px rgba(77, 208, 225, 0.8);
  }
  40% {
    color: rgba(224, 247, 250, 0.8);
    transform: translateX(-55%) translateY(40px) scale(1);
  }
  65% {
    transform: translateX(-48%) translateY(70px) scale(1.05);
  }
  85% {
    opacity: 0.6;
    color: rgba(224, 247, 250, 0.5);
    transform: translateX(-52%) translateY(95px) scale(0.95);
  }
  100% {
    opacity: 0;
    color: rgba(224, 247, 250, 0);
    transform: translateX(-50%) translateY(120px) scale(0.8);
    text-shadow: 0 0 10px rgba(77, 208, 225, 0);
  }
}

[data-theme="winter"] .matrix-background { opacity: 0.15; }

[data-theme="winter"] .konami-content h2,
[data-theme="winter"] .post-category,
[data-theme="winter"] .toc-title svg,
[data-theme="winter"] .related-posts h4 svg,
[data-theme="winter"] .comments-section h4 svg,
[data-theme="winter"] .shortcuts-header svg {
  color: #4dd0e1;
  text-shadow: 0 0 10px rgba(77, 208, 225, 0.4);
}

/* Christmas - Festive red and green */
html[data-theme="christmas"] {
  --bg-primary: #1a0a0a;
  --bg-secondary: #2d1515;
  --bg-card: #3d1f1f;
  --bg-card-hover: #4d2a2a;
  --text-primary: #ffcdd2;
  --text-secondary: #ef9a9a;
  --text-muted: #e57373;
  --accent: #c62828;
  --accent-hover: #e53935;
  --accent-glow: rgba(198, 40, 40, 0.25);
  --accent-rgb: 198, 40, 40;
  --cursor-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cellipse cx='7' cy='18' rx='2.8' ry='2.2' fill='%23c62828'/%3E%3Ccircle cx='4.5' cy='14' r='1.4' fill='%23c62828'/%3E%3Ccircle cx='6.5' cy='12.5' r='1.2' fill='%23c62828'/%3E%3Ccircle cx='8.5' cy='12.5' r='1.2' fill='%23c62828'/%3E%3Ccircle cx='10' cy='14' r='1.4' fill='%23c62828'/%3E%3Cellipse cx='17' cy='9' rx='2.8' ry='2.2' fill='%23c62828'/%3E%3Ccircle cx='14.5' cy='5' r='1.4' fill='%23c62828'/%3E%3Ccircle cx='16.5' cy='3.5' r='1.2' fill='%23c62828'/%3E%3Ccircle cx='18.5' cy='3.5' r='1.2' fill='%23c62828'/%3E%3Ccircle cx='20' cy='5' r='1.4' fill='%23c62828'/%3E%3C/svg%3E") 12 12, pointer;
  --border: #4a2c2c;
  --border-light: #5a3c3c;
  --header-bg: rgba(26, 10, 10, 0.95);
}

/* Christmas: Red and green alternating with golden sparkle - festive joy */
[data-theme="christmas"] .cyber-cat {
  filter: drop-shadow(0 20px 40px rgba(198, 40, 40, 0.25));
}

.can-hover[data-theme="christmas"] .cyber-cat:hover,
[data-theme="christmas"] .cyber-cat.mobile-glow {
  filter: drop-shadow(-25px 0 40px rgba(198, 40, 40, 0.8)) drop-shadow(25px 0 40px rgba(46, 125, 50, 0.8)) drop-shadow(0 0 30px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 80px rgba(198, 40, 40, 0.4));
}

/* Christmas festive lights animation on cat hover */
[data-theme="christmas"] .hero-mascot::before {
  content: "✦ ★ ✧ ⭐ ✦ ★ ✧";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  letter-spacing: 0.8rem;
  color: rgba(255, 215, 0, 0);
  text-shadow: none;
  pointer-events: none;
  z-index: 10;
  transition: none;
}

[data-theme="christmas"] .hero-mascot.theme-activated::before {
  animation: christmas-twinkle 2.5s ease-out forwards;
}
.can-hover[data-theme="christmas"] .hero-mascot:hover::before {
  animation: christmas-twinkle 2.5s ease-out forwards;
}

@keyframes christmas-twinkle {
  0% {
    opacity: 0;
    color: rgba(255, 215, 0, 0);
    transform: translateX(-50%) translateY(-20px) scale(0.5);
  }
  15% {
    opacity: 1;
    color: rgba(255, 215, 0, 1);
    text-shadow: 0 0 20px rgba(198, 40, 40, 0.8), 0 0 40px rgba(46, 125, 50, 0.6);
    transform: translateX(-45%) translateY(10px) scale(1.1);
  }
  40% {
    color: rgba(198, 40, 40, 1);
    text-shadow: 0 0 25px rgba(255, 215, 0, 1), 0 0 50px rgba(46, 125, 50, 0.8);
    transform: translateX(-55%) translateY(40px) scale(1);
  }
  65% {
    color: rgba(46, 125, 50, 1);
    text-shadow: 0 0 20px rgba(198, 40, 40, 0.8), 0 0 40px rgba(255, 215, 0, 0.6);
    transform: translateX(-48%) translateY(70px) scale(1.05);
  }
  85% {
    opacity: 0.7;
    color: rgba(255, 215, 0, 0.8);
    transform: translateX(-52%) translateY(95px) scale(0.95);
  }
  100% {
    opacity: 0;
    color: rgba(255, 215, 0, 0);
    transform: translateX(-50%) translateY(120px) scale(0.8);
  }
}

[data-theme="christmas"] .matrix-background { opacity: 0.2; }

[data-theme="christmas"] .btn-primary {
  background: linear-gradient(135deg, #c62828, #2e7d32);
}

[data-theme="christmas"] .konami-content h2,
[data-theme="christmas"] .post-category {
  color: #c62828;
  text-shadow: 0 0 10px rgba(198, 40, 40, 0.4);
}

[data-theme="christmas"] .toc-title svg,
[data-theme="christmas"] .related-posts h4 svg,
[data-theme="christmas"] .comments-section h4 svg,
[data-theme="christmas"] .shortcuts-header svg {
  color: #2e7d32;
}

/* Halloween - Spooky orange and purple */
html[data-theme="halloween"] {
  --bg-primary: #1a0a1f;
  --bg-secondary: #2d1535;
  --bg-card: #3d1f48;
  --bg-card-hover: #4d2a58;
  --text-primary: #ffcc80;
  --text-secondary: #ffb74d;
  --text-muted: #ff9800;
  --accent: #ff6f00;
  --accent-hover: #ff8f00;
  --accent-glow: rgba(255, 111, 0, 0.25);
  --accent-rgb: 255, 111, 0;
  --cursor-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cellipse cx='7' cy='18' rx='2.8' ry='2.2' fill='%23ff6f00'/%3E%3Ccircle cx='4.5' cy='14' r='1.4' fill='%23ff6f00'/%3E%3Ccircle cx='6.5' cy='12.5' r='1.2' fill='%23ff6f00'/%3E%3Ccircle cx='8.5' cy='12.5' r='1.2' fill='%23ff6f00'/%3E%3Ccircle cx='10' cy='14' r='1.4' fill='%23ff6f00'/%3E%3Cellipse cx='17' cy='9' rx='2.8' ry='2.2' fill='%23ff6f00'/%3E%3Ccircle cx='14.5' cy='5' r='1.4' fill='%23ff6f00'/%3E%3Ccircle cx='16.5' cy='3.5' r='1.2' fill='%23ff6f00'/%3E%3Ccircle cx='18.5' cy='3.5' r='1.2' fill='%23ff6f00'/%3E%3Ccircle cx='20' cy='5' r='1.4' fill='%23ff6f00'/%3E%3C/svg%3E") 12 12, pointer;
  --border: #4a2c54;
  --border-light: #5a3c64;
  --header-bg: rgba(26, 10, 31, 0.95);
}

/* Halloween: Eerie purple aura with pumpkin orange core - haunted spooky vibes */
[data-theme="halloween"] .cyber-cat {
  filter: drop-shadow(0 20px 40px rgba(255, 111, 0, 0.25)) hue-rotate(25deg) saturate(1.4);
}

.can-hover[data-theme="halloween"] .cyber-cat:hover,
[data-theme="halloween"] .cyber-cat.mobile-glow {
  filter: drop-shadow(0 0 35px rgba(255, 111, 0, 1)) drop-shadow(0 0 70px rgba(128, 0, 128, 0.7)) drop-shadow(0 0 100px rgba(75, 0, 130, 0.4)) hue-rotate(25deg) saturate(1.6);
}

[data-theme="halloween"] .matrix-background { opacity: 0.3; }

[data-theme="halloween"] .konami-content h2,
[data-theme="halloween"] .post-category,
[data-theme="halloween"] .toc-title svg,
[data-theme="halloween"] .related-posts h4 svg,
[data-theme="halloween"] .comments-section h4 svg,
[data-theme="halloween"] .shortcuts-header svg {
  color: #ff6f00;
  text-shadow: 0 0 15px rgba(255, 111, 0, 0.5);
}

/* Halloween: Floating ghosts and bats on cat hover */
[data-theme="halloween"] .hero-mascot::before {
  content: "☠ ✧ ☠ ✧ ☠ ✧ ☠";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  letter-spacing: 0.8rem;
  color: rgba(255, 111, 0, 0);
  text-shadow: none;
  pointer-events: none;
  z-index: 10;
  transition: none;
}

[data-theme="halloween"] .hero-mascot.theme-activated::before {
  animation: halloween-float 2.5s ease-out forwards;
}
.can-hover[data-theme="halloween"] .hero-mascot:hover::before {
  animation: halloween-float 2.5s ease-out forwards;
}

@keyframes halloween-float {
  0% {
    opacity: 0;
    color: rgba(255, 111, 0, 0);
    transform: translateX(-50%) translateY(-20px) scale(0.5);
  }
  15% {
    opacity: 1;
    color: rgba(255, 111, 0, 0.9);
    transform: translateX(-50%) translateY(0) scale(1);
  }
  30% {
    transform: translateX(-45%) translateY(25px) scale(1.05) rotate(-5deg);
  }
  50% {
    color: rgba(128, 0, 128, 0.9);
    transform: translateX(-55%) translateY(50px) scale(1.05) rotate(5deg);
  }
  70% {
    transform: translateX(-48%) translateY(75px) scale(1) rotate(-3deg);
  }
  85% {
    opacity: 0.6;
    color: rgba(128, 0, 128, 0.7);
    transform: translateX(-52%) translateY(95px) scale(0.95) rotate(3deg);
  }
  100% {
    opacity: 0;
    color: rgba(128, 0, 128, 0);
    transform: translateX(-50%) translateY(120px) scale(0.8) rotate(0deg);
  }
}

/* Easter - Soft pastels with spring vibes */
html[data-theme="easter"] {
  --bg-primary: #fdf6f9;
  --bg-secondary: #f8e8f0;
  --bg-card: #ffffff;
  --bg-card-hover: #fef0f5;
  --text-primary: #5c4a5e;
  --text-secondary: #8b7a8d;
  --text-muted: #a89aaa;
  --accent: #e879a9;
  --accent-hover: #d66094;
  --accent-glow: rgba(232, 121, 169, 0.15);
  --accent-rgb: 232, 121, 169;
  --border: #f0d4e4;
  --border-light: #f8e8f0;
  --header-bg: rgba(253, 246, 249, 0.95);
}

[data-theme="easter"] .cyber-cat {
  filter: drop-shadow(0 20px 40px rgba(232, 121, 169, 0.25)) hue-rotate(-20deg) saturate(0.9) brightness(1.05);
}

.can-hover[data-theme="easter"] .cyber-cat:hover,
[data-theme="easter"] .cyber-cat.mobile-glow {
  filter: drop-shadow(0 0 40px rgba(232, 121, 169, 0.8)) drop-shadow(0 0 80px rgba(167, 139, 250, 0.5)) drop-shadow(0 0 120px rgba(253, 224, 71, 0.4)) hue-rotate(-20deg) saturate(1.1) brightness(1.1);
}

[data-theme="easter"] .matrix-background { opacity: 0.3; }

/* Easter: Floating bunnies and eggs on cat hover */
[data-theme="easter"] .hero-mascot::before {
  content: "❀ ✿ ❁ ❀ ✿ ❁ ❀";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  letter-spacing: 0.8rem;
  color: rgba(232, 121, 169, 0);
  text-shadow: none;
  pointer-events: none;
  z-index: 10;
  transition: none;
}

[data-theme="easter"] .hero-mascot.theme-activated::before {
  animation: easter-hop 2.5s ease-out forwards;
}
.can-hover[data-theme="easter"] .hero-mascot:hover::before {
  animation: easter-hop 2.5s ease-out forwards;
}

@keyframes easter-hop {
  0% {
    opacity: 0;
    color: rgba(232, 121, 169, 0);
    transform: translateX(-50%) translateY(-20px) scale(0.5);
  }
  15% {
    opacity: 1;
    color: rgba(232, 121, 169, 0.9);
    transform: translateX(-48%) translateY(5px) scale(1.1);
  }
  35% {
    color: rgba(167, 139, 250, 0.9);
    transform: translateX(-52%) translateY(35px) scale(1);
  }
  55% {
    transform: translateX(-47%) translateY(60px) scale(1.05);
  }
  75% {
    opacity: 0.7;
    color: rgba(253, 224, 71, 0.8);
    transform: translateX(-53%) translateY(85px) scale(0.95);
  }
  100% {
    opacity: 0;
    color: rgba(167, 139, 250, 0);
    transform: translateX(-50%) translateY(115px) scale(0.85);
  }
}

/* Summer - Bright sunny vibes */
html[data-theme="summer"] {
  --bg-primary: #0c1929;
  --bg-secondary: #132438;
  --bg-card: #1a3048;
  --bg-card-hover: #234058;
  --text-primary: #fef3c7;
  --text-secondary: #fcd34d;
  --text-muted: #a8a29e;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-glow: rgba(245, 158, 11, 0.2);
  --accent-rgb: 245, 158, 11;
  --border: #2a4a68;
  --border-light: #3a5a78;
  --header-bg: rgba(12, 25, 41, 0.95);
}

[data-theme="summer"] .cyber-cat {
  filter: drop-shadow(0 20px 40px rgba(245, 158, 11, 0.25)) saturate(1.2) brightness(1.05);
}

.can-hover[data-theme="summer"] .cyber-cat:hover,
[data-theme="summer"] .cyber-cat.mobile-glow {
  filter: drop-shadow(0 0 50px rgba(245, 158, 11, 0.9)) drop-shadow(0 0 100px rgba(251, 191, 36, 0.6)) drop-shadow(0 0 150px rgba(14, 165, 233, 0.3)) saturate(1.4) brightness(1.15);
}

[data-theme="summer"] .matrix-background { opacity: 0.25; }

/* Summer: Sun rays and waves on cat hover */
[data-theme="summer"] .hero-mascot::before {
  content: "☀ ≋ ✺ ☀ ≋ ✺ ☀";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  letter-spacing: 0.8rem;
  color: rgba(245, 158, 11, 0);
  text-shadow: none;
  pointer-events: none;
  z-index: 10;
  transition: none;
}

[data-theme="summer"] .hero-mascot.theme-activated::before {
  animation: summer-rays 2.5s ease-out forwards;
}
.can-hover[data-theme="summer"] .hero-mascot:hover::before {
  animation: summer-rays 2.5s ease-out forwards;
}

@keyframes summer-rays {
  0% {
    opacity: 0;
    color: rgba(245, 158, 11, 0);
    transform: translateX(-50%) translateY(-20px) scale(0.3) rotate(-10deg);
  }
  15% {
    opacity: 1;
    color: rgba(245, 158, 11, 1);
    transform: translateX(-48%) translateY(5px) scale(1.15) rotate(5deg);
  }
  35% {
    color: rgba(251, 191, 36, 1);
    transform: translateX(-52%) translateY(35px) scale(1.1) rotate(-5deg);
  }
  55% {
    transform: translateX(-47%) translateY(60px) scale(1.05) rotate(3deg);
  }
  75% {
    opacity: 0.7;
    color: rgba(14, 165, 233, 0.8);
    transform: translateX(-53%) translateY(90px) scale(0.95) rotate(-3deg);
  }
  100% {
    opacity: 0;
    color: rgba(14, 165, 233, 0);
    transform: translateX(-50%) translateY(120px) scale(0.8) rotate(0deg);
  }
}

/* Fall/Autumn - Warm harvest colors */
html[data-theme="fall"] {
  --bg-primary: #1c1410;
  --bg-secondary: #2a1f18;
  --bg-card: #382a20;
  --bg-card-hover: #483828;
  --text-primary: #fcd9b6;
  --text-secondary: #d4a574;
  --text-muted: #a08060;
  --accent: #dc7633;
  --accent-hover: #c0612a;
  --accent-glow: rgba(220, 118, 51, 0.2);
  --accent-rgb: 220, 118, 51;
  --border: #4a3828;
  --border-light: #5a4838;
  --header-bg: rgba(28, 20, 16, 0.95);
}

[data-theme="fall"] .cyber-cat {
  filter: drop-shadow(0 20px 40px rgba(220, 118, 51, 0.25)) sepia(0.2) saturate(1.3);
}

.can-hover[data-theme="fall"] .cyber-cat:hover,
[data-theme="fall"] .cyber-cat.mobile-glow {
  filter: drop-shadow(0 0 40px rgba(220, 118, 51, 0.9)) drop-shadow(0 0 80px rgba(185, 83, 27, 0.6)) drop-shadow(0 0 120px rgba(234, 179, 8, 0.4)) sepia(0.1) saturate(1.5);
}

[data-theme="fall"] .matrix-background { opacity: 0.25; }

/* Fall: Falling leaves on cat hover */
[data-theme="fall"] .hero-mascot::before {
  content: "❧ ✤ ♣ ❧ ✤ ♣ ❧";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  letter-spacing: 0.8rem;
  color: rgba(220, 118, 51, 0);
  text-shadow: none;
  pointer-events: none;
  z-index: 10;
  transition: none;
}

[data-theme="fall"] .hero-mascot.theme-activated::before {
  animation: fall-leaves 3s ease-out forwards;
}
.can-hover[data-theme="fall"] .hero-mascot:hover::before {
  animation: fall-leaves 3s ease-out forwards;
}

@keyframes fall-leaves {
  0% {
    opacity: 0;
    color: rgba(220, 118, 51, 0);
    transform: translateX(-50%) translateY(-20px) scale(0.5);
  }
  20% {
    opacity: 1;
    color: rgba(220, 118, 51, 0.9);
    transform: translateX(-45%) translateY(0px) scale(1) rotate(-5deg);
  }
  40% {
    transform: translateX(-55%) translateY(20px) scale(1.05) rotate(5deg);
  }
  60% {
    transform: translateX(-48%) translateY(40px) scale(1) rotate(-3deg);
  }
  80% {
    opacity: 0.6;
    color: rgba(185, 83, 27, 0.7);
    transform: translateX(-52%) translateY(60px) scale(0.95) rotate(3deg);
  }
  100% {
    opacity: 0;
    color: rgba(185, 83, 27, 0);
    transform: translateX(-50%) translateY(80px) scale(0.8) rotate(0deg);
  }
}

/* Spring - Fresh blooming colors */
html[data-theme="spring"] {
  --bg-primary: #f0fdf4;
  --bg-secondary: #dcfce7;
  --bg-card: #ffffff;
  --bg-card-hover: #f0fdf4;
  --text-primary: #166534;
  --text-secondary: #15803d;
  --text-muted: #6b7280;
  --accent: #22c55e;
  --accent-hover: #16a34a;
  --accent-glow: rgba(34, 197, 94, 0.15);
  --accent-rgb: 34, 197, 94;
  --border: #bbf7d0;
  --border-light: #dcfce7;
  --header-bg: rgba(240, 253, 244, 0.95);
}

[data-theme="spring"] .cyber-cat {
  filter: drop-shadow(0 20px 40px rgba(34, 197, 94, 0.25)) hue-rotate(30deg) saturate(1.1) brightness(1.05);
}

.can-hover[data-theme="spring"] .cyber-cat:hover,
[data-theme="spring"] .cyber-cat.mobile-glow {
  filter: drop-shadow(0 0 40px rgba(34, 197, 94, 0.8)) drop-shadow(0 0 80px rgba(236, 72, 153, 0.5)) drop-shadow(0 0 120px rgba(168, 85, 247, 0.3)) hue-rotate(30deg) saturate(1.3) brightness(1.1);
}

[data-theme="spring"] .matrix-background { opacity: 0.35; }

/* Spring: Blooming flowers on cat hover */
[data-theme="spring"] .hero-mascot::before {
  content: "✿ ❀ ✾ ✿ ❀ ✾ ✿";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  letter-spacing: 0.8rem;
  color: rgba(34, 197, 94, 0);
  text-shadow: none;
  pointer-events: none;
  z-index: 10;
  transition: none;
}

[data-theme="spring"] .hero-mascot.theme-activated::before {
  animation: spring-bloom 2.5s ease-out forwards;
}
.can-hover[data-theme="spring"] .hero-mascot:hover::before {
  animation: spring-bloom 2.5s ease-out forwards;
}

@keyframes spring-bloom {
  0% {
    opacity: 0;
    color: rgba(34, 197, 94, 0);
    transform: translateX(-50%) translateY(-20px) scale(0.3);
  }
  15% {
    opacity: 1;
    color: rgba(236, 72, 153, 0.9);
    transform: translateX(-48%) translateY(5px) scale(1.1);
  }
  35% {
    color: rgba(168, 85, 247, 0.9);
    transform: translateX(-53%) translateY(35px) scale(1.05);
  }
  55% {
    color: rgba(34, 197, 94, 0.9);
    transform: translateX(-47%) translateY(60px) scale(1);
  }
  75% {
    opacity: 0.7;
    color: rgba(236, 72, 153, 0.7);
    transform: translateX(-52%) translateY(90px) scale(0.95);
  }
  100% {
    opacity: 0;
    color: rgba(34, 197, 94, 0);
    transform: translateX(-50%) translateY(115px) scale(0.85);
  }
}

/* Synthwave - 80s retro-futuristic neon */
html[data-theme="synthwave"] {
  --bg-primary: #1a1025;
  --bg-secondary: #2d1b3d;
  --bg-card: #3d2550;
  --bg-card-hover: #4d3560;
  --text-primary: #ff6ad5;
  --text-secondary: #c774e8;
  --text-muted: #8b5a9e;
  --accent: #ff6ad5;
  --accent-hover: #ff8de0;
  --accent-glow: rgba(255, 106, 213, 0.2);
  --accent-rgb: 255, 106, 213;
  --border: #5d3570;
  --border-light: #7d4590;
  --header-bg: rgba(26, 16, 37, 0.95);
}

/* Synthwave: Hot pink with cyan accents - 80s neon grid vibes */
[data-theme="synthwave"] .cyber-cat {
  filter: drop-shadow(0 20px 40px rgba(255, 106, 213, 0.3)) drop-shadow(0 0 60px rgba(0, 255, 255, 0.2)) hue-rotate(-25deg) saturate(1.4) brightness(1.1);
}

.can-hover[data-theme="synthwave"] .cyber-cat:hover,
[data-theme="synthwave"] .cyber-cat.mobile-glow {
  filter: drop-shadow(0 0 40px rgba(255, 106, 213, 1)) drop-shadow(0 0 80px rgba(0, 255, 255, 0.7)) drop-shadow(0 0 120px rgba(255, 106, 213, 0.5)) hue-rotate(-25deg) saturate(1.6) brightness(1.15);
}

[data-theme="synthwave"] .matrix-background { opacity: 0.35; }

[data-theme="synthwave"] .konami-content h2,
[data-theme="synthwave"] .post-category,
[data-theme="synthwave"] .toc-title svg,
[data-theme="synthwave"] .related-posts h4 svg,
[data-theme="synthwave"] .comments-section h4 svg,
[data-theme="synthwave"] .shortcuts-header svg {
  color: #ff6ad5;
  text-shadow: 0 0 10px rgba(255, 106, 213, 0.5), 0 0 20px rgba(0, 255, 255, 0.3);
}

/* ============================================
   THEMES PAGE
   ============================================ */
.themes-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.themes-intro p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.theme-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.theme-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.theme-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 12px 40px rgba(0, 0, 0, 0.3);
}

.theme-card.active::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-card.active::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 17px;
  width: 6px;
  height: 10px;
  border: solid var(--bg-primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  z-index: 1;
}

.theme-card.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.theme-card.locked:hover {
  transform: none;
  border-color: var(--border);
}

.theme-preview {
  height: 100px;
  border-radius: 10px;
  margin-bottom: 1rem;
  display: flex;
  gap: 6px;
  padding: 12px;
  position: relative;
  overflow: hidden;
}

.preview-sidebar {
  width: 30%;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}

.preview-line {
  height: 6px;
  border-radius: 3px;
  width: 80%;
}

.preview-line:nth-child(2) { width: 60%; }
.preview-line:nth-child(3) { width: 70%; }

.preview-content {
  flex: 1;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-title {
  height: 10px;
  border-radius: 3px;
  width: 60%;
}

.preview-text {
  height: 6px;
  border-radius: 3px;
}

.preview-text:nth-child(2) { width: 100%; }
.preview-text:nth-child(3) { width: 85%; }
.preview-text:nth-child(4) { width: 90%; }

.theme-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.theme-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.theme-badge.secret {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
}

.theme-badge.new {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: white;
}

.theme-badge.accessibility {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: white;
}

.theme-badge.seasonal {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: white;
}

.theme-swatches {
  display: flex;
  gap: 6px;
  margin-top: 1rem;
}

.theme-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.secret-hint {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px dashed var(--border);
}

.secret-hint h4 {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.secret-hint p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.secret-hint code {
  background: var(--bg-secondary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  color: var(--accent);
}

/* Theme toast notification */
.theme-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 1rem 2rem;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.95rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toast.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.theme-toast-icon {
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .themes-grid {
    grid-template-columns: 1fr;
  }

  .theme-preview {
    height: 80px;
  }
}

/* ============================================
   GLOSSARY PAGE
   ============================================ */
.glossary-search {
  margin-bottom: 2rem;
}

.glossary-search input {
  width: 100%;
  max-width: 400px;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}

.glossary-search input:focus { border-color: var(--accent); }
.glossary-search input::placeholder { color: var(--text-muted); }

.glossary-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.glossary-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s ease;
}

.glossary-item:hover { border-color: var(--accent); }

.glossary-term {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.glossary-abbr {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: var(--accent-glow);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--text-secondary);
}

.glossary-def {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.glossary-category {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   FALLBACKS FOR OLDER BROWSERS (Safari < 14.1)
   Provides margin-based spacing when flex gap isn't supported
   ============================================ */
@supports not (gap: 1rem) {
  /* Hero CTA buttons */
  .hero-cta > * { margin-right: 1rem; margin-bottom: 0.5rem; }
  .hero-cta > *:last-child { margin-right: 0; }

  /* Share buttons */
  .share-buttons > * { margin-right: 0.75rem; margin-bottom: 0.5rem; }
  .share-buttons > *:last-child { margin-right: 0; }

  /* Navigation links */
  .main-nav ul > * { margin-left: 2rem; }
  .main-nav ul > *:first-child { margin-left: 0; }

  /* Footer social links */
  .social-links > * { margin-right: 1rem; }
  .social-links > *:last-child { margin-right: 0; }

  /* Error page actions */
  .error-actions > * { margin-right: 1rem; margin-bottom: 0.5rem; }
  .error-actions > *:last-child { margin-right: 0; }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
/* Standard properties (Firefox, future browsers) */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) var(--bg-secondary);
}

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 5px;
  border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ============================================
   ANIMATED LINK UNDERLINES
   ============================================ */
.content a:not(.btn):not(.share-btn):not(.related-card) {
  position: relative;
  text-decoration: none;
  border-bottom: none;
}

.content a:not(.btn):not(.share-btn):not(.related-card)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.content a:not(.btn):not(.share-btn):not(.related-card):hover::after {
  width: 100%;
}

/* ============================================
   SCROLL-TRIGGERED ANIMATIONS
   CSS-only fallback for Safari + JS enhancement
   ============================================ */

/* CSS Keyframe animations for hero section (auto-play, no JS needed) */
@-webkit-keyframes fadeInLeft {
  from { opacity: 0; -webkit-transform: translateX(-12px); transform: translateX(-12px); }
  to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@-webkit-keyframes fadeInRight {
  from { opacity: 0; -webkit-transform: translateX(12px); transform: translateX(12px); }
  to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

@-webkit-keyframes fadeInUp {
  from { opacity: 0; -webkit-transform: translateY(15px); transform: translateY(15px); }
  to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero section - pure CSS animations (guaranteed to work on iOS Safari) */
.hero .hero-content {
  -webkit-animation: fadeInLeft 0.9s ease-out 0.1s forwards;
  animation: fadeInLeft 0.9s ease-out 0.1s forwards;
  opacity: 0;
}

.hero .hero-mascot {
  -webkit-animation: fadeInRight 1s ease-out 0.2s forwards;
  animation: fadeInRight 1s ease-out 0.2s forwards;
  opacity: 0;
}

/* Fade animations - for scroll-triggered elements (JS adds .visible class) */
.fade-in-up {
  opacity: 0;
  -webkit-transform: translateY(20px);
  transform: translateY(20px);
  -webkit-transition: opacity 0.6s ease, -webkit-transform 0.6s ease;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  -webkit-transform: translateX(-20px);
  transform: translateX(-20px);
  -webkit-transition: opacity 0.6s ease, -webkit-transform 0.6s ease;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  -webkit-transform: translateX(0);
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  -webkit-transform: translateX(20px);
  transform: translateX(20px);
  -webkit-transition: opacity 0.6s ease, -webkit-transform 0.6s ease;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  -webkit-transform: translateX(0);
  transform: translateX(0);
}

/* Stagger children animations (Safari-compatible) */
.stagger-children > * {
  opacity: 0;
  -webkit-transform: translateY(15px);
  transform: translateY(15px);
  -webkit-transition: opacity 0.4s ease, -webkit-transform 0.4s ease;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.stagger-children.visible > *:nth-child(1) { -webkit-transition-delay: 0.1s; transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { -webkit-transition-delay: 0.2s; transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { -webkit-transition-delay: 0.3s; transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { -webkit-transition-delay: 0.4s; transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { -webkit-transition-delay: 0.5s; transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { -webkit-transition-delay: 0.6s; transition-delay: 0.6s; }

.stagger-children.visible > * {
  opacity: 1;
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-in-up,
  .fade-in-left,
  .fade-in-right,
  .stagger-children > * {
    opacity: 1 !important;
    transform: none !important;
  }

  .matrix-background,
  .hero-gradient {
    display: none !important;
  }
}

/* ============================================
   FOCUS STATES FOR KEYBOARD NAVIGATION
   ============================================ */
/* Only show focus ring for keyboard navigation, not mouse clicks */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Specific focus styles for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* High contrast focus for floating buttons */
.theme-toggle:focus-visible,
.back-to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  opacity: 1;
}

/* ============================================
   QUICK THEME PICKER DROPDOWN
   ============================================ */
.theme-picker-wrap {
  position: relative;
}

.theme-picker-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  /* Only transition hover effects, not theme color changes */
  transition: border-color 0.2s ease, background 0.2s ease;
}

.theme-picker-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.theme-picker-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  /* Fixed colors for consistency across all themes */
  background: #1a1a1f;
  border: 1px solid #2a2a30;
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 160px;
  max-height: 70vh;
  overflow-y: auto;
  /* Prevent scroll from chaining to parent/body on mobile */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  /* Only transition animation properties, not colors - prevents weird color flashes on theme switch */
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

/* Custom scrollbar for theme picker */
.theme-picker-dropdown::-webkit-scrollbar {
  width: 6px;
}
.theme-picker-dropdown::-webkit-scrollbar-track {
  background: #2a2a30;
  border-radius: 3px;
}
.theme-picker-dropdown::-webkit-scrollbar-thumb {
  background: #4a4a50;
  border-radius: 3px;
}
.theme-picker-dropdown::-webkit-scrollbar-thumb:hover {
  background: #5a5a60;
}

.theme-picker-wrap.active .theme-picker-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Section headers in dropdown */
.theme-section-label {
  color: #888;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.75rem 0.25rem;
  font-weight: 600;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  /* Fixed light text for consistency */
  color: #e5e5e5;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  /* Only transition background for hover, colors change instantly with theme */
  transition: background 0.15s ease;
  text-decoration: none;
}

.theme-option:hover {
  background: rgba(245, 166, 35, 0.15);
}

.theme-option.active {
  background: rgba(245, 166, 35, 0.2);
  color: #f5a623;
}

.theme-option span {
  font-size: 1rem;
}

/* Theme color preview swatches - show actual theme colors in dropdown */
.theme-option[data-theme="dark"]::after {
  content: "";
  margin-left: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d1117, #f5a623);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-option[data-theme="light"]::after {
  content: "";
  margin-left: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fafafa, #d97706);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.theme-option[data-theme="cyberpunk"]::after {
  content: "";
  margin-left: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f0a1a, #ff2d95);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-option[data-theme="ocean"]::after {
  content: "";
  margin-left: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0a1628, #06b6d4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-option[data-theme="sunset"]::after {
  content: "";
  margin-left: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a0f1f, #f97316);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-option[data-theme="terminal"]::after {
  content: "";
  margin-left: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #000000, #33ff33);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-option[data-theme="highcontrast"]::after {
  content: "";
  margin-left: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #000000, #ffff00);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.theme-option[data-theme="synthwave"]::after {
  content: "";
  margin-left: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1025, #ff6ad5);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-option[data-theme="winter"]::after {
  content: "";
  margin-left: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d1b2a, #4dd0e1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-option[data-theme="christmas"]::after {
  content: "";
  margin-left: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c62828, #2e7d32);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-option[data-theme="halloween"]::after {
  content: "";
  margin-left: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a0a1f, #ff6f00);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-option[data-theme="spring"]::after {
  content: "";
  margin-left: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0fdf4, #22c55e);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-option[data-theme="summer"]::after {
  content: "";
  margin-left: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0c1929, #f59e0b);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-option[data-theme="fall"]::after {
  content: "";
  margin-left: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1c1410, #dc7633);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-option[data-theme="easter"]::after {
  content: "";
  margin-left: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fdf6f9, #e879a9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

.theme-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem 0.2rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.theme-more {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* No-JS fallback: show content immediately if JS hasn't loaded yet */
.no-js .fade-in-up,
.no-js .fade-in-left,
.no-js .fade-in-right,
.no-js .stagger-children > * {
  opacity: 1;
  transform: none;
}

/* ============================================
   ANIMATED GRADIENT HERO BACKGROUND
   ============================================ */
.hero-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(245, 158, 11, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(245, 158, 11, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 40% 80%, rgba(217, 119, 6, 0.08) 0%, transparent 40%);
  animation: gradient-shift 15s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gradient-shift {
  0%, 100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  33% {
    opacity: 0.8;
    transform: scale(1.1) rotate(1deg);
  }
  66% {
    opacity: 0.9;
    transform: scale(0.95) rotate(-1deg);
  }
}

[data-theme="light"] .hero-gradient {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(217, 119, 6, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(217, 119, 6, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 40% 80%, rgba(180, 83, 9, 0.06) 0%, transparent 40%);
}

[data-theme="fall"] .hero-gradient {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(220, 118, 51, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(185, 83, 27, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 40% 80%, rgba(234, 179, 8, 0.06) 0%, transparent 40%),
    linear-gradient(to bottom, transparent 70%, #1c1410 100%);
}

/* ============================================
   3D TILT EFFECT ON CARDS
   ============================================ */
.post-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.post-card.tilt {
  transition: transform 0.1s ease;
}

.post-card .post-card-inner {
  transition: transform 0.3s ease;
}

.post-card:hover .post-card-inner {
  transform: translateZ(20px);
}

/* ============================================
   MAGNETIC BUTTON EFFECT
   ============================================ */
.btn-magnetic {
  position: relative;
  transition: transform 0.2s ease;
}

/* ============================================
   CURSOR TRAIL
   ============================================ */
.cursor-trail {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cursor-trail.active {
  opacity: 0.6;
  transform: scale(1);
  animation: trail-fade 0.5s ease forwards;
}

@keyframes trail-fade {
  to {
    opacity: 0;
    transform: scale(0.5);
  }
}

/* ============================================
   READING LIST / BOOKMARKS
   ============================================ */
.bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}

.bookmark-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.bookmark-btn.bookmarked {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

.bookmark-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.bookmark-btn.bookmarked svg {
  fill: var(--accent);
  transform: scale(1.1);
}

/* Reading list page */
.reading-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reading-list-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.reading-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.reading-list-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.reading-list-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.reading-list-item-remove:hover {
  color: #ef4444;
}

/* ============================================
   POST REACTIONS
   ============================================ */
.post-reactions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reaction-btn:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.reaction-btn.reacted {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.reaction-btn .count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.reaction-btn.reacted .count {
  color: var(--accent);
}

/* ============================================
   COFFEE CUPS READING TIME
   ============================================ */
.coffee-time {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.coffee-time .cups {
  display: inline-flex;
  align-items: center;
}

.coffee-time .cups svg {
  width: 1.1em;
  height: 1.1em;
}

.coffee-time .meta-separator {
  margin-right: 0.25rem;
  color: var(--text-muted);
}

/* ============================================
   GLITCH TEXT EFFECT
   ============================================ */
.glitch {
  position: relative;
  animation: glitch-skew 4s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch::before {
  color: #ff00ff;
  animation: glitch-effect 3s infinite linear alternate-reverse;
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  -webkit-transform: translateX(-2px);
  transform: translateX(-2px);
}

.glitch::after {
  color: #00ffff;
  animation: glitch-effect 2s infinite linear alternate-reverse;
  -webkit-clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  -webkit-transform: translateX(2px);
  transform: translateX(2px);
}

@keyframes glitch-effect {
  0%, 90%, 100% { opacity: 0; }
  92%, 94%, 96%, 98% { opacity: 0.8; }
}

@keyframes glitch-skew {
  0%, 90%, 100% { transform: skew(0deg); }
  92% { transform: skew(2deg); }
  94% { transform: skew(-1deg); }
  96% { transform: skew(1deg); }
  98% { transform: skew(-2deg); }
}

/* ============================================
   DECRYPT TEXT ANIMATION
   ============================================ */
.decrypt-text {
  font-family: var(--font-mono);
}

.decrypt-text .char {
  display: inline-block;
  transition: opacity 0.1s ease;
}

.decrypt-text .char.decrypting {
  animation: decrypt-char 0.1s linear infinite;
}

@keyframes decrypt-char {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Glitch and decrypt effects - enabled on all devices */
/* Previously disabled on mobile, now enabled for consistent experience */

/* ============================================
   VERIFIED BADGE
   ============================================ */
.security-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 4px;
  font-size: 0.75rem;
  color: #22c55e;
  font-family: var(--font-mono);
}

.security-verified svg {
  width: 12px;
  height: 12px;
}

/* ============================================
   THREAT LEVEL INDICATOR (Fun Easter Egg)
   ============================================ */
.threat-level {
  position: fixed;
  bottom: 6rem;
  left: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  z-index: 98;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

/* Hide threat level on blog post pages to prevent overlap */
.post-article ~ .threat-level,
body:has(.post-article) .threat-level {
  display: none;
}

.threat-level.visible {
  opacity: 1;
  transform: translateY(0);
}

.threat-level-bar {
  width: 60px;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.threat-level-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.threat-level:hover {
  border-color: var(--accent);
}

.threat-level.scanning {
  border-color: var(--accent);
  animation: pulse-border 0.5s ease infinite;
}

.threat-level.scan-complete {
  border-color: #22c55e;
}

.threat-level.scan-complete .threat-text {
  color: #22c55e;
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0); }
}

@media (max-width: 768px) {
  .threat-level { display: none; }
}

/* ============================================
   VIEW TRANSITIONS API (Progressive Enhancement)
   ============================================ */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
}

/* ============================================
   PRINT STYLESHEET
   ============================================ */
@media print {
  /* Hide non-essential elements */
  .site-header,
  .site-footer,
  .theme-toggle,
  .back-to-top,
  .command-palette,
  .command-palette-overlay,
  .konami-overlay,
  .shortcuts-overlay,
  .share-section,
  .comments-section,
  .related-posts,
  .toc-sidebar,
  .reading-progress,
  .matrix-background,
  .hero-gradient,
  .threat-level,
  .post-reactions,
  .bookmark-btn,
  .copy-btn,
  .ask-cat-btn,
  .ask-cat-modal {
    display: none !important;
  }

  /* Reset backgrounds and colors for printing */
  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
    line-height: 1.5;
  }

  .post-header,
  .post-content,
  .content,
  .section {
    background: white !important;
    color: black !important;
  }

  /* Ensure links are visible */
  a {
    color: black !important;
    text-decoration: underline !important;
  }

  /* Show URL after links */
  .content a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  /* Page breaks */
  h1, h2, h3 {
    page-break-after: avoid;
  }

  pre, blockquote {
    page-break-inside: avoid;
  }

  /* Code blocks */
  pre {
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    padding: 1rem !important;
    white-space: pre-wrap;
    word-wrap: break-word;
  }

  code {
    background: #f5f5f5 !important;
    color: black !important;
  }

  /* Full width content */
  .container,
  .post-content,
  .post-body {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .post-container {
    display: block !important;
  }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.toast.active {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon { font-size: 1.1rem; }
.toast-message { color: var(--text-primary); font-size: 0.9rem; }

/* ============================================
   THREAT FEEDS PAGE
   ============================================ */
.threat-feeds-section {
  padding-bottom: 4rem;
}

.threat-feeds-container {
  max-width: 900px;
  margin: 0 auto;
}

/* Header with status indicator */
.threat-feeds-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.threat-feeds-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-indicator.status-live {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
  animation: pulse-live 2s infinite;
}

.status-indicator.status-demo {
  background: var(--accent);
}

.status-indicator.status-loading {
  background: var(--accent);
  animation: pulse-loading 1s infinite;
}

.status-indicator.status-error {
  background: #ef4444;
}

.last-updated {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
}

/* Demo mode warning banner */
.demo-warning-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--accent);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  color: var(--accent);
  font-size: 0.9rem;
}

.demo-warning-banner svg {
  flex-shrink: 0;
  stroke: var(--accent);
}

.demo-warning-banner span {
  flex: 1;
}

.demo-warning-banner strong {
  font-weight: 600;
}

.demo-warning-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.demo-warning-close:hover {
  opacity: 1;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulse-loading {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Filters section */
.threat-feeds-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.feed-tabs {
  display: flex;
  gap: 0.5rem;
}

.feed-tab {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all 0.2s ease;
}

.feed-tab:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.feed-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 500;
}

.feed-search {
  flex: 1;
  max-width: 300px;
}

.feed-search input {
  width: 100%;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-display);
  transition: border-color 0.2s ease;
}

.feed-search input:focus {
  outline: none;
  border-color: var(--accent);
}

.feed-search input::placeholder {
  color: var(--text-muted);
}

/* Feed list */
.threat-feeds-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 400px;
}

/* Loading state */
.feed-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.feed-empty,
.feed-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.feed-error button {
  margin-top: 1rem;
}

/* Feed item card */
.feed-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.feed-item:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.feed-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.feed-severity {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.severity-critical {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.severity-high {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.severity-medium {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.severity-low {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.feed-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.feed-item-body {
  margin-bottom: 1rem;
}

.feed-item-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.feed-item-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.feed-item-title a:hover {
  color: var(--accent);
}

.feed-vendor {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feed-item-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.feed-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feed-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-cvss {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.badge-kev {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.badge-ransomware {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-due {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.badge-overdue {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.feed-item-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.feed-link {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.feed-link:hover {
  color: var(--accent-hover);
}

/* Footer */
.threat-feeds-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.feed-sources {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.feed-sources a {
  color: var(--accent);
  text-decoration: none;
}

.feed-sources a:hover {
  text-decoration: underline;
}

.feed-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Severity filter buttons */
.threat-feeds-severity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.severity-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-right: 0.25rem;
}

.severity-btn {
  padding: 0.35rem 0.75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all 0.2s ease;
}

.severity-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.severity-btn.active {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
}

.severity-btn[data-severity="critical"].active {
  border-color: #ef4444;
  color: #ef4444;
}

.severity-btn[data-severity="high"].active {
  border-color: #f97316;
  color: #f97316;
}

.severity-btn[data-severity="medium"].active {
  border-color: #eab308;
  color: #eab308;
}

/* News badge */
.badge-news {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

/* News item styling */
.feed-item-news {
  border-left: 3px solid #3b82f6;
}

/* Alert badge */
.badge-alert {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

/* Alert item styling */
.feed-item-alert {
  border-left: 3px solid #f97316;
}

/* NEW badge for items since last visit */
.badge-new {
  background: #22c55e;
  color: #000;
  font-weight: 600;
  animation: pulse-new 2s ease-in-out infinite;
}

@keyframes pulse-new {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Feed item new state */
.feed-item-new {
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3), 0 0 12px rgba(34, 197, 94, 0.1);
}

/* Header right section with bookmark and time */
.feed-item-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Bookmark button */
.bookmark-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.bookmark-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
}

.bookmark-btn.bookmarked {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(245, 158, 11, 0.15);
}

/* New items indicator in header */
.threat-feeds-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.threat-feeds-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.new-items-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.4rem;
  background: #22c55e;
  color: #000;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 10px;
}

.new-items-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Options row with severity and extra filters */
.threat-feeds-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.threat-feeds-severity {
  margin-bottom: 0;
}

.threat-feeds-extra-filters {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Vendor filter dropdown */
.vendor-filter-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.vendor-filter {
  padding: 0.4rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-display);
  cursor: pointer;
  min-width: 140px;
  transition: border-color 0.2s ease;
}

.vendor-filter:hover {
  border-color: var(--text-muted);
}

.vendor-filter:focus {
  outline: none;
  border-color: var(--accent);
}

/* Bookmarks toggle */
.bookmarks-toggle-wrap {
  display: flex;
  align-items: center;
}

.bookmarks-checkbox {
  display: none;
}

.bookmarks-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bookmarks-label:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.bookmarks-checkbox:checked + .bookmarks-label {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
}

.bookmarks-label svg {
  flex-shrink: 0;
}

/* ============================================
   HOMEPAGE THREAT WIDGET
   ============================================ */
.threat-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.threat-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.threat-widget-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.threat-widget-header a {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.threat-widget-header a:hover {
  text-decoration: underline;
}

.threat-widget-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.threat-widget-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.threat-widget-item:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.threat-widget-severity {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.threat-widget-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.threat-widget-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.threat-widget-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .threat-feeds-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .threat-feeds-header-left {
    order: 2;
  }

  .threat-feeds-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .feed-tabs {
    justify-content: center;
    flex-wrap: wrap;
  }

  .feed-tab {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .feed-search {
    max-width: 100%;
  }

  .threat-feeds-options {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .threat-feeds-severity {
    justify-content: center;
  }

  .severity-label {
    width: 100%;
    text-align: center;
    margin-bottom: 0.25rem;
  }

  .threat-feeds-extra-filters {
    flex-direction: column;
    gap: 0.75rem;
  }

  .vendor-filter-wrap {
    width: 100%;
    justify-content: center;
  }

  .vendor-filter {
    flex: 1;
    min-width: 0;
  }

  .bookmarks-toggle-wrap {
    justify-content: center;
  }

  .feed-item {
    padding: 1rem;
  }

  .feed-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .feed-item-header-right {
    width: 100%;
    justify-content: space-between;
  }

  .feed-item-meta {
    gap: 0.35rem;
  }

  .feed-badge {
    font-size: 0.65rem;
  }

  .threat-widget {
    padding: 1rem;
  }
}

/* ============================================
   CODE BLOCK COPY BUTTON
   Merged from copy-button.css for -1 HTTP request
   ============================================ */
.code-block-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.code-block-wrapper pre {
  margin-bottom: 0;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 10;
}

.code-block-wrapper:hover .copy-btn {
  opacity: 1;
}

.copy-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0b;
}

.copy-btn.copied {
  background: #22c55e;
  border-color: #22c55e;
  color: white;
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}
