/* Responsive Styles */

/* Base Mobile Fixes */
@media (max-width: 1200px) {
    .container {
        padding: 0 var(--space-6);
    }
}

/* Large Tablets and Small Desktops */
@media (max-width: 992px) {
    /* Typography */
    h1, .hero-title {
        font-size: var(--text-4xl);
    }
    
    h2, .section-title {
        font-size: var(--text-3xl);
    }
    
    /* Hero Section */
    .hero-subtitle {
        font-size: var(--text-xl);
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .about-image {
        max-width: 300px;
        margin: 0 auto;
    }
    
    /* Timeline Section */
    .timeline-content {
        width: 90%;
        margin: 0 auto !important;
        text-align: left !important;
    }
    
    .timeline-line {
        left: 30px;
    }
    
    .timeline-dot {
        left: 30px;
    }
    
    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        display: none;
    }
    
    /* Projects Grid */
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
}

/* Tablets */
@media (max-width: 768px) {
    /* Header & Navigation */
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 250px;
        height: 100vh;
        background-color: var(--color-surface);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--space-8) var(--space-4);
        transition: right 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: var(--space-4) 0;
        width: 100%;
    }
    
    .nav-link {
        display: block;
        width: 100%;
        padding: var(--space-2);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Hero Section */
    .hero-buttons {
        flex-direction: column;
        gap: var(--space-4);
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    /* Skills Section */
    .skills-grid {
        gap: var(--space-2);
    }
    
    .skill-item {
        width: 80px;
    }
    
    /* Projects Section */
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        justify-content: center;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
}

/* Mobile Devices */
@media (max-width: 576px) {
    /* Typography */
    h1, .hero-title {
        font-size: var(--text-3xl);
    }
    
    h2, .section-title {
        font-size: var(--text-2xl);
    }
    
    /* Spacing */
    section {
        padding: var(--space-12) 0;
    }
    
    /* Project Filters */
    .project-filters {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Hero Section */
    .hero-section {
        text-align: center;
    }
    
    .shape-1,
    .shape-2 {
        width: 150px;
        height: 150px;
    }
    
    .shape-3 {
        width: 250px;
        height: 250px;
    }
    
    /* Timeline */
    .timeline {
        padding-left: var(--space-8);
    }
    
    .timeline-content {
        padding: var(--space-4);
    }
    
    /* Skills Section */
    .skills-grid {
        justify-content: center;
    }
}

/* Very Small Devices */
@media (max-width: 360px) {
    .container {
        padding: 0 var(--space-3);
    }
    
    .hero-title {
        font-size: var(--text-2xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-lg);
    }
    
    .section-title {
        font-size: var(--text-xl);
    }
    
    .timeline-content {
        width: 100%;
    }
}

/* Dark Mode Preference */
@media (prefers-color-scheme: dark) {
    body:not(.light-theme) {
        --color-bg-primary: #121212;
        --color-bg-secondary: #1E1E1E;
        --color-text-primary: #F1F1F1;
        --color-text-secondary: #B0B0B0;
        --color-accent-primary: #7C6FFF;
        --color-accent-secondary: #00D8FF;
        --color-surface: #232323;
        --color-divider: #333333;
        
        --gradient-primary: linear-gradient(135deg, #7C6FFF, #00D8FF);
        --gradient-secondary: linear-gradient(135deg, #232323, #121212);
        
        --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
        --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.25);
        --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.3);
        --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.35);
        --shadow-glow: 0 0 15px rgba(124, 111, 255, 0.15);
    }
}

/* Print Styles */
@media print {
    .header,
    .hero-background,
    .hero-buttons,
    .project-filters,
    .contact-form,
    .footer,
    .theme-toggle,
    .mobile-menu-toggle,
    .back-to-top {
        display: none !important;
    }
    
    body,
    .light-theme,
    .dark-theme {
        --color-bg-primary: white;
        --color-bg-secondary: white;
        --color-text-primary: black;
        --color-text-secondary: #555;
        --color-accent-primary: #5045E4;
        --shadow-sm: none;
        --shadow-md: none;
        --shadow-lg: none;
        --shadow-xl: none;
        background-color: white;
        color: black;
    }
    
    a {
        color: #5045E4;
        text-decoration: underline;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    
    section {
        page-break-inside: avoid;
        padding: 1cm 0;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr !important;
    }
    
    .projects-grid {
        display: block;
    }
    
    .project-card {
        page-break-inside: avoid;
        margin-bottom: 1cm;
    }
    
    .project-card-inner {
        transform: none !important;
    }
    
    .project-card-back {
        display: block !important;
        transform: none !important;
        opacity: 1 !important;
        position: relative;
    }
}