/* ══════════════════════════════════════════════════════
   responsive.css
   Media queries only (all @media blocks live here)
   ══════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
    :root {
        --base-font-size: 15px;
    }
}

@media (max-width: 768px) {
    :root {
        --base-font-size: 14px;
    }
}

@media (max-width: 480px) {
    :root {
        --base-font-size: 13px;
    }
}

/* Responsive Header */
@media (max-width: 768px) {
    .header .container {
        padding: 0.8rem clamp(1rem, 4vw, 2rem);
    }
    
    .nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(245, 245, 245, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: left 0.3s ease;
        z-index: 1000;
    }
    
    .nav.active {
        left: 0;
    }
    
    .nav-link {
        font-size: 1.2rem;
        color: #1a1a1a;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .language-switcher {
        margin-left: 0;
    }
}

/* Responsive Hero Section */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-brand {
        text-align: center;
    }
    
    .hero-description {
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .hero-content {
        padding: 0 1rem;
        gap: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-tagline {
        font-size: 0.8rem;
    }
    
    .hero-text {
        font-size: 0.9rem;
    }
    
    .hero-features {
        gap: 0.8rem;
    }
    
    .feature-item {
        padding: 0.6rem 0;
        padding-left: 0.8rem;
    }
    
    .hero-actions {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btn {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-tagline {
        font-size: 0.75rem;
    }
    
    .hero-text {
        font-size: 0.85rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        border-left: none;
        border-top: 2px solid rgba(212, 212, 212, 0.2);
        padding-left: 0;
        padding-top: 0.8rem;
    }
}

/* Responsive Portfolio Grid */
@media (max-width: 1200px) {
    .gallery {
        grid-template-columns: repeat(8, 1fr);
    }
    
    .portfolio-item:nth-child(1),
    .portfolio-item:nth-child(2),
    .portfolio-item:nth-child(3) {
        grid-column: span 4;
    }
    
    .portfolio-item:nth-child(4) {
        grid-column: span 4;
    }
    
    .portfolio-item:nth-child(5),
    .portfolio-item:nth-child(6) {
        grid-column: span 4;
    }
    
    .portfolio-item:nth-child(n+7) {
        grid-column: span 4;
    }
}

@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 1px;
    }
    
    .portfolio-item:nth-child(1),
    .portfolio-item:nth-child(2),
    .portfolio-item:nth-child(3),
    .portfolio-item:nth-child(4),
    .portfolio-item:nth-child(5),
    .portfolio-item:nth-child(6) {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .portfolio-item:nth-child(n+7) {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-item:nth-child(1),
    .portfolio-item:nth-child(2),
    .portfolio-item:nth-child(3),
    .portfolio-item:nth-child(4),
    .portfolio-item:nth-child(5),
    .portfolio-item:nth-child(6) {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .portfolio-item:nth-child(n+7) {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Responsive Modals */
@media (max-width: 768px) {
    .modal-content {
        width: 95vw;
        max-width: none;
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .modal-image-container {
        min-height: 150px;
        max-height: 250px;
    }
    
    .modal-info {
        padding: 1rem;
    }
    
    .modal-gallery-container {
        padding: 0.8rem 1rem 0.5rem 1rem;
    }
    
    .modal-gallery img {
        width: 60px;
        height: 45px;
    }
    
    .gallery-nav {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }
    
    .gallery-nav-left {
        left: 0.3rem;
    }
    
    .gallery-nav-right {
        right: 0.3rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 100vw;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .modal-image-container {
        min-height: 120px;
        max-height: 200px;
    }
    
    .modal-scrollable-content {
        min-height: 0;
    }
    
    .modal-info {
        padding: 0.8rem;
    }
    
    .modal-gallery-container {
        padding: 0.6rem 0.8rem 0.4rem 0.8rem;
    }
    
    .modal-gallery img {
        width: 50px;
        height: 38px;
    }
}

/* Responsive Skills Grid */
@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .skill-category h4 {
        font-size: 1rem;
    }
    
    .skill-item {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Responsive About Stats */
@media (max-width: 768px) {
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    
    .stat {
        padding: 0.5rem 0.3rem;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .about-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* Responsive Contact Info */
@media (max-width: 768px) {
    .contact-info {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .contact-item {
        padding: 0.8rem;
    }
    
    .contact-icon {
        font-size: 1rem;
    }
    
    .contact-text {
        font-size: 0.9rem;
    }
}

/* Responsive Scroll to Top Button */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Responsive Modal Hero Sections */
@media (max-width: 768px) {
    .skills-hero,
    .contact-hero,
    .about-hero {
        padding: 0.9rem 1rem 1rem;
        min-height: 0;
    }
    
    .modal-logo {
        width: 64px;
        height: 64px;
        margin-bottom: 0.5rem;
    }
    
    .skills-hero h2,
    .contact-hero h2,
    .about-hero h2 {
        font-size: 1.3rem;
    }
    
    .skills-hero p,
    .contact-hero p,
    .about-hero p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .skills-hero,
    .contact-hero,
    .about-hero {
        padding: 0.75rem 0.75rem 0.9rem;
        min-height: 0;
    }
    
    .modal-logo {
        width: 56px;
        height: 56px;
        margin-bottom: 0.45rem;
    }
    
    .skills-hero h2,
    .contact-hero h2,
    .about-hero h2 {
        font-size: 1.2rem;
    }
    
    .skills-hero p,
    .contact-hero p,
    .about-hero p {
        font-size: 0.75rem;
    }
}

/* Prevent horizontal scroll on mobile */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .main {
        overflow-x: hidden;
    }
}

/* High DPI / Retina Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero::before {
        background-size: 25px 25px;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-content {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .modal-content {
        max-height: calc(100vh - 1rem);
    }
}

/* Print styles */
@media print {
    .header,
    .scroll-to-top,
    .modal {
        display: none !important;
    }
    
    .main {
        margin-top: 0;
    }
    
    body {
        background: white;
        color: black;
    }
}

