: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);
}

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;
    background-color: var(--text-color);
    color: var(--background-color);
    border-radius: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: .1s;
}

.hero-section .text .links a:hover {
    background-color: var(--link-color);
    color: var(--background-color);
}

.hero-section .headshot {
    flex: 2;
    display: flex;
    justify-content: center;
    margin-left: -30px;
}

.hero-section .headshot img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 50%;
}

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

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

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

/* Skills boxes */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.skill-box {
    padding: 5px 15px;
    background-color: var(--text-color);
    color: var(--background-color);
    border-radius: 5px;
}

/* SECTION 3: 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(--text-color);
    background-color: transparent;
    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: .1s;
}

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

/* Consistent heading spacing */
.portfolio-section h2,
.contact-section h2 {
    margin-bottom: 20px;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* TABLET - 850px and below */
@media (max-width: 850px) {
    .hero-section .text h2 {
        font-size: 35px;
    }
}

/* SMALL TABLET - 740px and below */
@media (max-width: 740px) {
    /* Hero section stacks vertically */
    .hero-section {
        flex-direction: column-reverse;
    }

    .hero-section .headshot img {
        width: 300px;
        height: 300px;
    }
    
    /* Portfolio grid becomes single column */
    .portfolio-section .text > div[style*="grid"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Contact section stacks vertically */
    .contact-section .group {
        flex-direction: column;
        gap: 30px;
    }
}

/* MOBILE - 600px and below */
@media (max-width: 600px) {
    /* NAVBAR - Larger icons, hide text */
    nav {
        padding: 0 20px;
        height: 70px;
    }
    
    nav .left a {
        font-size: 18px;
    }

    nav .right a {
        font-size: 26px;
        margin: 0 12px;
    }

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

    nav .right a span {
        display: none;
    }

    /* HERO SECTION */
    .hero-section {
        padding: 0 20px;
        margin: 30px 0 60px 0;
    }

    .hero-section .text h2 {
        font-size: 34px;
        margin-bottom: 15px;
    }
    
    .hero-section .text p {
        font-size: 17px;
        line-height: 1.6;
    }
    
    /* Make hero buttons bigger and more touch-friendly */
    .hero-section .text .links a {
        padding: 12px 18px;
        font-size: 16px;
        margin-right: 8px;
        margin-bottom: 10px;
    }
    
    .hero-section .text .links a i {
        font-size: 18px;
        margin-right: 5px;
    }

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

    /* SKILLS SECTION */
    .portfolio-section {
        padding: 0 20px;
        margin-bottom: 60px;
    }
    
    .portfolio-section h2 {
        font-size: 30px;
        margin-bottom: 20px;
    }
    
    /* Bigger skill boxes for mobile */
    .skill-box {
        padding: 10px 18px;
        font-size: 16px;
    }
    
    /* PORTFOLIO PROJECTS */
    .portfolio-section .text > div > div h3 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .portfolio-section .text > div > div h3 i {
        font-size: 18px;
    }
    
    .portfolio-section .text > div > div p {
        font-size: 16px;
        line-height: 1.6;
    }

    /* CONTACT SECTION */
    .contact-section {
        padding: 0 20px;
        margin-bottom: 60px;
    }
    
    .contact-section h2 {
        font-size: 30px;
        margin-bottom: 20px;
    }
    
    .contact-section .group .text {
        font-size: 16px;
        line-height: 1.7;
        margin-top: 0;
    }
    
    .contact-section .group form label {
        font-size: 16px;
        margin-bottom: 8px;
        display: block;
    }
    
    /* Bigger input fields for easier typing */
    .contact-section .group form input,
    .contact-section .group form textarea {
        font-size: 16px;
        padding: 14px;
        border-radius: 5px;
    }
    
    .contact-section .group form button {
        font-size: 17px;
        height: 55px;
        border-radius: 5px;
        font-weight: 600;
    }
}

/* EXTRA SMALL MOBILE - 400px and below */
@media (max-width: 400px) {
    nav .left a {
        font-size: 16px;
    }
    
    nav .right a {
        font-size: 24px;
        margin: 0 8px;
    }
    
    .hero-section .text h2 {
        font-size: 28px;
    }
    
    .hero-section .text p {
        font-size: 15px;
    }
    
    .hero-section .headshot img {
        width: 220px;
        height: 220px;
    }
    
    .portfolio-section h2,
    .contact-section h2 {
        font-size: 26px;
    }
}