/**
 * Responsive Design
 * Media queries for different screen sizes
 */

/* Tablet and below (max-width: 768px) */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: var(--navbar-height);
        right: -100%;
        width: 100%;
        height: calc(100vh - var(--navbar-height));
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: var(--spacing-lg);
        transition: right 0.3s ease;
        border-left: 1px solid var(--border-color);
    }

    .nav-menu.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

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

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

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    /* Hero Section */
    .hero {
        padding: 100px var(--spacing-sm) 60px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .about-image {
        order: -1;
        max-width: 300px;
        margin: 0 auto;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    /* Timeline */
    .timeline::before {
        left: 10px;
    }

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

    .timeline-dot {
        left: 2px;
    }

    /* Section Header */
    .section-header {
        flex-wrap: wrap;
    }

    .section-line {
        flex-basis: 100%;
        margin-left: 0;
        margin-top: var(--spacing-sm);
    }

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

    .tech-icons {
        gap: var(--spacing-sm);
    }

    .tech-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    /* Achievements */
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact-info {
        grid-template-columns: 1fr;
    }

    .contact-social {
        flex-direction: column;
        align-items: center;
    }

    .social-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    /* Spacing adjustments */
    section {
        padding: 60px var(--spacing-sm);
    }

    .container {
        padding: 0 var(--spacing-sm);
    }
}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
    /* Typography */
    .section-title {
        font-size: 1.8rem;
    }

    .section-number {
        font-size: 1.2rem;
    }

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

    .typing-container {
        font-size: 1rem;
    }

    /* Social Links */
    .social-links {
        gap: var(--spacing-sm);
    }

    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

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

    /* Timeline */
    .timeline-content h3 {
        font-size: 1.2rem;
    }

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

    /* Cards */
    .achievement-card,
    .skill-category {
        padding: var(--spacing-sm);
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: var(--font-size-sm);
    }

    /* Footer */
    .footer-content p {
        font-size: var(--font-size-sm);
    }
}

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

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

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

/* Extra Large Desktop (min-width: 1920px) */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }

    section {
        padding: 120px var(--spacing-md);
    }
}

/* Landscape Mode for Tablets and Phones */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px var(--spacing-md) 40px;
    }

    .scroll-indicator {
        display: none;
    }

    section {
        padding: 60px var(--spacing-md);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hamburger,
    .scroll-indicator,
    #matrix-canvas,
    .social-links,
    .contact-social {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

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

    a {
        text-decoration: underline;
    }

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

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .btn:hover::before {
        display: none;
    }

    /* Larger touch targets */
    .nav-link,
    .btn,
    .social-icon {
        min-height: 44px;
        min-width: 44px;
    }

    /* Disable parallax on touch devices for better performance */
    .parallax {
        transform: none !important;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .profile-photo,
    .tech-icon img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

