/* Mobile-First Optimization - Keep All Features */

/* Enhanced Mobile Viewport */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
        font-size: 0.9rem;
        overflow-x: hidden;
    }
    
    /* Navigation Improvements */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1rem;
    }
    
    .navbar-nav {
        background: var(--bg-secondary);
        border-radius: var(--radius-lg);
        padding: 1rem;
        margin-top: 1rem;
        box-shadow: var(--shadow);
        border: 1px solid var(--border-color);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        margin-bottom: 0.25rem;
        border-radius: var(--radius);
        font-size: 0.95rem;
    }
    
    /* Hero Section Mobile Optimization */
    .hero-bio-section {
        padding: 1rem 0;
    }
    
    .hero-bio-section .row.align-items-center {
        min-vh-100: auto;
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
        line-height: 1.2;
        margin-bottom: 0.75rem;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .bio-summary {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .bio-summary .lead {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    /* Profile Image Mobile */
    .enhanced-profile-image {
        width: 160px !important;
        height: 160px !important;
        margin: 0 auto 1rem;
        display: block;
    }
    
    .profile-badges {
        height: 40px;
        margin-bottom: 1rem;
    }
    
    .badge-floating {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    /* Contact Grid Mobile */
    .hero-contact-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        margin: 1.5rem 0 !important;
    }
    
    .hero-contact-card {
        padding: 0.75rem !important;
        min-height: auto !important;
        flex-direction: row;
        align-items: center;
    }
    
    .hero-contact-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
        flex-shrink: 0;
    }
    
    .hero-contact-body {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* Social Links Mobile */
    .social-links-hero {
        justify-content: center;
        margin-bottom: 1.5rem;
        gap: 0.75rem;
    }
    
    .social-btn {
        width: 38px !important;
        height: 38px !important;
        font-size: 1rem;
    }
    
    /* Action Buttons Mobile */
    .hero-actions {
        text-align: center;
    }
    
    .hero-actions .btn {
        width: 100%;
        margin-right: 0 !important;
        margin-bottom: 0.75rem;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Stats Section Mobile */
    .stats-section .row {
        margin: 0 -0.5rem;
    }
    
    .stats-section .col-md-3 {
        padding: 0 0.5rem;
        margin-bottom: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem 1rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .stat-card p {
        font-size: 0.85rem;
    }
    
    /* Certifications Mobile */
    .certifications-section .row {
        margin: 0 -0.5rem;
    }
    
    .certifications-section .col-md-6,
    .certifications-section .col-lg-3 {
        padding: 0 0.5rem;
        margin-bottom: 1rem;
    }
    
    .cert-card {
        padding: 1.25rem 1rem;
    }
    
    .cert-image {
        width: 60px;
        height: 60px;
    }
    
    .cert-card h6 {
        font-size: 0.9rem;
    }
    
    .cert-issuer {
        font-size: 0.8rem;
    }
    
    .cert-year {
        font-size: 0.7rem;
        padding: 0.25rem 0.75rem;
    }
    
    /* Skills Overview Mobile */
    .skills-overview .row {
        margin: 0 -0.5rem;
    }
    
    .skills-overview .col-md-4 {
        padding: 0 0.5rem;
        margin-bottom: 1rem;
    }
    
    .skill-highlight {
        padding: 1.25rem 1rem;
        text-align: center;
    }
    
    .skill-highlight-icon {
        font-size: 2.25rem;
    }
    
    .skill-highlight h5 {
        font-size: 1rem;
    }
    
    .skill-highlight p {
        font-size: 0.85rem;
    }
    
    /* Container Spacing */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Card Improvements */
    .card-body, .card-header {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 1.5rem 0;
    }
    
    .footer .row {
        margin: 0 -0.5rem;
    }
    
    .footer .col-md-6 {
        padding: 0 0.5rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    /* Version Badge */
    .version-badge {
        bottom: 0.5rem;
        right: 0.5rem;
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Extra Small Mobile (iPhone SE, etc.) */
@media (max-width: 576px) {
    body {
        font-size: 0.85rem;
    }
    
    .hero-title {
        font-size: 1.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.95rem !important;
    }
    
    .enhanced-profile-image {
        width: 140px !important;
        height: 140px !important;
    }
    
    .hero-contact-card {
        padding: 0.6rem !important;
    }
    
    .hero-contact-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.8rem !important;
    }
    
    .hero-contact-body {
        font-size: 0.8rem;
    }
    
    .social-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 0.9rem;
    }
    
    .hero-actions .btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .stat-card {
        padding: 1rem 0.75rem;
    }
    
    .stat-card h3 {
        font-size: 1.25rem;
    }
    
    .cert-card {
        padding: 1rem 0.75rem;
    }
    
    .skill-highlight {
        padding: 1rem 0.75rem;
    }
    
    .skill-highlight-icon {
        font-size: 2rem;
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-bio-section .row.align-items-center {
        padding: 1rem 0;
    }
    
    .enhanced-profile-image {
        width: 120px !important;
        height: 120px !important;
    }
    
    .hero-contact-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    .hero-actions .btn {
        width: auto;
        display: inline-block;
        margin-right: 0.5rem;
    }
}

/* Touch Improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .social-btn,
    .social-link {
        min-width: 44px;
        min-height: 44px;
    }
    
    .theme-toggle {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Mobile Animation Fixes */
@media (max-width: 768px) {
    /* Fix reveal animations on mobile */
    .fx-reveal {
        opacity: 1 !important;
        transform: translateY(0) !important;
        transition: none !important;
    }
    
    /* Disable heavy animations on mobile */
    .fx-tilt:hover {
        transform: none !important;
        box-shadow: var(--shadow) !important;
    }
    
    /* Reduce particle effects */
    .nebula {
        opacity: 0.1 !important;
        filter: blur(6px) !important;
    }
    
    .hero-particle-canvas {
        opacity: 0.2 !important;
    }
    
    /* Disable complex animations */
    .badge-floating {
        animation: none !important;
        transform: none !important;
    }
    
    /* Smooth scroll behavior */
    html {
        scroll-behavior: smooth;
    }
    
    /* Optimize touch interactions */
    .hero-contact-card {
        transition: background-color 0.2s ease !important;
    }
    
    .hero-contact-card:active {
        background-color: rgba(255, 255, 255, 0.1) !important;
        transform: none !important;
    }
}

/* Reduce Motion for Mobile */
@media (prefers-reduced-motion: reduce) {
    .fx-reveal,
    .fx-tilt,
    .enhanced-profile-image,
    .badge-floating {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
    
    .nebula {
        display: none;
    }
    
    .hero-particle-canvas {
        display: none;
    }
}

/* High DPI Mobile Displays */
@media (-webkit-min-device-pixel-ratio: 2) and (max-width: 768px) {
    .enhanced-profile-image {
        image-rendering: -webkit-optimize-contrast;
    }
    
    .cert-image {
        image-rendering: -webkit-optimize-contrast;
    }
}
