/* ===================================
   RESPONSIVE DESIGN - MOBILE FIRST
   =================================== */

/* Tablet Devices (768px and below) */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .terminal-robot {
        order: -1;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

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

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
    }

    .timeline-dot {
        left: 30px;
    }

    .timeline-content {
        margin-left: 60px;
    }

    .timeline-empty {
        display: none;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Mobile Devices (768px and below) */
@media (max-width: 768px) {
    /* Navigation */
    nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 14, 39, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        border-top: 1px solid rgba(0, 255, 136, 0.2);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .download-btn .btn-text {
        display: none;
    }

    .download-btn {
        padding: 0.7rem 1rem;
    }

    /* Hero Section */
    .hero {
        padding: 100px 1.5rem 2rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

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

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

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

    .stat {
        text-align: left;
        width: 100%;
        padding: 1rem;
        background: rgba(0, 255, 136, 0.05);
        border-radius: 10px;
        border-left: 3px solid var(--primary);
    }

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

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

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

    /* Terminal */
    .terminal-body {
        padding: 1.5rem;
        min-height: 350px;
        max-height: 400px;
        font-size: 0.85rem;
    }

    .terminal-title {
        font-size: 0.75rem;
        display: none;
    }

    .pixel {
        width: 18px;
        height: 18px;
    }

    .pupil {
        width: 14px;
        height: 18px;
    }

    /* Sections */
    .section {
        padding: 60px 1.5rem;
    }

    .section-header {
        margin-bottom: 3rem;
    }

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

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

    /* About Section */
    .profile-avatar {
        height: 250px;
        font-size: 6rem;
    }

    .about-content h3 {
        font-size: 1.5rem;
    }

    .about-buttons {
        flex-direction: column;
    }

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

    .timeline-dot {
        left: 20px;
        width: 15px;
        height: 15px;
    }

    .timeline-content {
        margin-left: 50px;
        padding: 1.5rem;
    }

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

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

    .skill-card {
        padding: 2rem;
    }

    .skill-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-image {
        height: 180px;
        font-size: 3rem;
    }

    .project-content {
        padding: 1.5rem;
    }

    .project-links {
        flex-direction: column;
    }

    .project-link {
        width: 100%;
        justify-content: center;
    }

    /* Contact */
    .contact-card {
        padding: 1.5rem;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .contact-form {
        padding: 2rem;
    }

    /* Footer */
    footer {
        padding: 2rem 1.5rem;
    }

    .social-links {
        flex-wrap: wrap;
    }
}

/* Small Mobile Devices (480px and below) */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

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

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

    .pixel {
        width: 15px;
        height: 15px;
    }

    .pupil {
        width: 12px;
        height: 15px;
    }

    .terminal-body {
        padding: 1rem;
        font-size: 0.8rem;
    }

    .profile-avatar {
        height: 200px;
        font-size: 5rem;
    }

    .info-item {
        padding: 0.8rem;
    }

    .timeline-content {
        margin-left: 40px;
        padding: 1rem;
    }

    .skill-card {
        padding: 1.5rem;
    }

    .project-content {
        padding: 1rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.8rem;
    }
}

/* Landscape Mode for Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 1.5rem 2rem;
    }

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

    .terminal-body {
        min-height: 300px;
        max-height: 350px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .social-link,
    .project-link,
    .contact-card {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-links a {
        padding: 0.5rem 0;
    }

    .skill-tag,
    .tech-tag {
        padding: 0.6rem 1.2rem;
    }
}

/* Print Styles */
@media print {
    nav,
    .hamburger,
    .cta-buttons,
    .download-btn,
    .social-links,
    .terminal-robot,
    .bg-canvas,
    .gradient-bg {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

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

    a {
        text-decoration: underline;
        color: black !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #00ff00;
        --secondary: #00ffff;
        --text-gray: #cccccc;
    }

    .btn-outline,
    .skill-card,
    .project-card,
    .contact-card {
        border-width: 2px;
    }
}

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

    .pixel-art {
        animation: none;
    }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
    /* Already dark by default */
}

/* Light Mode Support (optional) */
@media (prefers-color-scheme: light) {
    /* Uncomment if you want light mode support
    :root {
        --darker: #ffffff;
        --dark: #f5f5f5;
        --text-light: #0a0e27;
        --text-gray: #666666;
    }
    */
}