/* Modern CSS for BrainX - Professional Tech Company */

/* CSS Variables */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --light-text: #f8fafc;
    --gray-text: #94a3b8;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Global Styles */
* {         
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--light-text);
    background: var(--darker-bg);
    overflow-x: hidden;
}

/* Typography */
.section-title {
    font-size: 3rem !important;
    font-weight: 800 !important;
    background: var(--gradient-primary) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    margin-bottom: 0.5rem !important;
}

.section-subtitle {
    font-size: 1.25rem !important;
    color: var(--gray-text) !important;
    margin-bottom: 1rem !important;
}

.gradient-text {
    background: var(--gradient-primary) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.highlight {
    color: var(--accent-color) !important;
    font-weight: 600 !important;
}

/* Navigation */
.navbar {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    transition: all 0.3s ease !important;
    padding: 1rem 0 !important;
    z-index: 1000 !important;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95) !important;
    box-shadow: var(--shadow-medium) !important;
}

.navbar-brand img {
    transition: transform 0.3s ease !important;
}

.navbar-brand:hover img {
    transform: scale(1.05) !important;
}

.nav-link {
    color: var(--light-text) !important;
    font-weight: 500 !important;
    margin: 0 1rem !important;
    position: relative !important;
    transition: all 0.3s ease !important;
}

.nav-link::after {
    content: '' !important;
    position: absolute !important;
    bottom: -5px !important;
    left: 50% !important;
    width: 0 !important;
    height: 2px !important;
    background: var(--gradient-primary) !important;
    transition: all 0.3s ease !important;
    transform: translateX(-50%) !important;
}

.nav-link:hover::after {
    width: 100% !important;
}

/* Hero Section - AGGRESSIVE SPACING FIXES */
.hero-section {
    position: relative !important;
    min-height: auto !important;
    background: var(--gradient-dark) !important;
    overflow: hidden !important;
    padding-top: 80px !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.hero-background {
    position: relative !important;
    background: url('../img/banner-bk.jpg') center/cover !important;
    min-height: auto !important;
    padding: 2rem 0 !important;
}

.hero-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%) !important;
}

.hero-title {
    font-size: 4rem !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    margin-bottom: 1rem !important;
}

.gradient-text {
    background: var(--gradient-primary) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-size: 8rem !important; /* 128px for desktop */
    font-weight: 900 !important;
    display: block !important;
    margin-bottom: 0 !important; /* Remove bottom margin */
    margin-top: 0 !important; /* Remove top margin */
    line-height: 0.9 !important; /* Tighter line height */
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.3) !important; /* Subtle glow effect */
}

.hero-subtitle {
    font-size: 1.5rem !important;
    color: var(--text-secondary) !important;
    margin-bottom: 2rem !important;
    margin-top: 0 !important; /* Remove top margin */
    line-height: 1.4 !important;
}

.hero-stats {
    display: flex !important;
    gap: 2rem !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0 !important;
}

.stat-item {
    text-align: center !important;
}

