/* Global Styles */
:root {
    /* Light Theme (Default) */
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --dark-color: #1a1a1a;
    --light-gray: #f8f9fa;
    --text-gray: #6c757d;
    --bg-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.5);
    --nav-bg: rgba(255, 255, 255, 0.9);
    --hero-gradient-start: rgb(239, 246, 255);
    --hero-gradient-end: rgb(255, 255, 255);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body.dark-mode {
    --primary-color: #8c4fff;
    /* Lighter purple for dark mode */
    --secondary-color: #4facfe;
    --dark-color: #f0f0f0;
    --light-gray: #121212;
    /* Dark background */
    --text-gray: #adb5bd;
    --bg-color: #121212;
    --card-bg: rgba(30, 30, 30, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(18, 18, 18, 0.9);
    --hero-gradient-start: #0f172a;
    --hero-gradient-end: #1e293b;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography & Helpers */
.ls-2 {
    letter-spacing: 2px;
}

.text-custom-gray {
    color: #555;
}

.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-padding {
    padding: 100px 0;
}

/* Navbar */
.glass-nav {
    background: var(--nav-bg) !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--card-border);
}

.navbar-brand img {
    height: 45px;
    width: auto;
    border-radius: 8px;
    /* Soft rounded corners for the logo */
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    margin: 0 10px;
    color: var(--dark-color) !important;
    position: relative;
}

.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.background-shape {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 90%);
    z-index: 0;
}

.hero-img {
    border: 5px solid rgba(255, 255, 255, 0.8);
    background: #fff;
    max-width: 400px;
}

.hero-image-wrapper {
    position: relative;
    display: inline-block;
}

/* Floating Badges */
.floating-badge {
    position: absolute;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px var(--shadow-color);
    animation: float 3s ease-in-out infinite;
    color: #1a1a1a;
    /* Keep text dark in badges */
}

.badge-1 {
    top: 10%;
    left: -20px;
    animation-delay: 0s;
}

.badge-2 {
    bottom: 10%;
    right: -20px;
    animation-delay: 1.5s;
    background: rgba(255, 255, 255, 0.95);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
}

/* Icon Box */
.icon-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-light-primary {
    background: rgba(106, 17, 203, 0.1);
}

.bg-light-success {
    background: rgba(40, 167, 69, 0.1);
}

body.dark-mode .bg-light-primary {
    background: rgba(140, 79, 255, 0.2);
}

body.dark-mode .bg-light-success {
    background: rgba(79, 172, 254, 0.2);
}

/* Buttons */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color) !important;
}

/* Timeline */
.timeline-item {
    margin-bottom: 50px;
}

.timeline-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    line-height: 50px;
    font-size: 1.2rem;
    position: relative;
    z-index: 2;
    margin: 0 auto;
    border: 4px solid var(--bg-color);
    /* Match background */
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--light-gray);
    transform: translateX(-50%);
    z-index: 0;
}

.timeline .bg-white {
    background-color: var(--card-bg) !important;
    color: var(--dark-color);
}

@media (max-width: 768px) {
    .timeline::before {
        left: 40px;
    }

    .timeline-icon {
        margin: 0;
        margin-left: 15px;
    }

    .dater {
        text-align: left !important;
        padding-left: 80px;
    }

    .content {
        padding-left: 80px !important;
        text-align: left !important;
    }

    .icon-col {
        flex: 0 0 80px;
        max-width: 80px;
    }
}

/* Skills */
.skill-card {
    transition: all 0.3s ease;
    background-color: var(--card-bg) !important;
    border: 1px solid transparent;
}

.skill-card:hover {
    border-color: var(--primary-color) !important;
}

.skill-card .bg-white {
    background-color: var(--bg-color) !important;
}

/* Contact */
.hover-text-white:hover {
    color: #fff !important;
}

/* Section Backgrounds Override */
.bg-white {
    background-color: var(--bg-color) !important;
}

.bg-light {
    background-color: var(--light-gray) !important;
}

.section-padding.bg-white {
    background-color: var(--bg-color) !important;
}

.section-padding.bg-light {
    background-color: var(--light-gray) !important;
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* Text Muted Override */
.text-muted {
    color: var(--text-gray) !important;
}

/* Theme Toggle Button */
#theme-toggle {
    color: var(--dark-color);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

#theme-toggle:hover {
    color: var(--primary-color);
}

/* Dark Mode Overrides for Visibility */
body.dark-mode .btn-outline-dark {
    color: #fff;
    border-color: #fff;
}

body.dark-mode .btn-outline-dark:hover {
    background-color: #fff;
    color: #000;
}

body.dark-mode .floating-badge {
    color: #fff !important;
    /* White text for badges in dark mode */
}

body.dark-mode .badge-2 {
    color: #1a1a1a;
    /* Keep dark text for the white badge */
}

body.dark-mode .text-muted {
    color: #ced4da !important;
    /* Lighter gray for better contrast */
}

body.dark-mode .hero-text .h3.text-muted {
    color: #e0e0e0 !important;
    /* Even lighter for the subtitle */
}