/* 
=========================================
   MOBILE RESPONSIVENESS IMPROVEMENTS
=========================================
*/

/* General Mobile Improvements */
@media (max-width: 768px) {
    :root {
        --section-gap: 60px;
        --section-padding: 60px 0;
    }

    /* Navigation Improvements */
    .navbar {
        padding: 15px 0;
    }

    .nav-container {
        padding: 0 15px;
    }

    .logo {
        font-size: 1.5rem;
    }

    /* Hero Section Mobile */
    #hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-text {
        max-width: 100%;
        padding: 0 15px;
    }

    #hero h1 {
        font-size: 2rem !important;
        line-height: 1.3;
    }

    #hero p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .hero-stats {
        justify-content: center;
        gap: 30px;
    }

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

    .hero-visual {
        order: -1;
        margin-bottom: 20px;
    }

    .hero-img-wrapper {
        width: 250px;
        height: 250px;
    }

    .glass-card.main-visual {
        width: 200px;
        height: 200px;
    }

    /* CTA Buttons Mobile */
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 30px;
    }

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

    /* Section Headers Mobile */
    .section {
        padding: 60px 0;
    }

    .section-head h2 {
        font-size: 1.75rem;
    }

    .section-head p {
        font-size: 1rem;
        padding: 0 20px;
    }

    /* Skills Grid Mobile */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .skill-card {
        padding: 30px 20px;
    }

    /* Projects Section Mobile */
    .projects-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .filter-group {
        justify-content: center;
        flex-wrap: wrap;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    /* Timeline Mobile */
    .timeline {
        padding-left: 30px;
    }

    .timeline-item {
        padding-left: 20px;
    }

    .timeline-content {
        padding: 20px;
    }

    /* Contact Section Mobile */
    .contact-container {
        flex-direction: column;
        padding: 30px 20px;
    }

    .contact-info {
        text-align: center;
    }

    .contact-method {
        justify-content: center;
    }

    .contact-form {
        width: 100%;
    }

    /* Footer Mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .footer-brand {
        max-width: 100%;
    }

    .social-links {
        justify-content: center;
    }

    .footer-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    /* Voice Widget Mobile */
    .voice-widget-toggle {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .voice-panel {
        width: 100%;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
        max-width: 100%;
    }

    /* Settings Modal Mobile */
    .settings-modal {
        width: 90%;
        max-height: 80vh;
    }

    .lang-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Mobile Menu */
    .mobile-menu {
        padding: 80px 20px 20px;
    }

    .mobile-menu a {
        font-size: 1.25rem;
        padding: 15px 0;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    :root {
        --section-padding: 40px 0;
    }

    .container {
        padding: 0 12px;
    }

    /* Hero */
    #hero h1 {
        font-size: 1.75rem !important;
    }

    .badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .hero-img-wrapper {
        width: 200px;
        height: 200px;
    }

    .glass-card.main-visual {
        width: 160px;
        height: 160px;
    }

    .glass-card.main-visual img {
        width: 80px;
    }

    /* Stats */
    .hero-stats {
        gap: 20px;
    }

    .stat-num {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    /* Skills */
    .skill-card {
        padding: 25px 15px;
    }

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

    .skill-card h3 {
        font-size: 1.1rem;
    }

    /* Projects */
    .project-card {
        padding: 15px;
    }

    .project-header h3 {
        font-size: 1.1rem;
    }

    /* Filter Buttons */
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    /* Contact */
    .contact-container {
        padding: 20px 15px;
    }

    .contact-info h3 {
        font-size: 1.5rem;
    }

    .contact-method {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .method-icon {
        width: 45px;
        height: 45px;
    }

    /* Form */
    .form-group label {
        font-size: 0.85rem;
    }

    .form-input {
        padding: 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    /* Footer */
    .footer-brand .logo {
        font-size: 1.5rem;
    }

    .footer-nav h4 {
        font-size: 0.9rem;
    }

    .footer-nav a {
        font-size: 0.9rem;
    }

    /* Settings */
    .settings-header h3 {
        font-size: 1.1rem;
    }

    .setting-item label {
        font-size: 0.9rem;
    }

    .accent-picker {
        gap: 10px;
    }

    .accent-dot {
        width: 30px;
        height: 30px;
    }

    .lang-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .lang-btn {
        padding: 10px 5px;
        font-size: 0.8rem;
    }

    /* Scrollbar improvements for mobile */
    ::-webkit-scrollbar {
        width: 4px;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    #hero h1 {
        font-size: 1.5rem !important;
    }

    .section-head h2 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .skill-tag {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    #hero {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .hero-content {
        flex-direction: row;
        align-items: center;
    }

    .hero-visual {
        order: 0;
        width: 40%;
    }

    .hero-text {
        width: 60%;
        text-align: left;
    }

    .hero-stats {
        justify-content: flex-start;
    }

    .cta-buttons {
        flex-direction: row;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }

    .skill-card:hover {
        transform: none;
    }

    .project-card:hover {
        transform: none;
    }

    .glass-card:hover {
        transform: none;
    }

    /* Larger touch targets */
    .nav-links a,
    .filter-btn,
    .btn,
    .hamburger {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Safe Area for Notch Phones */
@supports (padding-top: env(safe-area-inset-top)) {
    .navbar {
        padding-top: env(safe-area-inset-top);
    }

    .mobile-menu {
        padding-top: calc(80px + env(safe-area-inset-top));
    }

    #hero {
        padding-top: calc(100px + env(safe-area-inset-top));
    }
}

/* Dark Mode Specific Mobile Adjustments */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
    .form-input {
        background: rgba(255, 255, 255, 0.05);
    }
}

/* Reduced Motion for Accessibility */
@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;
    }
}
