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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #4f46e5;
    --secondary: #6525d3;
    --dark: #0f172a;
    --darker: #0a0f1c;
    --light: #e2e8f0;
    --glass: rgba(255, 255, 255, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    background-image: url('../../documents/assets/sitebackground.jpg');
    background-size: 100%;
    background-repeat: repeat;
    background-attachment: fixed cover;
    color: var(--light);
}

#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding:1.5rem;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass);
    
    & .menu {
        display: flex;
        justify-content: center;
        list-style: none;
        gap: 6rem;
    }

    & .nav-link {
        position: relative;
        font-size: 22px;
        padding: 0.1rem 0.5rem;
        color: var(--light);
        text-decoration: none;
        font-family: Poppins;
        font-weight: 500;
        cursor: pointer;
    }

    & .nav-link::after {
        content: '';
        height: 2px;
        width: 0;
        position: absolute;
        bottom: 0;
        left: 0;
        background: linear-gradient(90deg, var(--primary), var(--secondary));
        transition: width 0.25s ease-in-out;
    }

    & .nav-link:hover::after {
        width: 100%;
    }
}

.infos {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    & .profile-photo {
        width: 320px;
        height: 320px;
        border-radius: 50%;
        object-fit: cover;
        border: 4px solid var(--glass);
        box-shadow: 0 0 70px rgba(79, 70, 229, 0.65);
        animation: fluctuate 3s ease-in-out infinite;
    }

    & .name {
        font-size: 3.5rem;
        color: var(--primary);
        font-weight: bold;
        margin: 20px;
    }

    & .dev-info {
        font-size: 1.5rem;
        font-weight: bold;
        color: var(--light);
    }
}

.title {
    font-size: 3rem;
    color: var(--light);
    text-align: center;
    margin-bottom: 50px;
}

.about-me {
    padding: 6rem 2rem;

    & .about-desc {
        padding: 2rem;
        max-width: 900px;
        margin: 0 auto;
        border-radius: 16px;
        border: 1px solid var(--glass);
        backdrop-filter: blur(16px);
        box-shadow: 0 0 70px rgba(79, 70, 229, 0.15);
    }

    & .description {
        text-align: center;
        font-size: 1rem;
    }
}

.my-skills {
    padding: 6rem 2rem;

    & .skill-cards {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 50px;
        margin-bottom: 30px;
        gap: 20px;
    }

    & .skill-icon {
        padding: 15px 0 25px;
        font-size: 50px;
        margin-bottom: -5px;
        color: var(--primary);
        filter: drop-shadow(rgba(124, 58, 237, 0.4) 0px 0px 8px);
    }

    & .skill-item {
        display: flex;
        text-align: center;
        flex-direction: column;
        align-items: center;
        height: 140px;
        width: 120px;
        aspect-ratio: 1 / 1;
        backdrop-filter: blur(16px);
        border: 1px solid var(--glass);
        transition: all 0.5s ease;
        border-radius: 16px;
        padding: 15px;
        cursor: pointer;
        box-sizing: border-box;
    }

    & .skill-item:hover {
        box-shadow: 0 10px 20px rgba(79, 70, 229, 0.25);
        transform: translateY(-10px) scale(1.03);
    }
}

.projects {
    padding: 6rem 2rem;

    & .project-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        max-width: 1200px;
        margin: 0 auto;
        gap: 3rem;
    }

    & .project-item {
        backdrop-filter: blur(16px);
        border: 1px solid var(--glass);
        border-radius: 16px;
        overflow: hidden;
        transition: all 0.5s ease;
        cursor: pointer;
    }

    & .project-item:hover {
        box-shadow: 0 10px 20px rgba(79, 70, 229, 0.25);
        transform: translateY(-10px) scale(1.03);
    }

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

    & .text-box {
        padding: 1.5rem;
    }

    & .project-info {
        text-align: center;
        font-size: 1.75rem;
        margin-bottom: 20px;
        text-decoration: none;
    }

    & .project-desc {
        line-height: 1.25rem;
        text-align: center;
    }

    & .project.desc {
        font-size: 1rem;
        color: var(--light);
    }
}

.certificates {
    padding: 6rem 2rem;
    text-align: center;

    & .btn-show {
        height: 6rem;
        width: 30%;
        background: none;
        backdrop-filter: blur(16px);
        border: 2px solid var(--glass);
        border-radius: 16px;
        font-size: 2.5rem;
        color: var(--primary);
        font-weight: bold;
        transition: all 0.5s ease;
        cursor: pointer;
    }

    & .btn-show:hover {
        box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
        transform: translateY(-10px) scale(1.03);
    }

    & .certification-cards {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: row;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        gap: 3rem;
    }

    & .certification.items {
        backdrop-filter: blur(16px);
        border: 1px solid var(--glass);
        border-radius: 16px;
        padding: 20px;
    }

    & .certificate01 {
        height: 450px;
        width: 350px;
    }

    & .certificate02 {
        height: 450px;
        width: 550px;
    }
}

