/* Custom Styles for Portfolio Website */

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

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

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

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Fade-in Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

/* Fade-in for elements when they come into view */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Navigation Link Underline Effect */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #0ea5e9;
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Card Hover Effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
              0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button Pulse Effect */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.btn-pulse:hover {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Tech Tag Styles */
.tech-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: #f1f5f9;
  color: #475569;
  font-size: 0.875rem;
  font-family: 'Courier New', monospace;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.tech-tag:hover {
  background-color: #e0f2fe;
  color: #0284c7;
  transform: scale(1.05);
}

/* Loading Spinner (for future use) */
.spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid #0ea5e9;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

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

/* Focus Styles for Accessibility */
a:focus,
button:focus {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  header,
  footer,
  .no-print {
    display: none;
  }
  
  body {
    background: white;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* Mobile Menu Transition */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

#mobile-menu.show {
  max-height: 300px;
}

/* Text Selection */
::selection {
  background-color: #bae6fd;
  color: #0c4a6e;
}

::-moz-selection {
  background-color: #bae6fd;
  color: #0c4a6e;
}

/* Line Clamp Utility (for project descriptions) */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Subtle Background Pattern */
body {
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(14, 165, 233, 0.03) 1px, transparent 0);
  background-size: 40px 40px;
  background-color: #f8fafc;
  position: relative;
}

/* Animated gradient blob backgrounds */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: float 20s ease-in-out infinite;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(3, 105, 161, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
  }
  25% {
    transform: translateY(-20px) translateX(20px);
  }
  50% {
    transform: translateY(-40px) translateX(-20px);
  }
  75% {
    transform: translateY(-20px) translateX(20px);
  }
}

/* Hero Section Gradient Animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-animated {
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

/* Smooth Transitions for All Interactive Elements */
a, button, input, textarea, select {
  transition: all 0.2s ease;
}

/* Hide scrollbar for mobile menu */
#mobile-menu {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

#mobile-menu::-webkit-scrollbar {
  display: none;
}

/* Ensure proper spacing for fixed header */
section {
  scroll-margin-top: 80px;
}

/* Enhanced Shadow for Cards */
.shadow-soft {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 
              0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.shadow-soft:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 
              0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Profile Image Styling */
.profile-image {
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* Profile Image Hover Effect */
.profile-image:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
}

/* Blob Animation for Background */
@keyframes blob {
  0%, 100% {
    transform: translate(0px, 0px) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.animate-blob {
  animation: blob 7s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

/* Pulse Slow Animation */
@keyframes pulse-slow {
  0%, 100% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
}

.animate-pulse-slow {
  animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Section-specific backgrounds */
section#hero {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #e0f2fe 100%);
  position: relative;
}

section#experience {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
}

section#education {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  position: relative;
}

section#projects {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
}

/* Decorative lines between sections */
section {
  position: relative;
}

section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.2), transparent);
  pointer-events: none;
}
