/* Main Styles */
:root {
    --primary: #4f46e5;
    --secondary: #10b981;
    --accent: #8b5cf6;
    --dark: #0f172a;
    --light: #f8fafc;
    --gradient: linear-gradient(135deg, var(--primary), var(--accent));
    --bg-gradient: linear-gradient(135deg, #0b1120, #1e293b, #0f172a);
}

/* Reset & Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    overflow-x: hidden;
    line-height: 1.6;
    background: var(--bg-gradient);
    background-size: 400% 400%;
    /* Removed heavy gradient animation for better performance */
    min-height: 100vh;
    will-change: scroll-position;
    transform: translateZ(0);
}

/* Animations */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    margin-bottom: 1rem;
}

/* Navigation */
.navbar {
    transition: all 0.3s ease;
    padding: 1.5rem 2rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.scrolled {
    padding: 1rem 2rem;
    background: rgba(15, 23, 42, 0.98);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light);
    text-decoration: none;
}

.navbar-brand span {
    color: var(--secondary);
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--secondary);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Dropdown items: same underline behavior as main nav links */
.navbar .dropdown-menu-dark .dropdown-item {
    position: relative;
}

.navbar .dropdown-menu-dark .dropdown-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0.35rem;
    left: 1rem;
    background: var(--secondary);
    transition: width 0.3s ease;
}

.navbar .dropdown-menu-dark .dropdown-item:hover::after,
.navbar .dropdown-menu-dark .dropdown-item.active::after {
    width: calc(100% - 2rem);
}

.navbar .dropdown-menu-dark .dropdown-item.active,
.navbar .dropdown-menu-dark .dropdown-item:active {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Buttons */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    padding: 0.7rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
    color: white;
}

.btn-outline-light {
    border: 2px solid var(--primary);
    color: var(--light);
    background: transparent;
}

.btn-outline-light:hover {
    background: var(--primary);
    color: white;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::after {
    width: 300%;
    height: 300%;
}

/* Sections */
section {
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.py-6 {
    padding: 6rem 0;
}

.bg-dark2 {
    background: rgba(15, 23, 42, 0.8);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    padding-top: 3rem;
}

/* iOS Safari fix for 100vh bug */
@supports (-webkit-touch-callout: none) {
  .hero {
    min-height: -webkit-fill-available;
  }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.1) 0%, transparent 20%),
                radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 20%);
    z-index: -1;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-content h1 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-image {
    position: relative;
    animation: fadeInRight 1s ease-out, float 6s ease-in-out infinite !important;
    z-index: 1;
    animation-play-state: running !important;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    border: 3px solid var(--secondary);
    border-radius: 20px;
    z-index: -1;
    animation: rotateHero 15s linear infinite !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    will-change: transform;
    animation-play-state: running !important;
}