.stat-number {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    background: var(--gradient-primary) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.stat-label {
    color: var(--gray-text) !important;
    font-size: 0.9rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.hero-visual {
    position: relative !important;
    height: 500px !important; /* Increased height to accommodate all cards */
    width: 100% !important;
}

.floating-card {
    position: absolute !important;
    background: var(--card-bg) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    padding: 1rem !important;
    text-align: center !important;
    box-shadow: var(--shadow-medium) !important;
    animation: float 6s ease-in-out infinite !important;
    width: 120px !important;
    height: 80px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

/* Repositioned floating cards to prevent overlap */
.floating-card:nth-child(1) {
    top: 5% !important;
    left: 5% !important;
    animation-delay: 0s !important;
}

.floating-card:nth-child(2) {
    top: 15% !important;
    right: 10% !important;
    animation-delay: 1s !important;
}

.floating-card:nth-child(3) {
    top: 35% !important;
    left: 20% !important;
    animation-delay: 2s !important;
}

.floating-card:nth-child(4) {
    top: 45% !important;
    right: 25% !important;
    animation-delay: 3s !important;
}

.floating-card:nth-child(5) {
    bottom: 25% !important;
    left: 15% !important;
    animation-delay: 4s !important;
}

.floating-card:nth-child(6) {
    bottom: 10% !important;
    right: 15% !important;
    animation-delay: 5s !important;
}

.floating-card:hover {
    transform: scale(1.15) !important; /* Increased scale for better visibility */
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5) !important;
    border-color: var(--accent-color) !important;
    z-index: 10 !important; /* Higher z-index to ensure hovered card is on top */
}

.floating-card i {
    font-size: 1.5rem !important;
    color: var(--accent-color) !important;
    margin-bottom: 0.25rem !important;
    display: block !important;
}

.floating-card span {
    font-weight: 600 !important;
    color: var(--light-text) !important;
    font-size: 0.8rem !important;
    line-height: 1.2 !important;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 1;
    }
    50% { 
        transform: translateY(-20px) rotate(3deg); 
        opacity: 0.9;
    }
}

/* Services Section - AGGRESSIVE SPACING FIXES */
.services-section {
    background: var(--dark-bg) !important;
    padding: 1rem 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.service-card {
    background: var(--card-bg) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    padding: 2rem !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    height: 100% !important;
    position: relative !important;
    overflow: hidden !important;
    margin-bottom: 2rem !important; /* Increased from 1rem to 2rem for better row separation */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important; /* Enhanced shadow for better separation */
}

/* Add extra spacing between rows */
.row.g-4 {
    row-gap: 2rem !important; /* Increased row gap for better separation */
}

/* Ensure consistent spacing for all service cards */
.col-lg-4.col-md-6 {
    margin-bottom: 1rem !important;
}

.service-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: var(--gradient-primary) !important;
    transform: scaleX(0) !important;
    transition: transform 0.3s ease !important;
}

.service-card:hover::before {
    transform: scaleX(1) !important;
}

.service-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2) !important; /* Enhanced hover shadow */
    border-color: var(--primary-color) !important;
    z-index: 5 !important; /* Ensure hovered card appears above others */
}

.service-icon {
    width: 80px !important;
    height: 80px !important;
    background: var(--gradient-primary) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 1.5rem !important;
    transition: all 0.3s ease !important;
}

.service-card:hover .service-icon {
    transform: scale(1.1) !important;
    box-shadow: var(--shadow-glow) !important;
}

.service-icon i {
    font-size: 2rem !important;
    color: white !important;
}

.service-card h4 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 1rem !important;
    color: var(--light-text) !important;
}

.service-card p {
    color: var(--gray-text) !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.6 !important;
}

.service-features {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    justify-content: center !important;
}

.service-features span {
    background: rgba(99, 102, 241, 0.1) !important;
    color: var(--primary-color) !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
}

/* About Section - AGGRESSIVE SPACING FIXES */
.about-section {
    background: var(--darker-bg) !important;
    padding: 1rem 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.achievement-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
    margin-top: 2rem !important;
}

.achievement-item {
    text-align: center !important;
}

.achievement-number {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    background: var(--gradient-secondary) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    margin-bottom: 0.5rem !important;
}

.achievement-text {
    color: var(--gray-text) !important;
    font-size: 0.9rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.tech-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
    height: 300px !important;
}

.tech-item {
    background: var(--card-bg) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 4rem !important;
    color: var(--accent-color) !important;
    transition: all 0.3s ease !important;
    animation: techFloat 8s ease-in-out infinite !important;
}

.tech-item:nth-child(1) { animation-delay: 0s !important; }
.tech-item:nth-child(2) { animation-delay: 2s !important; }
.tech-item:nth-child(3) { animation-delay: 4s !important; }
.tech-item:nth-child(4) { animation-delay: 6s !important; }

.tech-item:hover {
    transform: scale(1.1) !important;
    box-shadow: var(--shadow-glow) !important;
    border-color: var(--accent-color) !important;
}

@keyframes techFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

