/* Custom styles for WebSolGuru redesign */

/* Smooth scrolling behaviour for anchor links */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Reduce render cost below the fold on mobile */
.cv-auto {
  content-visibility: auto;
  contain-intrinsic-size: 1px 800px;
}

@media (min-width: 1024px) {
  .cv-auto {
    contain-intrinsic-size: 1px 1000px;
  }
}

/* Hide scrollbars for hero section image on some browsers */
section.relative img {
  -webkit-user-drag: none;
  user-select: none;
}

/* Transition for mobile menu toggle */
#mobileMenu {
  transition: all 0.3s ease;
}

/* Card hover effect (lift) for services and portfolio cards is handled inline via Tailwind classes */

/* Footer social icons sizing */
footer .fab {
  font-size: 1.25rem;
}

/* Enhanced Hero Section - No fade-in animations for better performance */
/* Reserve space to prevent layout shift (CLS) */
.hero-title,
.hero-statement,
.hero-subtitle,
.hero-tags,
.hero-founder,
.hero-cta {
  /* Reserve space from start to prevent CLS */
  min-height: 1em;
  visibility: visible;
  /* No animations - visible immediately */
  animation: none;
  opacity: 1;
  transform: none;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  .hero-title,
  .hero-statement,
  .hero-subtitle,
  .hero-tags,
  .hero-founder,
  .hero-cta {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.hero-title {
  /* No fade-in animation - visible immediately */
  animation: none;
  opacity: 1;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
  /* Ensure space is reserved */
  display: block;
  min-height: 1.2em;
  /* Prevent layout shift from ::before pseudo-element */
  position: relative;
  contain: layout style paint;
}

/* Fix ::before pseudo-element to prevent layout shift */
.hero-title::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  visibility: hidden;
  pointer-events: none;
  /* Ensure it doesn't affect layout */
  display: block;
  overflow: hidden;
}

.hero-statement {
  /* No fade-in animation - visible immediately */
  animation: none;
  opacity: 1;
  text-shadow: 0 0 20px rgba(147, 197, 253, 0.4);
  letter-spacing: 2px;
  /* Reserve space */
  display: block;
  min-height: 1.5em;
}

.hero-subtitle {
  /* No fade-in animation - visible immediately */
  animation: none;
  opacity: 1;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  /* Reserve space */
  display: block;
  min-height: 1.2em;
}

.hero-tags {
  /* No fade-in animation - visible immediately */
  animation: none;
  opacity: 1;
  /* Reserve space */
  display: flex;
  min-height: 2.5em;
}

.hero-founder {
  /* No fade-in animation - visible immediately */
  animation: none;
  opacity: 1;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
  /* Reserve space */
  display: block;
  min-height: 3em;
}

.hero-cta {
  /* No fade-in animation - visible immediately */
  animation: none;
  opacity: 1;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
  /* Reserve space */
  display: inline-block;
  min-height: 3.5em;
  min-width: 200px;
}

.hero-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.hero-cta:hover::before {
  left: 100%;
}

.hero-highlight {
  background: linear-gradient(45deg, #3B82F6, #60A5FA, #93C5FD, #DBEAFE);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
  position: relative;
}

.hero-highlight::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #3B82F6, #60A5FA, #93C5FD);
  transform: scaleX(0);
  transform-origin: left;
  animation: underlineGrow 2s ease-out 2s forwards;
}

/* Enhanced floating shapes with more complex animations - Optimized */
.floating-shape {
  position: absolute;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
  filter: blur(0.5px);
  transition: all 0.3s ease;
  /* GPU acceleration */
  transform: translateZ(0);
  will-change: transform, opacity;
  /* Prevent layout shift */
  contain: layout style paint;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .floating-shape {
    animation: none;
  }
}

.floating-shape:hover {
  opacity: 0.3;
  filter: blur(0px);
  transform: scale(1.1);
  animation-play-state: paused;
}

.shape-1 {
  width: 80px;
  height: 80px;
  background: linear-gradient(45deg, #3B82F6, #60A5FA);
  border-radius: 20px;
  top: 20%;
  left: 10%;
  animation: float 6s ease-in-out infinite, rotate3D 8s linear infinite;
  transform: rotate(45deg);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.shape-2 {
  width: 60px;
  height: 60px;
  background: linear-gradient(45deg, #10B981, #34D399);
  border-radius: 50%;
  top: 60%;
  right: 15%;
  animation: float 6s ease-in-out infinite 1s, pulse 3s ease-in-out infinite;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.3);
}

.shape-3 {
  width: 100px;
  height: 100px;
  background: linear-gradient(45deg, #8B5CF6, #A78BFA);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  top: 30%;
  right: 25%;
  animation: float 6s ease-in-out infinite 2s, morphShape 10s ease-in-out infinite;
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.3);
}

.shape-4 {
  width: 70px;
  height: 70px;
  background: linear-gradient(45deg, #F59E0B, #FBBF24);
  border-radius: 15px;
  bottom: 25%;
  left: 20%;
  animation: float 6s ease-in-out infinite 3s, bounce 4s ease-in-out infinite;
  transform: rotate(30deg);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
}

.shape-5 {
  width: 50px;
  height: 50px;
  background: linear-gradient(45deg, #EF4444, #F87171);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  top: 70%;
  left: 5%;
  animation: float 6s ease-in-out infinite 4s, spin 6s linear infinite;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.3);
}

.shape-6 {
  width: 90px;
  height: 90px;
  background: linear-gradient(45deg, #06B6D4, #22D3EE);
  border-radius: 20px;
  bottom: 15%;
  right: 10%;
  animation: float 6s ease-in-out infinite 5s, wave 5s ease-in-out infinite;
  transform: rotate(15deg);
  box-shadow: 0 0 35px rgba(6, 182, 212, 0.3);
}

/* Enhanced grid lines with multiple animations */
.grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite, gridPulse 8s ease-in-out infinite;
  opacity: 0.1;
}

/* Enhanced particles with multiple types and complex animations */
.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

/* AI & Robotics themed particles - Clean and Modern */
.particles-container::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    /* AI Brain Synapses */
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.8) 0px, transparent 4px),
    radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.8) 0px, transparent 3px),
    radial-gradient(circle at 40% 80%, rgba(139, 92, 246, 0.8) 0px, transparent 5px),
    radial-gradient(circle at 60% 20%, rgba(245, 158, 11, 0.8) 0px, transparent 4px),
    radial-gradient(circle at 90% 40%, rgba(239, 68, 68, 0.8) 0px, transparent 3px),
    radial-gradient(circle at 10% 60%, rgba(6, 182, 212, 0.8) 0px, transparent 4px),
    radial-gradient(circle at 70% 80%, rgba(236, 72, 153, 0.8) 0px, transparent 3px),
    radial-gradient(circle at 30% 90%, rgba(34, 197, 94, 0.8) 0px, transparent 4px);
  background-size: 120px 120px, 180px 180px, 150px 150px, 200px 200px, 160px 160px, 140px 140px, 170px 170px, 190px 190px;
  animation: aiBrainParticles 20s linear infinite;
}

