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

* {
    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: 1800px;
    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;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #bcbcbc;
    background-color: #ffffff;
    transition: transform 0.4s ease;
}

nav.hide {
  transform: translateY(-100%);
}

nav .left a {
    color: var(--text-color);
    font-size: 22px;
    font-weight: 600;
}
nav .right a {
    color: var(--text-color);
    margin: 0 10px;
}

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

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 .intro {
    flex: 5;
}

.hero-section .intro h2 {
    font-size: 45px;
}

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

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

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

.hero-section .intro .text p {
    margin-left: 0;
    margin-bottom: 10px;
}

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

.hero-section .headshot img {
    width: 350px; 
    border-radius: 50%;
}

/* 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: 40px;
}

.skills-section .cells {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
}

.skills-section .skill-cell {
    width: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px 20px;
    background-color: #fff;
    border: 1px solid #d3d3d3;
    border-radius: 10px;
    color: var(--text-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.skills-section .skill-cell:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.skills-section .skill-cell img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.skills-section .cells span {
    font-size: 20px;
    color: var(--text-color);
    white-space: nowrap;
}

.skills-section .cells img {
    width: 75px;
    object-fit: contain;
}

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

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

.projects-section .projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.projects-section .project-card {
    background-color: #fff;
    border: 1.5px solid #d3d3d3;
    border-radius: 10px;
    width: 350px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.projects-section .project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.projects-section .project-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 6px;
    margin-bottom: 15px;
}

.projects-section .project-card h3 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.projects-section .project-card p {
    color: #555;
    font-size: 15px;
    margin-bottom: 15px;
}

.projects-section .project-card .buttons a {
    display: inline-block;
    color: var(--background-color);
    background-color: var(--link-color);
    padding: 8px 16px;
    border: 2px solid var(--link-color);
    font-size: 14px;
    transition: 0.3s;
    border-radius: 5px;
}

.projects-section .project-card .buttons a:hover {
    background-color: #fff;
    border: 2px solid var(--text-color);
    color: var(--text-color);
}

/* 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 {
    margin-top: 20px;
    flex: 3;
}

.contact-section .texts {
    flex: 3;
}

.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);
    border-radius: 5px;
    background-color: #fff;
    padding: 10px;
    margin-bottom: 15px;
    resize: none;
}

.contact-section .group form button {
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    color: var(--background-color);
    background-color: var(--link-color);
    border: 2px solid var(--link-color);
    height: 50px;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 5px;
    margin-bottom: 10px;
}

.contact-section .group form button:hover {
    background-color: #fff;
    border: 2px solid var(--text-color);
    color: var(--text-color);
}

.contact-section .form-popup {
    position: fixed;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--link-color);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 18px;
    transition: bottom 0.75s ease-in-out;
    z-index: 9999;
}

.contact-section .form-popup.show {
    bottom: 32px;
}


/* SMALLER SCREEN DEVICES */
@media (max-width: 840px) {
    /* NAVBAR */
    nav {
        padding: 0 20px;
    }

    nav .left a {
        font-size: 18px;
    }

    nav .right a {
        font-size: 18px;
    }

    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 {
        flex-direction: column-reverse;
        padding: 0 20px;
    }

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

    .hero-section .intro h2 {
        display: flex;
        align-items: center;
        font-size: 36px;
    }

    .hero-section .intro .links {
        display: flex;
        flex-direction: column;
        text-align: center;
        align-items: center;
        margin-left: 10px;
        font-size: 22px;
        gap: 10px;
    }
    
    .hero-section .intro .links a {
        width: 300px;
    }

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

    .skills-section .skill-cell {
        width: 260px;
    }

    .skills-section .cells img {
        width: 80px;
        height: auto;
    }

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

    /* SECTION 3: PROJECTS */
    .contact-section {
        padding: 0 20px;
    }

    .projects-section .project-card h3 {
        font-size: 28px;
    }

    .projects-section .projects-grid .buttons a {
        font-size: 16px;
    }

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

    .contact-section {
        padding: 0 20px;
    }

    .contact-section .form-popup {
        bottom: -100px;
        font-size: 16px;
        width: 375px;
    }
}
