/* Enhanced Mobile Hero Animation */

@media (max-width: 768px) {
  /* Special Hero Container for Mobile */
  .hero {
    position: relative;
    overflow: hidden;
    min-height: 100vh; /* Full viewport height for impact */
  }
  
  /* Ensure theme toggle has consistent positioning on mobile */
  .theme-toggle {
    position: fixed !important;
    right: 20px !important;
    top: 24px !important;
    z-index: 1000 !important;
  }

  
  /* Mobile-optimized hero background */
  .mobile-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #4361ee 0%, #3a86ff 60%, #4cc9f0 100%);
    overflow: hidden;
  }
  
  /* Animated particles background */
  .mobile-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  
  /* Individual particles */
  .mobile-particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
  }
  
  /* Shooting stars effect */
  .shooting-star {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8);
    opacity: 0;
    animation: shooting 3s ease-in-out infinite;
  }
  
  @keyframes shooting {
    0% {
      transform: translate(0, 0) rotate(-45deg) scale(0);
      opacity: 0;
    }
    10% {
      transform: translate(-20px, 20px) rotate(-45deg) scale(1);
      opacity: 1;
    }
    100% {
      transform: translate(-300px, 300px) rotate(-45deg) scale(0.2);
      opacity: 0;
    }
  }
  
  /* Enhanced Hero Content */
  .hero .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px 20px;
  }
  
  /* Mobile heading animation */
  .hero .hero-content h1 {
    margin: 0;
    font-size: 2.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    animation: mobile-fade-in 1s ease forwards 0.5s;
    position: relative;
    z-index: 5; /* Ensure text stays above icons */
  }

  /* Light theme specific color for mobile hero h1 */
  body:not(.dark-theme) .hero .hero-content h1 {
    color: var(--dark-color); /* Use a dark color for light theme */
    text-shadow: 0 1px 3px rgba(0,0,0,0.1); /* Softer shadow for dark text */
  }
  body.dark-theme .hero .hero-content h1 {
    color: white; /* Explicitly white for dark theme */
  }
  
  /* Glowing underline effect */
  .hero .hero-content h1:after {
    content: "";
    display: block;
    width: 0;
    height: 3px;
    margin: 15px auto 0;
    box-shadow: 0 0 10px 1px rgba(255, 255, 255, 0.8);
    animation: expand-line 2s ease forwards 1.5s;
  }

  body:not(.dark-theme) .hero .hero-content h1:after {
    background: var(--primary-color); /* Use primary color for underline in light mode */
    box-shadow: 0 0 8px 1px rgba(var(--rgb-primary-color), 0.5);
  }
  body.dark-theme .hero .hero-content h1:after {
    background: white; /* Explicitly white for dark theme */
  }
  
  /* Enhance subtitle styles */
  .hero .hero-content p {
    font-size: 1.1rem;
    margin: 25px 0;
    opacity: 0;
    transform: translateY(20px);
    animation: mobile-fade-in 1s ease forwards 1s;
    position: relative;
    z-index: 5; /* Ensure text stays above icons */
  }

  /* Light theme specific color for mobile hero p */
  body:not(.dark-theme) .hero .hero-content p {
    color: var(--dark-color); /* Use a dark color for light theme */
    opacity: 0.9;
  }
  body.dark-theme .hero .hero-content p {
    color: rgba(255, 255, 255, 0.9); /* Explicitly light for dark theme */
  }
  
  /* Button animation */
  .hero .hero-buttons {
    opacity: 0;
    transform: translateY(20px);
    animation: mobile-fade-in 1s ease forwards 1.5s;
    position: relative;
    z-index: 5; /* Ensure buttons stay above icons */
  }
  
  .hero .btn-primary {
    background: white;
    color: #4361ee; /* This is var(--primary-color) essentially */
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }
  
  /* Default mobile hero secondary button (for dark theme context) */
  .hero .btn-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
    color: white;
  }

  /* Light theme specific colors for mobile hero secondary button */
  body:not(.dark-theme) .hero .btn-secondary {
    border-color: var(--primary-color);
    color: var(--primary-color);
  }

  /* Explicit dark theme colors for mobile hero secondary button (redundant but good for clarity) */
  body.dark-theme .hero .btn-secondary {
    border-color: rgba(255, 255, 255, 0.7);
    color: white;
  }
    /* Floating icons for mobile */
  .mobile-floating-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    color: #4361ee;
    font-size: 1.2rem;
    z-index: 2;
    animation: float-fun 8s ease-in-out infinite;
    transition: all 0.3s ease;
  }
  
  /* Position floating icons */
  .mobile-icon-code {
    bottom: 20px;
    right: 25%;
    animation-delay: 0s;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(220,240,255,0.95));
  }
  
  .mobile-icon-mobile {
    bottom: 40px;
    left: 20%;
    animation-delay: 1s;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(220,255,240,0.95));
  }
  
  .mobile-icon-design {
    bottom: 10px;
    left: 55%;
    animation-delay: 2s;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,220,255,0.95));
  }
  
  .mobile-icon-web {
    bottom: 30px;
    right: 15%;
    animation-delay: 3s;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,240,220,0.95));
  }
  
  /* More fun animations for icons */
  @keyframes float-fun {
    0% {
      transform: translateY(0) rotate(0deg);
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    25% {
      transform: translateY(-12px) rotate(8deg);
      box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
    }
    50% {
      transform: translateY(5px) rotate(-5deg);
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    75% {
      transform: translateY(-8px) rotate(3deg);
      box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
    }
    100% {
      transform: translateY(0) rotate(0deg);
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
  }
  
  /* Add glow effect on tap */
  .mobile-floating-icon:active {
    transform: scale(1.3);
    box-shadow: 0 0 30px rgba(67, 97, 238, 0.6);
  }
  
  /* Standard animations */
  @keyframes mobile-fade-in {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Darkened overlay to improve text contrast */
  .mobile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
                rgba(0,0,0,0.4) 0%,
                rgba(0,0,0,0.1) 40%,
                rgba(0,0,0,0.1) 60%,
                rgba(0,0,0,0.4) 100%);
    z-index: 1;  }
}