/* Floating AI & Robotics Elements */
.particles-container::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    /* Large AI Processing Nodes */
    radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.9) 0px, rgba(59, 130, 246, 0.4) 12px, transparent 20px),
    radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.9) 0px, rgba(16, 185, 129, 0.4) 10px, transparent 18px),
    radial-gradient(circle at 85% 25%, rgba(139, 92, 246, 0.9) 0px, rgba(139, 92, 246, 0.4) 8px, transparent 16px),
    radial-gradient(circle at 15% 75%, rgba(245, 158, 11, 0.9) 0px, rgba(245, 158, 11, 0.4) 14px, transparent 22px),
    radial-gradient(circle at 50% 50%, rgba(239, 68, 68, 0.9) 0px, rgba(239, 68, 68, 0.4) 16px, transparent 24px);
  background-size: 250px 250px;
  animation: floatingAINodes 18s ease-in-out infinite;
}

/* AI & Robotics Animations */
@keyframes aiBrainParticles {
  0% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-15px) rotate(90deg); }
  50% { transform: translateY(-30px) rotate(180deg); }
  75% { transform: translateY(-15px) rotate(270deg); }
  100% { transform: translateY(0px) rotate(360deg); }
}

@keyframes floatingAINodes {
  0%, 100% { transform: translateY(0px) scale(1); opacity: 0.9; }
  25% { transform: translateY(-25px) scale(1.1); opacity: 1; }
  50% { transform: translateY(-50px) scale(1.2); opacity: 0.8; }
  75% { transform: translateY(-25px) scale(1.1); opacity: 1; }
}

