/* === CSS CUSTOM PROPERTIES (DESIGN SYSTEM) === */
:root {
  /* Colors from technical design system */
  --bg-primary: #0A0E1A;
  --bg-secondary: #1A1F2E;
  --bg-tertiary: #1a1a1a;
  --surface: #242B3D;
  --border: #2D3548;
  
  /* Text hierarchy */
  --text-primary: #E2E8F0;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  /* Accent colors */
  --accent: #0EA5E9;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', 'Monaco', 'Cascadia Code', monospace;
  
  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-xxl: 5rem;

  /* Text on colored backgrounds */
  --text-on-accent: #ffffff;
  --text-on-dark: #ffffff;
  
  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Z-index layers */
  --z-header: 400;
  --z-nav-menu: 450;
  --z-toc-overlay: 350;
  --z-toc-panel: 351;
  /* Raise toggle above nav/menu to ensure it stays clickable */
  --z-toc-toggle: 460;
}

/* === RESET AND BASE STYLES === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #38BDF8;
}

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

.accent-text {
  color: var(--accent);
}

.text-muted {
  color: var(--text-muted);
}

/* === BUTTON COMPONENTS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent);
  color: white;
  border-color: var(--accent);
}

.btn-primary:hover {
  background-color: #0284c7;
  border-color: #0284c7;
  color: white;
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: white;
}

/* === HEADER & NAVIGATION === */
.header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-xl);
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.nav-brand a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: -2px;
  font-family: var(--font-mono);
}

/* === NAV BRAND GLITCH EFFECT === */
.nav-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.nav-brand.glitch {
  animation: nav-glitch-container 250ms ease-in-out;
}

.nav-brand.glitch a {
  animation: nav-glitch-text 250ms ease-in-out;
  position: relative;
}

.nav-brand.glitch a::before,
.nav-brand.glitch a::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.nav-brand.glitch a::before {
  animation: nav-glitch-layer-1 250ms ease-in-out;
  color: #ff0040;
  text-shadow: -1px 0 #ff0040;
  z-index: -1;
}

.nav-brand.glitch a::after {
  animation: nav-glitch-layer-2 250ms ease-in-out;
  color: #00ffff;
  text-shadow: 1px 0 #00ffff;
  z-index: -2;
}

@keyframes nav-glitch-container {
  0%, 100% { transform: translate(0); }
  10% { transform: translate(-1px, -1px); }
  20% { transform: translate(1px, 1px); }
  30% { transform: translate(-1px, 1px); }
  40% { transform: translate(1px, -1px); }
  50% { transform: translate(-1px, -1px); }
  60% { transform: translate(1px, 1px); }
  70% { transform: translate(-1px, 1px); }
  80% { transform: translate(1px, -1px); }
  90% { transform: translate(-1px, -1px); }
}

@keyframes nav-glitch-layer-1 {
  0% { clip-path: inset(40% 0 43% 0); transform: translateX(-1px); }
  10% { clip-path: inset(54% 0 21% 0); transform: translateX(1px); }
  20% { clip-path: inset(25% 0 58% 0); transform: translateX(-1px); }
  30% { clip-path: inset(69% 0 15% 0); transform: translateX(1px); }
  40% { clip-path: inset(33% 0 45% 0); transform: translateX(-1px); }
  50% { clip-path: inset(80% 0 5% 0); transform: translateX(1px); }
  60% { clip-path: inset(12% 0 70% 0); transform: translateX(-1px); }
  70% { clip-path: inset(47% 0 32% 0); transform: translateX(1px); }
  80% { clip-path: inset(61% 0 18% 0); transform: translateX(-1px); }
  90% { clip-path: inset(29% 0 48% 0); transform: translateX(1px); }
  100% { clip-path: inset(40% 0 43% 0); transform: translateX(0); }
}

