/* 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-8 text-center shadow-lg border border-gray-100/50 hover:border-gray-200 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: all 0.3s ease;
    border: 1px solid rgba(229, 231, 235, 0.5);
}

.project-card:hover {
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.15);
    border-color: rgba(219, 234, 254, 1);
    transform: translateY(-4px);
}

.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-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0.75rem;
}

.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/90 hover:to-accent/90 hover:text-white transition-all duration-300 cursor-default hover:shadow-lg;
}

/* Badge refinements */
[class*="px-"][class*="py-"][class*="bg-"][class*="rounded-"] {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.4px;
}

/* Enhanced typography */
.text-6xl {
    letter-spacing: -0.025em;
    line-height: 1.1;
    font-weight: 800;
}

.text-5xl {
    letter-spacing: -0.015em;
    line-height: 1.15;
    font-weight: 700;
}

body {
    line-height: 1.6;
    letter-spacing: 0.3px;
}

h1, h2, h3, h4 {
    letter-spacing: -0.01em;
}

p {
    line-height: 1.65;
}

/* 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);
}

/* Enhanced card styling */
[class*="rounded-"] {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bg-white\/80 {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.bg-white\/80:hover {
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* Large text improvements */
h1:not([class*="text-"]), h2:not([class*="text-"]), h3:not([class*="text-"]) {
    text-rendering: optimizeLegibility;
    color: #1F2937;
    font-weight: 700;
}

h4:not([class*="text-"]), h5:not([class*="text-"]), h6:not([class*="text-"]) {
    color: #111827;
    font-weight: 600;
}

/* Better text contrast */
.text-neutral {
    color: #6B7280;
}

.text-neutral\/80 {
    color: rgba(107, 114, 128, 0.8);
}

/* 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;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

/* 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;
}

/* Enhanced form input styles */
input, textarea {
    transition: all 0.2s ease;
    border: 1px solid rgba(229, 231, 235, 1);
}

input:hover, textarea:hover {
    border-color: rgba(219, 234, 254, 1);
    background-color: rgba(255, 255, 255, 0.9);
}

input:focus, textarea:focus {
    transform: translateY(-1px);
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #ffffff;
}

/* 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 improvements */
#home h1 {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

#home p {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 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;
}

/* Enhanced button styles */
button {
    min-height: 44px;
    transition: all 0.2s ease;
    font-weight: 500;
    letter-spacing: 0.3px;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

/* Mobile responsiveness improvements */
@media (max-width: 640px) {
    h1 {
        font-size: 1.875rem;
        line-height: 1.15;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    button, a[class*="bg-"], input, textarea {
        min-height: 48px;
        min-width: 48px;
        padding: 0.75rem 1.25rem;
    }

    /* Better spacing on mobile */
    section {
        padding: 2.5rem 1rem;
    }

    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    /* Improved grid gaps */
    .grid {
        gap: 1.5rem;
    }

    /* Better text sizing */
    p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
}

/* Print styles */
@media print {
    nav, footer {
        display: none;
    }

    .project-card {
        break-inside: avoid;
    }
}