/* Parallax Background */
.parallax-bg {
  transform: translate3d(0, 0, 0);
  will-change: transform;
  transition: transform 0.1s ease-out;
  /* Ensure image displays properly */
  object-fit: cover;
  object-position: center;
  /* Prevent any display issues */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Smooth rendering */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Enhanced scroll indicator */
.scroll-indicator {
  animation: fadeIn 2s ease-out 2s both;
}

.scroll-indicator-track {
  overflow: hidden;
}

.scroll-indicator-dot {
  will-change: transform;
}

.scroll-indicator:hover {
  transform: scale(1.2);
  transition: transform 0.3s ease;
  animation: scrollPulse 1s ease-in-out infinite;
}

/* Enhanced keyframe animations - Optimized for Performance */
/* Use opacity-only animation to prevent layout shift (CLS) */
@keyframes fadeInOpacity {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Keep fadeInUp for backward compatibility but use fadeInOpacity for hero */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes titleGlow {
  0%, 100% {
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
  }
  50% {
    text-shadow: 0 0 50px rgba(59, 130, 246, 0.6), 0 0 70px rgba(59, 130, 246, 0.4);
  }
}

@keyframes statementPulse {
  0%, 100% {
    transform: scale3d(1, 1, 1);
    text-shadow: 0 0 20px rgba(147, 197, 253, 0.4);
  }
  50% {
    transform: scale3d(1.02, 1.02, 1);
    text-shadow: 0 0 30px rgba(147, 197, 253, 0.6), 0 0 40px rgba(147, 197, 253, 0.3);
  }
}

@keyframes subtitlePulse {
  0%, 100% {
    transform: scale3d(1, 1, 1);
  }
  50% {
    transform: scale3d(1.01, 1.01, 1);
  }
}

@keyframes founderSlide {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(10px);
  }
}

@keyframes ctaBounce {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -3px, 0);
  }
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes underlineGrow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  33% {
    transform: translate3d(0, -20px, 0) rotate(5deg);
  }
  66% {
    transform: translate3d(0, 10px, 0) rotate(-5deg);
  }
}

@keyframes rotate3D {
  0% {
    transform: rotate(45deg) rotateX(0deg) rotateY(0deg);
  }
  100% {
    transform: rotate(45deg) rotateX(360deg) rotateY(360deg);
  }
}

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

@keyframes morphShape {
  0%, 100% {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  }
  25% {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  }
  50% {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  }
  75% {
    clip-path: polygon(0% 20%, 100% 20%, 100% 80%, 0% 80%);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0) rotate(30deg);
  }
  50% {
    transform: translateY(-15px) rotate(30deg);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes wave {
  0%, 100% {
    transform: rotate(15deg) scale(1);
  }
  50% {
    transform: rotate(15deg) scale(1.1);
  }
}

@keyframes gridMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

@keyframes gridPulse {
  0%, 100% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.2;
  }
}

@keyframes particleFloat {
  0% {
    transform: translateY(0px) translateX(0px);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(50px);
    opacity: 0;
  }
}

@keyframes particleBackground {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-200px, -200px);
  }
}

@keyframes particleGlow {
  0%, 100% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.3;
  }
}

@keyframes floatingOrbs {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }
  25% {
    transform: translate(20px, -30px) scale(1.2);
    opacity: 0.6;
  }
  50% {
    transform: translate(-15px, 25px) scale(0.8);
    opacity: 0.3;
  }
  75% {
    transform: translate(30px, 15px) scale(1.1);
    opacity: 0.5;
  }
}

@keyframes sparkleParticles {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.8;
  }
  25% {
    transform: translate(10px, -15px) rotate(90deg);
    opacity: 0.4;
  }
  50% {
    transform: translate(-20px, 10px) rotate(180deg);
    opacity: 0.9;
  }
  75% {
    transform: translate(15px, 20px) rotate(270deg);
    opacity: 0.3;
  }
  100% {
    transform: translate(0, 0) rotate(360deg);
    opacity: 0.8;
  }
}

@keyframes energyWaves {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.1;
  }
  33% {
    transform: scale(1.2) rotate(120deg);
    opacity: 0.2;
  }
  66% {
    transform: scale(0.8) rotate(240deg);
    opacity: 0.15;
  }
}

