html {
    overflow-x: hidden;
    margin-right: calc(100% - 100vw);
}

body {
    font-family: sans-serif;
    font-size: var(--body-size);
    min-height: 100vh;
    display: flex;
    align-items: center;
    flex-direction: column;
}

header {
    nav {
        width: var(--major-width);
        display: flex;
        justify-content: space-between;
        padding-top: 2em;
        padding-bottom: 2em;

        #logo { 
            font-size: 3em; 
            a { 
                color: inherit;
                text-decoration: none; 
            }
        }

        #menu {
            display: flex;
            font-size: 1.5em;

            a { 
                color: var(--lighter);
                text-decoration: none; 
            }
        
            li {
                display: flex;
                align-items: center;
            }

            li:not(:last-child) { margin-right: 1em; }

            a:hover, .active  { 
                color: inherit;
            }
        }
    }
}

main {
    width: var(--major-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    
    #content {
        width: var(--content-width); 
        h1 { text-wrap: stable; }
    }

    p {
        hyphens: auto;
        margin-bottom: 1em;
    }

    .social-icons {
        display: flex;
        margin-top: 0.5em;
        img { height: 2.5em; }
        li:not(:last-child) { margin-right: 1.5em; }
    }

    #prev-next {
        width: var(--major-width);
        display: flex;
        justify-content: space-between;
        margin-top: 1em;
        a { 
            font-size: 0.83em;
            color: var(--light);
            text-decoration: none; 
        }
    }

    #work-list {
        width: var(--major-width);
        display: grid;
        column-gap: 1em;
        margin-bottom: 1em;
        grid-template-columns: 1fr 1fr 1fr;

        a {
            text-decoration: none;
            text-align: center;
        }

        a:hover img {
            filter: brightness(80%);
        }

        img { width: 100%; }

        figcaption { 
            margin-bottom: 0.5em;
        }
    }

    figure {
        img {
            margin-top: 0.5em;
            margin-bottom: 0.5em;
        }

        figcaption {
            color: var(--light);
            font-size: 0.83em;
            margin-bottom: 4em;
        }
    }
 
    .tall {
        width: var(--minor-minor-width);
        margin-left: auto;
        margin-right: auto;
    }
}

footer {
    font-size: 0.83em;
    color: var(--light);
    margin-top: auto;
    padding-top: 2em;
    margin-bottom: 1em;
}

:root {
    --body-size: 18px;
    --major-width: 900px;
    --minor-width: 700px;
    --minor-minor-width: 550px;

    --content-width: var(--minor-width);
    --light: #595959;
    --lighter: #767676;
}

@media (max-width: 1000px) {
    :root {
        --body-size: 16px;
        --major-width: min(var(--minor-width), 100vw - 2em);
        --minor-minor-width: var(--major-width);
        --content-width: var(--major-width);
    }

    nav { flex-direction: column; }
    main { 
        figure figcaption { margin-bottom: 3em; }
        #work-list { grid-template-columns: 1fr 1fr; }
    }
     
}

@media (max-width: 370px) {
header nav {
    #logo { font-size: 2.5em; }
    #menu { font-size: 1em; }
}
