/* Global Styles */
:root {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --secondary-color: #1f2937;
  --text-light: #f3f4f6;
  --text-dark: #111827;
  --bg-dark: #000000;
  --bg-light: #f3f4f6;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Loader Animation */
#loader {
  transition: opacity 0.5s ease-out;
}

/* Floating Elements Animation */
.floating {
  position: absolute;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0) 70%);
  border-radius: 50%;
  animation: float 8s infinite ease-in-out;
  z-index: -1;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-20px) scale(1.1);
    opacity: 0.8;
  }
}

/* 3D Hover Effect */
.hover-3d {
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
}

.hover-3d:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Modern Shadow */
.shadow-modern {
  box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.3);
}

/* Typing Animation */
.typing {
  border-right: 2px solid var(--primary-color);
  white-space: nowrap;
  overflow: hidden;
  animation: typing 4s steps(40) 1s 1 normal both, blink 1s steps(1) infinite;
  width: fit-content;
  margin: 0 auto;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

/* Hover Background Effect */
.hover-bg {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.hover-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0) 100%);
  z-index: -1;
  transform: translateY(100%);
  transition: transform 0.5s ease;
}

.hover-bg:hover::before {
  transform: translateY(0);
}

/* Morphing Button Effect */
.morph {
  position: relative;
  transition: all 0.3s ease;
}

.morph::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.morph:hover::after {
  width: 100%;
}

/* Fireworks Effect */
.fireworks {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(circle, transparent 20%, rgba(0, 0, 0, 0.8) 150%);
}

.fireworks.active {
  opacity: 1;
  animation: fireworks 3s ease-out;
}

@keyframes fireworks {
  0% {
    background-color: rgba(59, 130, 246, 0);
  }
  25% {
    background-color: rgba(59, 130, 246, 0.2);
  }
  50% {
    background-color: rgba(239, 68, 68, 0.2);
  }
  75% {
    background-color: rgba(16, 185, 129, 0.2);
  }
  100% {
    background-color: rgba(59, 130, 246, 0);
  }
}

/* Scroll Reveal Animation */
section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

section.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .typing {
    animation: none;
    border-right: none;
  }
  
  .hover-3d:hover {
    transform: none;
  }
  
  .floating {
    display: none;
  }
}

/* Form Status Messages */
#form-status.text-green-500 {
  color: #10b981;
}

#form-status.text-red-500 {
  color: #ef4444;
}

/* Project Card Hover Effects */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Focus Styles for Accessibility */
a:focus, button:focus, input:focus, textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Skip to Content Link for Accessibility */
.skip-to-content {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 1em;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
}

.skip-to-content:focus {
  left: 50%;
  transform: translateX(-50%);
}

