/**
 * Custom Styles for Portfolio Website
 * Minimal custom CSS - most styling is handled by Tailwind CSS
 */

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

/* Smooth scrolling for older browsers */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar (optional - for modern browsers) */
::-webkit-scrollbar {
    width: 10px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #c03636;
}

/* Remove focus outline but keep accessibility */
*:focus {
    outline: 2px solid #E04343;
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

/* Ensure images don't break layout */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth transitions for interactive elements */
a, button, input, textarea, select {
    transition: all 0.3s ease;
}

/* Print styles */
@media print {
    nav, footer, #back-to-top {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Performance optimization - reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Additional utility classes */
.text-balance {
    text-wrap: balance;
}

/* Loading state for images */
img[loading="lazy"] {
    background: #f3f4f6;
}
