/* ================================
   Responsive Styles
================================ */

/* Large Desktop */
@media (max-width: 1400px) {
    :root {
        --container-width: 1100px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    :root {
        --container-width: 960px;
    }

    .hero-content {
        gap: 40px;
    }

    .portrait-wrapper {
        max-width: 350px;
    }
}

/* Tablet */
@media (max-width: 992px) {
    :root {
        --section-padding: 80px 0;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right 0.3s ease;
        border-left: 1px solid var(--glass-border);
    }

    .nav-menu.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        order: 2;
    }

    .hero-portrait {
        order: 1;
    }

    .hero-tagline {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .portrait-wrapper {
        max-width: 300px;
    }

    .about-stats {
        gap: 20px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Small Tablet */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 30px 25px;
    }

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .tech-item {
        padding: 20px 15px;
    }

    .tech-icon {
        width: 50px;
        height: 50px;
        font-size: 0.8rem;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-number {
        font-size: 2rem;
    }

    .contact-form {
        padding: 30px;
    }

    .scroll-indicator {
        display: none;
    }
}

/* Mobile */
@media (max-width: 576px) {
    :root {
        --container-padding: 0 16px;
        --section-padding: 50px 0;
    }

    .navbar {
        padding: 15px 0;
    }

    .nav-logo {
        font-size: 1.5rem;
    }

    .hero {
        min-height: auto;
        padding: 120px 0 60px;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 1rem;
    }

    .hero-tagline {
        font-size: 0.95rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
        padding: 14px 24px;
    }

    .portrait-wrapper {
        max-width: 250px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .about-intro {
        font-size: 1.1rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .stat-item {
        padding: 20px;
        background: var(--bg-card);
        border-radius: var(--radius-md);
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-name {
        font-size: 0.8rem;
    }

    .project-content {
        padding: 20px;
    }

    .project-content h3 {
        font-size: 1.1rem;
    }

    .project-tech span {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .contact-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    .contact-form {
        padding: 25px 20px;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .footer {
        padding: 40px 0 20px;
    }

    .footer-logo a {
        font-size: 1.5rem;
    }

    .footer-social {
        gap: 15px;
    }

    .footer-social a {
        width: 40px;
        height: 40px;
    }

    /* Reduce animations on mobile for performance */
    .gradient-blob {
        display: none;
    }

    .floating-shape {
        display: none;
    }

    .hero-grid {
        opacity: 0.3;
    }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
    .hero-name {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .tech-grid {
        gap: 10px;
    }

    .tech-item {
        padding: 15px 10px;
    }

    .tech-icon {
        width: 40px;
        height: 40px;
        font-size: 0.7rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 50px;
    }

    .hero-content {
        grid-template-columns: 1fr 1fr;
    }

    .hero-text {
        order: 1;
        text-align: left;
    }

    .hero-portrait {
        order: 2;
    }

    .hero-cta {
        justify-content: flex-start;
    }

    .portrait-wrapper {
        max-width: 200px;
    }

    .scroll-indicator {
        display: none;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .gradient-blob,
    .floating-shape,
    .hero-grid {
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --glass-border: rgba(255, 255, 255, 0.3);
        --text-secondary: #c0c0c0;
        --text-muted: #999999;
    }

    .glass-card {
        border-width: 2px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {

    .service-card:hover,
    .project-card:hover,
    .tech-item:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    .contact-card:hover {
        transform: none;
    }

    /* Increase touch targets */
    .nav-link {
        padding: 10px;
    }

    .btn {
        min-height: 48px;
    }

    .footer-social a {
        min-width: 48px;
        min-height: 48px;
    }
}