/* --- Base Styles & Theme Variables --- */
:root {
    --primary-blue: #172a53;
    --primary-purple: #9333ea;
    --gradient-main: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    --gradient-text: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));

    /* Light Theme */
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --card-bg: #ffffff;
    --navbar-bg: rgba(255, 255, 255, 0.5);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --divider-color-start: rgba(248, 249, 250, 0);
    --divider-color-end: rgba(248, 249, 250, 1);
    --neon-blue: #2563eb;
    --neon-purple: #9333ea;
    --particle-color: rgba(0, 0, 0, 0.3);
    /* Darker particles for visibility */
}

[data-theme="dark"] {
    --bg-color: #0d0d12;
    --text-color: #e2e8f0;
    --card-bg: #161621;
    --navbar-bg: rgba(13, 13, 18, 0.7);
    --shadow-color: rgba(0, 0, 0, 0.6);
    --divider-color-start: rgba(13, 13, 18, 0);
    --divider-color-end: rgba(13, 13, 18, 1);
    --neon-blue: #00d2ff;
    --neon-purple: #bd00ff;
    --particle-color: rgba(255, 255, 255, 0.4);
    /* Light particles for dark mode */
}

/* --- Anti-Gravity Background --- */
.anti-gravity-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: var(--particle-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--particle-color);
    animation: float-particle var(--duration) infinite ease-in-out;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    /* Reduced blur for higher intensity */
    opacity: 0.35;
    /* Increased opacity */
    mix-blend-mode: multiply;
    animation: drift-orb var(--duration) infinite ease-in-out;
}

[data-theme="dark"] .glow-orb {
    opacity: 0.3;
    mix-blend-mode: screen;
    /* Reverted to screen for dark backgrounds */
}

.orb-blue {
    background: var(--neon-blue);
    width: 400px;
    height: 400px;
}

.orb-purple {
    background: var(--neon-purple);
    width: 500px;
    height: 500px;
}

@keyframes float-particle {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0.3;
    }

    50% {
        transform: translate(30px, -60px);
        opacity: 0.7;
    }
}

@keyframes drift-orb {

    0%,
    100% {
        transform: translate(0, 0) scale(1.1);
    }

    50% {
        transform: translate(10%, 15%) scale(1.3);
    }
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-main);
    border-radius: 10px;
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-purple);
}

/* --- Back to Top Button --- */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-main);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* --- Animations & Transitions --- */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* --- Navbar --- */
.navbar {
    background-color: var(--navbar-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}

.navbar-brand {
    font-weight: 700;
}

.nav-link {
    font-weight: 600;
}

.nav-link:hover {
    color: var(--primary-blue) !important;
}

/* --- Theme Toggle Switch --- */
.theme-switch {
    cursor: pointer;
    font-size: 1.5rem;
}

/* --- Hero Section --- */
#hero {
    min-height: 100vh;
    background: var(--gradient-main);
    color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    z-index: 2;
}

#hero .profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#hero h1 {
    font-size: 3rem;
    font-weight: 700;
}

#hero .tagline {
    font-size: 1.5rem;
    font-weight: 300;
}

/* --- Section Styling --- */
section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.section-content {
    position: relative;
    z-index: 10;
}

@keyframes drift-orb {

    0%,
    100% {
        transform: translate(0, 0) scale(1.1);
    }

    50% {
        transform: translate(10%, 15%) scale(1.3);
    }
}

/* --- Section Styling --- */
section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    /* Contain background animations */
}



.section-title {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 50px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text-color);
}

.soft-divider {
    height: 100px;
    background-image: linear-gradient(to bottom, var(--divider-color-start), var(--divider-color-end));
    margin-top: -100px;
    margin-bottom: -1px;
}

/* --- About Me Section --- */
#about p {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 50px auto;
}

.skill-card {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    /* Ensure cards are same height */
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.skill-card i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.skill-card i:not(.colored) {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skill-card h5 {
    font-weight: 600;
}

/* --- Projects Section --- */
.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.project-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card-body {
    padding: 25px;
}

.project-card-header {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-main);
    color: white;
    font-size: 5rem;
}

.project-card-header i {
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.netflix-header {
    background: #141414 !important;
    /* Netflix black background */
}

.netflix-header svg {
    filter: drop-shadow(0 0 10px rgba(229, 9, 20, 0.4));
}

/* --- Contact Section --- */
.contact-info-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(128, 128, 128, 0.1);
    height: 100%;
}

.contact-info-card i {
    font-size: 1.5rem;
}

#contact .form-control {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid #ced4da;
    border-radius: 10px;
    padding: 12px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact .form-control:focus {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
}

.social-icons a {
    font-size: 2rem;
    color: var(--text-color);
    margin: 0 15px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-purple);
    transform: scale(1.2);
    text-shadow: 0 0 15px var(--primary-purple);
}

/* --- Footer --- */
footer {
    background: var(--card-bg);
    padding: 20px 0;
    border-top: 1px solid rgba(128, 128, 128, 0.1);
}

/* --- Buttons --- */
.btn-gradient {
    background-image: var(--gradient-main);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    color: white;
}



/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.5rem;
    }

    #hero .tagline {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    section {
        padding: 60px 0;
    }
}