:root {
    --color-border-tertiary: #000;
    --color-text-primary: #000;
    --color-text-tertiary: #006666;
    --font-serif: 'Papyrus', 'Times New Roman', Times, serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-size: 20vw;
}

h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    padding: 0;
    margin: 0;
}

.page-title, h3.truth-post-title, h3.archive-entry-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    background-color: chartreuse;
    display: inline-block;
    margin-bottom: 0.5rem;
}

h3.archive-entry-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin: 1rem 1rem 0.25rem;
}

p {
    font-weight: bold;
    font-size: 20px;
    background-color: chartreuse;
    padding: 1rem;
    margin-left: 1rem;
}

.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 2rem;
}

.content img.content-figure {
    float: right;
    max-width: 40%;
    height: auto;
    margin: 0 0 1rem 1rem;
}

.container img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
}

.content {
    display: flex;
    margin-top: 2rem;
}

.content--truth {
    flex-direction: column;
}

.page-body {
    flex-grow: 1;
}

.page-body p:has(> img:only-child),
.truth-post-body p:has(> img:only-child),
.archive-intro p:has(> img:only-child) {
    background: none;
}

.flex-container {
    display: flex;
    gap: 1rem;
}

/* ---- Navigation (main + secondary) ---- */
.nav {
    border: yellow 4px solid;
    margin-left: 1rem;
    display: inline-block;
    max-width: calc(100% - 1rem - 4px);
}

.nav-secondary {
    border: cyan 4px solid;
    order: 2;
}

.nav ul,
.nav-secondary ul {
    margin: 0;
    padding: 8px;
}

.nav li {
    list-style: none;
    display: inline-block;
}

.nav-secondary li {
    list-style: none;
    display: block;
    margin-top: 0.75rem;
}

.nav-secondary li:first-child {
    margin-top: 0;
}

.link {
    font-weight: bold;
    text-decoration: none;
    background-color: cyan;
    color: #003333;
    padding: 8px 24px 8px 24px;
    border: green 2px solid;
    width: 150px;
    text-align: center;
    display: inline-block;
}

.link.is-active {
    background-color: yellow;
    border-color: magenta;
}

.link--ghost {
    background-color: transparent;
    border-color: cyan;
    color: inherit;
}

.truth-intro {
    display: flex;
}

.truth-intro p {
    background: none;
    width: auto;
    margin: 0 1rem 1rem 0;
}

.video {
    display: block;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

#title {
    background-color: chartreuse;
}

/* ---- Marquee ---- */
.marquee-wrap {
    background-color: aqua;
    overflow: hidden;
    border-top: 0.5px solid var(--color-border-tertiary);
    border-bottom: 0.5px solid var(--color-border-tertiary);
    padding: 0.5rem 0;
    margin: 2rem 0;
    white-space: nowrap;
}
.marquee-track {
    display: inline-block;
    animation: scroll 16s linear infinite;
}
.marquee-track span {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--color-text-primary);
    text-transform: uppercase;
    padding: 0 2.5rem;
}
.marquee-track span.dim {
    color: var(--color-text-tertiary);
}
@keyframes scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
    }
}

/* ---- Footer ---- */
.site-footer {
    border-top: yellow 4px solid;
    margin-top: 2rem;
    padding: 1rem;
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.footer-text {
    background: none;
    font-size: 14px;
    width: auto;
    margin: 0;
    padding: 0;
}
.footer-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}
.footer-nav li {
    display: inline-block;
}

/* ---- Archive listings ---- */
.archive-intro {
    width: auto;
    flex: 1;
}
.archive-list {
    list-style: none;
    margin: 1rem;
    padding: 0;
    gap: 1rem;
    flex: 1;
}

.archive-list-item {
    border: 2px solid green;
    background: #fff;
    padding: 0.75rem;
}
.archive-list-link {
    display: block;
    width: auto;
    text-align: left;
    margin-bottom: 0.5rem;
}
.archive-thumb {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0.5rem;
}
.archive-list-date,
.archive-list-tag {
    display: inline-block;
    font-size: 12px;
    font-family: var(--font-mono);
    margin-right: 0.5rem;
}
.archive-list-empty {
    background-color: chartreuse;
    padding: 1rem;
}

.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 10;
    padding: 0.75rem 1rem;
    border: 2px solid green;
    background: chartreuse;
    color: #003333;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
}
.back-to-top:hover,
.back-to-top:focus {
    background: yellow;
    border-color: magenta;
}
.back-to-top:focus-visible {
    outline: 2px solid #003333;
    outline-offset: 2px;
}

/* ---- Single archive entry (video/audio) ---- */
.archive-entry-date {
    font-family: var(--font-mono);
    font-size: 14px;
    margin: 0 1rem 1rem;
    background: none;
    padding: 0;
    width: auto;
    background: chartreuse;
    display: inline-block;
}

.video-embed {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    margin: 0 1rem 1rem;
    border: 4px solid cyan;
    background: #000;
}
.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.audio-embed {
    margin: 0 1rem 1rem;
    max-width: 800px;
}
.audio-embed--bandcamp iframe {
    width: 100%;
    border: 0;
}
.audio-embed--soundcloud iframe {
    width: 100%;
    border: 0;
}
.audio-embed--upload audio {
    width: 100%;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    body {
        background-size: 60vw;
    }
    h1 {
        font-size: 1.75rem;
    }
    .marquee-track span {
        font-size: 1.5rem;
        padding: 0 1.25rem;
    }
    .nav-secondary {
        float: none;
        display: block;
        margin: 1rem;
    }
    .content img.content-figure {
        float: none;
        max-width: 100%;
        margin: 0 0 1rem 0;
    }
    p {
        width: auto;
        margin: 1rem;
    }
}

