/* ==========================================================================
   Responsive CSS
   ========================================================================== */

/* Large Desktop (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 100px;
    }
    
    .section-title {
        font-size: 56px;
    }
}

@media (max-width: 768px) {
    .privacy-modal .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .privacy-modal .modal-body {
        padding: 2rem 1.5rem;
    }
    
    .privacy-modal h2 {
        font-size: 2rem;
    }
}

/* Desktop (1200px and up) */
@media (min-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet Landscape (992px to 1199px) */
@media (max-width: 1199px) {
    :root {
        --section-padding: 80px;
    }
    
    .section-title {
        font-size: 42px;
    }
    
    .hero-title {
        font-size: 72px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet (768px to 991px) */
@media (max-width: 991px) {
    :root {
        --section-padding: 60px;
        --header-height: 70px;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transition: left 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translateY(10px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-10px);
    }
    
    .nav-link {
        font-size: 18px;
    }
    
    /* Hero */
    .hero-title {
        font-size: 56px;
    }
    
    .hero-description {
        font-size: 18px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .stat-number {
        font-size: 36px;
    }


    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
    }

         /* Software */
    .software-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .software-item {
        padding: 15px;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    /* Modal */
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-image {
        max-height: 50vh;
    }
    
    .modal-nav {
        top: auto;
        bottom: 20px;
        transform: none;
    }
    
    .modal-prev {
        left: 20px;
    }
    
    .modal-next {
        right: 20px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Mobile Landscape (576px to 767px) */
@media (max-width: 767px) {
    :root {
        --section-padding: 50px;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    .hero-title {
        font-size: 42px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    /* About */
    .about-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .about-cta {
        padding: 30px 20px;
        margin: 30px 0;
    }
    
    .cta-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .cta-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .cta-title {
        font-size: 24px;
    }
    
    .cta-text {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .cta-decoration {
        top: 15px;
        right: 15px;
    }

    /* Skills */
    .skill-card {
        padding: 30px;
    }
    
    .skill-icon {
        width: 60px;
        height: 60px;
    }
    
    .skill-title {
        font-size: 20px;
    }

     /* Software */
     .software-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        max-width: 100%;
    }
    
    .software-item {
        padding: 12px;
    }
    
    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portfolio-filters {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    /* Contact */
    .contact-form {
        padding: 30px 20px;
    }
    
    .contact-details {
        gap: 20px;
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-image {
        padding: 20px;
    }
    
    .modal-info {
        padding: 30px 20px;
    }
    
    .modal-title {
        font-size: 24px;
    }
    
    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* Mobile Portrait (up to 575px) */
@media (max-width: 575px) {
    :root {
        --section-padding: 40px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-subtitle {
        font-size: 12px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    /* Hero */
    .hero {
        min-height: 100svh; /* Use svh for mobile browsers */
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .hero-description {
        font-size: 14px;
    }
    
    .hero-buttons .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    /* About */
    .about-intro {
        font-size: 16px;
    }
    
    .about-text p {
        font-size: 14px;
    }
    .language-switcher {
        gap: 8px;
    }
    
    .lang-btn {
        width: 40px;
        height: 27px;
    }

    .stat-number {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
     .about-cta {
        padding: 25px 15px;
    }
    
    .cta-title {
        font-size: 22px;
    }
    
    .cta-button {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .cta-button svg {
        width: 16px;
        height: 16px;
    }
    
    /* Skills */
    .skill-card {
        padding: 25px;
    }
    
    .skill-icon {
        width: 50px;
        height: 50px;
    }
    
    .skill-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .skill-title {
        font-size: 18px;
    }
    
    .skill-description {
        font-size: 14px;
    }
    
       /* Software */
    .software-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    
    .software-item {
        padding: 10px;
    }
    
    .language-switcher {
        gap: 8px;
        justify-content: center;
    }
    
    .lang-btn {
        width: 50px;
        height: 33px;
    }

    /* Portfolio */
    .portfolio-item {
        aspect-ratio: 1 / 1;
    }
    
    .portfolio-overlay {
        padding: 20px;
    }
    
    .portfolio-title {
        font-size: 18px;
    }
    
    .portfolio-category {
        font-size: 12px;
    }
    
    /* Contact */
    .contact-info h3 {
        font-size: 24px;
    }
    
    .contact-info p {
        font-size: 14px;
    }
    
    .contact-item {
        gap: 15px;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    
    .contact-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .contact-item h4 {
        font-size: 14px;
    }
    
    .contact-item p {
        font-size: 13px;
    }
    
    .contact-form {
        padding: 25px 15px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .form-group label {
        font-size: 14px;
        left: 15px;
        top: 12px;
    }
    
    .btn-submit {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    /* Modal */
    .modal-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-body {
        max-height: 100vh;
    }
    
    .modal-image {
        padding: 15px;
        max-height: 40vh;
    }
    
    .modal-info {
        padding: 20px 15px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-description {
        font-size: 14px;
    }
    
    .detail-item {
        font-size: 13px;
        flex-direction: column;
        gap: 5px;
    }
    
    .detail-item strong {
        min-width: auto;
    }
    
    .modal-nav {
        width: 40px;
        height: 40px;
    }
    
    .modal-nav svg {
        width: 20px;
        height: 20px;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-logo h3 {
        font-size: 24px;
    }
    
    .footer-logo p,
    .footer-links a {
        font-size: 14px;
    }
    
    .footer-links h4,
    .footer-social h4 {
        font-size: 16px;
    }
    
    .footer-bottom p {
        font-size: 12px;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* Extra Small Mobile (up to 375px) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 32px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .hero-buttons .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .nav-logo a {
        font-size: 20px;
    }
    
    .skill-card {
        padding: 20px;
    }
    
    .software-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .portfolio-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-btn {
        width: 100%;
    }
}

/* Landscape Orientation */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 120px 0 60px;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle,
    .hero-description {
        font-size: 14px;
    }
    
    .hero-buttons {
        margin-top: 20px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .nav-toggle,
    .scroll-indicator,
    .back-to-top,
    .portfolio-filters,
    .contact-form,
    .hero-buttons,
    .modal-close,
    .modal-nav {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    section {
        page-break-inside: avoid;
        padding: 20px 0;
    }
    
    .hero {
        min-height: auto;
        page-break-after: always;
    }
    
    .portfolio-item,
    .skill-card {
        page-break-inside: avoid;
    }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images and rendering for retina displays */
    .hero-shapes .shape {
        filter: blur(40px);
    }
}

/* Dark Mode Support (if browser/OS prefers dark mode) */
@media (prefers-color-scheme: dark) {
    /* Already using dark theme, but this ensures compatibility */
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-shapes .shape {
        animation: none;
    }
    
    .scroll-indicator {
        animation: none;
    }
}

/* Hover Support Detection */
@media (hover: none) {
    /* Touch devices - remove hover effects */
    .portfolio-item:hover img {
        transform: none;
    }
    
    .portfolio-overlay {
        opacity: 1;
        background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.9));
    }
    
    .portfolio-title,
    .portfolio-category {
        transform: none;
    }
    
    .skill-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}