@keyframes quantumTrails {
  0% {
    transform: translate(0, 0) skew(0deg);
    opacity: 0.3;
  }
  25% {
    transform: translate(50px, -30px) skew(15deg);
    opacity: 0.6;
  }
  50% {
    transform: translate(-40px, 60px) skew(-10deg);
    opacity: 0.4;
  }
  75% {
    transform: translate(30px, 40px) skew(20deg);
    opacity: 0.7;
  }
  100% {
    transform: translate(0, 0) skew(0deg);
    opacity: 0.3;
  }
}

@keyframes dataStreams {
  0% {
    transform: translateX(-100%) translateY(0);
    opacity: 0.2;
  }
  50% {
    transform: translateX(0%) translateY(-20px);
    opacity: 0.4;
  }
  100% {
    transform: translateX(100%) translateY(0);
    opacity: 0.2;
  }
}

@keyframes binaryCode {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(10px, 10px);
  }
}

@keyframes holographicRings {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    transform: translate(10px, 10px) rotate(360deg);
  }
}

@keyframes neuralConnections {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(5px, 5px);
  }
}

@keyframes cosmicDust {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(10px, 10px);
  }
}

@keyframes mouseTrail {
  0% {
    opacity: 0.3;
    transform: scale(0.5);
  }
  50% {
    opacity: 0.6;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

@keyframes magneticField {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.1;
  }
  33% {
    transform: translate(15px, -10px) rotate(120deg);
    opacity: 0.2;
  }
  66% {
    transform: translate(-10px, 20px) rotate(240deg);
    opacity: 0.15;
  }
}

@keyframes plasmaOrbs {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.2;
  }
  25% {
    transform: translate(25px, -20px) scale(1.3);
    opacity: 0.4;
  }
  50% {
    transform: translate(-20px, 30px) scale(0.7);
    opacity: 0.1;
  }
  75% {
    transform: translate(30px, 25px) scale(1.1);
    opacity: 0.3;
  }
}

@keyframes timeWarp {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.2);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes scrollPulse {
  0%, 100% {
    transform: scale(1.2);
  }
  50% {
    transform: scale(1.4);
  }
}

@keyframes scrollBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

/* Enhanced glow effects */
  /* Ensure hero elements don't cause layout shift on mobile */
  .hero-title,
  .hero-subtitle,
  .hero-founder {
    min-height: auto;
  position: relative;
}

/* Disable ::before pseudo-elements to prevent layout shifts */
.hero-title::before,
.hero-subtitle::before,
.hero-founder::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  visibility: hidden;
  pointer-events: none;
  /* Disable glow effects that cause layout shifts */
  display: none;
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.02);
  }
}

/* Responsive adjustments for floating shapes */
@media (max-width: 768px) {
  .floating-shape {
    display: none;
  }
  
  .grid-lines {
    background-size: 30px 30px;
  }
  
  .hero-title {
    font-size: 2.5rem;
    text-align: center !important;
    margin: 0 auto !important;
    display: block;
    width: 100%;
  }
  
  .hero-statement {
    font-size: 1rem;
    letter-spacing: 0.5px;
    line-height: 1.5;
  }
  
  /* Very small screens (350-390px) */
  @media (max-width: 390px) {
    .hero-statement {
      font-size: 0.875rem;
      letter-spacing: 0.5px;
      line-height: 1.4;
      padding-left: 1rem;
      padding-right: 1rem;
    }
  }
  
  /* Small screens (391-480px) */
  @media (min-width: 391px) and (max-width: 480px) {
    .hero-statement {
      font-size: 0.9375rem;
      letter-spacing: 0.5px;
      line-height: 1.45;
    }
  }
  
  .hero-subtitle {
    font-size: 0.875rem;
    line-height: 1.5;
  }
  
  .hero-tags span {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
  }
}

/* Enhanced hover effects for interactive elements */
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
}

.hero-cta:active {
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* Smooth transitions for all animated elements */
.floating-shape,
.grid-lines,
.particles-container::before,
.particles-container::after {
  transition: all 0.3s ease;
}

/* Performance optimizations */
.floating-shape,
.grid-lines,
.particles-container {
  will-change: transform, opacity;
}

/* Add subtle noise texture */
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.01'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* Interactive mouse-responsive particles */
.particles-container::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    /* Mouse trail particles */
    radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(59, 130, 246, 0.3) 0px, transparent 15px),
    radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(16, 185, 129, 0.3) 0px, transparent 20px);
  background-size: 100px 100px, 150px 150px;
  animation: mouseTrail 0.5s ease-out;
  pointer-events: none;
}

