:root {
    --base: #1e1e2e;
    --mantle: #181825;
    --crust: #11111b;

    --text: #cdd6f4;
    --subtext: #a6adc8;

    --rosewater: #f5e0dc;
    --mauve: #cba6f7;
    --blue: #89b4fa;
    --soft-blue: #bdd8fc;
    --green: #a6e3a1;
    --yellow: #f9e2af;
    --red: #f38ba8;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:not([class^="fa"]) {
    font-family: "SN Pro", sans-serif;
}

html {
    font-size: 16px;
}

body {
    background-color: var(--base);
    color: var(--text);
    overflow-y: scroll;
}

nav {
    height: 64px;
    background: var(--mantle);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 0 3rem;
    color: var(--text);
    position: fixed;
    z-index: 100;
    width: 100%;
}

.hamburger {
    display: none;
    /* Hidden on desktop */
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
    /* Above the menu */
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text);
    transition: 0.3s;
    border-radius: 3px;
}

.main-content>section {
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo p {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--blue);
}

.menu ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.menu li a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    position: relative;
    padding: 0.2rem 0;
}

.menu li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0%;
    background-color: var(--blue);
    transition: width 0.3s ease;
}

nav .menu li a:hover {
    color: var(--blue);
}

nav .menu li a:hover::after {
    width: 100%;
}

.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100vh;
    position: relative;
    overflow: hidden;
    gap: 20px;
}

.moon {
    position: absolute;
    width: 120px;
    height: 120px;
    background-color: var(--rosewater);
    top: 10%;
    left: 10%;
    border-radius: 50%;
    box-shadow:
        0 0 20px rgba(245, 224, 220, 0.6),
        inset -15px -15px 0 rgba(0, 0, 0, 0.08);
}

.hero h1 {
    margin-top: 12rem;
    font-size: 5rem;
    color: var(--subtext);
    max-width: 600px;
}

.role {
    font-size: 1.1rem;
    text-align: center;

}

.buttons {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-top: 50px;
}

.projects {
    background-color: var(--blue);
    color: var(--base);
    border-radius: 10px;
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--blue);
}

.projects:hover {
    background-color: var(--soft-blue);
    border: 2px solid var(--soft-blue);
}

.projects:active {
    transform: scale(0.97);
}

.contact {
    background-color: transparent;
    color: var(--blue);
    border: 2px solid var(--blue);
    border-radius: 10px;
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.contact:hover {
    background-color: var(--blue);
    color: var(--base);
}

.contact:active {
    transform: scale(0.97);
}

.socials {
    margin-top: 20px;
    display: flex;
    flex-direction: row;
    font-size: 1.5rem;
    gap: 20px;
}

.socials a {
    display: flex;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    background-color: var(--mantle);
    color: var(--blue);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.socials a:hover {
    transform: translateY(-3px) scale(1.05);
    color: var(--soft-blue);
}

.about {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--crust);
    padding: 10rem 0;
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5rem;
    flex-wrap: wrap;
    width: 90%;
    max-width: 1130px;
}

.about-text {
    max-width: 600px;
}

.about-text h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 1rem;
}

.about-text p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--subtext);
    margin-bottom: 1rem;
    letter-spacing: 0.01rem;
    text-align: justify;

}

.about-text strong {
    color: var(--text);
    font-weight: 600;
}

.about-image {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 400px;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.skills {
    display: flex;
    flex-direction: center;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    padding: 6rem 8vw;
}

.skills h2 {
    font-size: 2.5rem;
    color: var(--subtext);
    text-align: center;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    justify-items: center;
    width: 100%;
    max-width: 1610px
}

.skill-card {
    background-color: var(--mantle);
    border: 1px solid var(--mantle);
    border-radius: 10px;
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-height: 300px;
}

.skill-card h3 {
    font-size: 1.3rem;
    color: var(--blue);
    margin-bottom: 0.8rem;
    text-align: center;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
    justify-content: center;
}

.tech {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text);
    background-color: var(--base);
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
}

.tech i {
    font-size: 1.2rem;
    color: var(--subtext);
}

.projects-section {
    padding: 6rem 8vw;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    background-color: var(--crust);
}

.projects-section h2 {
    font-size: 2.5rem;
    color: var(--subtext);
    margin-bottom: 2rem;
    width: 100%;
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(470px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--mantle);
    border: 1px solid var(--crust);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 500px;
    min-height: 600px;
}

.project-card h3 {
    color: var(--blue);
    font-size: 1.3rem;
}

.project-card p {
    color: var(--subtext);
    font-size: 0.95rem;
    line-height: 1.5;
}

.project-card img {
    width: auto;
    border-radius: 8px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.tech-label {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.3rem 0.7rem;
    border-radius: 10px;
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.05);
}

.project-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: auto;
    gap: 1rem;
    margin-top: auto;
}

.project-store {
    color: var(--blue);
    text-decoration: none;
    margin-top: auto;
    align-self: flex-start;
    background-color: transparent;
    padding: 0.5rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid var(--blue);

}

.project-store:hover {
    background-color: var(--blue);
    color: var(--base);
}

.project-store:active {
    transform: scale(0.97);
}

.project-link {
    margin-top: auto;
    text-decoration: none;
    align-self: flex-start;
    background-color: var(--blue);
    color: var(--base);
    padding: 0.5rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-link:hover {
    background-color: var(--soft-blue);
}

.project-link:active {
    transform: scale(0.97);
}

.contact-section {
    min-height: 100vh;
    padding: 6rem 8vw;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.contact-section h2 {
    font-size: 2.5rem;
    color: var(--subtext);
    text-align: center;
    margin-bottom: 2rem;
}

.contact-container {
    background-color: var(--mantle);
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 2rem;
    border-radius: 10px;
    max-width: 1130px;
    width: 100%;
}

.contact-form {
    background-color: var(--mantle);
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    border-radius: 10px;
}

.contact-form input,
.contact-form textarea {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    border: 1px solid transparent;
    background-color: var(--base);
    color: var(--text);
    font-size: 1rem;
    resize: none;
    transition: all 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--blue);
}

.contact-submit {
    background-color: var(--blue);
    color: var(--base);
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-submit:hover {
    background-color: var(--soft-blue);
}

.contact-submit:active {
    transform: scale(0.99);
}

.contact-info {
    flex: 1 1 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;

}

.contact-info h3 {
    font-size: 1.5rem;
    color: var(--blue);
    text-align: center;
}

.contact-info p {
    color: var(--subtext);
    text-align: center;
}

.contact-info .socials {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.contact-info .socials a {
    display: flex;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.contact-info .socials a:hover {
    transform: translateY(-3px) scale(1.05);
    color: var(--soft-blue);
}

.field-trap {
    display: none;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: var(--rosewater);
    border-radius: 50%;
    will-change: transform, opacity;
    animation: drift linear infinite;
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translate(100px, 100px);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    nav {
        justify-content: space-between;
        padding: 0 1rem;
    }

    .hamburger {
        display: flex;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }

    .menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--mantle);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease-in-out;
        z-index: 1000;
    }

    .menu.active {
        right: 0;
    }

    .menu ul {
        flex-direction: column;
        /* Stack links vertically */
        gap: 2rem;
        text-align: center;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}