@media (max-width: 600px) {
    .nav {
        display: block;
        margin: 0.5rem;
        padding-right: 0.5rem;
    }
    .nav li {
        display: block;
        margin-bottom: 0.5rem;
    }
    .link {
        width: 100%;
    }
    .marquee-track span {
        font-size: 1.1rem;
        padding: 0 0.75rem;
    }
}

/* ---- Truth pages (Written Truths, Hidden Truths): multi-post + sidebar ---- */
.content--truth {
    /* Override the float-based default layout for truth pages */
}
.content--truth .nav-secondary {
    float: none;
    display: inline-block;
    margin-bottom: 1rem;
}

.chapter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.content--truth .chapter-heading-image {
    display: block;
    flex: 0 1 auto;
    width: auto;
    max-width: min(35%, 240px);
    max-height: 180px;
    object-fit: contain;
    margin: 1rem 1rem 0.5rem auto;
}

.truth-layout {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-top: 1rem;
    clear: both;
}

/* Sticky sidebar */
.truth-sidebar {
    flex: 0 0 200px;
    position: sticky;
    top: 1.5rem;
    border: yellow 4px solid;
    background: aqua;
    padding: 0.75rem 1rem;
    margin-left: 1rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
}
.truth-sidebar-label {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: bold;
    background: none;
    width: auto;
    padding: 0;
    margin: 0.5rem 0 0.5rem 0;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.05em;
}
.truth-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.truth-sidebar-link {
    display: block;
    font-weight: bold;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    color: black;
    background: chartreuse;
    border: green 2px solid;
    padding: 6px 10px;
    transition: background 0.15s;
}
.truth-sidebar-link:hover,
.truth-sidebar-link:focus {
    background: yellow;
    border-color: magenta;
    outline: none;
}
.truth-sidebar-empty {
    font-size: 13px;
    color: #555;
}

/* Posts column */
.truth-posts {
    flex: 1 1 0;
    min-width: 0;
}
.truth-intro {
    margin-bottom: 1.5rem;
}
.truth-intro p {
    width: auto;
    margin: 0 0 1rem 0;
}

.truth-post {
    margin-bottom: 3rem;
    scroll-margin-top: 1.5rem; /* offset for sticky elements when jumping to anchor */
    border-top: 4px solid cyan;
    padding-top: 1.25rem;
}
.truth-post:first-child {
    border-top: none;
    padding-top: 0;
}
.truth-post-title {
    font-family: var(--font-serif)          ;
    font-size: 1.5rem;
    margin: 0 0 0.25rem 0;
}
.truth-post-date {
    font-family: var(--font-mono);
    font-size: 13px;
    background: none;
    width: auto;
    padding: 0;
    margin: 0 0 0.75rem 0;
    color: black;
}
.truth-post-date span {
    background: chartreuse;
    display: inline-block;
    padding: 0.25rem 0.5rem;
}

.truth-post-body p {
    width: auto;
    margin: 0 0 1rem 0;
}
.truth-empty {
    width: auto;
    background: chartreuse;
    padding: 1rem;
}

/* Responsive: sidebar collapses above posts on narrow screens */
@media (max-width: 900px) {
    .truth-layout {
        flex-direction: column;
        gap: 1rem;
    }
    .truth-sidebar {
        flex: none;
        width: calc(100% - 2rem);
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    .truth-sidebar-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    .truth-sidebar-link {
        white-space: nowrap;
    }
}

@media (max-width: 600px) {
    .chapter-heading {
        flex-direction: column;
        align-items: flex-start;
    }
    .content--truth .chapter-heading-image {
        max-width: calc(100% - 2rem);
        margin: 0 1rem 0.5rem;
    }
}

/* ── Hexagonal video grid (Zoo page) ─────────────────────────────────────── */
.zoo-intro {
    margin: 0 1rem 2rem;
}
.zoo-intro p {
    width: auto;
}

.hex-grid-wrap {
    width: 100%;
    padding: 2rem 0 4rem;
    overflow: hidden;
}

.hex-row {
    display: flex;
    gap: 8px;
    margin-top: -60px; /* pull rows together for honeycomb overlap */
}
.hex-row:first-child {
    margin-top: 0;
}
.hex-row--offset {
    transform: translateX(124px); /* half of 240px + half of 8px gap */
}

.hex-item {
    flex: 0 0 240px;
    width: 240px;
    height: 240px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    overflow: hidden;
    background: #000;
    border: none;
}
.hex-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive hex grid */
@media (max-width: 1024px) {
    .hex-item {
        flex: 0 0 180px;
        width: 180px;
        height: 180px;
    }
    .hex-row {
        margin-top: -45px;
    }
    .hex-row--offset {
        transform: translateX(94px);
    }
}

@media (max-width: 600px) {
    .hex-item {
        flex: 0 0 110px;
        width: 110px;
        height: 110px;
    }
    .hex-row {
        margin-top: -28px;
        gap: 5px;
    }
    .hex-row--offset {
        transform: translateX(57px);
    }
}
