/* REVEAL */
.rv {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .85s ease, transform .85s ease;
}

.rv.in {
    opacity: 1;
    transform: translateY(0);
}

.rvl {
    opacity: 0;
    transform: translateX(-28px);
    transition: opacity .85s ease, transform .85s ease;
}

.rvl.in {
    opacity: 1;
    transform: translateX(0);
}

.rvr {
    opacity: 0;
    transform: translateX(28px);
    transition: opacity .85s ease, transform .85s ease;
}

.rvr.in {
    opacity: 1;
    transform: translateX(0);
}

/* RESPONSIVE */
@media(max-width:1100px) {
    .ed-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .ecard--main {
        grid-column: 1/-1;
        grid-row: auto;
    }

    .ecard--main .eimg {
        min-height: 260px;
    }

    .about-in {
        grid-template-columns: 1fr;
        gap: 5rem;
    }

    .about-in .rvr {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .pframe {
        max-width: 380px;
        margin: 0 auto;
    }

    .astats {
        justify-content: center;
        gap: 2rem;
    }

    .adiv {
        margin: 1.5rem auto 2.5rem;
    }

    .recent-in {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    footer {
        max-width: 1300px;
        margin: 0 auto;
        padding: 6rem 3rem 2.5rem;
    }
}

@media(max-width:768px) {
    .main-nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        position: fixed;
        inset: 0;
        background: var(--bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        z-index: 505;
        opacity: 0;
        pointer-events: none;
        transition: opacity .4s;
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        font-family: 'Bricolage Grotesque', sans-serif;
        font-size: 1.8rem;
        letter-spacing: .05em;
        text-transform: none;
    }

    .nav-end {
        display: none;
    }

    .nav-links .theme-toggle {
        display: flex;
        margin-top: 2rem;
        margin-left: 0;
    }

    .nav-burger {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 0 1.5rem 4rem;
        gap: 2rem;
    }

    .hero-side {
        align-items: flex-start;
    }

    .hero-poem {
        text-align: left;
        border-right: none;
        border-left: 1px solid rgba(212, 162, 76, .25);
        padding-right: 0;
        padding-left: 1.2rem;
    }

    .editorial,
    .cats,
    .recent,
    .about,
    .qband {
        padding: 4rem 1.5rem;
    }

    .ed-grid {
        grid-template-columns: 1fr;
        /* Single column on mobile as requested */
        grid-template-rows: auto;
    }

    .ecard--main .eimg {
        min-height: 220px;
    }

    .cath {
        font-size: 2.5rem;
    }

    .catname {
        font-size: 1.3rem;
    }

    /* About Section Mobile Fixes */
    .anumber {
        margin-bottom: -0.5rem;
    }

    .astats {
        flex-direction: row;
        /* Force 3-in-a-row on mobile as requested */
        gap: 1rem;
        width: 100%;
        justify-content: center;
    }

    .astat {
        padding: 0 .8rem;
        border-right: 1px solid var(--border);
    }

    .astat:last-child {
        border-right: none;
        padding-right: 0;
    }

    .astatn {
        font-size: 1.5rem;
        /* Slightly smaller for mobile row fit */
    }

    .pframe::before {
        left: -10px;
        right: 10px;
        bottom: -10px;
    }

    .catrow {
        gap: 1rem;
    }

    .recent-in {
        grid-template-columns: 1fr;
    }

    .pitem {
        grid-template-columns: 80px 1fr;
    }

    .fbot {
        flex-direction: column;
        gap: .5rem;
        text-align: center;
    }

    footer {
        padding: 4rem 1.5rem !important;
    }

    body {
        cursor: auto;
    }

    #cursor,
    #cdot {
        display: none;
    }
}

@media(max-width:480px) {
    .hero-title {
        font-size: 3.8rem;
    }

    .catname {
        font-size: 1.1rem;
    }

    .nbox {
        padding: 1.5rem;
    }

    .astats {
        gap: 2rem;
    }

    .astatn {
        font-size: 2rem;
    }
}

/* THEME SWITCH ENHANCEMENTS */
html.light .hero-bg::after,
html.light .post-hero .hero-bg::after {
    background: linear-gradient(to bottom, transparent 30%, rgba(232, 217, 188, 0.72) 100%);
    mix-blend-mode: multiply;
}


/* FINAL FLICKER FIX OVERRIDE */
.main-nav,
.meta-bar,
.chip,
footer,
.comment-body,
.post-content blockquote,
.post-sidebar,
.wander,
.hero-bg,
.cat-hero .hero-bg,
.eov,
.ticker,
.editorial,
.qband,
.about,
.pbg {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease !important;
}