@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #1f242d;
    --second-bg-color: #323946;
    --text-color: #fff;
    --main-color: #0ef;
    --bg-dark: #0f172a;
    --bg-section: #1e293b;
    --bg-card: #334155;
    --border-color: #475569;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

/* Animated Particle Background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
    background: transparent; /* Makes sections transparent to see particles */
}

/* Add back solid backgrounds for sections that need it for readability */
.about, .experience, .contact, .footer {
    background: var(--second-bg-color);
}
.projects {
    background: var(--bg-color);
}

.heading {
    text-align: center;
    font-size: 4.5rem;
    margin-bottom: 3rem;
}

span {
    color: var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--second-bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
}

.btn:hover {
    box-shadow: none;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: rgba(8, 8, 8, 0.7); /* Semi-transparent header */
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: .3s;
}

.header.sticky {
    background: rgba(24, 24, 24, 0.8);
    box-shadow: 0 .1rem 1rem rgba(0, 0, 0, .2);
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 600;
    cursor: default;
}

.navbar a {
    font-size: 1.7rem;
    color: var(--text-color);
    margin-left: 4rem;
    transition: .3s;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    gap: 2rem;
}

.hero-img img {
    width: 35vw;
    border-radius: 50%;
    border: .5rem solid var(--main-color);
    animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
    0% { transform: translateY(0); }
    50% { transform: translateY(-2.4rem); }
    100% { transform: translateY(0); }
}

.hero-content h3 { font-size: 3.2rem; font-weight: 700; }
.hero-content h3:nth-of-type(2) { margin-bottom: 2rem; }
.hero-content h1 { font-size: 5.6rem; font-weight: 700; line-height: 1.3; }
.hero-content p { font-size: 1.6rem; margin: 2rem 0 3rem; }

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: .5s ease;
}

.social-links a:hover {
    background: var(--main-color);
    color: var(--text-color);
    box-shadow: 0 0 1rem var(--main-color);
}

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

.about-img img {
    width: 35vw;
    border-radius: 1rem;
}

.about-content h2 { text-align: left; line-height: 1.2; }
.about-content h3 { font-size: 2.6rem; }
.about-content p { font-size: 1.6rem; margin: 2rem 0 3rem; }

/* Skills Section */
.skills { padding-bottom: 7rem; }
.skills .skills-slider {
    width: 100%;
    padding-bottom: 5rem;
}
.skills .swiper-slide {
    background: var(--second-bg-color);
    border: .2rem solid transparent;
    border-radius: .8rem;
    text-align: center;
    padding: 1rem 1rem;
    transition: transform 0.4s ease, opacity 0.4s ease, border-color 0.4s ease;
    cursor: grab;
    width: 25rem; /* Set a fixed width for coverflow slides */
}
.skills .swiper-slide:hover {
    border-color: var(--main-color);
    transform: translateY(-1rem);
}
.skills .swiper-slide img { height: 5rem; margin-bottom: 1rem; }
.skills .swiper-slide h3 { font-size: 1.2rem; }
.swiper-pagination-bullet-active { background: var(--main-color); }
.swiper-button-next,
.swiper-button-prev {
    color: var(--main-color);
    transition: color 0.3s ease;
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: var(--text-color);
}

.skills-container {
    display: grid;
    gap: 2rem;
}

.skill-category {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    font-size: 1.6rem;
}