/* Contact Section - AGGRESSIVE SPACING FIXES */
.contact-section {
    background: var(--dark-bg) !important;
    padding: 1rem 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.contact-info {
    background: var(--card-bg) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    padding: 2rem !important;
}

.contact-item {
    text-align: center !important;
}

.contact-icon {
    width: 60px !important;
    height: 60px !important;
    background: var(--gradient-accent) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 1rem !important;
    transition: all 0.3s ease !important;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1) !important;
    box-shadow: var(--shadow-glow) !important;
}

.contact-icon i {
    font-size: 1.5rem !important;
    color: white !important;
}

.contact-item h5 {
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
    color: var(--light-text) !important;
}

.contact-item p {
    color: var(--gray-text) !important;
    margin: 0 !important;
}

.contact-item a {
    color: var(--accent-color) !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.contact-item a:hover {
    color: var(--light-text) !important;
}

/* Footer */
.footer {
    background: var(--darker-bg) !important;
    border-top: 1px solid var(--border-color) !important;
    padding: 2rem 0 !important;
}

.social-links {
    display: flex !important;
    gap: 1rem !important;
    justify-content: center !important;
}

.social-link {
    width: 40px !important;
    height: 40px !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--gray-text) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.social-link:hover {
    background: var(--gradient-primary) !important;
    color: white !important;
    transform: translateY(-3px) !important;
    box-shadow: var(--shadow-glow) !important;
}

/* Responsive Design - Comprehensive */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3.5rem !important;
    }
    
    .gradient-text {
        font-size: 7rem !important; /* 112px - proportional to 128px */
        line-height: 0.9 !important;
        margin-bottom: 0 !important;
    }
    
    .section-title {
        font-size: 2.5rem !important;
    }
    
    .floating-card {
        width: 100px !important;
        height: 70px !important;
        padding: 0.75rem !important;
    }
    
    .floating-card i {
        font-size: 1.25rem !important;
    }
    
    .floating-card span {
        font-size: 0.7rem !important;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem !important;
    }
    
    .gradient-text {
        font-size: 6rem !important; /* 96px - proportional to 128px */
        line-height: 0.9 !important;
        margin-bottom: 0 !important;
    }
    
    .hero-subtitle {
        font-size: 1.25rem !important;
        margin-top: 0 !important;
    }
    
    .hero-stats {
        gap: 1.5rem !important;
    }
    
    .stat-number {
        font-size: 2rem !important;
    }
    
    .floating-card {
        width: 90px !important;
        height: 65px !important;
        padding: 0.5rem !important;
    }
    
    .floating-card i {
        font-size: 1.1rem !important;
    }
    
    .floating-card span {
        font-size: 0.65rem !important;
    }
    
    .service-card {
        padding: 1.5rem !important;
    }
    
    .tech-grid {
        height: 250px !important;
    }
}

