@font-face {
    font-family: 'bricolage-grotesque';
    src: url('fonts/bricolage-grotesque.ttf') format('truetype');
}

@font-face {
    font-family: 'murecho';
    src: url('fonts/murecho.ttf') format('truetype');
}

:root {
    --sand-light: #F5EDDD;
    --sand-dark: #AE9372;
    --clay-light: #B27D57;
    --clay-dark: #7F4B30;
    --sage-light: #7D8769;
    --sage-med: #424C21;
    --sage-dark: #213920;
    --blue-light: #596D89;
    --blue-dark: #212E40;
}

html, body {
    background-color: var(--sand-light);
    color: var(--blue-dark);
    margin: 0;
    height: 100%;
    text-wrap: pretty;
}

* {
    box-sizing: border-box;
}

main {
    min-height: 90%;
}

img {
    max-width: 100%;
}

/* ===== header & nav ===== */
header {
    background-color: var(--sand-light);
    color: var(--blue-dark);
    width: 100%;
    box-shadow: 0px 6px 6px rgb(0, 0, 0, 0.2);
}

header a:link,
header a:visited {
    color: var(--blue-dark);
}

.top-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background-color: var(--sand-light);
    height: 85px;
    padding: 1em;
}

.top-nav img {
    max-height: 50px;
}

.menu {
    display: flex;
    flex-direction: row;
    list-style-type: none;
    font-family: 'bricolage-grotesque';
    font-size: 1.3rem;
    text-align: center;
    margin: 0;
    padding: 0;
}

.menu > li {
    margin: 0 1rem;
    overflow: hidden;
}

.menu-button-container {
    display: none;
    height: 100%;
    width: 50px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#menu-toggle {
    display: none;
}

.menu-button,
.menu-button::before,
.menu-button::after {
    display: block;
    background-color: var(--blue-dark);
    position: absolute;
    height: 8px;
    width: 55px;
    transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 10px;
}

.menu-button::before {
    content: '';
    margin-top: -18px;
}

.menu-button::after {
    content: '';
    margin-top: 18px;
}

#menu-toggle:checked + .menu-button-container .menu-button::before {
    margin-top: 0px;
    transform: rotate(405deg);
}

#menu-toggle:checked + .menu-button-container .menu-button {
    background: rgba(255, 255, 255, 0);
}

#menu-toggle:checked + .menu-button-container .menu-button::after {
    margin-top: 0px;
    transform: rotate(-405deg);
}

/* ===== typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'bricolage-grotesque', serif;
}

h1 {
    font-size: 4rem;
    margin: 1.5rem 0;
    text-decoration: underline var(--sage-med);
    text-underline-offset: .3rem;
}

h2 {
    font-size: 3rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.4rem;
}

p, ul {
    font-family: 'murecho', sans-serif;
    font-weight: 275;
}

p, li, a {
    font-size: 1.25rem;
    line-height: 1.7rem;
    letter-spacing: 0.04rem;
}

ul {
    padding-left: 20px;
}

p a:link {
    color: var(--sage-dark);
}

p a:visited {
    color: var(--sage-med);
}

/* ===== shared image styles ===== */
.about-me-pic img,
.portfolio-pic img,
.dlw-pic img {
    display: block;
    margin: 0 auto;
    border-radius: 1rem;
    border: .2rem solid var(--sage-med);
    box-shadow: 0px 6px 6px rgb(0, 0, 0, 0.2);
}

/* ===== footer ===== */
footer {
    padding: .5rem;
    text-align: center;
    background-color: var(--sand-light);
    color: var(--blue-dark);
}

footer h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 450;
}

footer p {
    margin: 0;
    padding: .2rem;
}

footer a:link {
    color: var(--sage-dark);
}

footer a:visited {
    color: var(--sage-med);
}

/* ===== homepage ===== */
.home-container {
    display: flex;
    flex-direction: row;
    max-width: 100vw;
    padding: 2rem 0 0 0;
}

.intro-message {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: end;
    padding-left: 50px;
}

.intro-message h1 {
    width: fit-content;
    max-width: 100%;
    font-size: 6rem;
    font-weight: 600;
    line-height: 5rem;
    text-align: left;
}

.intro-message p {
    font-size: 2.5rem;
    line-height: 3rem;
    max-width: 433px;
    margin: 0;
    text-align: left;
}

.home-pic {
    flex: 1;
}

.home-pic img {
    display: block;
    max-height: 85vh;
    max-width: 50vw;
}

/* ===== about me ===== */
.about-me-pic {
    margin: .5rem;
}

.about-me-pic img {
    max-width: 900px;
    max-height: 60vh;
    margin: 20px auto;
}