.contact-me {
    padding: 6rem 2rem;

    & .btn-group {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6rem;
        margin-top: 2rem;
    }

    & a {
        text-decoration: none;
    }

    & .btn-github {
        height: 4rem;
        padding: 0 2.5rem;
        background: none;
        backdrop-filter: blur(16px);
        border: 2px solid var(--glass);
        border-radius: 16px;
        font-size: 1.5rem;
        color: var(--primary);
        font-weight: bold;
        transition: all 0.5s ease;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    & .btn-github:hover {
        box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
        transform: translateY(-10px) scale(1.03);
    }

    & .btn-linkedin {
        height: 4rem;
        padding: 0 2.5rem;
        background: none;
        backdrop-filter: blur(16px);
        border: 2px solid var(--glass);
        border-radius: 16px;
        font-size: 1.5rem;
        color: var(--primary);
        font-weight: bold;
        transition: all 0.5s ease;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    & .btn-linkedin:hover {
        box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
        transform: translateY(-10px) scale(1.03);
    }
}

.footbar {
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(16px);
    color: var(--light);
    font-size: 1.2rem;
    position: relative;
    bottom: 0;
    width: 100%;
    border-top: 1px solid var(--glass);
}

@keyframes fluctuate {
    0%, 100% {
        transform: translateY(10px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* --- Improved Responsive Design: Keep Desktop Aspect Ratios, Just Scale Down --- */
@media (max-width: 900px) {
    html {
        font-size: 14px;
    }
    .infos {
        & .profile-photo {
            width: 180px;
            height: 180px;
        }
        & .name {
            font-size: 1.7rem;
        }
        & .dev-info {
            font-size: 1.05rem;
        }
    }
    .title {
        font-size: 1.4rem;
    }
    .about-me, .my-skills, .projects, .certificates, .contact-me {
        padding: 3rem 1rem;
    }
    .about-me {
        & .about-desc {
            max-width: 700px;
            padding: 1.2rem;
            font-size: 0.98rem;
        }
    }
    .my-skills {
        & .skill-cards {
            gap: 18px;
        }
        & .skill-item {
            width: 90px;
            height: 90px;
            aspect-ratio: 1 / 1;
            font-size: 1rem;
            padding: 10px;
        }
        & .skill-icon {
            font-size: 36px;
            padding: 10px 0 15px;
        }
    }
    .projects {
        & .project-cards {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 1.2rem;
            max-width: 100vw;
        }
        & .project-item {
            margin: 0 auto;
            max-width: 320px;
        }
        & .project-img {
            height: 120px;
        }
        & .project-info {
            font-size: 1.1rem;
        }
        & .project-desc {
            font-size: 0.92rem;
        }
    }
    .certificates {
        & .btn-show {
            width: 60%;
            font-size: 1.1rem;
            height: 3.5rem;
            margin: 0 auto;
        }
        & .certification-cards {
            flex-direction: row;
            gap: 1.5rem;
        }
        & .certificate01, & .certificate02 {
            width: 180px;
            max-width: 90vw;
            height: auto;
        }
    }
    .contact-me {
        & .btn-group {
            flex-direction: row;
            gap: 2rem;
            justify-content: center;
        }
        & .btn-github, & .btn-linkedin {
            min-width: 120px;
            max-width: 200px;
            font-size: 1.1rem;
            height: 3.2rem;
            padding: 0 1.2rem;
            justify-content: center;
        }
    }
    .footbar {
        font-size: 0.85rem;
        padding: 1rem 0.2rem;
    }
    #navbar {
        padding: 0.7rem;
        & .menu {
            gap: 1.2rem;
        }
        & .nav-link {
            font-size: 1rem;
            padding: 0.1rem 0.2rem;
        }
    }
}

@media (max-width: 600px) {
    html {
        font-size: 12px;
    }
    .infos {
        & .profile-photo {
            width: 110px;
            height: 110px;
        }
        & .name {
            font-size: 1.1rem;
        }
        & .dev-info {
            font-size: 0.85rem;
        }
    }
    .title {
        font-size: 1rem;
    }
    .about-me, .my-skills, .projects, .certificates, .contact-me {
        padding: 1.2rem 0.5rem;
    }
    .about-me {
        & .about-desc {
            max-width: 98vw;
            padding: 0.7rem;
            font-size: 0.85rem;
        }
    }
    .my-skills {
        & .skill-cards {
            gap: 8px;
        }
        & .skill-item {
            width: 60px;
            height: 60px;
            aspect-ratio: 1 / 1;
            font-size: 0.8rem;
            padding: 4px;
        }
        & .skill-icon {
            font-size: 18px;
            padding: 2px 0 4px;
        }
    }
    .projects {
        & .project-cards {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0.5rem;
        }
        & .project-item {
            margin: 0 auto;
            max-width: 110px;
        }
        & .project-img {
            height: 40px;
        }
        & .project-info {
            font-size: 0.8rem;
        }
        & .project-desc {
            font-size: 0.7rem;
        }
    }
    .certificates {
        & .btn-show {
            width: 80vw;
            font-size: 0.8rem;
            height: 2.2rem;
            margin: 0 auto;
        }
        & .certificate01, & .certificate02 {
            max-width: 80vw;
        }
    }
    .contact-me {
        & .btn-group {
            flex-direction: row;
            gap: 1rem;
        }
        & .btn-github, & .btn-linkedin {
            min-width: 80px;
            max-width: 120px;
            font-size: 0.7rem;
            height: 2.2rem;
            padding: 0 0.5rem;
        }
    }
    .footbar {
        font-size: 0.7rem;
        padding: 0.5rem 0.1rem;
    }
    #navbar {
        padding: 0.3rem;
        & .menu {
            gap: 0.5rem;
        }
        & .nav-link {
            font-size: 0.7rem;
            padding: 0.05rem 0.1rem;
        }
    }
}