@keyframes nav-glitch-layer-2 {
  0% { clip-path: inset(25% 0 58% 0); transform: translateX(1px); }
  10% { clip-path: inset(69% 0 15% 0); transform: translateX(-1px); }
  20% { clip-path: inset(40% 0 43% 0); transform: translateX(1px); }
  30% { clip-path: inset(54% 0 21% 0); transform: translateX(-1px); }
  40% { clip-path: inset(80% 0 5% 0); transform: translateX(1px); }
  50% { clip-path: inset(33% 0 45% 0); transform: translateX(-1px); }
  60% { clip-path: inset(47% 0 32% 0); transform: translateX(1px); }
  70% { clip-path: inset(12% 0 70% 0); transform: translateX(-1px); }
  80% { clip-path: inset(29% 0 48% 0); transform: translateX(1px); }
  90% { clip-path: inset(61% 0 18% 0); transform: translateX(-1px); }
  100% { clip-path: inset(25% 0 58% 0); transform: translateX(0); }
}

@keyframes nav-glitch-text {
  0%, 100% { transform: translate(0); text-shadow: none; }
  10% { transform: translate(-0.5px, -0.5px); text-shadow: 0.5px 0 #ff0040, -0.5px 0 #00ffff; }
  20% { transform: translate(0.5px, 0.5px); text-shadow: -0.5px 0 #ff0040, 0.5px 0 #00ffff; }
  30% { transform: translate(-0.5px, 0.5px); text-shadow: 0.5px 0 #ff0040, -0.5px 0 #00ffff; }
  40% { transform: translate(0.5px, -0.5px); text-shadow: -0.5px 0 #ff0040, 0.5px 0 #00ffff; }
  50% { transform: translate(-0.5px, -0.5px); text-shadow: 0.5px 0 #ff0040, -0.5px 0 #00ffff; }
  60% { transform: translate(0.5px, 0.5px); text-shadow: -0.5px 0 #ff0040, 0.5px 0 #00ffff; }
  70% { transform: translate(-0.5px, 0.5px); text-shadow: 0.5px 0 #ff0040, -0.5px 0 #00ffff; }
  80% { transform: translate(0.5px, -0.5px); text-shadow: -0.5px 0 #ff0040, 0.5px 0 #00ffff; }
  90% { transform: translate(-0.5px, -0.5px); text-shadow: 0.5px 0 #ff0040, -0.5px 0 #00ffff; }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .nav-brand.glitch,
  .nav-brand.glitch::before,
  .nav-brand.glitch::after,
  .nav-brand.glitch a,
  .hero-word.glitch-active,
  .hero-word.glitch-active::before,
  .hero-word.glitch-active::after {
    animation: none !important;
    transform: none !important;
    text-shadow: none !important;
  }
}

/* === HERO TITLE GLITCH EFFECT === */
.hero-word {
  position: relative;
  display: inline-block;
}

.hero-word.glitch-active {
  animation: hero-glitch-shake 300ms ease-in-out;
}

.hero-word.glitch-active::before,
.hero-word.glitch-active::after {
  content: attr(data-glitch);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.hero-word.glitch-active::before {
  animation: hero-glitch-layer-red 300ms ease-in-out;
  color: #ff0040;
  text-shadow: -2px 0 #ff0040;
  z-index: -1;
  clip-path: inset(0 0 40% 0);
}

.hero-word.glitch-active::after {
  animation: hero-glitch-layer-cyan 300ms ease-in-out;
  color: #00ffff;
  text-shadow: 2px 0 #00ffff;
  z-index: -2;
  clip-path: inset(60% 0 0 0);
}

@keyframes hero-glitch-shake {
  0%, 100% { transform: translate(0); }
  15% { transform: translate(-2px, 1px); }
  25% { transform: translate(2px, -1px); }
  35% { transform: translate(-1px, 2px); }
  45% { transform: translate(1px, -2px); }
  55% { transform: translate(-2px, -1px); }
  65% { transform: translate(2px, 1px); }
  75% { transform: translate(-1px, -2px); }
  85% { transform: translate(1px, 2px); }
}

@keyframes hero-glitch-layer-red {
  0% { transform: translateX(0); clip-path: inset(40% 0 43% 0); }
  10% { transform: translateX(-3px); clip-path: inset(25% 0 58% 0); }
  20% { transform: translateX(3px); clip-path: inset(69% 0 15% 0); }
  30% { transform: translateX(-2px); clip-path: inset(33% 0 45% 0); }
  40% { transform: translateX(2px); clip-path: inset(80% 0 5% 0); }
  50% { transform: translateX(-1px); clip-path: inset(12% 0 70% 0); }
  60% { transform: translateX(1px); clip-path: inset(47% 0 32% 0); }
  70% { transform: translateX(-2px); clip-path: inset(61% 0 18% 0); }
  80% { transform: translateX(2px); clip-path: inset(29% 0 48% 0); }
  90% { transform: translateX(-1px); clip-path: inset(54% 0 21% 0); }
  100% { transform: translateX(0); clip-path: inset(40% 0 43% 0); }
}

@keyframes hero-glitch-layer-cyan {
  0% { transform: translateX(0); clip-path: inset(25% 0 58% 0); }
  10% { transform: translateX(3px); clip-path: inset(69% 0 15% 0); }
  20% { transform: translateX(-3px); clip-path: inset(40% 0 43% 0); }
  30% { transform: translateX(2px); clip-path: inset(54% 0 21% 0); }
  40% { transform: translateX(-2px); clip-path: inset(80% 0 5% 0); }
  50% { transform: translateX(1px); clip-path: inset(33% 0 45% 0); }
  60% { transform: translateX(-1px); clip-path: inset(47% 0 32% 0); }
  70% { transform: translateX(2px); clip-path: inset(12% 0 70% 0); }
  80% { transform: translateX(-2px); clip-path: inset(29% 0 48% 0); }
  90% { transform: translateX(1px); clip-path: inset(61% 0 18% 0); }
  100% { transform: translateX(0); clip-path: inset(25% 0 58% 0); }
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
  align-items: center;
  position: relative;
  z-index: 200;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s ease;
  cursor: pointer;
  position: relative;
  z-index: 201;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 3px;
  position: relative;
  z-index: 500;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background-color: var(--text-secondary);
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* === HERO SECTION === */
.hero {
  padding: var(--space-3xl) 0;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

#hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero .container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

/* === HERO VISUAL REMOVED - Now using canvas background === */

/* === BUG EASTER EGG === */
.hero { position: relative; }

.bug-easter-egg {
  position: absolute;
  width: 32px;
  height: 24px;
  z-index: 11; /* ensure always visible above hero content */
  pointer-events: none;
  opacity: 0; /* hidden when idle */
  background-image: url('../assets/sprites/bug-walk-1.png');
  background-size: contain;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.bug-easter-egg.active {
  opacity: 1;
}

.bug-easter-egg.walking {
  animation: bug-walk-cycle 0.8s infinite;
}

.bug-easter-egg.flipped {
  transform: scaleX(-1);
}

.bug-easter-egg.glitch {
  filter: hue-rotate(180deg) saturate(2) brightness(1.5);
  transform: translate(2px, -1px);
}

/* Sprite animation for walking */
.bug-easter-egg.walking {
  animation: bug-sprite-walk 0.8s infinite steps(5);
}

/* Ensure bug shows first frame when not walking - higher specificity */
.bug-easter-egg.active:not(.walking) {
  background-image: url('../assets/sprites/bug-walk-1.png') !important;
  animation: none !important;
}

/* Explicit paused state to freeze sprite reliably */
.bug-easter-egg.paused {
  background-image: url('../assets/sprites/bug-walk-1.png') !important;
  animation: none !important;
}

@keyframes bug-sprite-walk {
  0% { background-image: url('../assets/sprites/bug-walk-1.png'); }
  20% { background-image: url('../assets/sprites/bug-walk-2.png'); }
  40% { background-image: url('../assets/sprites/bug-walk-3.png'); }
  60% { background-image: url('../assets/sprites/bug-walk-4.png'); }
  80% { background-image: url('../assets/sprites/bug-walk-5.png'); }
  100% { background-image: url('../assets/sprites/bug-walk-1.png'); }
}

/* Disable bug on reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bug-easter-egg {
    display: none !important;
  }
}

/* Circuit Traces (lines) */
.circuit-trace {
  position: absolute;
  background: var(--accent);
  opacity: 0.6;
  border-radius: 1px;
}

.trace-1 {
  width: 2px;
  height: 180px;
  top: 20px;
  left: 80px;
  animation: trace-glow 3s ease-in-out infinite;
}

.trace-2 {
  width: 280px;
  height: 2px;
  top: 90px;
  left: 20px;
  animation: trace-glow 3s ease-in-out infinite 0.5s;
}

.trace-3 {
  width: 2px;
  height: 150px;
  top: 80px;
  right: 50px;
  animation: trace-glow 3s ease-in-out infinite 1s;
}

.trace-4 {
  width: 220px;
  height: 2px;
  top: 180px;
  left: 80px;
  animation: trace-glow 3s ease-in-out infinite 1.5s;
}

.trace-5 {
  width: 2px;
  height: 120px;
  bottom: 20px;
  left: 160px;
  animation: trace-glow 3s ease-in-out infinite 2s;
}

.trace-6 {
  width: 180px;
  height: 2px;
  top: 60px;
  right: 20px;
  animation: trace-glow 3s ease-in-out infinite 2.5s;
}

.trace-7 {
  width: 2px;
  height: 140px;
  bottom: 60px;
  right: 120px;
  animation: trace-glow 3s ease-in-out infinite 3s;
}

.trace-8 {
  width: 160px;
  height: 2px;
  top: 40px;
  left: 50px;
  animation: trace-glow 3s ease-in-out infinite 3.5s;
}

.trace-9 {
  width: 2px;
  height: 100px;
  top: 200px;
  left: 200px;
  animation: trace-glow 3s ease-in-out infinite 4s;
}

.trace-10 {
  width: 200px;
  height: 2px;
  bottom: 100px;
  left: 50px;
  animation: trace-glow 3s ease-in-out infinite 4.5s;
}

.trace-11 {
  width: 2px;
  height: 160px;
  top: 60px;
  left: 300px;
  animation: trace-glow 3s ease-in-out infinite 5s;
}

.trace-12 {
  width: 120px;
  height: 2px;
  bottom: 150px;
  right: 80px;
  animation: trace-glow 3s ease-in-out infinite 5.5s;
}

/* Circuit Nodes (connection points) */
.circuit-node {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.8;
  animation: node-pulse 2s ease-in-out infinite;
}

.node-1 { top: 20px; left: 78px; animation-delay: 0s; }
.node-2 { top: 88px; left: 18px; animation-delay: 0.3s; }
.node-3 { top: 88px; right: 48px; animation-delay: 0.6s; }
.node-4 { top: 178px; left: 78px; animation-delay: 0.9s; }
.node-5 { bottom: 20px; left: 158px; animation-delay: 1.2s; }
.node-6 { bottom: 80px; right: 118px; animation-delay: 1.5s; }
.node-7 { top: 58px; right: 18px; animation-delay: 1.8s; }
.node-8 { bottom: 120px; right: 78px; animation-delay: 2.1s; }
.node-9 { top: 40px; left: 48px; animation-delay: 2.4s; }
.node-10 { top: 200px; left: 198px; animation-delay: 2.7s; }
.node-11 { bottom: 100px; left: 48px; animation-delay: 3s; }
.node-12 { top: 60px; left: 298px; animation-delay: 3.3s; }
.node-13 { bottom: 150px; right: 78px; animation-delay: 3.6s; }
.node-14 { top: 180px; left: 298px; animation-delay: 3.9s; }

/* Circuit Chips (processors) */
.circuit-chip {
  position: absolute;
  width: 40px;
  height: 30px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: chip-activity 4s ease-in-out infinite;
}

.chip-1 {
  top: 60px;
  right: 80px;
  animation-delay: 0s;
}

.chip-2 {
  bottom: 70px;
  left: 80px;
  animation-delay: 2s;
}

.chip-3 {
  top: 140px;
  left: 200px;
  animation-delay: 4s;
}

.chip-4 {
  top: 30px;
  left: 350px;
  animation-delay: 6s;
}

.chip-5 {
  bottom: 40px;
  right: 40px;
  animation-delay: 8s;
}

.chip-core {
  width: 20px;
  height: 15px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.7;
  animation: core-process 1.5s ease-in-out infinite;
}

/* Data Flow Particles */
.data-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--success);
  border-radius: 50%;
  opacity: 0;
  animation: particle-flow 4s linear infinite;
}

.particle-1 {
  top: 25px;
  left: 85px;
  animation-delay: 0s;
  animation-duration: 4s;
}

.particle-2 {
  top: 95px;
  left: 25px;
  animation-delay: 1s;
  animation-duration: 3.5s;
}

.particle-3 {
  top: 85px;
  right: 45px;
  animation-delay: 2s;
  animation-duration: 4.5s;
}

.particle-4 {
  bottom: 25px;
  left: 165px;
  animation-delay: 3s;
  animation-duration: 3s;
}

.particle-5 {
  top: 65px;
  right: 25px;
  animation-delay: 4s;
  animation-duration: 4s;
}

.particle-6 {
  bottom: 65px;
  right: 125px;
  animation-delay: 5s;
  animation-duration: 3.5s;
}

.particle-7 {
  top: 45px;
  left: 55px;
  animation-delay: 6s;
  animation-duration: 4s;
}

.particle-8 {
  top: 205px;
  left: 205px;
  animation-delay: 7s;
  animation-duration: 3.5s;
}

.particle-9 {
  bottom: 105px;
  left: 55px;
  animation-delay: 8s;
  animation-duration: 4s;
}

.particle-10 {
  top: 65px;
  left: 305px;
  animation-delay: 9s;
  animation-duration: 3.5s;
}

/* Animations */
@keyframes trace-glow {
  0%, 100% { opacity: 0.6; box-shadow: 0 0 0 rgba(14, 165, 233, 0.5); }
  50% { opacity: 1; box-shadow: 0 0 8px rgba(14, 165, 233, 0.8); }
}

@keyframes node-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}

@keyframes chip-activity {
  0%, 70%, 100% { border-color: var(--accent); }
  15%, 55% { border-color: var(--success); }
}

@keyframes core-process {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; background: var(--success); }
}

@keyframes particle-flow {
  0% { opacity: 0; transform: scale(0.5); }
  10% { opacity: 1; transform: scale(1); }
  90% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.5) translate(100px, -50px); }
}

/* === SECTION STYLING === */
.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: var(--space-3xl);
  color: var(--text-primary);
}

/* === FEATURED WORK SECTION === */
.featured-work {
  padding: var(--space-3xl) 0;
  background-color: var(--bg-secondary);
}

.featured-project {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-3xl);
  border: 1px solid var(--border);
}

.project-title {
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.project-description {
  font-size: 1.125rem;
  margin-bottom: var(--space-xl);
}

.project-highlights {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.highlight h4 {
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.highlight p {
  font-size: 0.875rem;
  margin-bottom: 0;
}

.project-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Project Status */
.project-status {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.status-badge {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.active {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid #22c55e;
}

.status-badge.archive {
  background: rgba(14, 165, 233, 0.2);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.project-type {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* === CHART VISUALIZATION === */
.project-visual {
  display: flex;
  justify-content: center;
}

.chart-placeholder {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  width: 100%;
  max-width: 300px;
}

.chart-title {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.chart-area {
  height: 150px;
  position: relative;
  background: linear-gradient(to right, transparent 0%, var(--accent) 30%, transparent 60%, var(--warning) 80%, transparent 100%);
  opacity: 0.3;
  border-radius: var(--radius-sm);
}

/* === RECENT ACTIVITY SECTION === */
.recent-activity {
  padding: var(--space-3xl) 0;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-xl);
}

.activity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.card-type {
  background: var(--accent);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-date {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.card-title {
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.card-description {
  margin-bottom: var(--space-lg);
}

.card-link {
  font-weight: 500;
  color: var(--accent);
}

.card-link:hover {
  text-decoration: underline;
}

/* === COMMUNITY SECTION === */
.community {
  padding: var(--space-3xl) 0;
  background: var(--bg-secondary);
}

.community-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.community-text h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.support-tiers {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.tier h4 {
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.tier p {
  margin-bottom: 0;
  font-size: 0.875rem;
}

.community-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* === FOOTER === */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-section h4 {
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Add this to the end of your main.css */
/* === MOBILE NAVIGATION === */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: var(--space-lg);
    border-top: 1px solid var(--border);
    gap: var(--space-md);
    z-index: var(--z-nav-menu);
  }

  .nav-menu.active {
    display: flex;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero-title {
    font-size: 2.5rem;
  }
}

/* === NOTICES / CALLOUTS === */
.notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.notice.notice-warning {
  border-left-color: var(--warning);
}

.notice-title {
  color: var(--text-primary);
  font-weight: 600;
}

.notice small {
  color: var(--text-muted);
}
  
  .featured-project {
    grid-template-columns: 1fr;
  }
  
  .community-content {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-actions {
    justify-content: center;
  }
}