/* Magnetic field particles */
.particles-container::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    /* Magnetic field lines */
    linear-gradient(90deg, transparent 0%, rgba(6, 182, 212, 0.1) 45%, transparent 55%),
    linear-gradient(0deg, transparent 0%, rgba(139, 92, 246, 0.1) 45%, transparent 55%),
    linear-gradient(45deg, transparent 0%, rgba(245, 158, 11, 0.1) 45%, transparent 55%);
  background-size: 200px 200px, 250px 250px, 300px 300px;
  animation: magneticField 24s ease-in-out infinite;
}

/* Plasma particles */
.particles-container::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    /* Plasma orbs */
    radial-gradient(circle at 25% 35%, rgba(239, 68, 68, 0.2) 0px, transparent 12px),
    radial-gradient(circle at 75% 65%, rgba(16, 185, 129, 0.2) 0px, transparent 18px),
    radial-gradient(circle at 45% 85%, rgba(139, 92, 246, 0.2) 0px, transparent 14px);
  background-size: 180px 180px, 220px 220px, 160px 160px;
  animation: plasmaOrbs 26s ease-in-out infinite;
}

/* Time warp particles */
.particles-container::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    /* Time distortion */
    conic-gradient(from 0deg, transparent, rgba(59, 130, 246, 0.1), transparent, rgba(16, 185, 129, 0.1), transparent);
  background-size: 400px 400px;
  animation: timeWarp 28s linear infinite;
}

/* Hero section performance optimizations */
section.relative.min-h-screen {
  /* Prevent layout shift */
  contain: layout style paint;
  /* GPU acceleration */
  transform: translateZ(0);
  /* Reserve space */
  min-height: 100vh;
  height: 100vh;
}

/* Hero section image container fixes */
.hero-section {
  /* Ensure proper image display */
  overflow: hidden;
  position: relative;
}

.hero-section img.parallax-bg {
  /* Ensure image fills container properly */
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Prevent any transform issues */
  transform-origin: center center;
  /* Smooth transitions */
  transition: transform 0.3s ease-out;
}

/* Fix for any potential image scaling issues */
.hero-section img.parallax-bg:hover {
  transform: scale(1.02);
  transition: transform 0.5s ease-out;
}

/* Interactive Journey Section Styles */
.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  opacity: 0;
  transition: all 0.3s ease;
}

.timeline-item:hover::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.2);
}

.achievement-item {
  position: relative;
  overflow: hidden;
  transition: all 0.5s ease;
}

.achievement-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.achievement-item:hover::before {
  left: 100%;
}

.achievement-item:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.achievement-unlocked {
  position: relative;
}

.achievement-unlocked::after {
  content: '✨';
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 2rem;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.2) rotate(180deg); opacity: 0.8; }
}

/* Progress bar animation */
#progress-bar {
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Achievement modal animations */
#achievement-modal .bg-gradient-to-br {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating particles */
@keyframes float {
  0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.3; }
  50% { transform: translateY(-20px) translateX(10px); opacity: 0.8; }
}

/* Confetti animation */
@keyframes confetti-fall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Achievement counter pulse */
#achievement-counter {
  animation: pulse 2s ease-in-out infinite;
}

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

/* Timeline line glow effect */
#journey .bg-gradient-to-b::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  filter: blur(8px);
  opacity: 0.5;
  z-index: -1;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .timeline-item .w-1/2 {
    width: 100%;
    padding: 0 1rem;
    margin-bottom: 2rem;
  }
  
  .timeline-item .w-1/2:first-child {
    text-align: center;
  }
  
  .timeline-item .w-1/2:last-child {
    text-align: center;
  }
  
  #journey .bg-gradient-to-b {
    left: 2rem;
  }
  
  .timeline-item .w-4 {
    left: 2rem;
  }
}

/* Achievement unlock sound effect simulation */
.achievement-item:active {
  transform: scale(0.95);
}

/* Hover effects for timeline dots */
.timeline-item .w-4 {
  transition: all 0.3s ease;
  cursor: pointer;
}

.timeline-item:hover .w-4 {
  transform: scale(1.5);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
}

/* Gradient text animation */
.text-transparent.bg-clip-text {
  background-size: 200% 200%;
  animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}