/* TOKENS */

:root {
    --fg-subtle: var(--fg-5);
}

/* COMPOSITION */

.layout-centered {
    display: grid;
    place-items: center;
    min-height: 100dvh;
}

.layout-centered h1 {
    margin: 0;
}

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    padding-inline-end: 1rem;
}

@media (max-width: 1200px) {
    .site-nav {
        position: initial;
        padding-inline-start: 1rem;
    }
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav li {
    margin: 0;
}

.site-nav a {
    color: var(--fg-5);
}

/* BLOCKS */

.post-card {
    position: relative;
}

.post-card .post-anchor {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
    background: var(--fg-05);
    padding: 0.25rem 0.5rem;
    border-radius: var(--br-s);
    text-decoration: none;
    color: var(--purple-8);
    --fl: 1;
    font-weight: bold;
    z-index: 1;
}

.post-card:hover .post-anchor,
.post-anchor:focus {
    opacity: 1;
}

.post-card .post-time {
    --fl: -1;
    color: var(--fg-subtle);
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
}

.post-card .post-heading {
    position: absolute;
    visibility: hidden;
}

.post-image {
    max-height: 85dvh;
    max-width: 100%;
    display: block;
    aspect-ratio: 16/9;
}

.post-caption {
    text-align: center;
    margin-top: 0.75rem;
    padding: var(--pad-s) var(--pad-m);
    background: var(--fg-05);
    border-radius: var(--br-s);
    color: var(--fg);
}

.post-form textarea {
    width: min(100%, 50%);
    resize: vertical;
}

.lightbox {
    background: transparent;
    border: none;
    padding: 0;
    max-width: 95vw;
    max-height: 95dvh;
}

.lightbox img {
    max-width: 95vw;
    max-height: 95dvh;
    display: block;
}

/* EXCEPTIONS */

body {
    transition: background-color 0.2s, outline 0.2s;
}

body[data-state="dragging"] {
    background-color: var(--blue-1);
    outline: 2px dashed var(--blue-5);
    outline-offset: -4px;
}

body[data-state="pasted"] {
    background-color: var(--green-1);
    outline: 2px solid var(--green-5);
    outline-offset: -4px;
}
