/* Enhanced Performance and Responsiveness */

/* Navigation improvements */
.nav__logo {
    color: var(--color-white);
    font-weight: var(--font-semi);
    text-decoration: none;
}

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

.home__data {
    animation: fadeInUp 1s ease-out;
}

.home__img {
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Improved hover effects */
.nav__link {
    color: {--first-color}
    position: relative;
    transition: color 0.3s ease;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.nav__link:hover::after,
.nav__link.active-link::after {
    width: 100%;
}

/* Mobile menu improvements */
@media screen and (max-width: 767px) {
    .nav__menu {
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
    }
    
    .nav__link {
        color: var(--color-white);
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Section animations */
.section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading indicator */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Improved accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
.button:focus,
.contact__input:focus,
.nav__link:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .nav, .footer, .home__social {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #0066cc;
        --color-text: #000000;
        --color-bg-light: #ffffff;
    }
}

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