@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;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
}

:root {
    --bg-color: #081b29;
    --second-bg-color: #112e42;
    --text-color: #ededed;
    --main-color: #00efcb;
    /* Neon Cyan */
    --hover-color: #00c6a7;
    --box-shadow: 0 0 1rem var(--main-color);
    --card-bg: rgba(17, 46, 66, 0.8);
    --header-bg: rgba(8, 27, 41, 0.9);
}

[data-theme="light"] {
    --bg-color: #f4f6f8;
    --second-bg-color: #ffffff;
    --text-color: #333333;
    --main-color: #009688;
    /* A darker teal for light mode */
    --hover-color: #00796b;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --header-bg: rgba(244, 246, 248, 0.9);
}

html {
    font-size: 62.5%;
    /* 1rem = 10px */
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    transition: background 0.3s ease, color 0.3s ease;
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

/* Base fade-in class */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

.heading {
    text-align: center;
    font-size: 4.5rem;
    margin-bottom: 5rem;
}

.heading span {
    color: var(--main-color);
    text-shadow: 0 0 5px var(--main-color), 0 0 10px var(--main-color);
    transition: 0.3s;
}

/* ---------- Header ---------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: var(--header-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(10px);
    transition: 0.3s;
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 600;
    cursor: default;
}

.navbar {
    display: flex;
    align-items: center;
}

.navbar a {
    font-size: 1.7rem;
    color: var(--text-color);
    margin-left: 4rem;
    transition: .3s;
    font-weight: 500;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
    text-shadow: 0 0 10px var(--main-color);
}

.theme-btn {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-left: 4rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
}

.theme-btn:hover {
    color: var(--main-color);
    text-shadow: 0 0 15px var(--main-color);
    transform: rotate(15deg);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
}

/* ---------- Home ---------- */
.home {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 2rem;
}

.home-content span {
    color: var(--main-color);
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content p {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
    line-height: 1.8;
    max-width: 600px;
}

.social-media 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-media a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 1rem var(--main-color);
    transform: translateY(-5px);
}

.btn-box {
    display: flex;
    gap: 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    border: .2rem solid var(--main-color);
    transition: .5s ease;
}

.btn:hover {
    background: transparent;
    color: var(--main-color);
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    color: var(--main-color);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.home-img {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 450px;
    height: 450px;
}

.img-box {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glowing-circle {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: var(--main-color);
    filter: blur(100px);
    opacity: 0.3;
    animation: pulse 4s infinite alternate;
}

.glowing-circle-2 {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--hover-color);
    filter: blur(50px);
    opacity: 0.2;
}

.profile-img {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 10;
    border: .4rem solid var(--main-color);
    box-shadow: 0 0 2rem var(--main-color);
    animation: float 3s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.2;
    }

    100% {
        transform: scale(1.1);
        opacity: 0.4;
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

/* ---------- Skills ---------- */
.skills {
    background: var(--second-bg-color);
}

.skills-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
}

.skill-box {
    flex: 1 1 20rem;
    background: var(--card-bg);
    padding: 3rem 2rem 4rem;
    border-radius: 2rem;
    text-align: center;
    border: .2rem solid var(--bg-color);
    transition: .5s;
    box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.1);
}

.skill-box:hover {
    border-color: var(--main-color);
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 0 2rem var(--main-color);
}

.skill-box i {
    font-size: 7rem;
    color: var(--main-color);
    margin-bottom: 2rem;
    transition: 0.3s;
}

.skill-box h3 {
    font-size: 2.6rem;
}

/* ---------- Projects ---------- */
.projects {
    background: var(--bg-color);
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    align-items: stretch;
    gap: 2.5rem;
}

.portfolio-box {
    background: var(--card-bg);
    border-radius: 2rem;
    padding: 2rem;
    position: relative;
    border: .2rem solid transparent;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.1);
    transition: 0.5s;
    overflow: hidden;
}

.portfolio-img {
    width: 100%;
    height: 22rem;
    border-radius: 1.5rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s ease;
}

.portfolio-box:hover {
    transform: scale(1.03);
    border-color: var(--main-color);
    box-shadow: 0 0 2.5rem rgba(0, 239, 203, 0.2);
}

.portfolio-box:hover .portfolio-img img {
    transform: scale(1.1);
}

.project-icon {
    font-size: 4rem;
    color: var(--main-color);
    margin-bottom: 1rem;
    display: none;
}

.portfolio-box h4 {
    font-size: 2.6rem;
    margin-bottom: 1rem;
}

.portfolio-box p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.features {
    list-style: none;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.features li {
    font-size: 1.4rem;
    margin-bottom: .8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.features li i {
    color: var(--main-color);
    font-size: 2rem;
}

.project-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.portfolio-box .project-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 1.5rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 1rem;
    font-size: 1.5rem;
    color: var(--main-color);
    transition: 0.3s;
    font-weight: 500;
    gap: .8rem;
}

.portfolio-box .project-links a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    transform: translateY(-3px);
    box-shadow: 0 0 1rem var(--main-color);
}


/* ---------- Contact ---------- */
.contact {
    background: var(--second-bg-color);
}

.contact form {
    max-width: 70rem;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}

.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;
    border: .2rem solid transparent;
    transition: .3s;
}

.contact form .input-box input:focus,
.contact form textarea:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.contact form .input-box input {
    width: 49%;
}

.contact form textarea {
    resize: none;
}

.contact form .btn {
    margin-top: 2rem;
    cursor: pointer;
}

/* ---------- Footer ---------- */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--bg-color);
    gap: 2rem;
}

.footer-text p {
    font-size: 1.6rem;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social 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);
    transition: .5s ease;
}

.footer-social a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 1rem var(--main-color);
    transform: translateY(-3px);
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--bg-color);
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 2rem 3%;
    }

    section {
        padding: 10rem 3% 2rem;
    }

    .services {
        padding-bottom: 7rem;
    }

    .portfolio {
        padding-bottom: 7rem;
    }

    .contact {
        min-height: auto;
    }

    .footer {
        padding: 2rem 3%;
    }
}

@media (max-width: 768px) {
    #menu-icon {
        display: block;
        cursor: pointer;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        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);
        display: none;
        flex-direction: column;
        align-items: stretch;
    }

    .navbar.active {
        display: flex;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        text-align: center;
    }

    .theme-btn {
        justify-content: center;
        margin: 1rem 0;
    }

    .home {
        flex-direction: column;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    .home-img {
        width: 300px;
        height: 300px;
        margin-top: 4rem;
    }

    .glowing-circle {
        width: 250px;
        height: 250px;
    }

    .profile-img {
        width: 250px;
        height: 250px;
    }

    .skills-container {
        gap: 1.5rem;
    }
}

@media (max-width: 450px) {
    html {
        font-size: 50%;
    }

    .contact form .input-box input {
        width: 100%;
    }

    .home-img {
        width: 250px;
        height: 250px;
    }

    .glowing-circle {
        width: 200px;
        height: 200px;
    }

    .profile-img {
        width: 200px;
        height: 200px;
    }
}
