* {
    padding: 0;
    margin: 0;
    display: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

    /* test every element */
    /* border: 1px solid red; */
}

:root {
    --primary-color: hsl(226, 87%, 33%);
    --secondary-color: hsl(226, 84%, 48%);
    --accent-color: hsl(226, 100%, 60%);
    --light-bg-color: hsla(0, 0%, 100%, 1);
    --light-text-color: hsl(0, 0%, 20%);
    --dark-bg-color: hsl(0, 0%, 20%);
    --dark-text-color: hsla(0, 0%, 100%, 0.89);
    --dark: hsla(0, 0%, 10%, 0.904);
    --light: hsl(0, 0%, 96%);
    --border-color: hsla(0, 0%, 0%, 0.082);
    --transparent-overlay: hsla(0, 0%, 0%, 0.199);
    --transparent-overlay-mobile-nav: rgba(0, 0, 0, 0.3);
    --success-green: hsl(120, 39%, 54%);
    --font-size: 16px;
}

body {
    font-size: var(--font-size);
    width: 100%;
    height: 100%;
}

html {
    scroll-behavior: smooth;
}

/*! Theme colors */
body.light {
    background-color: var(--light-bg-color);
    color: var(--light-text-color);
}

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

/*! End theme colors  */


.hidden{
    display: none;
}


li {
    list-style: none;
}

ul.nav-links li i{
    color: var(--secondary-color);
}

header {
    display: flex;
    position: fixed;
    width: 95.99%;
    top: 0;
    justify-content: space-between;
    padding: 20px 30px;
    border-bottom: 2px solid var(--border-color);
    background-color: var(--transparent-overlay);
    backdrop-filter: blur(3px);
    /* border: 1px solid blue; */
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
}

main{
    display: flex;
    flex-direction: column;
    gap: 50px;
    padding-top: 100px; /* to avoid content being hidden behind the header */
}


a {
    text-decoration: none;
    color: var(--accent-color);
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}


/* test Header */
/* header *{
    border: 1px solid greenyellow;
} */

header h1 {
    font-size: 2rem;
}


/*! Projects section. */
.projects-container{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: fit-content;
    background-color: var(--light-bg-color);
    padding: 20px;
}

.projects-container h2 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 20px;
    margin-bottom: 20px;
}
.projects {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
    color: var(--light-text-color);
}
.project {
    position: sticky;
    top: 5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--light-bg-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.project .top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 20px;
}

.project .top h3 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--secondary-color);
}

.project .top .time-line {
    font-size: 0.9rem;
}
.project .top h4 {
    font-size: 0.8rem;
    color: var(--secondary-color);
}


.project .tech {
    margin-top: 10px;
    width: 100%;
}



/*! project links */
.projects .project a {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.projects .project a:hover {
    background-color: var(--secondary-color);
}

.project .tech-stack li {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    color: var(--secondary-color);
    font-size: 1.02rem;
    font-weight: 500;
}


/*! Skills section */
section.skills{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    gap: 20px;
    background-color: var(--transparent-overlay);
}

.skills-list {
    max-width: 900px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 20px 0;
}

.education {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 20px 0;
}


footer {
    display: flex;
    flex-direction: column;
    background-color: var(--transparent-overlay);
    padding: 50px 50px 30px;
}

hr {
    width: 100%;
    border: 1px solid var(--border-color);
    margin: 0 0 12px;
}

footer p {
    display: flex;
    width: 100%;
    justify-content: center;
}

.footer-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 20px;
    gap: 24px;
}

.footer-main div.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer-nav .footer-links{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}


