/* Custom Animations and Styles */

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

/* Navigation Links */
.nav-link {
    @apply text-gray-300 hover:text-white transition-colors duration-300 relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #6366f1, #a855f7);
    transition: width 0.3s ease;
}

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

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Project Cards */
.project-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.3s ease;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

/* Social Links */
.social-link {
    @apply w-12 h-12 rounded-full bg-dark-800 flex items-center justify-center text-gray-400 hover:text-white hover:bg-gradient-to-br hover:from-accent-500 hover:to-purple-600 transition-all duration-300;
}

.social-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

/* Pulse Animation Delay */
.delay-1000 {
    animation-delay: 1s;
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, #6366f1, #a855f7, #ec4899);
    z-index: 9999;
    transition: width 0.3s ease;
}

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

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #6366f1, #a855f7);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #4f46e5, #9333ea);
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }
}

/* Animation delays for staggered effects */
.project-card:nth-child(1) {
    animation-delay: 0.1s;
}

.project-card:nth-child(2) {
    animation-delay: 0.2s;
}

.project-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Gradient text animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}

/* Loading animation for images */
img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* Focus states for accessibility */
a:focus,
button:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: #6366f1;
    color: white;
}

::-moz-selection {
    background-color: #6366f1;
    color: white;
}

/* Backdrop blur support */
@supports (backdrop-filter: blur(10px)) {
    nav {
        backdrop-filter: blur(10px);
    }
}

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

    body {
        background: white;
        color: black;
    }
}
