:root {
    --pico-font-family-sans-serif:
        "Iosevka Web", "Iosevka", system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu,
        Cantarell, Helvetica, Arial, "Helvetica Neue", sans-serif,
        var(--pico-font-family-emoji);
}

[data-theme="light"],
:root:not([data-theme="dark"]) {
    --pico-background-color: #f1f1f1;
    --pico-color: #54433a;
    --pico-primary: #54433a;
    --pico-muted-color: #292522;
}

@media only screen and (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --pico-background-color: #292522;
        --pico-color: #ece1d7;
        --pico-primary: #ece1d7;
        --pico-muted-color: #867462;
    }
}

h1,
h2,
h3 {
    --pico-color: var(--pico-color);
}

.boolean-and {
    font-size: 0.7em;
}

hgroup > h3 > a {
    text-decoration-style: dotted;
}

body {
    min-height: 100vh;
    position: relative;
    background-color: var(--pico-background-color);
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 6fr;
    grid-template-rows: 1fr;
    grid-column-gap: 40px;
    grid-row-gap: 20px;
    justify-items: stretch;
    align-items: baseline;
    min-height: 0;
    min-width: 0;
    margin-bottom: 150px;
}

.content {
    min-width: 0;
    overflow: hidden;
}

.main-nav {
    position: sticky;
    margin-top: var(--pico-spacing);
    top: -110px;
    background: var(--pico-background-color);
    z-index: 99;
}

.logo > a > svg {
    max-height: 150px;
}

.main-nav > nav > ul {
    text-align: center;
    font-weight: bold;
    line-height: 0.8em;
}

path #svg1 {
    fill: var(--pico-foreground-color);
}

.codehilite {
    font-family: monospace;
    font-size: 0.8rem;
}

pre > code {
    background: var(--pico-background-color);
}

.title-link {
    text-decoration-style: dotted;
    color: var(--pico-foreground-color);
}

.pagination {
    display: flex;
}

.pagination > div {
    margin: 0em 1em;
}
.pagination > div:first-child {
    margin-left: auto;
}

.pagination > progress {
    margin-bottom: 0;
    margin-top: calc(var(--pico-spacing) * 0.5);
}

label[for="id_comment_email"],
#id_comment_email {
    display: none;
}

.comment.htmx-added {
    opacity: 0;
}
.comment {
    margin: 1.5em;
    opacity: 1;
    transition: opacity 1s ease-out;
}

.comment header {
    display: flex;
}

.comment time {
    flex: 1;
    text-align: right;
}

blockquote.micro {
    margin-top: calc(var(--pico-typography-spacing-vertical) * 2);
    font-size: calc(var(--pico-font-size) * 1.1);
    border: 2px dotted;
    background-color: var(--pico-muted-border-color);
}
blockquote.micro:before {
    content: open-quote;
    font-size: 4em;
    line-height: 0.1em;
    vertical-align: -0.4em;
}

blockquote.micro p {
    display: inline;
}

blockquote.micro footer {
    font-size: 0.5em;
}
.go-clockwise {
    animation: clockwise 3s infinite linear;
    transform-origin: 50% 50%;
}
.go-counter-clockwise {
    animation: counter-clockwise 3s infinite linear;
    transform-origin: 50% 50%;
}
.gallery-row {
    margin-top: var(--pico-spacing);
}
.gallery img {
    filter: drop-shadow(0px 0px 2px #000000);
    min-height: 200px;
}

.gallery img.htmx-indicator {
    min-height: 0;
    filter: none;
}

.gallery video {
    filter: drop-shadow(0px 0px 2px #000000);
    min-height: 200px;
    max-width: 100%;
}

.media-comment.htmx-added {
    opacity: 0;
}
.media-comment {
    opacity: 1;
    transition: opacity 1s ease-out;
}
/** LIGHTBOX MARKUP **/

.lightbox {
    /* Default to hidden */
    display: none;

    /* Overlay entire screen */
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    /* A bit of padding around image */
    padding: 1em;

    /* Translucent background */
    background: rgba(0, 0, 0, 0.8);
}

/* Unhide the lightbox when it's the target */
.lightbox:target {
    display: block;
}

.lightbox span {
    /* Full width and height */
    display: block;
    width: 100%;
    height: 100%;

    /* Size and position background image */
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

figure {
    position: relative;
}

figure figcaption {
    font-size: 0.8rem;
    color: #ffffff;
    position: absolute;
    left: 0;
    right: 0;
}
.video-caption {
    top: 0;
    padding: 0.5rem 0.5rem 0rem;
    background: linear-gradient(
        to bottom,
        hsla(230, 40%, 5%, 0.95),
        hsla(230, 40%, 5%, 0)
    );
}

.image-caption {
    bottom: 0;
    padding: 3rem 0.5rem 0rem;
    background: linear-gradient(
        to top,
        hsla(230, 40%, 5%, 0.95),
        hsla(230, 40%, 5%, 0)
    );
}

figcaption a {
    color: #ffffff;
}

.comment-list {
    padding: 0.5rem 0.5rem 0rem;
}

.comment-list a {
    cursor: pointer;
}

@keyframes clockwise {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
@keyframes counter-clockwise {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(-360deg);
    }
}

.main-footer {
    width: 100vw;
    position: absolute;
    bottom: 0;
    padding: var(--pico-spacing);
    background-color: var(--pico-contrast-background);
}

.main-footer li {
    font-size: 0.8rem;
    color: var(--pico-contrast-inverse);
}

@media (max-width: 576px) {
    .grid-container {
        padding-block: 0;
        grid-template-columns: 1fr;
    }
    .main-nav ul {
        display: flex;
    }
    .main-nav {
        margin-top: 0;
        top: 0;
    }
    .logo > a > svg {
        height: 50px;
    }

    .container {
        padding-top: 0;
    }

    #favorite-quote {
        display: none;
    }
}
