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

html {
  scroll-behavior: smooth;
}

html, body {
  background-color: #131313;
  color: #e5e2e1;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #333333 #131313;
}

/* Custom modern scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #131313;
}

::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444444;
}

/* Minimalist Top Loader */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 9999;
  background: transparent;
  pointer-events: none;
  transition: opacity 0.6s ease-out;
}

.loader.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader-bar-track {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #ffffff);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.8);
  transition: width 0.15s ease-out;
}

/* Scroll Animation Section */
.animation-section {
  position: relative;
  width: 100%;
  height: 125vh; /* Compact scroll travel for instant responsive scrubbing */
  background-color: #000000;
}

.sticky-canvas-container {
  position: sticky;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #000000;
}

#animation-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Hero Section Overlay on Top of Canvas */
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  pointer-events: none;
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
  will-change: opacity, transform;
}

/* Seamless transition for website content directly below animation */
.main-content {
  position: relative;
  z-index: 30;
  background-color: #131313;
  margin-top: -35vh;
  box-shadow: 0 -25px 50px rgba(0, 0, 0, 0.95);
}

/* Design Patterns */
.grid-pattern {
  background-image: linear-gradient(to right, rgba(65, 71, 81, 0.1) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(65, 71, 81, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
}

.glow-hover:hover {
  box-shadow: 0 0 20px rgba(164, 201, 255, 0.1);
  border-color: rgba(164, 201, 255, 0.3);
}

/* Subtle Cursor Ambient Glow */
#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(164, 201, 255, 0.12) 0%, rgba(96, 165, 250, 0.05) 45%, transparent 75%);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
  transform: translate3d(-1000px, -1000px, 0);
}

@media (pointer: coarse) {
  #cursor-glow {
    display: none !important;
  }
}