/* Mobile first design */

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .menu{
        display: flex;
    }

    /* Mobile nav bar active */

    /* test menu */

    /* .menu *{
        border: 1px solid red;
    } */

    .menu.active {
        display: none;
    }

    .menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        margin-right: 25px;
        cursor: pointer;
    }

    .menu span {
        width: 25px;
        border: 1px solid var(--primary-color);
    }

    .mobile-nav{
        display: none;
    }

    .mobile-nav.active {
        display: flex;
        justify-content: left;
        align-items: flex-start;
        position: absolute;
        top: 75px;
        right: 45px;
        width: 200px;
        height: 250px;
        padding-top: 30px;
        border: 1px solid var(--transparent-overlay);
        background-color: var(--light-bg-color);
        backdrop-filter: blur(3px);
        border-radius: 15px;
        -webkit-border-radius: 15px;
        -moz-border-radius: 15px;
        -ms-border-radius: 15px;
        -o-border-radius: 15px;
    }

    /* .nav-links * {
        border: 1px solid red;
    } */

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: left;
        justify-content: center;
        gap: 25px;
        width: 100%;
    }

    .nav-links .close{
        position: absolute;
        top: 6px;
        right: 15px;
        padding: 1px 5px;
        border-radius: 30%;
        -webkit-border-radius: 30%;
        -moz-border-radius: 30%;
        -ms-border-radius: 30%;
        -o-border-radius: 30%;
}

    .nav-links .close:hover{
        scale: 1.05;
        background-color: var(--border-color);
        /* text-decoration: underline; */
        border: none;
    }

    .nav-links li {
        margin-right: 15px;
        list-style: none;
        padding-left: 15px;
    }

    .nav-links li a {
        font-size: 1.25rem;
        color: var(--secondary-color);
        display: inline-block;
        text-decoration: none;
        border-bottom: 2px solid transparent;
    }

    .nav-links li a:hover {
        /* text-decoration: underline; */
        color: var(--secondary-color);
        border-color: var(--primary-color);
    }

    main {
        padding: 100px 0 0; /* to avoid content being hidden behind the header */
    }

    .hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;
        padding: 0 20px;
    }
    /* image blend mode for sharper image */

    .hero-image {
        width: 100%;
        display: flex;
        justify-content: center;
        border-bottom: 2px solid var(--border-color);
        padding-bottom: 25px;
    }
    .hero-image img {
        width: 250px;
        height: 250px;
        object-fit: cover;
    }
    .hero-text {
        text-align: left;
        letter-spacing: 0.03rem;
        width: 100%;
        padding: 0 20px;
    }
    .hero-text h1 {
        font-size: 2rem;
    }
    .hero-text h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
        color: var(--secondary-color);
    }
    .hero-text p {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    .hero-text .contact-button, .contact-button {
        display: inline-block;
        padding: 10px 20px;
        background-color: var(--primary-color);
        color: white;
        text-decoration: none;
        border-radius: 5px;
        transition: background-color 0.3s ease;
    }
    .hero-text .contact-button:hover {
        background-color: var(--secondary-color);
    }


    /* projects section. */

    .projects .project h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    .projects .project p {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 15px;
    }

    .project .top {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        margin-top: 10px;
        margin-bottom: 20px;
    }

    .project .top h3 {
        font-size: 1.2rem;
        margin: 0;
        color: var(--secondary-color);
    }

    .project .top .time-line {
        font-size: 0.9rem;
    }
    .project .top h4 {
        font-size: 0.8rem;
        color: var(--secondary-color);
    }

    .project .tech {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-top: 10px;
    }

    .project .tech-stack-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
    .project .tech-stack-container h4 {
        font-size: 1rem;
        color: var(--secondary-color);
    }
    .project .tech-stack {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
    /* .project .tech-stack li {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 40px;
        color: var(--secondary-color);
        font-size: 1.2rem;
        font-weight: 500;
    } */
    /* .project .tech-stack li img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    } */
    .project .links {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-top: 10px;
    }
    .project .links ul {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
}



/* Desktop first design */
@media (min-width: 769px) {

    .menu {
        display: none;
    }

    .mobile-nav {
        display: none;
    }

    /* test desktop nav */
    /* .desktop-nav *{
        display: flex;
        border: 1px solid red;
    } */

    .desktop-nav {
        display: flex;
    }

    .nav-links {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
    }

    .nav-links li {
        list-style: none;
    }

    .nav-links li a {
        font-size: 1.2rem;
        color: var(--secondary-color);
        text-decoration: none;
        border-bottom: 2px solid transparent;
    }

    .nav-links li a:hover {
        /* text-decoration: underline; */
        color: var(--secondary-color);
        border-color: var(--secondary-color);
    }

    main {
        padding: 130px 0 0;
    }

    .hero{
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 50px;
        padding: 0 50px;
    }

    .hero-image {
        width: 50%;
        display: flex;
        justify-content: center;
    }

    .hero-image img {
        width: 450px;
        height: 450px;
        object-fit: cover;
    }

    .hero-text {
        text-align: left;
        letter-spacing: 0.03rem;
        width: 50%;
        padding: 0 20px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
        /* margin-bottom: 10px; */
    }

    .hero-text h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
        color: var(--secondary-color);
    }

    .hero-text p {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 20px;
    }

    .hero-text .contact-button {
        display: inline-block;
        padding: 12px 24px;
        background-color: var(--primary-color);
        color: white;
        text-decoration: none;
        border-radius: 5px;
        transition: background-color 0.3s ease;
    }
    .hero-text .contact-button:hover {
        background-color: var(--secondary-color);
    }

    /* projects section */
    .project .tech{
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-top: 20px;
    }

    .project .tech-stack-container{
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: center;
        gap: 10px;
    }

    .project .tech-stack-container h4 {
        font-size: 1.05rem;
        color: var(--secondary-color);
    }

    .project .tech-stack {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .project .tech-stack li {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 40px;
    }
    /* .project .tech-stack li img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    } */
    .tech .links ul{
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-top: 10px;
    }


    /*! footer styling */
    .footer-main {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .footer-main div.brand {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }

    .footer-nav .footer-links{
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
}





/* ! Contact Page */
.contact-form-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 50px;
    padding: 0 20px;
    margin: 0 0 50px;
}

.title {
    text-align: center;
    margin-bottom: 20px;
}

.title h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.title p {
    font-size: 1rem;
}

.contact-details{
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-evenly;
    gap: 50px;
    margin-bottom: 20px;
}

/* socials and final comments */

.socials{
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    background-color: var(--secondary-color);
    padding: 50px 15px;
    border-radius: 15px;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    -ms-border-radius: 15px;
    -o-border-radius: 15px;
}

.final-comment{
    display: flex;
    flex-direction: column;
    font-size: 1.05rem;
    gap: 0.6rem;
    line-height: 1.5;
}

.final-comment h3 {
    font-size: 1.35rem;
    color: var(--dark);
    /* margin-bottom: 10px; */
}

.final-comment p{
    font-weight: 500;
    color: var(--light);
}

.social-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: scale 0.1 ease-in-out;
    -webkit-transition: scale 0.1 ease-in-out;
    -moz-transition: scale 0.1 ease-in-out;
    -ms-transition: scale 0.1 ease-in-out;
    -o-transition: scale 0.1 ease-in-out;
}
.social-icon:hover {
    scale: 1.08;
}

/* form section */

.form-section{
    background-color: var(--transparent-overlay);
    /* color: var(--accent-color); */
    border-radius: 15px;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    -ms-border-radius: 15px;
    -o-border-radius: 15px;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

/*Todo: (remove styling for test below) visual on elements. */
/* form *{
        border: 1px solid limegreen;
} */

/* Todo: end test */

form .form-header{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-header h3{
    font-size: 1.3rem;
    color: var(--accent-color);
}

.form-header p {
    font-size: 1.08rem;
    font-weight: 500;
}

form .form-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

.input-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-group .name {
    display: flex;
    flex-direction: column;
    /* width: 100%; */
}

form label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 5px;
}


form input, form textarea {
    padding: 10px;
    border: 1px solid var(--transparent-overlay);
    border-radius: 5px;
    font-size: 1rem;
}

form textarea {
    min-height: 90px;
    max-height: 200px;
    min-width: 421px;
    max-width: 422px;
}

form input:focus, form textarea:focus{
    border-color: var(--secondary-color);
    outline: 2px solid var(--accent-color);
}


form button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: var(--secondary-color);
}

.submit-btn.loading {
    cursor: not-allowed;
    opacity: 0.6;
}


.success{
    height: 652px;
}

.success .success-message{
    font-size: 1.2rem;
    color: var(--success-green);
}


/* Contact page responsive design. */

/* Mobile first design */
@media (max-width: 769px) {

    .form-section{
        padding: 5%;
    }

    form textarea {
        min-height: 90px;
        max-height: 200px;
        min-width: 200px;
        max-width: 400px;
    }

    .contact-form-container{
        gap: 30px;
    }

    .form-group {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 15px;
        width: 100%;
    }

    .form-group .name{
        width: 100%;
    }
}



/* Desktop first design */
@media (min-width: 769px) {
    .contact-details{
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 50px;
    }


    .form-section{
        padding: 25px 50px;
    }
}