.bio {
    max-width: 900px;
    margin: 0 auto;
}

.bio p {
    letter-spacing: 0.01rem;
    line-height: 1.45rem;
}

/* ===== portfolio ===== */
.project-card {
    border-top: 1px solid var(--sand-dark);
    padding-top: .5rem;
    margin-bottom: 1rem;
}

.portfolio-pic {
    margin: .5rem;
}

.portfolio-pic img {
    max-height: 50vh;
}

.portfolio-text {
    max-width: 900px;
    margin: 0 auto;
}

.portfolio-text h3 {
    margin: 3rem 0 .25rem 0;
    font-weight: 500;
}

.portfolio-text p, ul {
    letter-spacing: 0.01rem;
    line-height: 1.45rem;
    margin: .5rem 0;
}

/* ===== dlw restructure ===== */
.dlw-pic {
    margin: .5rem;
}

.dlw-pic img {
    max-height: 60vh;
}

.dlw-explanation {
    max-width: 900px;
    margin: 0 auto 50px;
}

.dlw-explanation h3 {
    margin: .35rem 0;
    font-weight: 400;
    letter-spacing: 0.035rem;
}

.dlw-explanation p {
    margin: 1rem;
    letter-spacing: 0.01rem;
    line-height: 1.45rem;
}

/* ===== resume ===== */
.resume {
    max-width: 900px;
    margin: 0 auto 50px;
}

.resume h2 {
    margin: 3rem 0 0;
    font-weight: 500;
    letter-spacing: 0.07rem;
}

.resume h3 {
    margin: 2.2rem 0 .1rem;
    font-weight: 450;
    letter-spacing: 0.06rem;
}

.resume h4 {
    margin: 1.5rem 0 .1rem;
    font-weight: 400;
    letter-spacing: 0.04rem;
}

.resume p, a {
    margin: 1rem 0 0.75rem;
    letter-spacing: 0.01rem;
    line-height: 1.45rem;
}

/* ===== tablet (max-width: 1039px) ===== */
@media (max-width: 1039px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    h3 {
        font-size: 1.35rem;
    }

    h4 {
        font-size: 1.15rem;
    }

    p, li, a {
        font-size: 1rem;
        line-height: 1.5rem;
        letter-spacing: 0.01rem;
    }

    /* homepage*/
    .home-container {
        flex-direction: column;
    }

    .intro-message {
        flex: none;
        display: block;
        text-align: center;
        padding: 0 8px;
    }

    .intro-message h1 {
        font-size: 4rem;
        text-align: center;
        width: auto;
    }

    .intro-message p {
        max-width: 400px;
        margin: 0 auto;
    }

    .home-pic {
        flex: none;
    }

    .home-pic img {
        display: block;
        max-width: 700px;
        max-height: none;
        margin: auto;
    }

    .about-me-pic img {
        max-height: 50vh;
        max-width: 100%;
    }

    .bio {
        margin: 0 100px;
    }

    .portfolio-pic img {
        max-height: 40vh;
    }

    .portfolio-text {
        margin: 0 100px;
    }
}

/* ===== mobile (max-width: 699px) ===== */
@media (max-width: 699px) {

    /* nav */
    .menu-button-container {
        display: flex;
    }

    .menu {
        position: absolute;
        top: 0;
        margin-top: 75px;
        left: 0;
        flex-direction: column;
        width: 100%;
        justify-content: center;
        align-items: center;
    }

    #menu-toggle ~ .menu li {
        height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
    }

    #menu-toggle:checked ~ .menu li {
        border: .75px solid var(--blue-dark);
        height: 3em;
        padding: .5em;
        transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
    }

    .menu > li {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0;
        padding: 1em 0;
        width: 100%;
        background-color: var(--sand-light);
    }

    .menu > li a {
        display: block;
    }

    /* homepage — mobile-specific sizes (overrides tablet values above) */
    .intro-message h1 {
        font-size: 3rem;
        line-height: 3.5rem;
        margin: 2rem auto 1rem;
    }

    .intro-message p {
        font-size: 1.5rem;
        line-height: 2.2rem;
        max-width: none;
    }

    .home-pic {
        margin-top: 2rem;
    }

    .home-pic img {
        max-width: 100%;
    }

    /* about me */
    .about-me-pic img {
        max-height: none;
        max-width: 100%;
    }

    .bio {
        margin: 0 2rem;
    }

    /* portfolio */
    .portfolio-text {
        margin: 0 2rem 1.5rem;
    }

    /* dlw restructure */
    .dlw-explanation {
        margin: 0 2rem;
    }

    /* resume */
    .resume {
        margin: 2rem;
    }
}
