/* Custom styles to complement Tailwind CSS */

.skill-badge {
    @apply px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-medium hover:bg-primary hover:text-white transition-colors cursor-default;
}

.skill-card {
    @apply bg-white/70 backdrop-blur-sm rounded-2xl p-6 text-center shadow-lg border border-gray-100 hover:scale-105 hover:shadow-xl transition-all duration-300 cursor-default;
}

.skill-card span {
    @apply text-sm font-medium text-dark;
}

/* Background patterns */
.bg-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.15) 1px, transparent 0);
    background-size: 20px 20px;
}

.bg-grid-pattern {
    background-image: 
        linear-gradient(rgba(0,0,0,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: #3B82F6;
    border-radius: 1px;
}

.nav-link-modern {
    position: relative;
    font-medium: 500;
    transition: all 0.3s ease;
}

.nav-link-modern.active {
    color: #3B82F6;
    background: rgba(59, 130, 246, 0.1);
}

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.6); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Quality badges */
.quality-badge {
    @apply bg-gradient-to-r from-primary/20 to-accent/20 border border-primary/30 rounded-2xl px-6 py-3 text-dark font-medium hover:from-primary hover:to-accent hover:text-white transition-all duration-300 cursor-default hover:scale-105 hover:shadow-lg;
}

/* Enhanced typography */
.text-6xl {
    letter-spacing: -0.02em;
}

.text-5xl {
    letter-spacing: -0.01em;
}

/* Improved card shadows */
.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hover\:shadow-2xl:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Large text improvements */
h1, h2, h3 {
    text-rendering: optimizeLegibility;
}

/* Aspect ratio utilities */
.aspect-\[4\/5\] {
    aspect-ratio: 4 / 5;
}

/* Smooth scrolling for browsers that don't support CSS scroll-behavior */
html {
    scroll-behavior: smooth;
}

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

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

::-webkit-scrollbar-thumb {
    background: #3B82F6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563EB;
}

/* Animation for form inputs */
input:focus, textarea:focus {
    transform: translateY(-1px);
}

/* Loading animation for contact form submission */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero section text animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive image placeholder improvements */
.project-card .bg-gradient-to-br {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Enhanced hover effects */
.project-card:hover .bg-gradient-to-br {
    filter: brightness(1.1);
}

/* Form validation styles */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #EF4444;
    box-shadow: 0 0 0 1px #EF4444;
}

input:valid,
textarea:valid {
    border-color: #10B981;
}

/* Button press effect */
button:active {
    transform: scale(0.98);
}

/* Improved accessibility */
.nav-link:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, footer {
        display: none;
    }
    
    .project-card {
        break-inside: avoid;
    }
}
