:root {
    --text-color: #fffafb;
    --link-color: #f16600;
    --background-color: #2a2b2e;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    max-width: 1400px;
    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;
}

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 15px;
    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 .text {
    flex: 5;
}

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

.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: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: 0.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 {
    width: 300px;
    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: 20px;
}

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

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

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

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

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

/* SECTION 3: Experience */

/* Basic styling for the section and its heading */
.experience-section {
    padding: 2rem;
    font-family: sans-serif;
}

.experience-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

/* Flexbox container for the horizontal alignment */
.experience-container {
    display: flex; /* Enables flexbox layout */
    flex-wrap: wrap; /* Allows cards to wrap to the next line on smaller screens */
    justify-content: space-evenly; /* Distributes space evenly between and around items */
    gap: 20px; /* Provides consistent spacing between cards */
}

/* Styling for each individual experience card */
.experience-card {
    flex: 1 1 300px; /* Shorthand for flex-grow, flex-shrink, flex-basis.
                      Allows cards to grow, shrink, and have a base width of 300px. */
    background-color: #2a2b2e;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    min-width: 250px; /* Minimum width to prevent cards from becoming too narrow */
}

/* Text styling for the card content */
.experience-card h3 {
    color: #f16600;
    margin-bottom: 0.5rem;
}

.experience-card .company {
    font-style: italic;
    color: #fffafb;
    margin-bottom: 0.25rem;
}

.experience-card .date {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 1rem;
}

.experience-card ul {
    list-style-type: disc;
    margin-left: 1.25rem;
}

.experience-card li {
    margin-bottom: 0.5rem;
}

.experience-section {
    padding: 0 50px;
    margin-bottom: 100px;
}

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

.experience-section .group {
    align-items: center;
    display: flex;
    gap: 50px;
}

.experience-section .group .person-details {
    text-align: center;
    flex: 2;
}

.experience-section .group .person-details img {
    width: 200px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 10px;
}

.experience-section .group .person-details p {
    font-weight: 600;
}

.experience-section .group .person-details p:last-child {
    font-weight: normal;
}

.experience-section .group .text {
    flex: 8;
}

/* 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: #fffafb;
    padding: 10px;
    margin-bottom: 15px;
    outline: none;
    resize: none;
}

.contact-section .group form button {
    font-size: 16px;
    font-family: "Poppins", sans-serif;
    color: #fff;
    background-color: var(--link-color);
    border: none;
    height: 50px;
    cursor: pointer;
    transition: 0.1s;
}

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

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

.job-entry {
    margin-bottom: 15px;
}

.job-entry h3,
.education-entry h3 {
    margin-bottom: 5px;
    color: #fffafb;
}

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

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

    /* SECTION 3: Testimony */
    .experience-section {
        text-align: center;
    }

    .experience-section .group {
        flex-direction: column;
    }

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

@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: Testimony */
    .experience-section {
        padding: 0 20px;
    }

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

    /* Experience */
    #experience {
        padding: 50px 20px; /* Adjust padding as needed */
        background-color: #f9f9f9; /* Light background for the section */
        text-align: center; /* Center the heading */
    }

    #experience h2 {
        font-size: 2.5em;
        color: #333;
        margin-bottom: 40px;
    }

    .experience-item {
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        margin: 0 auto 30px auto; /* Center items and add spacing */
        padding: 30px;
        max-width: 800px; /* Limit width for readability */
        text-align: left; /* Align text within the item to the left */
    }

    .experience-item h3 {
        font-size: 1.8em;
        color: #007bff; /* Highlight job titles */
        margin-bottom: 10px;
    }

    .experience-item .company {
        font-weight: bold;
        color: #555;
        margin-bottom: 5px;
    }

    .experience-item .dates {
        font-style: italic;
        color: #777;
        margin-bottom: 15px;
    }

    .experience-item ul {
        list-style-type: disc; /* Bullet points for responsibilities */
        margin-left: 20px;
        color: #444;
    }

    .experience-item ul li {
        margin-bottom: 8px;
    }
}
