/* Basic Styles */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: #121212;
    color: #e0e0e0;
    scroll-behavior: smooth;
}

/* Header and Navigation */
header {
    background-color: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    animation: logo-animation 8s infinite ease-in-out;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #00bcd4;
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: #00bcd4;
}

.nav-links a:hover::after {
    width: 100%;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: all 0.3s ease;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #1e1e1e;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {background-color: #00bcd4;}

.dropdown:hover .dropdown-content {
    display: block;
}

@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        background-color: #1e1e1e;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 60%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links li {
        margin: 2rem 0;
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .burger {
        display: block;
        z-index: 1001; /* Ensure it's above the nav */
    }

    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .toggle .line2 {
        opacity: 0;
    }
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-content h1 {
        font-size: 3rem;
    }
}

/* Sections */
section {
    padding: 120px 2rem;
    max-width: 1200px;
    margin: 0 auto;
    /* opacity: 0; */
    /* transform: translateY(20px); */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #00bcd4;
}

/* Hero Section */
@keyframes circle-animation {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-1000px) scale(1);
        opacity: 0;
    }
}

#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #020c16; /* Dark background for circles */
    overflow: hidden; /* Hide circles outside the section */
    position: relative;
    border-radius: 0 0 100px 100px; /* More rounded bottom corners */
}

.hero-content {
    z-index: 1; /* Ensure content is above circles */
}

.circles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.circles-container div {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(0, 188, 212, 0.2);
    animation: circle-animation 25s infinite;
    bottom: -150px;
}

.circles-container div:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.circles-container div:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.circles-container div:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.circles-container div:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.circles-container div:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.circles-container div:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
}

.circles-container div:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-delay: 7s;
}

.circles-container div:nth-child(8) {
    left: 50%;
    width: 25px;
    height: 25px;
    animation-delay: 15s;
    animation-duration: 45s;
}

.circles-container div:nth-child(9) {
    left: 20%;
    width: 15px;
    height: 15px;
    animation-delay: 2s;
    animation-duration: 35s;
}

.circles-container div:nth-child(10) {
    left: 85%;
    width: 150px;
    height: 150px;
    animation-delay: 0s;
    animation-duration: 11s;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.5rem;
}

/* About Section */
#about .about-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

#about .about-image {
    flex: 1;
    max-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#about .about-image img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #00bcd4;
}

#about .about-text {
    flex: 2;
    max-width: 600px;
    text-align: left;
}

.about-contact p {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
}

.about-contact i {
    color: #00bcd4;
    margin-right: 1rem;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.about-contact a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.about-contact a:hover {
    color: #00bcd4;
}

.about-contact p:hover i {
    transform: scale(1.2);
}

#about .about-text p {
    font-size: 1.15rem;
    line-height: 1.8;
    /* opacity: 0; */
    /* transform: translateY(20px); */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

#about.visible .about-text p {
    opacity: 1;
    transform: translateX(0);
}

#about.visible .about-text p:nth-child(1) {
    transition-delay: 0.2s;
}

#about.visible .about-text p:nth-child(2) {
    transition-delay: 0.4s;
}

/* Experience Sections */
.experience-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.experience-image {
    flex: 1;
    max-width: 400px;
    overflow: hidden;
    border-radius: 10px;
}

.experience-image img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.experience-image:hover img {
    transform: scale(1.05);
}

.experience-text {
    flex: 2;
    max-width: 600px;
    text-align: left;
}

.experience-text p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #1e1e1e;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {background-color: #00bcd4;}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Skills Section */
#skills .skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.skill-card {
    background-color: #1e1e1e;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 188, 212, 0.2);
}

.skill-card i {
    font-size: 3rem;
    color: #00bcd4;
    margin-bottom: 1rem;
}

.skill-card h3 {
    font-size: 1.2rem;
    color: white;
}

/* Contact Section */
.contact-info {
    margin-bottom: 2rem;
}

.contact-info p {
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

#contact form {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto;
    gap: 1rem;
}

#contact input,
#contact textarea {
    padding: 1rem;
    border-radius: 5px;
    border: none;
    background-color: #1e1e1e;
    color: #e0e0e0;
}

#contact button {
    padding: 1rem;
    border: none;
    border-radius: 5px;
    background-color: #00bcd4;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#contact button:hover {
    background-color: #0097a7;
}

/* Call to Action Section */
#cta {
    background-color: #1e1e1e;
    padding: 80px 2rem;
    text-align: center;
}

#cta h2 {
    color: #00bcd4;
    margin-bottom: 1rem;
}

#cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background-color: #00bcd4;
    color: white;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin: 0 10px;
}

.btn:hover {
    background-color: #0097a7;
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #00bcd4;
}

.btn-secondary:hover {
    background-color: #00bcd4;
    color: white;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    background-color: #1e1e1e;
}

footer p {
    margin: 0.5rem 0;
}

/* Back to Top Button */
#backToTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed/sticky position */
    bottom: 20px; /* Place the button at the bottom of the page */
    right: 30px; /* Place the button 30px from the right */
    z-index: 99; /* Make sure it does not overlap */
    border: none; /* Remove borders */
    outline: none; /* Remove outline */
    background-color: #00bcd4; /* Set a background color */
    color: white; /* Text color */
    cursor: pointer; /* Add a mouse pointer on hover */
    padding: 15px; /* Some padding */
    border-radius: 10px; /* Rounded corners */
    font-size: 18px; /* Increase font size */
    transition: background-color 0.3s ease;
}

#backToTopBtn:hover {
    background-color: #0097a7; /* Add a darker background on hover */
}

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

.loader {
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid #00bcd4; /* Blue */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
}

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