/* ===================================
   Responsive Design - Mobile First
   =================================== */

/* Tablet - 768px and below */
@media (max-width: 768px) {
    /* Typography */
    :root {
        --section-padding: 3rem 1.5rem;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        transition: all var(--transition-base);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-list {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .mobile-toggle {
        display: flex;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Hero Section */
    .hero {
        min-height: 90vh;
        padding: 6rem 1.5rem 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* Section Titles */
    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

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

    /* Services Section */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Tech Stack */
    .tech-items {
        justify-content: center;
    }

    .tech-badge {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    /* Timeline */
    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item {
        padding-left: 1.5rem;
    }

    .timeline-marker {
        left: -1.5rem;
    }

    .timeline-content h3 {
        font-size: 1.25rem;
    }

    .timeline-content h4 {
        font-size: 1rem;
    }

    /* Projects Section */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-image {
        height: 180px;
    }

    .project-placeholder {
        font-size: 3rem;
    }

    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .contact-item {
        margin-bottom: 1.5rem;
    }
}

/* Mobile - 480px and below */
@media (max-width: 480px) {
    /* Typography */
    html {
        font-size: 14px;
    }

    :root {
        --section-padding: 2.5rem 1rem;
    }

    /* Navigation */
    .nav-container {
        padding: 0.875rem 1rem;
    }

    .logo {
        font-size: 1.125rem;
    }

    .language-switcher {
        gap: 0.25rem;
    }

    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    /* Hero Section */
    .hero {
        padding: 5rem 1rem 2.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
    }

    /* Section Titles */
    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    /* Service Cards */
    .service-card {
        padding: 1.5rem;
    }

    .service-icon {
        font-size: 2.5rem;
    }

    .service-title {
        font-size: 1.25rem;
    }

    /* Timeline */
    .timeline {
        padding-left: 1rem;
    }

    .timeline-item {
        padding-left: 1rem;
        margin-bottom: 2.5rem;
    }

    .timeline-marker {
        left: -1rem;
        width: 12px;
        height: 12px;
    }

    .timeline-date {
        font-size: 0.8rem;
    }

    .timeline-content h3 {
        font-size: 1.125rem;
    }

    .achievement {
        padding: 0.875rem;
    }

    /* Projects */
    .project-image {
        height: 150px;
    }

    .project-content {
        padding: 1.25rem;
    }

    .project-title {
        font-size: 1.125rem;
    }

    /* Contact */
    .contact-icon {
        font-size: 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    /* Footer */
    .footer {
        padding: 1.5rem 1rem;
    }

    .footer p {
        font-size: 0.875rem;
    }
}

/* Large Desktop - 1400px and above */
@media (min-width: 1400px) {
    :root {
        --container-max-width: 1320px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        font-size: 2rem;
    }

    .section-title {
        font-size: 3rem;
    }
}

/* Print Styles */
@media print {
    .nav,
    .scroll-indicator,
    .theme-toggle,
    .language-switcher,
    .mobile-toggle,
    .contact-form,
    .footer {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }

    .section {
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}

/* Landscape Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }

    .hero-stats {
        flex-direction: row;
        gap: 2rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Dark Mode Preference */
@media (prefers-color-scheme: dark) {
    body:not(.light-theme) {
        --bg-primary: #0a0a0a;
        --bg-secondary: #1a1a1a;
        --text-primary: #f8f9fa;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-arrow {
        animation: none;
    }
}

/* Hover Support */
@media (hover: none) {
    /* Touch devices - disable hover effects */
    .hover-lift:hover,
    .hover-scale:hover,
    .hover-rotate:hover {
        transform: none;
    }

    .nav-link:hover::after {
        width: 0;
    }
}