@keyframes rotateHero {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-content {
    animation: fadeInLeft 1s ease-out !important;
    animation-play-state: running !important;
}

.hero-content h1 {
    animation: fadeInUp 1s ease-out 0.2s both !important;
    animation-play-state: running !important;
}

.hero-content p {
    animation: fadeInUp 1s ease-out 0.4s both !important;
    animation-play-state: running !important;
}

.hero-content .d-flex {
    animation: fadeInUp 1s ease-out 0.6s both !important;
    animation-play-state: running !important;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: #94a3b8;
    max-width: 700px;
    margin: 0 auto;
}

/* Service Cards */
.service-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.service-card:hover .service-icon {
    animation-play-state: paused;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    animation: floatServiceIcon 4s ease-in-out infinite;
    transition: all 0.3s ease;
}

/* Different animation delays for each service icon */
.service-card:nth-child(1) .service-icon {
    animation-delay: 0s;
}

.service-card:nth-child(2) .service-icon {
    animation-delay: 0.5s;
}

.service-card:nth-child(3) .service-icon {
    animation-delay: 1s;
}

.service-card:nth-child(4) .service-icon {
    animation-delay: 1.5s;
}

.service-card:nth-child(5) .service-icon {
    animation-delay: 2s;
}

.service-card:nth-child(6) .service-icon {
    animation-delay: 2.5s;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.service-card p {
    color: #94a3b8;
    line-height: 1.6;
}

/* Project Cards */
.project-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.6s;
    z-index: 1;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

.project-img {
    background: var(--gradient);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-card .project-img i {
    transition: all 0.4s ease;
}

.project-card:hover .project-img i {
    color: var(--secondary);
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    transform: scale(1.1);
}

.project-card h3 {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.project-card:hover h3 {
    color: var(--secondary);
}

.project-card p {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.project-card:hover p {
    color: rgba(255, 255, 255, 0.95);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 55%;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 55%;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateY(-50%);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -60px;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -60px;
}

.timeline-content.visible {
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 0.6s ease-out;
}

/* Chart Animation */
.chart-animation {
    position: relative;
    height: 300px;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 1rem;
}

.bar {
    width: 40px;
    background: var(--gradient);
    border-radius: 4px 4px 0 0;
    animation: growBar 2s ease-out forwards !important;
    transform-origin: bottom;
    transform: scaleY(0);
    animation-play-state: running !important;
}

@keyframes growBar {
    to { transform: scaleY(1); height: var(--h); }
}

/* CTA Section */
.cta-section {
    position: relative;
    background: var(--gradient) !important;
    border-radius: 20px;
    padding: 4rem;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotateCTA 20s linear infinite;
    z-index: 0;
}

.cta-section .position-relative {
    position: relative;
    z-index: 1;
}

@keyframes rotateCTA {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Footer */
footer {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    padding: 4rem 0 2rem;
}

.footer-list {
    list-style: none;
    padding: 0;
}

.footer-list li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--secondary);
}

.social-icon {
    color: #cbd5e1;
    font-size: 1.2rem;
    margin-right: 0.7rem;
    transition: color 0.3s;
    text-decoration: none;
}

.social-icon:hover {
    color: var(--secondary);
}

.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* Tech Stack Carousel */
.carousel-wrapper {
    overflow: hidden;
    white-space: nowrap;
}

.carousel-track {
    display: inline-flex;
    animation: scroll 20s linear infinite !important;
    animation-play-state: running !important;
}

.carousel-track img {
    height: 60px;
    margin: 0 2rem;
    filter: grayscale(100%) brightness(0.7);
    transition: all 0.3s ease;
}

.carousel-track img:hover {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.1);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.tech-gradient {
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.footer-gradient {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

/* Scroll to Top Button - Fixed to Viewport */
#scrollTopBtn {
    position: fixed !important;
    bottom: 100px !important;
    right: 30px !important;
    width: 50px !important;
    height: 50px !important;
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
    outline: none !important;
    border-radius: 50% !important;
    display: none; /* Allow JavaScript to control display */
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    z-index: 9999 !important;
    font-size: 16px !important;
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    /* Prevent button from being affected by container transforms */
    will-change: transform, opacity !important;
}

body #scrollTopBtn {
    position: fixed !important;
    bottom: 100px !important;
    right: 30px !important;
    z-index: 9999 !important;
}

#scrollTopBtn:hover {
    background: var(--secondary) !important;
    transform: scale(1.1) translateY(-2px) translateZ(0) !important;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4) !important;
}

/* Ensure button is always visible on mobile */
@media (max-width: 768px) {
    #scrollTopBtn {
        bottom: 80px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 14px !important;
    }
}

/* Custom Cursor */
.cursor, .cursor-follower {
    position: fixed;
    pointer-events: none;
    will-change: transform;
    user-select: none;
    transition: transform 0.15s cubic-bezier(.22,1,.36,1), opacity 0.2s;
    opacity: 1;
    visibility: visible;
}
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #10b981;
    border-radius: 50%;
    z-index: 2147483647;
    background: transparent;
    mix-blend-mode: difference;
}
.cursor-follower {
    width: 8px;
    height: 8px;
    background: #4f46e5;
    border-radius: 50%;
    z-index: 2147483646;
}
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    .cursor, .cursor-follower { display: none !important; }
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Form Styles */
.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--light);
    padding: 0.75rem 1rem;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
    color: var(--light);
}

.form-label {
    color: var(--light);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Responsive Design */
/* Large Tablets and Small Desktops */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
}

