html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
}

body {
    overflow-x: hidden;
    overflow-y: auto;
}

/* =========================
   PAINTINGS PAGE CONTENT
   ========================= */

.view {
    display: none;
}

.view.active {
    display: block;
}

.photoView {
    width: 70vw;
    margin: 0 auto;
    padding: 3vh 0 8vh;

    display: flex;
    flex-direction: column;
    gap: 100px;
}

.imageContainer {
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.imageContainer > img {
    display: block;

    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 90vh;
}

.caption {
    width: 50%;

    display: flex;
    justify-content: center;
}

.caption p {
    margin: 10px 0 0;

    font-family: "Lora", serif;
    font-size: 13px;
    font-weight: 200;
    text-align: center;
}

.caption img {
    display: block;

    width: auto;
    height: auto;
    max-height: 30px;
}

/* =========================
   HEADER / NAV
   ========================= */

#pageHeader {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 1000;

    width: 10vw;

    display: flex;
    flex-direction: column;
    align-items: center;
}

#pageHeader > a:first-child {
    display: block;
    width: 100%;
}

#pageHeader > a:first-child img {
    display: block;
    width: 100%;
    max-width: 10vw;
    height: auto;
}

.navButton,
.contactButton {
    appearance: none;
    -webkit-appearance: none;

    padding: 0;
    border: 0;

    background: transparent;
    box-shadow: none;

    line-height: 0;
    text-decoration: none;
}

.navButton {
    margin-top: 10px;
}

.navButton img {
    display: block;
    width: 100%;
    max-width: 150px;
    height: auto;
    filter: opacity(1);
}

.navButton:hover img,
.navButton.active img {
    filter: opacity(0.5);
}

#homeButton {
    width: 95px;
}

#aboutButton {
    width: 60px;
}

#contactButton {
    width: 75px;
}

#cvLink {
    width: 50px;
}

/* =========================
   ABOUT / CONTACT
   ========================= */

.aboutText {
    width: min(600px, 100%);
    margin: 0;

    font-family: "Lora", serif;
    font-size: 13px;
    font-weight: 200;
    line-height: 1.55;
    text-align: left;
}

.contactButton {
    margin-top: 50px;
}

.contactButton img {
    display: block;

    width: auto;
    max-width: 100%;
    max-height: 50px;
    height: auto;

    filter: opacity(1);
}

.contactButton:hover img {
    filter: opacity(0.5);
}

#studioLink img {
    transform: scale(0.8);
}

/* =========================
   TABLET
   ========================= */

@media (max-width: 1100px) and (min-width: 701px) {
    #pageHeader {
        top: 22px;
        left: 22px;
        width: 14vw;
        max-width: 145px;
    }

    #pageHeader > a:first-child img {
        max-width: 145px;
    }

    #homeButton {
        width: 82px;
    }

    #aboutButton {
        width: 52px;
    }

    #contactButton {
        width: 64px;
    }

    #cvLink {
        width: 44px;
    }

    .photoView {
        width: 72vw;
        margin-left: 22vw;
        margin-right: 6vw;
        padding-top: 4vh;
        gap: 80px;
    }

    .imageContainer > img {
        max-width: 100%;
        max-height: 78vh;
    }

    .caption {
        width: 70%;
    }

    .aboutText {
        width: min(560px, 100%);
        font-size: 13px;
        line-height: 1.55;
    }

    .contactButton {
        margin-top: 36px;
    }
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 700px) {
    #pageHeader {
        position: relative;
        top: auto;
        left: auto;

        width: 100%;
        box-sizing: border-box;
        padding: 14px 14px 28px;

        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #pageHeader > a:first-child {
        width: min(46vw, 190px);
    }

    #pageHeader > a:first-child img {
        width: 100%;
        max-width: none;
    }

    #pageHeader .navButton {
        margin-top: 6px;
    }

    #homeButton {
        width: 82px;
    }

    #aboutButton {
        width: 50px;
    }

    #contactButton {
        width: 64px;
    }

    #cvLink {
        width: 44px;
        margin-top: 24px;
    }

    .photoView {
        width: 100%;
        margin: 0;
        box-sizing: border-box;
        padding: 0 18px 64px;
        gap: 64px;
    }

    .imageContainer {
        width: 100%;
    }

    .imageContainer > img {
        width: auto;
        max-width: 100%;
        max-height: none;
    }

    .caption {
        width: 100%;
    }

    .caption p {
        width: 100%;
        font-size: 12px;
        line-height: 1.4;
    }

    .aboutText {
        width: 100%;
        max-width: 560px;
        box-sizing: border-box;
        padding: 0 4px;

        font-size: 13px;
        line-height: 1.6;
    }

    .contactButton {
        margin-top: 28px;
    }

    .contactButton img {
        max-width: 72vw;
        max-height: 40px;
    }
}

/* Disable hover-only visual changes on touch devices */
@media (hover: none), (pointer: coarse) {
    .navButton:hover img,
    .contactButton:hover img {
        filter: opacity(1);
    }

    .navButton.active img {
        filter: opacity(0.5);
    }
}