.skill-category-icon {
    margin-right: 0.75rem;
    font-size: 1.6rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background: var(--bg-section);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1.2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Experience Section */
.experience-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(35rem, 1fr));
    gap: 2.5rem;
    justify-content: center;
}
.experience-box {
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 2rem;
    text-align: center;
    border: .2rem solid transparent;
    transition: .5s ease;
}
.experience-box:hover { border-color: var(--main-color); transform: scale(1.02); }
.experience-box i { font-size: 5rem; color: var(--main-color); margin-bottom: 1rem; }
.experience-box h3 { font-size: 2.4rem; }
.experience-box p { font-size: 1.6rem; margin: .5rem 0; }
.experience-box .experience-desc { font-size: 1.4rem; color: #ccc; margin-top: 1.5rem; }

/* Projects Section */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 2.5rem;
}
.project-card {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem var(--second-bg-color);
    overflow: hidden;
    display: flex;
}
.project-card img { width: 100%; transition: .5s ease; }
.project-card:hover img { transform: scale(1.1); }
.project-card .project-layer {
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(0,0,0, .3), var(--main-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    transform: translateY(100%);
    transition: .5s ease;
}
.project-card:hover .project-layer { transform: translateY(0); }
.project-layer h4 { font-size: 2rem; }
.project-layer p { font-size: 1.2rem; margin: .3rem 0 1.2rem; }
.project-layer .tech-stack { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-bottom: 1.5rem; }
.project-layer .tech-stack span { background: rgba(0,0,0,0.5); color: var(--text-color); padding: .5rem 1rem; border-radius: 1rem; font-size: 1.2rem; }
.project-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem; height: 5rem;
    background: var(--text-color);
    border-radius: 50%;
}
.project-layer a i { font-size: 2.5rem; color: var(--bg-color); }

/* Contact Section */
.contact .contact-subheading { text-align: center; font-size: 1.8rem; margin: -2rem 0 3rem; }
.contact-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 4rem;
    margin-top: 3rem;
}
.contact-form {
    flex: 1 1 55%;
}
.contact-form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.contact-form .input-box input,
.contact-form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--bg-color);
    border-radius: .8rem;
    margin: .7rem 0;
}
.contact-form .input-box input {
    width: 49%;
}
.contact-form .btn {
    margin-top: 2rem;
    cursor: pointer;
}
.contact-info {
    flex: 1 1 40%;
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 2rem;
}
.contact-info h3 {
    font-size: 2.4rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}
.contact-info p {
    font-size: 1.6rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}
.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 1.6rem;
}
.contact-item .contact-icon {
    font-size: 2.2rem;
    color: var(--main-color);
    margin-right: 1.5rem;
    width: 2.5rem;
    text-align: center;
}
.contact-item span, .contact-item a {
    color: var(--text-color);
    word-break: break-all;
    text-decoration: none;
    transition: color .3s ease;
}
.contact-item a:hover {
    color: var(--main-color);
    text-decoration: underline;
}
.resume-download {
    margin-top: 3rem;
}
.resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--second-bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.resume-btn:hover {
    box-shadow: none;
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-left: 1%;
    padding-right: 1%;
    background: var(--second-bg-color);
}
.footer-text p {
    font-size: 1.2rem;
}
.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    margin-bottom: 1rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}
.footer-iconTop a:hover { box-shadow: 0 0 1rem var(--main-color); }
.footer-iconTop a i { font-size: 2.4rem; color: var(--bg-color); }

/* Animation on Scroll */
.animatable {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animatable.animate { opacity: 1; transform: translateY(0); }

/* Responsive Breakpoints */
@media (max-width: 1200px) { html { font-size: 55%; } }

@media (max-width: 991px) {
    .header { padding: 2rem 3%; }
    section { padding: 10rem 3% 2rem; }
    .contact-container { flex-direction: column; }
}

@media (max-width: 768px) {
    #menu-icon { display: block; }
    .navbar {
        position: absolute; top: 100%; left: -100%; width: 100%;
        padding: 1rem 3%; background: var(--bg-color);
        border-top: .1rem solid rgba(0,0,0, .2);
        box-shadow: 0 .5rem 1rem rgba(0,0,0, .2);
        transition: .3s ease;
    }
    .navbar.active { left: 0; }
    .navbar a { display: block; font-size: 2rem; margin: 3rem 0; }
    .hero { flex-direction: column-reverse; text-align: center; }
    .hero-content h1 { font-size: 5rem; }
    .hero-img img { width: 70vw; margin-top: 4rem; }
    .about { flex-direction: column; text-align: center; }
    .about-content h2 { text-align: center; }
    .about-img img { width: 70vw; margin-top: 4rem; }
}

@media (max-width: 450px) {
    html { font-size: 50%; }
    .contact-form .input-box input {
        width: 100%;
    }
}
