:root {
    --text-color: #1a1c20;
    --link-color: #4a76ee;
    --background-color: #eeeff1;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    max-width: fit-content;
    margin: 0 auto;
}

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

/* NAVBAR */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    height: 80px;
    background-color: var(--background-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 9999999;
}

nav .left a {
    color: var(--text-color);
    font-size: 22px;
    font-weight: 600;
    transition: color 0.2s ease-in-out;
}

nav .left a:hover {
    color: var(--link-color);
}

nav .right a {
    color: var(--text-color);
    margin: 0 10px;
    transition: color 0.2s ease-in-out, font-size 0.2s ease-in-out;
}

nav .right a:hover {
    color: var(--link-color);
    font-size: large;
}

nav .right a:last-child {
    color: var(--background-color);
    background-color: var(--text-color);
    padding: 5px 15px;
    border-radius: 5px;
}

nav .right a:last-child:hover {
    background-color: var(--link-color);
    transition: background-color 0.2s ease-in-out;
}

nav .right a span{
    margin-left: 5px;
}

/* SECTION 1: Hero */
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    margin: 50px 0;
    margin-bottom: 100px;
    gap: 40px;
}

.hero-section .text {
    flex: 5;
}

.hero-section .text h2 {
    font-size: 45px;
    color: var(--text-color);
}

.hero-section .text .links {
    margin-top: 25px;
}

.hero-section .text .links a {
    display: inline-block;
    padding: 5px 10px;
    border: 2px solid var(--link-color);
    border-radius: 25px;
    margin-right: 10px;;
    margin-bottom: 10px;
    transition: .1s;
}

.hero-section .text .links a:hover {
    color: var(--text-color);
    border: 2px solid var(--text-color);
}

.hero-section .headshot {
    flex: 2;
    display: flex;
    justify-content: right;
}

.hero-section .headshot img {
    border-radius: 50%;
    width: 300px;   
    transition: .25s ease-in-out;
}

.hero-section .headshot img:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* SECTION 2: Skills */
.skills-section {
    padding: 0 50px;
    margin-bottom: 100px;
}

.skills-section h2 {
    text-align: center;
    font-size: 35px;
}

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

.skills-section .cells {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.skills-section .cells .cell {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;

    width: 200px;
    padding: 10px 20px;
    border: 1.5px solid #d3d3d3;
    border-radius: 5px;
    margin: 10px;
}

.skills-section .cells .cell span {
    font-size: 18px;
}

.skills-section .cells .cell img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 2px;
}

/* SECTION 3: Projects */
.projects-section {
    padding: 0 50px;
    margin-bottom: 100px;
}

.projects-section h2 {
    text-align: center;
    font-size: 35px;
    margin-bottom: 30px;
}

.projects-section .group {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
    justify-content: start;
    overflow-x: auto;
    max-width: 100%;
    width: 100%;
}

.projects-section .group .project {
    padding: 20px;
    border: 1.5px solid hsl(0, 0%, 83%);
    border-radius: 5px;
    margin: 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 500px;
    align-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.projects-section .group .project:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.projects-section .group .project img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 2px;
}

.projects-section .group .project span {
    font-size: 18px;
    font-weight: 400;

}

/* SECTION 4: Contact */
.contact-section {
    padding: 0 50px;
    margin-bottom: 100px;
}

.contact-section h2 {
    font-size: 35px;
}

.contact-section .group {
    display: flex;
    gap: 50px;
}

.contact-section .group .text {
    flex: 3;
    margin-top: 20px;
}

.contact-section .group form {
    flex: 3;
    display: flex;
    flex-direction: column;
}

.contact-section .group form input, 
.contact-section .group form textarea {
    font-family: 'Poppins', sans-serif;
    border: 2px solid var(--link-color);
    background-color: transparent;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    outline: none;
    resize: none;
}

.contact-section .group form button {
    font-size: 16px;
    background-color: var(--link-color);
    color: #ffff;
    border: none;
    height: 50px;
    cursor: pointer;
    transition: .1s;
    border-radius: 5px;
}

.contact-section .group form button:hover {
    filter: brightness(1.1);
}

@media(max-width: 850px) {
    /* SECTION 1: Hero */
    .hero-section .text h2 {
        font-size: 35px;
    }
}

@media(max-width: 740px) {
    /* SECTION 1: Hero */
    .hero-section {
        flex-direction: column-reverse;
    }

    .hero-section .headshot img {
        width: 300px;
    }

    /* SECTION 4: Contact */
    .contact-section .group {
        flex-direction: column;
    }
}

/* mobile friendly */
@media (max-width: 600px) {
    /* NAVBAR */
    nav {
        padding: 0 20px;
    }
    
    nav .right a {
        font-size: 22px;
    }

    nav .right a:last-child {
        color: var(--text-color);
        background-color: transparent;
        padding: 0;
    }

    nav .right a span {
        display: none;
    }

    /* SECTION 1: Hero */
    .hero-section {
        padding: 0 20px;
    }

    .hero-section .text h2 {
        font-size: 30px;
    }

    /* SECTION 2: Skills */
    .skills-section {
        padding: 0 20px;
    }

    .skills-section .cells .cell span {
        font-size: 16px;
    }

    /* SECTION 3: Projects */
    .projects-section {
        padding: 0 20px;
    }

    /* SECTION 4: Contact */
    .contact-section {
        padding: 0 20px;
    }
}