:root {
    --body-margin: 1rem;
}

html {
    height: 100%;
    font-family: "PT Serif", serif;
    color: var(--col-birch);
}

body {
    height: 100vh;
    width: 100vw;
    background-color: var(--col-brown);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.bg-grad {
    background: linear-gradient(180deg,
            transparent 50%,
            var(--col-brown) 100%);

    z-index: -9998;

    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    height: 100%;
}

.bg {
    background-image: url("/files/images/bg.png");
    background-repeat: repeat;

    z-index: -9999;

    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    height: 100%;

    animation: slide 20s linear infinite;
}

@keyframes slide {
    0% {
        background-position-x: 0;
    }

    100% {
        background-position-x: -256px;
        background-position-y: 128px;
    }
}

@media (prefers-reduced-motion) {
    .bg {
        animation: none;
    }
}

/*  MAINSITE  */

#mainbody {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#maincontainer {
    max-width: 60rem;
    width: calc(100% - (var(--body-margin) * 2));
    min-height: 42rem;

    display: flex;
    flex-direction: column;

    border: 2px inset var(--col-coffee);
    border-radius: 1rem;
    box-shadow:
        0.1rem 0.1rem 0.5rem color-mix(in oklab,
            var(--col-coal) 75%,
            #0000 0%);

    background: linear-gradient(180deg,
            var(--col-choco) 0%,
            var(--col-coffee) 150%);

    padding: 1rem;
    margin: var(--body-margin);
}

/*  TITLE BANNER  */

.titlebanner {
    /* border: 1px solid #fff5; */
    border-radius: 0.5rem;

    background: linear-gradient(320deg,
            var(--col-coal) 0%,
            var(--col-coffee) 100%);

    height: 128px;
    flex-grow: 0;
    flex-shrink: 0;
}

.titletxt {
    display: flex;
    flex-direction: column;
    user-select: none;

    font-family: "Faculty Glyphic", sans-serif;

    color: var(--col-birch);
    -webkit-text-stroke: 0.5rem var(--col-coffee);
    paint-order: stroke fill;

    transform:
        rotate(-2deg) translate(max(min(-1vw, 2rem), -3rem), -1rem);
}

.title {
    font-size: max(min(-1vw, 2rem), 4rem);
    line-height: 4rem;
}

.subtitle {
    font-size: 1.5rem;
    margin-left: 1rem;

    -webkit-text-stroke-width: 0.25rem;
}

/*  TASKBAR  */

.taskbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;

    margin-top: 0.5rem;
    gap: 0.25rem;

    color: var(--col-coal);
}

/*  CONTENT  */

.content {
    padding: 0.5rem;

    gap: 1.5rem;

    flex-grow: 1;

    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}

.maintext {
    text-align: justify;
    flex: 5;
    min-width: 16rem;
}

/*  PHOTO DISPLAY  */

.randomphoto {
    /* border: 1px dashed grey; */
    border-radius: 0.5rem;
    flex: 3;
    min-width: 14rem;
    min-height: 20rem;
    max-height: 30rem;
    overflow: hidden;
    position: relative;

    display: inline-flexbox;

    border: 2px solid var(--col-coal);
    paint-order: fill border;
    cursor: pointer;
}

.randomphoto .rndpchild {
    position: absolute;
    inset: 0;
}

.randomphoto>.phototitle {
    display: flex;

    padding: 0.75rem;
    padding-inline: 1rem;

    font-style: italic;
    justify-content: flex-end;
    align-items: flex-end;
    color: white;

    user-select: none;

    height: 100%;
    z-index: 5;

    text-shadow: 1px 1px 2px var(--col-coffee);

}

.randomphoto>.phototitlebg {
    background: linear-gradient(180deg,
            transparent 70%,

            var(--col-black) 110%);

    height: 100%;
    z-index: 2;
    mix-blend-mode: darken;
}

.randomphoto::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 3;

    mask: linear-gradient(to top,
            var(--col-capuccino) 5%,
            transparent 50%);
    backdrop-filter: blur(1px);
}

.randomphoto>.photo {
    height: 100%;

    background-color: var(--col-coffee);
    background-size: cover;
    background-clip: border-box;
    background-repeat: no-repeat;

    filter: grayscale(10%) contrast(95%);

    animation-name: showphoto;
    animation-play-state: running;

    animation-timing-function: ease-in-out;
    animation-direction: alternate;
    animation-iteration-count: infinite;
    animation-duration: 10s;
    
    z-index: 1;
}

@keyframes showphoto {
    5% {
        background-position-x: left;
        background-position-y: top;
    }

    95% {
        background-position-x: right;
        background-position-y: bottom;
    }

    100% {
        background-position-x: right;
        background-position-y: bottom;
    }
}

@media (prefers-reduced-motion) {
    .randomphoto>.photo {
        animation: none;
    }
}

/*  COPYRIGHT TEXT  */

.copyfooter {
    font-style: italic;
    font-size: 0.75rem;
    user-select: none;

    text-shadow:
        0.125rem 0.125rem 0.25rem var(--col-coal);

    margin-block-end: 1rem;
}