/* Custom CSS for enhanced styling beyond Tailwind */

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

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

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

::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5a67d8;
}

/* Enhanced gradient backgrounds */
.gradient-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

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

/* Floating animation */
.floating {
  animation: floating 3s ease-in-out infinite;
}

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

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

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

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Project card styling */
.project-card {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Custom button animations */
.btn-hover {
  position: relative;
  overflow: hidden;
}

.btn-hover::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;
}

.btn-hover:hover::before {
  left: 100%;
}

/* Grid Layout Styles */
.project-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Ensure consistent card heights in grid */
.project-card .h-48 {
    flex-shrink: 0;
}

.project-card .p-6 {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card .p-6 p {
    flex: 1;
    margin-bottom: 1rem;
}

.project-card button {
    margin-top: auto;
}

/* Project cards equal height */
.project-card {
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.project-card .p-6 {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card .p-6 > button {
    margin-top: auto;
}

/* Experience cards equal height */
.experience-card {
    display: flex;
    flex-direction: column;
    min-height: 450px;
}

.experience-card .p-6 {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.experience-card .p-6 > button {
    margin-top: auto;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .floating {
    animation: none; /* Disable floating on mobile for performance */
  }
  
  .card-hover:hover {
    transform: none; /* Disable hover effects on mobile */
  }
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .gradient-bg {
    background: #667eea !important;
    color: white !important;
  }
  
  nav, .floating, button {
    display: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .gradient-bg {
    background: #000 !important;
    color: #fff !important;
  }
  
  .card-hover {
    border: 2px solid #000 !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .floating {
    animation: none !important;
  }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here */
}