.header.nav-hidden .header-nav {
    display: none;
}

@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
    
    .header-container {
        padding: 0 1.5rem;
    }
    
    .section-container {
        padding: 0 1.5rem;
    }
    
    .hero-section {
        min-height: 90vh;
        padding: 2.5rem 0;
    }
    
    .hero-text {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }
    
    .hero-description {
        font-size: 1rem;
        max-width: 90%;
    }

    .hero-scroll-indicator {
        bottom: 1.5rem;
    }
    
    .expertise-section {
        padding: 4rem 0;
    }

    .repositories-section {
        padding: 4rem 0;
    }
    
    .expertise-section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .repositories-section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .expertise-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .expertise-item {
        padding: 1.5rem;
    }
    
    .expertise-icon {
        width: 48px;
        height: 48px;
        margin-right: 1rem;
    }
    
    .expertise-item .expertise-icon img {
        width: 24px !important;
        height: 24px !important;
        max-width: 24px !important;
        max-height: 24px !important;
    }
    
    .expertise-title h3 {
        font-size: 1.25rem;
    }
    
    .expertise-context p {
        font-size: 0.875rem;
    }
    
    .expertise-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.75rem;
    }

    .repositories-track {
        height: 24rem;
    }

    .repository-item {
        width: calc(100% - 4.5rem);
        padding: 1.5rem;
    }

    .repository-nav {
        width: 2.4rem;
        height: 2.4rem;
    }

    .repository-nav-prev {
        left: 0;
    }

    .repository-nav-next {
        right: 0;
    }
    
    .contact-section,
    .footer-section {
        padding: 4rem 0;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-item {
        padding: 1rem;
    }
    
    .contact-icon {
        width: 44px;
        height: 44px;
    }
    
    .contact-icon img {
        width: 20px;
        height: 20px;
    }
    
    .social-links-container {
        gap: 0.75rem;
    }
    
    .social-link {
        width: 48px;
        height: 48px;
    }
    
    .social-link img {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 1rem;
    }
    
    .header-title {
        font-size: 1rem;
    }
    
    .header-subtitle {
        font-size: 0.75rem;
    }
    
    .section-container {
        padding: 0 1rem;
    }
    
    .hero-section {
        min-height: 85vh;
        padding: 2rem 0;
    }
    
    .hero-text {
        font-size: clamp(2rem, 10vw, 3rem);
    }
    
    .hero-description {
        font-size: 0.875rem;
        max-width: 95%;
        line-height: 1.5;
    }

    .hero-scroll-indicator {
        bottom: 1.25rem;
    }

    .hero-scroll-indicator-text {
        font-size: 0.72rem;
    }
    
    .expertise-section {
        padding: 3rem 0;
    }

    .repositories-section {
        padding: 3rem 0;
    }
    
    .expertise-section h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .repositories-section h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .expertise-item {
        padding: 1.25rem;
        flex-direction: column;
        text-align: center;
    }

    .expertise-title {
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .expertise-icon {
        width: 56px;
        height: 56px;
        margin-right: 0.75rem;
        margin-bottom: 0;
    }
    
    .expertise-item .expertise-icon img {
        width: 28px !important;
        height: 28px !important;
        max-width: 28px !important;
        max-height: 28px !important;
    }
    
    .expertise-title h3 {
        font-size: 1.125rem;
        text-align: center;
    }
    
    .expertise-context p {
        font-size: 0.8rem;
        text-align: center;
    }
    
    .expertise-tags {
        justify-content: center;
        gap: 0.375rem;
    }
    
    .expertise-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .repositories-track {
        height: 23rem;
    }

    .repository-item {
        width: calc(100% - 3rem);
        padding: 1.25rem;
    }

    .repository-name {
        font-size: 1.2rem;
    }

    .repository-description {
        font-size: 0.85rem;
    }

    .repository-nav {
        width: 2.1rem;
        height: 2.1rem;
        font-size: 1rem;
    }
    
    .contact-section,
    .footer-section {
        padding: 3rem 0;
    }
    
    .contact-item {
        padding: 0.875rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    
    .contact-icon img {
        width: 18px;
        height: 18px;
    }
    
    .contact-label {
        font-size: 0.8rem;
    }
    
    .contact-value {
        font-size: 0.9rem;
    }
    
    .social-links-container {
        padding: 1.5rem 0;
        gap: 0.5rem;
    }
    
    .social-link {
        width: 44px;
        height: 44px;
    }
    
    .social-link img {
        width: 18px;
        height: 18px;
    }
    
    /* Disable parallax on mobile for performance */
    .hero-content {
        transform: none !important;
    }
    
    /* Reduce particle count on mobile */
    .particle {
        display: none;
    }
    
    /* Hide logo-carousel and dev-icons on mobile */
    .logo-carousel,
    .dev-icons {
        display: none !important;
    }
}

/* Touch-friendly hover states */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover::after {
        display: none;
    }
    
    .nav-link:active {
        color: var(--accent-primary);
    }
    
    .expertise-item:hover {
        transform: none;
    }
    
    .expertise-item:active {
        transform: scale(0.98);
        border-color: var(--accent-primary);
    }
    
    .contact-item:hover {
        transform: none;
    }
    
    .contact-item:active {
        transform: scale(0.98);
        border-color: var(--accent-primary);
    }
    
    .social-link:hover {
        transform: none;
    }
    
    .social-link:active {
        transform: scale(0.95);
        border-color: var(--accent-primary);
    }
}

@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(255, 255, 255, 0.3);
        --glass-bg: rgba(255, 255, 255, 0.1);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-content {
        transform: none;
    }
    
    .particle {
        animation: none;
    }
}

@media (prefers-color-scheme: light) {
    /* Keep dark theme as it's part of the design requirement */
}
