/* Mobile-First Responsive Improvements */

/* Base responsive typography */
html {
    font-size: 16px;
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
}

/* Enhanced Mobile Navigation */
.navbar {
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .theme-toggle {
        margin: 1rem auto 0;
        display: block;
        width: 40px;
    }
}

/* Mobile-Optimized Hero Section */
.hero-section {
    padding: 80px 0 60px;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 40px;
        min-height: 80vh;
    }
    
    .hero-name {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .stat-item {
        padding: 0.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 0.75rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-name {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
}

/* Mobile-Friendly Timeline */
.timeline {
    position: relative;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 50px;
        margin-bottom: 2rem;
    }
    
    .timeline-marker {
        left: 3px;
        width: 20px;
        height: 20px;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .experience-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .company-badge {
        align-self: flex-start;
        font-size: 0.75rem;
        padding: 0.25rem 0.75rem;
    }
    
    .experience-meta {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    
    .experience-description {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .skill-tags {
        gap: 0.25rem;
    }
    
    .skill-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}
/* Fix Mobile Hero Section Spacing */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 40px; /* Reduced bottom padding */
        min-height: 70vh; /* Reduced from 80vh */
    }
    
    .hero-content {
        margin-bottom: 0; /* Remove extra margin */
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        margin-bottom: 1rem; /* Reduced margin */
    }
    
    /* Remove the rocket emoji completely */
    .hero-visual {
        display: none; /* Hide the entire visual section on mobile */
        margin-top: 0;
    }
    
    .hero-visual::after {
        display: none; /* Remove rocket emoji */
        content: none;
    }
}

/* Fix About Section Top Spacing */
@media (max-width: 768px) {
    #about {
        padding-top: 40px; /* Reduced from default section-padding */
    }
    
    .section-padding {
        padding: 40px 0; /* Reduced from 60px */
    }
}

/* Better Mobile Container Spacing */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .col-lg-8, .col-lg-6, .col-lg-4 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Remove Hero Visual Completely on Mobile */
@media (max-width: 768px) {
    .floating-cards {
        display: none !important;
    }
    
    .hero-visual {
        display: none !important;
        height: 0;
        margin: 0;
    }
    
    /* Make hero content full width on mobile */
    .hero-section .col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .hero-section .col-lg-4 {
        display: none; /* Hide the visual column completely */
    }
}

/* Tighter Mobile Layout */
@media (max-width: 768px) {
    .min-vh-100 {
        min-height: 60vh; /* Reduce hero height */
    }
    
    .hero-section .row {
        align-items: flex-start; /* Don't center vertically */
        padding-top: 2rem;
    }
    
    .scroll-indicator {
        display: none; /* Hide scroll indicator on mobile */
    }
}

/* About Section Mobile Improvements */
@media (max-width: 768px) {
    .about-visual {
        margin-top: 1rem; /* Reduced from 2rem */
        height: 250px; /* Smaller height */
    }
    
    .section-header {
        margin-bottom: 30px; /* Reduced from 40px */
        padding: 0 0.5rem;
    }
}



/* Mobile Skills Section */
@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skill-category {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .category-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .skills-list {
        gap: 1rem;
    }
    
    .skill-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        margin-bottom: 0.5rem;
    }
    
    .skill-name {
        font-size: 0.9rem;
    }
    
    .skill-years {
        font-size: 0.75rem;
        align-self: flex-start;
    }
    
    .skill-percentage {
        position: static;
        margin-top: 0.25rem;
        font-size: 0.7rem;
    }
}

/* Mobile Certifications */
@media (max-width: 768px) {
    .certifications-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .certification-card {
        padding: 1.5rem;
    }
    
    .cert-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .cert-name {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .cert-code {
        font-size: 0.75rem;
    }
    
    .cert-badge {
        width: 25px;
        height: 25px;
        top: 0.75rem;
        right: 0.75rem;
        font-size: 0.75rem;
    }
}

/* Mobile Contact Section */
@media (max-width: 768px) {
    .contact-methods {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .contact-method {
        padding: 1.5rem;
        flex-direction: row;
        text-align: left;
    }
    
    .method-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        flex-shrink: 0;
    }
    
    .method-content {
        flex: 1;
    }
    
    .method-content h4 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .method-content p {
        font-size: 0.9rem;
        word-break: break-word;
    }
    
    .social-links {
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Mobile About Section */
@media (max-width: 768px) {
    .about-visual {
        margin-top: 2rem;
        height: 300px;
    }
    
    .tech-orbit {
        width: 250px;
        height: 250px;
    }
    
    .orbit-center {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .ring-1 {
        width: 120px;
        height: 120px;
    }
    
    .ring-2 {
        width: 200px;
        height: 200px;
    }
    
    .orbit-item {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .contact-info {
        gap: 0.75rem;
    }
    
    .contact-item {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .contact-item i {
        width: 18px;
        font-size: 0.9rem;
    }
}

/* Mobile Floating Cards */
@media (max-width: 768px) {
    .floating-cards {
        display: none; /* Hide on mobile for performance */
    }
    
    .hero-visual {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 2rem;
    }
    
    .hero-visual::after {
        content: '🚀';
        font-size: 4rem;
        opacity: 0.3;
        animation: float 3s ease-in-out infinite;
    }
}

/* Enhanced Touch Targets */
@media (max-width: 768px) {
    .btn {
        min-height: 44px; /* iOS touch target minimum */
        font-size: 1rem;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .social-link {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Mobile Typography Improvements */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .lead {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Mobile Spacing Improvements */
@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
        padding: 0 1rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
    /* Reduce animations on mobile for better performance */
    .floating-card,
    .orbit-ring,
    .progress-bar::after {
        animation: none;
    }
    
    /* Simplify hover effects for touch devices */
    .skill-category:hover,
    .certification-card:hover,
    .contact-method:hover {
        transform: none;
        box-shadow: var(--shadow-lg);
    }
}

/* Landscape Phone Optimization */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-section {
        min-height: 70vh;
        padding: 40px 0;
    }
    
    .hero-stats {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

/* Very Small Screens */
@media (max-width: 360px) {
    .hero-name {
        font-size: 1.75rem;
    }
    
    .hero-title {
        font-size: 1.1rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
    
    .certification-card {
        padding: 1rem;
    }
    
    .skill-category {
        padding: 1rem;
    }
    
    .timeline-content {
        padding: 1rem;
    }
}

/* High DPI Mobile Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-gradient,
    .bg-gradient {
        background-size: 200% 200%;
    }
}

/* Mobile Dark Theme Adjustments */
@media (max-width: 768px) {
    [data-theme="dark"] .skill-category,
    [data-theme="dark"] .contact-method {
        background: var(--gray-800);
        border: 1px solid var(--gray-700);
    }
    
    [data-theme="dark"] .timeline-content {
        background: rgba(90, 107, 79, 0.9);
        border: 1px solid var(--gray-700);
    }
}

/* Improve readability on mobile */
@media (max-width: 768px) {
    body {
        line-height: 1.6;
    }
    
    p {
        margin-bottom: 1rem;
    }
    
    /* Ensure text is not too small */
    small, .small {
        font-size: 0.85rem;
    }
}