.flex-about {
    display: flex;
    flex-flow: column wrap;
    justify-content: space-between;
    max-width: 90%;
    max-width: calc(2.5*var(--portrait-max-width));
    margin-left: auto;
    margin-right: auto;

    & div {
        margin: auto;
    }

    & .about-row {
        display: flex;
        flex-flow: row wrap;
        align-content: center;
        justify-content: center;
        width: 100%;
        border-style: none;
    }

    & img {
        object-fit: cover;
        position: absolute;
    }

    & .portrait {
        max-width: var(--portrait-max-width);
        width: auto;
        height: auto;
        max-height: var(--portrait-max-height);
        margin-top: 1rem;
        margin-bottom: 1rem;
        aspect-ratio: var(--aspect-ratio);

        & img {
            width: 100%;
            height: auto;
            aspect-ratio: var(--aspect-ratio);
        }
    }

    & .image-container {
        position: relative;
        flex: 1 1 min-content;
    }

    & .text-container {
        display: flex;
        justify-content: center;
        min-width: var(--portrait-min-width);
        background-color: var(--theme-background-colour);
        overflow: hidden;
        padding: .5rem;
        flex: 1 1 20%;
    }
}


.overlay-image {
    opacity: 0;
    transition: 1s ease;

    &:hover {
        opacity: 1;
    }
}

@media only screen and (max-width: 1024px) {

    .flex-about {
        & .portrait {
            order: -1;
            margin: 1rem;
        }

        & .about-row {
            justify-content: center;
        }

        & .image-container {
            display: flex;
            justify-content: center;
            align-items: center;
        }
    }
}

@media only screen and (max-width: 480px) {
    .flex-about {
        & .portrait {
            width: 80%;
            min-width: var(--portrait-min-width);
            max-height: none;
        }

        & .about-row {
            flex-direction: column;
        }

        & .text-container {
            aspect-ratio: auto;
            overflow: auto;
        }
    }
}

@media only screen and (max-width: 880px) and (min-aspect-ratio: 3/2) {
    .flex-about {
        margin-left: 0;
    }
}