/* General & Variables */
:root {
    --bg-black: #121212;
    --text-white: #E0E0E0;
    --accent-blue: #00BFFF;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-black);
    color: var(--text-white);
    overflow-x: hidden;
    position: relative; /* For animated background positioning */
}

/* Animated Background for Bubbles */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1; /* Ensure it stays behind content */
}

.animated-background .bubble {
    position: absolute;
    bottom: -100px; /* Start from below the screen */
    background-color: rgba(0, 191, 255, 0.2); /* Semi-transparent accent blue */
    border-radius: 50%;
    animation: riseAndFade 15s infinite ease-in; /* Animation duration and type */
}

@keyframes riseAndFade {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    50% {
        opacity: 0.5;
        transform: translateY(-50vh) scale(1);
    }
    100% {
        transform: translateY(-100vh) scale(0.5);
        opacity: 0;
    }
}

/* Sections */
.section {
    padding: 80px 5%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative; /* To ensure content is above bubbles */
    z-index: 1;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: #fff;
    margin-bottom: 20px;
}
.highlight {
    color: var(--accent-blue);
}

/* Nav Bar */
.header {
    background-color: var(--bg-black);
    position: fixed;
    width: 100%;
    z-index: 1000;
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
}
.logo {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}
.nav-menu {
    display: flex;
    gap: 25px;
    list-style: none;
    transition: all 0.5s ease;
}
.nav-link {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}
.nav-link:hover {
    color: var(--accent-blue);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
}
.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
}
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Close icon (Hidden by default) */
.close-menu {
    display: none;
}

/* Home Section */
.home {
    background-color: transparent; /* Bubbles ke liye transparent */
}
.intro h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}
.btn {
    display: inline-block;
    background: var(--accent-blue);
    color: var(--bg-black);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    margin-top: 20px;
    transition: transform 0.3s ease;
}
.btn:hover {
    transform: scale(1.05);
}

/* About Me Section */
.about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 800px;
}
.about-photo-wrapper {
    position: relative;
    padding: 10px;
    border: 2px solid var(--accent-blue);
    border-radius: 15px;
}
.profile-img {
    width: 300px;
    height: 300px;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--accent-blue);
}
.about-content p {
    margin-top: 10px;
    line-height: 1.6;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
}
.skill-card {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 191, 255, 0.2);
}
.skill-card i {
    font-size: 3rem;
    color: var(--accent-blue);
    margin-bottom: 10px;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}
.project-card {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.project-card h3 {
    color: var(--accent-blue);
}
.project-btn {
    display: inline-block;
    margin-top: 15px;
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
    padding: 8px 15px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.project-btn:hover {
    background-color: var(--accent-blue);
    color: var(--bg-black);
}

/* Contact Section */
.contact-links {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}
.contact-links a {
    color: var(--text-white);
    font-size: 2.5rem;
    transition: color 0.3s ease;
}
.contact-links a:hover {
    color: var(--accent-blue);
}

/* Footer */
.footer {
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
    background-color: #0d0d0d;
    position: relative;
    z-index: 1;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    .nav-menu {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background-color: #1a1a1a;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 80px;
        gap: 30px;
        transition: right 0.5s ease-in-out;
        z-index: 999;
    }
    .nav-menu.active {
        right: 0;
    }

    .close-menu {
        display: block;
        position: absolute;
        top: 20px;
        left: 20px;
        font-size: 2rem;
        color: var(--text-white);
        cursor: pointer;
        transition: color 0.3s ease;
    }
    .close-menu:hover {
        color: var(--accent-blue);
    }

    .nav-menu .nav-item {
        margin: 10px 0;
    }
    .about-container {
        flex-direction: column;
        text-align: center;
    }
}