/* ============================================================
    IMPORTS - Google Fonts
    ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@600&display=swap');

/* ============================================================
    ROOT VARIABLES - For easier control
    ============================================================ */
:root {
    --main-color: #5E7ACF;
    --bg-dark: #111;
    --bg-black: #000;
}

/* ============================================================
    RESET & BASE STYLES
    ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh; /* Changed to min-height for better scrolling */
    overflow-x: hidden;
    background-color: var(--bg-black);
    color: white;
    font-family: 'Poppins', sans-serif; /* Applied once here */
}

section {
    border-top: 1px solid var(--main-color);
}

ul {
    list-style: none; /* Applied globally to all lists */
    padding: 0;
}

/* ============================================================
    HEADER & NAVIGATION
    ============================================================ */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 3%;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -40px;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
    pointer-events: none;
}

/* --- Logo --- */
.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.7rem;
    font-weight: 400;
    color: white;
    transition: 0.2s ease;
}

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

.logo:hover {
    transform: scale(1.03);
    text-shadow: 0 0 15px var(--main-color);
}

/* --- Nav Links --- */
nav a {
    font-size: 1.8rem;
    color: var(--main-color);
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.2s ease;
}

nav a:hover {
    border-bottom: 3px solid var(--main-color);
}

/* ============================================================
    HOME SECTION
    ============================================================ */
.home {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-content h2 {
    font-size: 6rem;
    font-weight: 700;
}

.home-content h3 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

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

.home-content p {
    font-size: 1.6rem;
    margin-right: 5rem;
}

/* --- Home Image --- */
.home-img-mobile { display: none; }

.home-img {
    cursor: pointer;
    margin-right: 10rem;
    border-right: 1px solid var(--main-color);
}

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

.social-icons a:hover {
    color: black;
    transform: scale(1.3) translateY(-5px);
    background-color: var(--main-color);
    box-shadow: 0 0 15px var(--main-color);
}

/* --- btn --- */
.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: black;
    border-radius: 4rem;
    font-size: 1.6rem;
    color: var(--main-color);
    letter-spacing: 0.2rem;
    font-weight: 600;
    border: 2px solid var(--main-color);
    transition: 0.2s ease;
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.03);
    background-color: var(--main-color);
    color: black;
    box-shadow: 0 0 15px var(--main-color);
}

/* ============================================================
    ABOUT SECTION
    ============================================================ */
.about {
    min-height: 100%;
    padding: 7rem 5%;
}

.about h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.about h2 {
    font-size: 2.5rem;
    margin: 3rem 0 1.5rem;
    color: var(--main-color);
}

.about-me p {
    font-size: 1.6rem;
}

/* --- Skills Cards --- */
.skills-cards {
    margin-top: 4rem;
}

.skills-group {
    margin-bottom: 3rem;
}

.skills-group h3 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--main-color);
    margin-bottom: 1.5rem;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background-color: var(--bg-dark);
    border: 1px solid var(--main-color);
    border-radius: 0.8rem;
    padding: 0.8rem 1.4rem;
    color: white;
    font-size: 1.5rem;
    transition: 0.2s ease;
    cursor: default;
}

.badge:hover {
    transform: scale(1.03);
    color: black;
    background-color: var(--main-color);
    box-shadow: 0 0 10px var(--main-color);
}

.badge img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.badge img.invert {
    filter: invert(1);
}

/* --- Skills, Exploring Lists --- */
.skills li, .exploring li {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.skills li::before, .exploring li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--main-color);
}

/* ============================================================
    PROJECTS SECTION
    ============================================================ */
.projects {
    min-height: 100%;
    padding: 7rem 5%;
}

.projects h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
    color: white;
}

/* --- Project Card --- */
.project-card {
    background-color: var(--bg-dark);
    border: 1px solid var(--main-color);
    border-radius: 1.5rem;
    padding: 3rem;
    width: 100%;
    transition: 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.projects-row {
    display: flex;
    gap: 2rem;
    margin-top: 4rem;
}

.project-card.half {
    width: 50%;
}

.project-card .btn {
    margin-top: 2rem;
    align-self: flex-start;
}

.project-card:hover {
    box-shadow: 0 0 15px var(--main-color);
}

.project-card-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.project-card-header i {
    font-size: 3rem;
    color: var(--main-color);
}

.project-card h2 {
    font-size: 2.2rem;
    font-weight: 600;
    color: white;
}

.project-card p {
    font-size: 1.6rem;
    color: #aaa;
    line-height: 1.8;
    flex-grow: 1;
}

/* ============================================================
    CONTACT SECTION
    ============================================================ */
.contact {
    padding: 10rem;
    text-align: center;
}

.contact h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.contact p {
    font-size: 1.6rem;
    color: #aaa;
    margin-bottom: 3rem;
}

.contact .social-icons {
    margin-top: 1rem;
}

/* ============================================================
    FOOTER
    ============================================================ */
.footer {
    text-align: center;
    padding: 3rem 0;
    font-size: 1.4rem;
    background-color: var(--bg-dark);
    color: #aaa;
}

/* ============================================================
    MEDIA QUERIES
    ============================================================ */
@media (max-width: 1000px) {
    .home {
        gap: 4rem;
    }
}

@media (max-width: 995px) {
    header::after {
        display: none;
    }

    nav {
        position: absolute;
        display: none;
        top: 0;
        right: 0;
        width: 40%;
        border-left: 3px solid var(--main-color);
        border-bottom: 3px solid var(--main-color);
        border-bottom-left-radius: 2rem;
        padding: 1rem;
        background-color: #161616;
    }

    nav a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }

    nav a:hover {
        padding: 1rem;
        border-radius: 0.5rem;
        border-bottom: 0.5rem solid var(--main-color);
    }

    .home {
        min-height: auto;
        flex-direction: column;
        padding: 7rem 5%;
    }

    .home-img { display: none; }

    .home-img-mobile{
        padding-top: 2rem;
        display: inline-block;
        transition: 0.2s ease;
        cursor: pointer;
    }

    .home-img-mobile:hover{
        transform: translateY(-5px);
    }

    .home-img-mobile img{
        width: 60vw;
        border-radius: 50%;
        box-shadow: 0 0 20px #5E7ACF;
        transition: 0.2s ease;
    }

    .home-img-mobile:hover img{
        transform: scale(1.05);
        box-shadow: 0 0 20px #5E7ACF,
                    0 0 30px #5E7ACF;
    }

    .home-content h2 { font-size: 4rem; }
    .home-content h3 { font-size: 2rem; }
    .home-content p { font-size: 1.4rem; }

    .btn { letter-spacing: 0.1rem; }

    .projects-row { flex-direction: column; }
    .project-card.half { width: 100%; }

    .contact { padding: 7rem 4rem; }
    .contact .social-icons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
}
