:root {
  --color-bg: #0a0a0a;
  --color-text: #ffffff;
  --color-accent: #00ff00;
  --color-border: #333333;
  --font-mono: 'Courier New', Courier, monospace;
  --max-width: 900px;
  --section-padding: 3rem 1.5rem;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-mono);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Starfield canvas - fixed background */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Forest canvas - scrolls up from below viewport */
#forest-canvas {
  position: fixed;
  left: 0;
  width: 100%;
  height: 60vh;
  z-index: 0;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  will-change: transform;
}

/* Cursor effects canvas - sits just under text content */
#cursor-particles {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}

/* Content layers above cursor effects */
.hero, main, footer {
  position: relative;
  z-index: 2;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section {
  padding: var(--section-padding);
  border-top: 2px solid var(--color-border);
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(2px);
}

.hero {
  padding: 4rem 1.5rem;
  text-align: center;
}

h1, h2, h3 {
  font-family: var(--font-mono);
}

h2 {
  color: var(--color-accent);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

footer {
  background: transparent;
  padding: 2rem 1.5rem;
  text-align: center;
}

footer p {
  display: inline-block;
  transition: text-shadow 0.4s ease, color 0.4s ease;
}

footer p:hover {
  color: #ff5722;
  text-shadow: 0 0 8px rgba(255, 87, 34, 0.8), 0 0 20px rgba(255, 87, 34, 0.4);
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.8; }
  94% { opacity: 1; }
  96% { opacity: 0.9; }
  97% { opacity: 1; }
}

.flicker {
  animation: flicker 4s infinite;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.7), 0 2px 4px rgba(0, 0, 0, 0.8);
}

@keyframes blink {
  0%, 100% { border-right-color: var(--color-accent); }
  50% { border-right-color: transparent; }
}

.terminal-link::after {
  content: '';
  border-right: 2px solid var(--color-accent);
  margin-left: 0.25rem;
  animation: blink 1s step-end infinite;
}

/* Responsive Design - Mobile First */
.hero h1 {
  font-size: clamp(1.5rem, 5vw, 3rem);
}

@media (min-width: 768px) {
  .section {
    padding: 3rem 2rem;
  }

  .hero {
    padding: 6rem 2rem;
  }
}

@media (min-width: 1024px) {
  main {
    max-width: var(--max-width);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
  }

  html {
    scroll-behavior: auto;
  }

  #starfield, #forest-canvas {
    display: none;
  }
}
