:root {
    /* Professional Data Analyst Color Scheme: Midnight Blue & Teal */
    --bs-primary: #2c3e50; 
    --bs-primary-rgb: 44, 62, 80;
    --bs-secondary: #3B9797;
    --bs-secondary-rgb: 26, 188, 156;
    --transition-speed: 0.3s ease;
}

/* Universal improvements for accessibility and UX */
* {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Override Bootstrap defaults for consistent branding */
.text-primary {
    color: var(--bs-secondary) !important;
}

.text-secondary {
    color: var(--bs-secondary) !important;
}

.btn-primary {
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: var(--bs-secondary);
    --bs-btn-hover-border-color: var(--bs-secondary);
    transition: all var(--transition-speed);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(59, 151, 151, 0.3);
}

.bg-secondary-theme {
    background-color: var(--bs-secondary) !important;
    color: white !important;
}

.btn-dark {
    --bs-btn-hover-bg: var(--bs-secondary);
    --bs-btn-hover-border-color: var(--bs-secondary);
}

.btn-outline-light:hover,
.btn-outline-dark:hover {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
    color: white;
}


/* Navbar Customization - Professional & Modern */
.navbar {
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.navbar-brand {
    font-weight: 800;
    letter-spacing: -0.5px;
    font-size: 1.5rem;
    color: var(--bs-primary) !important;
    transition: opacity var(--transition-speed);
}

.navbar-brand:hover {
    opacity: 0.8;
}

.nav-link {
    font-weight: 600;
    margin: 0 0.75rem;
    transition: color var(--transition-speed);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--bs-secondary);
    transition: all var(--transition-speed);
    transform: translateX(-50%);
}

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

.nav-link:hover, .nav-link.active {
    color: var(--bs-secondary) !important;
}
html {
    scroll-padding-top: 85px;
}
#btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    z-index: 1000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    transition: all var(--transition-speed);
}

#btn-back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(44, 62, 80, 0.3);
}

/* Hero Section - Strong Call to Action */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden; /* Ensure animation stays within bounds */
}

.hero-data-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1; /* Ensures it's behind all other content, including the image and text */
}





#hero-animation-canvas {
    display: block;
    width: 100%;
    height: 100%;
}



.hero-name {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: -1px;
}

.display-2 {
    font-weight: 800;
    line-height: 1.2;
}
.animate-float {
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}
.typing-cursor {
    border-right: 3px solid var(--bs-primary);
    animation: blink-caret .75s step-end infinite;
    font-weight: 600;
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--bs-primary); }
}
/* Hero Image Styling */
.hero-image-wrapper {
    position: relative; /* Needed for img container positioning */
    display: inline-block; /* For centering */
}

.hero-image-container {
    width: 260px; /* Original size for the image container */
    height: 260px;
    border-radius: 50%;
    overflow: hidden; /* Still needed for the circular image itself */
    position: relative;
    display: inline-block; /* To allow auto margins for centering */
    border: 5px solid white;
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.5);
    z-index: 1; /* Ensure image is above the background */
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .hero-image-container {
        width: 200px; /* Smaller image size for mobile */
        height: 200px;
    }
}


/* Section Styling - Better Visual Hierarchy */
section {
    padding: 5rem 0;
    position: relative; /* Added for pseudo-element positioning */
    overflow: hidden; /* Added to clip pseudo-element */
}

section h2 {
    position: relative;
    padding-bottom: 1rem;
    color: var(--bs-primary);
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--bs-secondary), transparent);
    border-radius: 2px;
}

/* About Section Enhancements */
.about {
    background: #f9fafb;
    position: relative; /* Added for pseudo-element positioning */
    overflow: hidden; /* Added to clip pseudo-element */
}

.about .lead {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Service Cards - Professional Look */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-speed);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1) !important;
}

.card h4, .card h6 {
    color: var(--bs-primary);
}

.card h6 {
    font-weight: 700;
}
.footer-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-link:hover {
    color: var(--bs-secondary);
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--bs-secondary);
    border-radius: 50%;
    background-size: 60%;
}
.carousel-indicators [data-bs-target] {
    background-color: var(--bs-secondary);
    border-radius: 2px;
    transition: all var(--transition-speed);
}

/* Responsive images for Project Modal Carousel */
.modal-body .carousel-item .carousel-img-wrapper {
    position: relative;
    width: 100%;
    height: 0; /* Use padding-bottom for responsive height */
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio (height / width = 9/16 = 0.5625) */
    background-color: var(--bs-primary); /* Fill potential gaps with theme color */
}

.modal-body .carousel-item .carousel-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure image covers the entire area, cropping if necessary */
}

/* Project Cards - Engaging Hover Effects */
.project-card {
    overflow: hidden;
    transition: all var(--transition-speed);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border: none;
}

.project-card:hover {
    box-shadow: 0 15px 40px rgba(44, 62, 80, 0.2) !important;
    transform: translateY(-8px);
}

.project-card .card-img {
    border-radius: 12px; /* Ensure image container corners match parent card */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--bs-primary); /* Fill whitespace with primary color */
    height: 0; /* Use padding-bottom for responsive height */
    padding-bottom: 66.66%; /* 3:2 aspect ratio (height / width = 2/3 = 0.6666...) */
    transition: transform 0.6s ease; /* Keep hover effect transition */
}

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

.project-card .card-img-overlay {
    opacity: 0;
    transition: opacity var(--transition-speed);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(59, 151, 151, 0.7) 100%);
    top: auto;
    bottom: 0;
    height: auto;
    padding: 1.5rem;
}

.project-card:hover .card-img-overlay {
    opacity: 1;
}

.about::before,
.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.1) 0%, transparent 50%); /* More subtle diagonal gradient */
    transform: skewY(-3deg); /* Less pronounced diagonal effect */
    transform-origin: top left;
    z-index: 0; /* Behind content, above section background */
}

/* Ensure content within sections is above the pseudo-element */
.about > .container,
.projects > .container {
    position: relative;
    z-index: 1;
}

/* Responsive improvements for mobile-first design */
@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
    
    .display-2 {
        font-size: 2rem !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .navbar {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    #btn-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 0.8rem;
    }
    
    section h2::after {
        width: 40px;
    }

    /* Responsive adjustments for smaller screens */
    .hero-image-wrapper {
        width: 200px; /* Smaller wrapper size for mobile */
        height: 200px;
        overflow: hidden; /* To clip the animation if it extends too far */
        border-radius: 50%; /* So the animation also follows the circular shape */
    }

    .hero-image-container {
        width: 100%; /* Take full width of wrapper */
        height: 100%; /* Take full height of wrapper */
    }}

.project-card {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 0 1rem #f8f9fa;
}
.project-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important;
}
.project-card img {
    transition: transform 0.5s ease;
}
.project-card:hover img {
    transform: scale(1.05);
}
.project-card .card-img-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: black;
    background-color: rgba(0, 0, 0, 0.85);
    top: auto;
    bottom: 0;
    height: auto;
    padding: 1.5rem;
}
.project-card:hover .card-img-overlay {
    opacity: 1;
}