/* ===== CLEAN PORTFOLIO STYLES ===== */

/* Core Animations - Optimized */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 5px currentColor; }
  100% { box-shadow: 0 0 15px currentColor, 0 0 25px currentColor; }
}

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

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Particle System - Simplified */
.particle {
  position: absolute;
  background: linear-gradient(45deg, #00f5ff, #bf00ff);
  border-radius: 50%;
  pointer-events: none;
  animation: particle-float 6s infinite linear;
}

@keyframes particle-float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(-50px) rotate(180deg);
    opacity: 0;
  }
}

/* ===== LAYOUT & SCROLLING FIXES ===== */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Container fixes */
.container {
  overflow: visible;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Section spacing for hover effects */
section {
  overflow: visible;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

/* Grid layouts with hover space */
.grid {
  overflow: visible;
  padding: 0.25rem;
  margin: -0.25rem;
}

/* ===== NAVBAR FIXES ===== */

nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
  background-color: #0a0a0f !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Hero section spacing */
#hero {
  padding-top: 80px !important;
  min-height: 100vh !important;
}

/* ===== HOVER EFFECTS - OPTIMIZED ===== */

/* Safe hover scaling with proper spacing */
.hover\:scale-105 {
  transition: transform 0.2s ease-out;
  transform-origin: center;
}

.hover\:scale-105:hover {
  transform: scale(1.03);
  z-index: 5;
}

/* Border transitions */
.hover\:border-neon-blue\/60:hover {
  border-color: rgba(0, 245, 255, 0.6);
}

.hover\:border-neon-green\/60:hover {
  border-color: rgba(57, 255, 20, 0.6);
}

.hover\:border-neon-purple\/60:hover {
  border-color: rgba(191, 0, 255, 0.6);
}

/* ===== BUTTON & INTERACTION FIXES ===== */

/* Button hover effects */
button,
a {
  transition: all 0.2s ease-out;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
a:focus {
  outline: 2px solid #00f5ff;
  outline-offset: 2px;
}

/* ===== GO TO TOP BUTTON ===== */

#go-to-top {
  position: fixed !important;
  bottom: 1rem !important;
  right: 1rem !important;
  z-index: 9999 !important;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

@media (min-width: 640px) {
  #go-to-top {
    bottom: 2rem !important;
    right: 2rem !important;
  }
}

#go-to-top.visible {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ===== SCROLLBAR STYLING ===== */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #00f5ff, #bf00ff);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #bf00ff, #00f5ff);
}

/* ===== MOBILE OPTIMIZATIONS ===== */

@media (max-width: 768px) {
  /* Reduce hover effects on mobile */
  .hover\:scale-105:hover {
    transform: scale(1.01);
  }
  
  /* Optimize container spacing */
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  section {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  
  /* Reduce grid spacing */
  .grid {
    gap: 1rem !important;
    padding: 0.5rem !important;
    margin: -0.5rem !important;
  }
  
  /* Optimize text sizes */
  .text-4xl {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
  }
  
  .text-5xl {
    font-size: 3rem !important;
    line-height: 1.2 !important;
  }
  
  .text-6xl {
    font-size: 3.5rem !important;
    line-height: 1.1 !important;
  }
  
  .text-8xl {
    font-size: 4rem !important;
    line-height: 1.1 !important;
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

/* Hardware acceleration for animations */
.animate-float,
.animate-pulse-glow,
.animate-gradient-shift,
.hover\:scale-105 {
  will-change: transform;
  transform: translateZ(0);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hover\:scale-105:hover {
    transform: none !important;
  }
}

/* ===== IMAGE OPTIMIZATIONS ===== */

img {
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Aspect ratio containers */
.aspect-square {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
}

.aspect-square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== FORM OPTIMIZATIONS ===== */

input,
textarea {
  transition: border-color 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: #00f5ff;
  outline: none;
}

/* ===== UTILITY CLASSES ===== */

.no-scroll {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
}

.smooth-scroll {
  scroll-behavior: smooth;
}

/* ===== CLEANUP ===== */

/* Remove default margins and padding conflicts */
* {
  box-sizing: border-box;
}

/* Ensure consistent font rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
