/*=============== RESPONSIVE STYLES ===============*/

/* Large devices (desktops, less than 1200px) */
@media screen and (max-width: 1199.98px) {
    :root {
        --biggest-font-size: 2.75rem;
        --h1-font-size: 2rem;
        --h2-font-size: 1.5rem;
    }
    
    .container {
        max-width: 960px;
    }
    
    .hero-content {
        gap: 2rem;
    }
    
    .image-container {
        width: 320px;
        height: 320px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium devices (tablets, less than 992px) */
@media screen and (max-width: 991.98px) {
    :root {
        --biggest-font-size: 2.5rem;
        --h1-font-size: 1.75rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
    }
    
    .container {
        max-width: 720px;
    }
    
    .section {
        padding: 5rem 0;
    }
    
    .hero-content,
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text {
        order: 1;
    }
    
    .hero-image {
        order: 0;
        margin-bottom: 2rem;
    }
    
    .hero-description {
        margin: 0 auto 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-image {
        margin: 0 auto 3rem;
    }
    
    .about-text {
        text-align: center;
    }
    
    .about-info {
        justify-content: center;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media screen and (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
    
    .nav-list {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .about-info {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media screen and (max-width: 575.98px) {
    :root {
        --biggest-font-size: 2rem;
        --h1-font-size: 1.5rem;
        --h2-font-size: 1.25rem;
        --h3-font-size: 1.125rem;
        --normal-font-size: 0.9375rem;
        --small-font-size: 0.875rem;
        --smaller-font-size: 0.75rem;
    }
    
    .container {
        width: 95%;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    .image-container {
        width: 250px;
        height: 250px;
    }
    
    .about-info {
        grid-template-columns: 1fr;
    }
    
    .skills-tabs {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .projects-filter {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .contact-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.25rem;
    }
    
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .back-to-top {
        right: 1rem;
        bottom: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Landscape orientation for mobile devices */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0;
    }
    
    .image-container {
        width: 200px;
        height: 200px;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* High-resolution displays (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images for high-resolution displays */
    .image-container img,
    .project-img img,
    .author-img img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Dark mode preference */
@media (prefers-color-scheme: dark) {
    body:not(.light-theme) {
        --primary-color: #3b82f6;
        --primary-color-light: #60a5fa;
        --primary-color-dark: #2563eb;
        --text-color: #e2e8f0;
        --text-color-light: #94a3b8;
        --bg-color: #0f172a;
        --bg-color-alt: #1e293b;
        --border-color: #334155;
    }
}

/* Print styles */
@media print {
    .header,
    .mobile-nav,
    .back-to-top,
    .footer,
    .contact-form-container,
    .projects-filter,
    .skills-tabs,
    .theme-toggle,
    .hamburger {
        display: none !important;
    }
    
    .section {
        padding: 1rem 0 !important;
        page-break-inside: avoid;
    }
    
    .container {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    body {
        font-size: 12pt !important;
        line-height: 1.5 !important;
        color: #000 !important;
        background: #fff !important;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    .hero-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .projects-grid,
    .skills-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}