/* Tablets */
@media (max-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .navbar {
        padding: 1rem 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .section-title h2 {
        font-size: 2.2rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
    
    .project-card {
        margin-bottom: 2rem;
    }
    
    /* Improve touch targets */
    .btn {
        min-height: 48px;
        padding: 0.75rem 2rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .container {
        max-width: 720px;
        padding: 0 1rem;
    }
    
    .navbar {
        padding: 0.8rem 1rem;
    }
    
    .navbar.scrolled {
        padding: 0.6rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        font-size: 1.2rem;
    }
    
    .navbar-collapse {
        margin-top: 1rem;
    }
    
    .nav-link {
        padding: 0.75rem 0;
        font-size: 1.1rem;
        text-align: center;
    }
    
    .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0.5rem;
        border: none;
        box-shadow: none;
        background: rgba(15, 23, 42, 0.95);
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
        text-align: center;
        font-size: 1rem;
    }
    
    .hero {
        min-height: 100vh;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .hero-content {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .hero-content .d-flex {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-content .btn {
        width: 250px;
        min-height: 50px;
        font-size: 1rem;
        margin: 0;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    .hero-image img {
        max-width: 100%;
        height: auto;
    }
    
    .section-title {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .section-title p {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .service-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .project-card {
        margin-bottom: 1.5rem;
    }
    
    .cursor, .cursor-follower {
        display: none !important;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 50px;
        margin-right: 0;
        text-align: left;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .timeline-content::before {
        left: -40px !important;
    }
    
    .cta-section {
        padding: 3rem 1rem;
        text-align: center;
    }
    
    .cta-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .cta-section p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    /* Footer improvements */
    footer {
        padding: 3rem 0 2rem;
    }
    
    footer .row {
        text-align: center;
    }
    
    footer .col-6,
    footer .col-md-3 {
        margin-bottom: 2rem;
    }
    
    footer h6 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .footer-link {
        font-size: 0.95rem;
        padding: 0.25rem 0;
    }
    
    .social-icon {
        width: 45px;
        height: 45px;
        margin: 0 0.5rem;
        font-size: 1.2rem;
    }
    
    /* Carousel improvements */
    .carousel-wrapper {
        overflow: hidden;
        padding: 1rem 0;
    }
    
    .carousel-track img {
        height: 40px;
        margin: 0 1rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 576px) {
    .container {
        max-width: 540px;
        padding: 0 0.75rem;
    }
    
    .navbar {
        padding: 0.75rem 0.75rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .hero-content h1 {
        font-size: 1.9rem;
        line-height: 1.2;
        padding: 0 0.5rem;
    }
    
    .hero-content p {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }
    
    .hero-content .btn {
        width: 220px;
        min-height: 48px;
        font-size: 0.95rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .section-title p {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }
    
    .service-card {
        padding: 1.5rem 1rem;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
    }
    
    .cta-section {
        padding: 2rem 0.75rem;
    }
    
    .cta-section h2 {
        font-size: 1.6rem;
    }
    
    .cta-section p {
        font-size: 0.95rem;
    }
    
    .timeline-content {
        padding: 1.25rem;
        margin-left: 40px;
    }
    
    .timeline-content h3 {
        font-size: 1.2rem;
    }
    
    .timeline-content p {
        font-size: 0.9rem;
    }
    
    /* Contact form improvements */
    .contact-section {
        padding: 2rem 1rem;
    }
    
    .form-control {
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    .btn {
        min-height: 48px;
        font-size: 1rem;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 400px) {
    .hero-content h1 {
        font-size: 1.7rem;
    }
    
    .hero-content .btn {
        width: 200px;
    }
    
    .section-title h2 {
        font-size: 1.6rem;
    }
    
    .service-card {
        padding: 1.25rem 0.75rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .carousel-track img {
        height: 35px;
        margin: 0 0.75rem;
    }
}

/* Landscape Mobile Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 90vh;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .section-title {
        margin-bottom: 1.5rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .service-icon,
    .project-img i {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Ensure touch-friendly interactions */
@media (pointer: coarse) {
    .btn,
    .nav-link,
    .dropdown-item,
    .social-icon,
    .footer-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    .service-card,
    .project-card {
        padding: 2rem 1.5rem;
    }
}

/* Reduced motion preferences */
@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;
    }
}

/* Print Styles */
@media print {
    .navbar,
    #scrollTopBtn,
    #chatBubble,
    #chatModal,
    .cursor,
    .cursor-follower {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        text-decoration: underline;
    }
    
    @page {
        margin: 2cm;
    }
}

/* Additional Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Enhanced Hero Animations - Duplicate removed */

.hero-content h1 {
    animation: fadeInUp 1s ease-out 0.2s both !important;
    animation-play-state: running !important;
}

.hero-content p {
    animation: fadeInUp 1s ease-out 0.4s both !important;
    animation-play-state: running !important;
}

.hero-content .d-flex {
    animation: fadeInUp 1s ease-out 0.6s both !important;
    animation-play-state: running !important;
}

/* Enhanced Button Animations - Duplicate removed */

/* Loading Animation for Images */
.hero-image img {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.8s forwards !important;
    animation-play-state: running !important;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Tech Stack Enhanced Animation */
.carousel-track img {
    transition: all 0.3s ease;
    filter: grayscale(100%) brightness(0.7);
}

.carousel-track img:hover {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.1);
}

/* Contact Section Enhanced Animations */
.contact-section {
    animation: fadeInUp 1s ease-out !important;
    animation-play-state: running !important;
}

.data-stream {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.1), transparent);
    animation: stream 10s linear infinite !important;
    animation-play-state: running !important;
}

@keyframes stream {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.data-point-contact {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary);
    animation: floatContact 6s infinite ease-in-out !important;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation-play-state: running !important;
}

@keyframes floatContact {
    0% { transform: translateY(0) translateX(0); opacity: 0.6; }
    25% { transform: translateY(-20px) translateX(10px); opacity: 1; }
    50% { transform: translateY(0) translateX(20px); opacity: 0.8; }
    75% { transform: translateY(20px) translateX(10px); opacity: 1; }
    100% { transform: translateY(0) translateX(0); opacity: 0.6; }
}

/* Preloader Enhanced Animation */
#preloader .spinner-border {
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite !important;
    animation-play-state: running !important;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Staggered Animations for Service Cards */
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

/* Performance Optimizations */
.hero-image,
.service-card,
.project-card,
.data-point {
    will-change: transform;
}

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

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.1); opacity: 0.9; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Service Icon Float Animation */
@keyframes floatServiceIcon {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

.data-point {
    position: absolute;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.7;
    animation: pulse 3s infinite alternate, float 6s ease-in-out infinite !important;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
    animation-play-state: running !important;
}

.data-point:nth-child(even) {
    background: var(--secondary);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    animation-delay: 1s;
}

.data-point:nth-child(3n) {
    background: var(--accent);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    animation-delay: 2s;
}

/* Test Animation - Visible test to see if animations work */
.navbar-brand {
    animation: testPulse 2s ease-in-out infinite !important;
    animation-play-state: running !important;
}

@keyframes testPulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}



.project-img i {
  font-size: 3rem;
  color: var(--primary);
}

/* Keyframes */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Dropdown hover functionality */
.navbar .dropdown:hover > .dropdown-menu,
.navbar .dropdown-menu:hover {
    display: block;
}

.dropdown-menu {
    margin-top: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Fade-in when dropdown becomes visible */
.navbar .dropdown:hover > .dropdown-menu,
.navbar .dropdown-menu:hover {
    animation: fadeInDropdown 0.2s forwards;
    opacity: 1;
    transform: translateY(0);
}

/* Keyframes */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Equal height for project cards in Data Success Stories */
#projects .row.g-4 {
  display: flex;
  flex-wrap: wrap;
}
#projects .col-md-6.col-lg-4 {
  display: flex;
}
#projects .project-card {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
}
#projects .project-img {
  flex-shrink: 0;
}
#projects .p-4 {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
@media (max-width: 991.98px) {
  #projects .row.g-4 {
    flex-direction: column;
  }
  #projects .col-md-6.col-lg-4 {
    width: 100%;
    max-width: 100%;
  }
} 