@media (max-width: 768px) {
    /* Hero Section Mobile Optimization */
    .hero-section {
        padding-top: 60px !important;
        padding-bottom: 1rem !important;
        text-align: center !important;
    }
    
    .hero-background {
        padding: 1rem 0 !important;
        text-align: center !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.5rem !important;
        text-align: center !important;
    }
    
    .gradient-text {
        font-size: 4rem !important; /* 64px - proportional to 128px */
        line-height: 0.9 !important;
        margin-bottom: 0 !important;
        text-align: center !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .section-title {
        font-size: 1.75rem !important;
        margin-bottom: 0.5rem !important;
        text-align: center !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        margin-top: 0 !important;
        margin-bottom: 1rem !important;
        line-height: 1.3 !important;
        text-align: center !important;
    }
    
    /* Mobile Stats Layout */
    .hero-stats {
        flex-direction: column !important;
        gap: 1rem !important;
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .stat-item {
        margin-bottom: 0.5rem !important;
        text-align: center !important;
    }
    
    .stat-number {
        font-size: 1.75rem !important;
        margin-bottom: 0.25rem !important;
        text-align: center !important;
    }
    
    .stat-label {
        font-size: 0.75rem !important;
        text-align: center !important;
    }
    
    /* Mobile Hero Visual - CSS Grid Layout */
    .hero-visual {
        height: 300px !important;
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
        padding: 1rem !important;
        position: relative !important;
        align-items: center !important;
        justify-items: center !important;
    }
    
    /* Mobile Floating Cards - CSS Grid Positioning */
    .floating-card {
        position: relative !important;
        width: 80px !important;
        height: 60px !important;
        margin: 0 !important;
        animation: none !important;
        transform: none !important;
        float: none !important;
        clear: none !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 1 !important;
    }
    
    /* Explicit Grid Positioning for Each Card */
    .floating-card:nth-child(1) { 
        grid-column: 1 !important; 
        grid-row: 1 !important; 
    }
    .floating-card:nth-child(2) { 
        grid-column: 2 !important; 
        grid-row: 1 !important; 
    }
    .floating-card:nth-child(3) { 
        grid-column: 3 !important; 
        grid-row: 1 !important; 
    }
    .floating-card:nth-child(4) { 
        grid-column: 1 !important; 
        grid-row: 2 !important; 
    }
    .floating-card:nth-child(5) { 
        grid-column: 2 !important; 
        grid-row: 2 !important; 
    }
    .floating-card:nth-child(6) { 
        grid-column: 3 !important; 
        grid-row: 2 !important; 
    }
    
    .floating-card:hover {
        transform: scale(1.05) !important;
        z-index: 10 !important;
    }
    
    .floating-card i {
        font-size: 1rem !important;
        margin-bottom: 0.2rem !important;
        text-align: center !important;
    }
    
    .floating-card span {
        font-size: 0.6rem !important;
        line-height: 1.1 !important;
        text-align: center !important;
    }
    
    /* Mobile Services Section */
    .services-section {
        padding: 1rem 0 !important;
        text-align: center !important;
    }
    
    .service-card {
        padding: 1.25rem !important;
        margin-bottom: 1rem !important;
        height: auto !important;
        text-align: center !important;
    }
    
    .service-icon {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 1rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .service-icon i {
        font-size: 1.5rem !important;
    }
    
    .service-card h4 {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
        text-align: center !important;
    }
    
    .service-card p {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
        line-height: 1.5 !important;
        text-align: center !important;
    }
    
    .service-features {
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    .service-features span {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.5rem !important;
        text-align: center !important;
    }
    
    /* Mobile About Section */
    .about-section {
        padding: 1rem 0 !important;
        text-align: center !important;
    }
    
    .achievement-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin-top: 1rem !important;
        justify-items: center !important;
    }
    
    .achievement-item {
        padding: 1rem !important;
        text-align: center !important;
    }
    
    .achievement-number {
        font-size: 2rem !important;
        margin-bottom: 0.25rem !important;
        text-align: center !important;
    }
    
    .achievement-text {
        font-size: 0.8rem !important;
        text-align: center !important;
    }
    
    .tech-grid {
        grid-template-columns: 1fr !important;
        height: auto !important;
        gap: 1rem !important;
        margin-top: 1rem !important;
        justify-items: center !important;
    }
    
    .tech-item {
        height: 80px !important;
        font-size: 2.5rem !important;
        text-align: center !important;
    }
    
    /* Mobile Contact Section */
    .contact-section {
        padding: 1rem 0 !important;
        text-align: center !important;
    }
    
    .contact-info {
        padding: 1.5rem !important;
        text-align: center !important;
    }
    
    .contact-item {
        margin-bottom: 1.5rem !important;
        text-align: center !important;
    }
    
    .contact-icon {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 0.75rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .contact-icon i {
        font-size: 1.25rem !important;
    }
    
    .contact-item h5 {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
        text-align: center !important;
    }
    
    .contact-item p {
        font-size: 0.9rem !important;
        text-align: center !important;
    }
    
    /* Mobile Navigation */
    .navbar {
        padding: 0.5rem 0 !important;
    }
    
    .navbar-brand img {
        height: 35px !important;
    }
    
    .navbar-nav {
        text-align: center !important;
        margin-top: 1rem !important;
        background: rgba(15, 23, 42, 0.95) !important;
        border-radius: 10px !important;
        padding: 1rem !important;
    }
    
    .nav-link {
        margin: 0.5rem 0 !important;
        padding: 0.75rem !important;
        border-radius: 8px !important;
        transition: all 0.3s ease !important;
        text-align: center !important;
    }
    
    .nav-link:hover {
        background: rgba(99, 102, 241, 0.1) !important;
    }
    
    /* Mobile Footer */
    .footer {
        padding: 1rem 0 !important;
        text-align: center !important;
    }
    
    .social-links {
        justify-content: center !important;
        margin-top: 1rem !important;
    }
    
    .social-link {
        width: 35px !important;
        height: 35px !important;
    }
    
    .social-link i {
        font-size: 1rem !important;
    }
}

@media (max-width: 576px) {
    /* Small Mobile Devices */
    .hero-title {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }
    
    .gradient-text {
        font-size: 3.5rem !important; /* 56px - proportional to 128px */
        line-height: 0.9 !important;
        margin-bottom: 0 !important;
        text-align: center !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .section-title {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
        text-align: center !important;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 0.75rem !important;
        text-align: center !important;
    }
    
    /* Ultra Small Mobile Stats */
    .hero-stats {
        gap: 0.75rem !important;
        margin-top: 0.75rem !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .stat-number {
        font-size: 1.5rem !important;
        text-align: center !important;
    }
    
    .stat-label {
        font-size: 0.7rem !important;
        text-align: center !important;
    }
    
    /* Ultra Small Hero Visual - CSS Grid Layout */
    .hero-visual {
        height: 250px !important;
        margin-top: 0.75rem !important;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: repeat(2, 1fr) !important;
        gap: 0.4rem !important;
        padding: 0.75rem !important;
        position: relative !important;
        align-items: center !important;
        justify-items: center !important;
    }
    
    /* Ultra Small Floating Cards - CSS Grid Positioning */
    .floating-card {
        position: relative !important;
        width: 70px !important;
        height: 55px !important;
        padding: 0.4rem !important;
        margin: 0 !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 1 !important;
    }
    
    /* Explicit Grid Positioning for Each Card */
    .floating-card:nth-child(1) { 
        grid-column: 1 !important; 
        grid-row: 1 !important; 
    }
    .floating-card:nth-child(2) { 
        grid-column: 2 !important; 
        grid-row: 1 !important; 
    }
    .floating-card:nth-child(3) { 
        grid-column: 3 !important; 
        grid-row: 1 !important; 
    }
    .floating-card:nth-child(4) { 
        grid-column: 1 !important; 
        grid-row: 2 !important; 
    }
    .floating-card:nth-child(5) { 
        grid-column: 2 !important; 
        grid-row: 2 !important; 
    }
    .floating-card:nth-child(6) { 
        grid-column: 3 !important; 
        grid-row: 2 !important; 
    }
    
    .floating-card:hover {
        transform: scale(1.05) !important;
        z-index: 10 !important;
    }
    
    .floating-card i {
        font-size: 0.9rem !important;
        margin-bottom: 0.15rem !important;
        text-align: center !important;
    }
    
    .floating-card span {
        font-size: 0.55rem !important;
        text-align: center !important;
    }
    
    /* Ultra Small Service Cards */
    .service-card {
        padding: 1rem !important;
        margin-bottom: 0.75rem !important;
        text-align: center !important;
    }
    
    .service-icon {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 0.75rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .service-icon i {
        font-size: 1.25rem !important;
    }
    
    .service-card h4 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
        text-align: center !important;
    }
    
    .service-card p {
        font-size: 0.85rem !important;
        margin-bottom: 0.75rem !important;
        text-align: center !important;
    }
    
    .service-features span {
        font-size: 0.65rem !important;
        padding: 0.15rem 0.5rem !important;
        text-align: center !important;
    }
    
    /* Ultra Small About Section */
    .achievement-number {
        font-size: 1.75rem !important;
        text-align: center !important;
    }
    
    .achievement-text {
        font-size: 0.75rem !important;
        text-align: center !important;
    }
    
    .tech-item {
        height: 60px !important;
        font-size: 2rem !important;
        text-align: center !important;
    }
    
    /* Ultra Small Contact Section */
    .contact-info {
        padding: 1rem !important;
        text-align: center !important;
    }
    
    .contact-icon {
        width: 45px !important;
        height: 45px !important;
        margin-bottom: 0.5rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .contact-icon i {
        font-size: 1.1rem !important;
    }
    
    .contact-item h5 {
        font-size: 0.9rem !important;
        text-align: center !important;
    }
    
    .contact-item p {
        font-size: 0.8rem !important;
        text-align: center !important;
    }
}

@media (max-width: 480px) {
    /* Tiny Mobile Devices */
    .hero-title {
        font-size: 1.5rem !important;
        text-align: center !important;
    }
    
    .gradient-text {
        font-size: 3rem !important; /* 48px - proportional to 128px */
        text-align: center !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .section-title {
        font-size: 1.25rem !important;
        text-align: center !important;
    }
    
    .hero-subtitle {
        font-size: 0.85rem !important;
        text-align: center !important;
    }
    
    /* Tiny Mobile Hero Visual - CSS Grid Layout */
    .hero-visual {
        height: 200px !important;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: repeat(2, 1fr) !important;
        gap: 0.3rem !important;
        padding: 0.5rem !important;
        position: relative !important;
        align-items: center !important;
        justify-items: center !important;
    }
    
    /* Tiny Mobile Floating Cards - CSS Grid Positioning */
    .floating-card {
        position: relative !important;
        width: 60px !important;
        height: 50px !important;
        padding: 0.3rem !important;
        margin: 0 !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 1 !important;
    }
    
    /* Explicit Grid Positioning for Each Card */
    .floating-card:nth-child(1) { 
        grid-column: 1 !important; 
        grid-row: 1 !important; 
    }
    .floating-card:nth-child(2) { 
        grid-column: 2 !important; 
        grid-row: 1 !important; 
    }
    .floating-card:nth-child(3) { 
        grid-column: 3 !important; 
        grid-row: 1 !important; 
    }
    .floating-card:nth-child(4) { 
        grid-column: 1 !important; 
        grid-row: 2 !important; 
    }
    .floating-card:nth-child(5) { 
        grid-column: 2 !important; 
        grid-row: 2 !important; 
    }
    .floating-card:nth-child(6) { 
        grid-column: 3 !important; 
        grid-row: 2 !important; 
    }
    
    .floating-card:hover {
        transform: scale(1.05) !important;
        z-index: 10 !important;
    }
    
    .floating-card i {
        font-size: 0.8rem !important;
        text-align: center !important;
    }
    
    .floating-card span {
        font-size: 0.5rem !important;
        text-align: center !important;
    }
    
    /* Tiny Mobile Service Cards */
    .service-card {
        padding: 0.75rem !important;
        text-align: center !important;
    }
    
    .service-icon {
        width: 45px !important;
        height: 45px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .service-icon i {
        font-size: 1.1rem !important;
    }
    
    .service-card h4 {
        font-size: 1rem !important;
        text-align: center !important;
    }
    
    .service-card p {
        font-size: 0.8rem !important;
        text-align: center !important;
    }
    
    .service-features span {
        font-size: 0.6rem !important;
        padding: 0.1rem 0.4rem !important;
        text-align: center !important;
    }
    
    /* Tiny Mobile About Section */
    .achievement-number {
        font-size: 1.5rem !important;
        text-align: center !important;
    }
    
    .achievement-text {
        font-size: 0.7rem !important;
        text-align: center !important;
    }
    
    .tech-item {
        height: 50px !important;
        font-size: 1.75rem !important;
        text-align: center !important;
    }
    
    /* Tiny Mobile Contact Section */
    .contact-info {
        padding: 0.75rem !important;
        text-align: center !important;
    }
    
    .contact-icon {
        width: 40px !important;
        height: 40px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .contact-icon i {
        font-size: 1rem !important;
    }
    
    .contact-item h5 {
        font-size: 0.85rem !important;
        text-align: center !important;
    }
    
    .contact-item p {
        font-size: 0.75rem !important;
        text-align: center !important;
    }
    
    /* Tiny Mobile Footer */
    .footer {
        padding: 0.75rem 0 !important;
        text-align: center !important;
    }
    
    .social-link {
        width: 30px !important;
        height: 30px !important;
    }
    
    .social-link i {
        font-size: 0.9rem !important;
    }
}

/* Mobile-First Navigation Toggle */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(15, 23, 42, 0.98) !important;
        border-radius: 10px !important;
        margin-top: 1rem !important;
        padding: 1rem !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }
    
    .navbar-toggler {
        border: none !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    .navbar-toggler:focus {
        box-shadow: none !important;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .floating-card:hover {
        transform: none !important;
    }
    
    .service-card:hover {
        transform: none !important;
    }
    
    .contact-item:hover .contact-icon {
        transform: none !important;
    }
    
    .social-link:hover {
        transform: none !important;
    }
    
    /* Increase touch targets */
    .nav-link {
        padding: 1rem !important;
        margin: 0.25rem 0 !important;
    }
    
    .floating-card {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    .service-card {
        cursor: pointer !important;
    }
}

/* Mobile Landscape Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto !important;
        padding-top: 40px !important;
    }
    
    .hero-visual {
        height: 150px !important;
    }
    
    .floating-card {
        width: 50px !important;
        height: 40px !important;
        padding: 0.3rem !important;
    }
    
    .floating-card i {
        font-size: 0.7rem !important;
    }
    
    .floating-card span {
        font-size: 0.45rem !important;
    }
    
    .hero-stats {
        flex-direction: row !important;
        gap: 1rem !important;
        flex-wrap: wrap !important;
    }
    
    .stat-item {
        flex: 1 !important;
        min-width: 80px !important;
    }
}

/* High DPI Mobile Displays */
@media (-webkit-min-device-pixel-ratio: 2) and (max-width: 768px) {
    .floating-card {
        border-width: 0.5px !important;
    }
    
    .service-card {
        border-width: 0.5px !important;
    }
    
    .navbar {
        border-bottom-width: 0.5px !important;
    }
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
    .floating-card {
        will-change: auto !important;
        transform: none !important;
        animation: none !important;
    }
    
    .tech-item {
        will-change: auto !important;
        animation: none !important;
    }
    
    /* Reduce backdrop-filter on mobile for better performance */
    .navbar,
    .floating-card,
    .service-card,
    .contact-info {
        backdrop-filter: blur(10px) !important;
    }
}

/* Print styles */
@media print {
    .floating-card {
        display: none !important;
    }
    
    .navbar {
        position: static !important;
        background: white !important;
        color: black !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
    }
    
    .service-card {
        border: 1px solid #ccc !important;
        background: white !important;
        color: black !important;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px !important;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg) !important;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary) !important;
    border-radius: 4px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color) !important;
}

/* Loading Animation */
.loading {
    opacity: 0 !important;
    transform: translateY(20px) !important;
    transition: all 0.6s ease !important;
}

.loading.loaded {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease !important;
}

.hover-lift:hover {
    transform: translateY(-5px) !important;
}

/* Glow Effects */
.glow-on-hover:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5) !important;
}

/* Text Selection */
::selection {
    background: var(--primary-color) !important;
    color: white !important;
}

::-moz-selection {
    background: var(--primary-color) !important;
    color: white !important;
}

/* Mobile-First Grid System */
@media (max-width: 768px) {
    .row.g-4 {
        row-gap: 1rem !important;
        margin: 0 !important;
    }
    
    .col-lg-4.col-md-6 {
        margin-bottom: 0.75rem !important;
        padding: 0 0.5rem !important;
    }
    
    .col-lg-4.col-md-6:last-child {
        margin-bottom: 0 !important;
    }
    
    /* Ensure proper spacing between service cards */
    .service-card + .service-card {
        margin-top: 0.75rem !important;
    }
}

/* Mobile Typography Scale */
@media (max-width: 576px) {
    html {
        font-size: 14px !important;
    }
    
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .row {
        margin-left: -0.5rem !important;
        margin-right: -0.5rem !important;
    }
    
    .col, .col-12, .col-md-6, .col-lg-4 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}

/* Mobile Touch Interactions */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .floating-card:hover,
    .service-card:hover,
    .contact-item:hover .contact-icon,
    .social-link:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* Add active states for touch feedback */
    .floating-card:active,
    .service-card:active,
    .contact-item:active .contact-icon,
    .social-link:active {
        transform: scale(0.95) !important;
        transition: transform 0.1s ease !important;
    }
    
    /* Ensure minimum touch target size */
    .nav-link,
    .floating-card,
    .service-card,
    .contact-icon,
    .social-link {
        min-height: 44px !important;
        min-width: 44px !important;
    }
}

/* Mobile Loading States */
@media (max-width: 768px) {
    .loading {
        transition: all 0.3s ease !important;
    }
    
    .loading.loaded {
        transition: all 0.3s ease !important;
    }
}

/* Mobile Scroll Behavior */
@media (max-width: 768px) {
    html {
        scroll-behavior: auto !important;
    }
    
    /* Smooth scrolling for anchor links */
    .navbar-nav .nav-link[href^="#"] {
        scroll-behavior: smooth !important;
    }
}

/* Mobile Focus States */
@media (max-width: 768px) {
    .nav-link:focus,
    .floating-card:focus,
    .service-card:focus,
    .contact-icon:focus,
    .social-link:focus {
        outline: 2px solid var(--accent-color) !important;
        outline-offset: 2px !important;
        border-radius: 8px !important;
    }
}

/* Mobile Safe Areas (for devices with notches) */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .navbar {
            padding-left: max(1rem, env(safe-area-inset-left)) !important;
            padding-right: max(1rem, env(safe-area-inset-right)) !important;
        }
        
        .container {
            padding-left: max(1rem, env(safe-area-inset-left)) !important;
            padding-right: max(1rem, env(safe-area-inset-right)) !important;
        }
        
        .hero-section {
            padding-top: max(80px, calc(60px + env(safe-area-inset-top))) !important;
        }
    }
}

/* Mobile Print Styles */
@media print and (max-width: 768px) {
    .navbar,
    .floating-card,
    .hero-visual {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
        padding: 1rem !important;
    }
    
    .service-card {
        border: 1px solid #ccc !important;
        background: white !important;
        color: black !important;
        margin-bottom: 1rem !important;
        break-inside: avoid !important;
    }
    
    .gradient-text {
        background: black !important;
        -webkit-text-fill-color: black !important;
        color: black !important;
    }
}

/* Mobile Accessibility Improvements */
@media (max-width: 768px) {
    /* Ensure sufficient color contrast */
    .stat-label,
    .achievement-text,
    .contact-item p {
        color: #94a3b8 !important;
        font-weight: 500 !important;
    }
    
    /* Improve text readability */
    .hero-subtitle,
    .service-card p,
    .contact-item p {
        line-height: 1.6 !important;
        letter-spacing: 0.01em !important;
    }
    
    /* Better focus indicators */
    .nav-link:focus-visible,
    .service-card:focus-visible {
        outline: 3px solid var(--accent-color) !important;
        outline-offset: 2px !important;
    }
}

/* Mobile Performance Enhancements */
@media (max-width: 768px) {
    /* Reduce animations for better performance */
    .floating-card,
    .tech-item {
        animation: none !important;
        transition: none !important;
    }
    
    /* Optimize backdrop filters */
    .navbar,
    .floating-card,
    .service-card,
    .contact-info {
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }
    
    /* Reduce box shadows for better performance */
    .floating-card,
    .service-card,
    .contact-info {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    }
    
    .floating-card:hover,
    .service-card:hover {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    }
}