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

/* global styles */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

html {
    scroll-behavior: smooth;
}

article a {
    text-decoration: none;
}

.glbl-container {
    max-width: 60rem;
    margin: 0 auto;
}

/* header styles */

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: #fff;
}

nav {
    max-width: 87.5rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 3.75rem;
}

.logo {
    color: #333;
    font-size: 2rem;
    letter-spacing: 0.1em;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
}

.nav-links a {
    background: #ddd;
    color: #333;
    padding: 0.375rem 0.9375rem;
    border-radius: 1.5625rem;
    text-decoration: none;
}

/* about section styles */

.about {
    color: #333;
    padding: 6.25rem 2rem;
}

.about-full {
    max-width: 60rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
}

.about-txt h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.about-txt p {
    font-size: 1.1rem;
    max-width: 31.25rem;
    line-height: 1.8;
    color: #666;
}

.profile-img {
    width: 15.625rem;
    height: 15.625rem;
    border-radius: 50%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #999;
}

/* skils section styles */

#skills {
    padding: 6.25rem 2rem;
}

.skills-container {
    max-width: 60rem;
    margin: 0 auto;
}

.skills-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
}

.skills-text {
    flex: 1;
    max-width: 31.25rem; /* same as About */
    margin: 0 auto;
}

.skills-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.skills-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
}

.skills-icons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.9375rem;
}

.skill-icon {
    width: 5rem;
    height: 5rem;
    background: #ddd;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.5625rem;
}

/* projects section styles */

#projects {
    padding: 6.25rem 2rem;
    margin-top: 7.5rem;
}

.projects-container {
    max-width: 60rem;
    margin: 0 auto;
}

.projects-container h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.project-card {
    border-radius: 0.9375rem;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s ease;
}

.project-image {
    width: 100%;
    height: 12.5rem;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #999;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #333;
    text-align: center;
}

.project-detail {
    padding: 8.75rem 2rem 6.25rem;
    display: none;
}

.project-detail-container {
    max-width: 60rem;
    margin: 0 auto;
    text-align: center;
}

.project-detail-container h2 {
    font-size: 2.5rem;
    color: #333;
}

/* contact section styles */

#contact {
    padding: 6.25rem 2rem;
}

.contact-container {
    max-width: 60rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 4rem;
}

.contact-info {
    flex: 1;
    max-width: 31.25rem; 
    margin: 0 auto;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
    font-family: "inter-variable", sans-serif;
    font-variation-settings: "slnt" 0, "wght" 600;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: #333;
    font-family: "inter-variable", sans-serif;
    font-variation-settings: "slnt" 0, "wght" 500;
}

.contact-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    font-family: "inter-variable", sans-serif;
    font-variation-settings: "slnt" 0, "wght" 400;
}

.contact-form {
    flex: 1;
}

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

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.3125rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid darkgreen;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: linear-gradient(90deg, #E6F6FC 0%, #C5B1EF 100%);
    font-family: "inter-variable", sans-serif;
    font-variation-settings: "slnt" 0, "wght" 400;
}

.form-group textarea {
    min-height: 9.375rem;
    resize: vertical;
    background: linear-gradient(90deg, #E6F6FC 0%, #C5B1EF 100%);
    font-family: "inter-variable", sans-serif;
    font-variation-settings: "slnt" 0, "wght" 400;
}

label {
    padding-left: 0.4rem;
    font-family: "inter-variable", sans-serif;
    font-variation-settings: "slnt" 0, "wght" 400;
    color: darkgreen;
}

.submit-btn {
    background: #9999FF;
    color: #000;
    padding: 1rem 3rem;
    border: none;
    border-radius: 2rem;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    font-family: "bebas-neue", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 2rem;
}

.hideAll {
    display: none;
}

/* footer styles */

footer {
    color: #333;
    text-align: center;
    padding: 2rem;
}

/* responsive media query so that the site scales optimally for mobile devices */
@media (max-width: 40em) {
    /* nav section styling adjustments  */
    nav {
        flex-direction: column;
        height: auto;
        padding: 1.5rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
        padding-top: 1rem;
    }

    /* global flex adjusment for stated sections */
    .about-full,
    .skills-content,
    .contact-container {
        flex-direction: column;
        text-align: center;
    }

    .contact-container label {
        text-align: left;
    }

    /* skills section styling adjustments */
    .profile-img {
        margin-top: 2rem;
        width: 12rem;
        height: 12rem;
    }

    .skills-icons {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }

    /* project section styling adjustments */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        width: 100%;
    }

    /* contact styling adjustments */
    .contact-form form {
        max-width: 31.25rem; /* match contact text */
        margin: 0 auto;
        width: 100%;
    }

    label {
        padding-left: 0.4rem;
    }

    .skills-text,
    .contact-info {
        max-width: 31.25rem;
        margin: 0 auto;
        text-align: center;
    }

    /* global positioning adjustments */
    main {
        padding-top: 4rem; 
    }

    .about,
    #skills,
    #projects,
    #contact {
        padding: 4rem 1rem;
    }

    /* deals with the section scrolling margin offset so that the nav anchor scroll is aligned properly */
    section {
        scroll-margin-top: 10rem; 
    }

}

/* this media query targets tablets and small laptops only (uses min and max widths to target between 40.1em to 64em to target basic tablet sizes while keeping mobile unaffected.*/
@media (min-width: 40em) and (max-width: 64em) {
    /* nav styling adjusments */
    nav {
        flex-direction: column;
        align-items: center;
        padding: 1rem 1.5rem;
        height: auto;
        gap: 0.75rem;
    }

    .nav-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        padding-top: 0.5rem;
    }

    /* About section styling adjustments */
    .about-full {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .about-txt h1 {
        font-size: 2.25rem;
    }

    .about-txt p {
        font-size: 1rem;
        margin: 0 auto;
    }

    .profile-img {
        margin-top: 1rem;
        width: 14rem;
        height: 14rem;
    }

    /* skills section styling adjustments */
    .skills-content {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
    }

    .skills-text h2 {
        font-size: 2.25rem;
    }

    .skills-icons {
        grid-template-columns: repeat(4, 1fr);
    }

    /* project section styling adjustments */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        justify-items: center;
    }

    .projects-grid .project-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
        width: 50%; 
    }

    .project-card {
        width: 100%;
    }

    /* contact section styling adjustments */
    .contact-container {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    .contact-info h2 {
        font-size: 2.25rem;
    }

    .contact-form form {
        max-width: 31.25rem; /* match contact text */
        margin: 0 auto;
        width: 100%;
    }

    .skills-text,
    .contact-info {
        max-width: 31.25rem;
        margin: 0 auto;
        text-align: center;
    }

    label {
        text-align: left;
        padding-left: 0.4rem;
    }

    /* global positioning adjustments */
    main {
        padding-top: 4rem;
    }

    .about,
    #skills,
    #projects,
    #contact {
        padding: 5rem 2rem;
    }

    /* deals with the section scrolling margin offset so that the nav anchor scroll is aligned properly */
    section {
        scroll-margin-top: 5rem;
    }
}