/*
Theme Name: Blue Distortion
Theme URI: https://bluedistortion.com
Author: Blue Distortion
Author URI: https://bluedistortion.com
Description: Dark electric theme for an experimental music archive. Album-art card grid, scanline texture, chromatic glitch accents, night-first with a day flip.
Version: 1.8.4
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bluedistortion
Tags: blog, dark, two-columns, custom-menu, featured-images, translation-ready
*/

/* ============================================
   BLUE DISTORTION
   ============================================ */

:root {
    /* Night (default). --bg matches the bottom pixel of the background
       image so the page blends seamlessly where the image ends. */
    --bg: #1f1f1f;
    --bg-image: url('assets/images/slanted-gradient-6.png');
    --bg-panel: #0d1322;
    --bg-panel-hover: #111a30;
    --border: #1b2440;
    --border-strong: #2b3a63;
    --text: #d5dbe8;
    --text-strong: #eef2fa;
    --text-dim: #7d8cb0;
    --accent: #4cc2ff;
    --accent-deep: #2563eb;
    --glitch-cyan: rgba(34, 211, 238, 0.75);
    --glitch-magenta: rgba(244, 114, 182, 0.65);
    --glow: rgba(76, 194, 255, 0.14);
    --logo-outline: transparent;
    --logo-shadow: none;

    /* Zen Maru Gothic everywhere (rounded, thick at 900); Plex Mono for
       code. Variable names kept from v1 to avoid touching every rule. */
    --font-display: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
    --font-sans: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
    --font-mono: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
    --font-code: 'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;
    --menu-overlay-bg: linear-gradient(160deg, rgba(8, 11, 22, 0.97) 0%, rgba(23, 17, 45, 0.95) 100%);

    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 3rem;

    --content-width: 72rem;
    --prose-width: 42rem;
    --radius: 10px;

    --t-fast: 150ms ease;
    --t-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    color-scheme: dark;
}

/* --- Day version --- */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #c5c5c5;
        --bg-image: url('assets/images/slanted-gradient-6-light.png');
        --bg-panel: #ffffff;
        --bg-panel-hover: #f7faff;
        --border: #d9e0ef;
        --border-strong: #b9c6e2;
        --text: #232b3d;
        --text-strong: #0d1322;
        --text-dim: #5b6884;
        --accent: #2563eb;
        --accent-deep: #1d4ed8;
        --glitch-cyan: rgba(8, 145, 178, 0.5);
        --glitch-magenta: rgba(219, 39, 119, 0.4);
        --glow: rgba(37, 99, 235, 0.1);
        --menu-overlay-bg: linear-gradient(160deg, rgba(242, 245, 251, 0.97) 0%, rgba(216, 222, 240, 0.95) 100%);
        --logo-outline: #22375d;
        --logo-shadow: drop-shadow(0 1px 2px rgba(13, 19, 34, 0.3));

        color-scheme: light;
    }
}

:root[data-theme="light"] {
    --bg: #c5c5c5;
    --bg-image: url('assets/images/slanted-gradient-6-light.png');
    --bg-panel: #ffffff;
    --bg-panel-hover: #f7faff;
    --border: #d9e0ef;
    --border-strong: #b9c6e2;
    --text: #232b3d;
    --text-strong: #0d1322;
    --text-dim: #5b6884;
    --accent: #2563eb;
    --accent-deep: #1d4ed8;
    --glitch-cyan: rgba(8, 145, 178, 0.5);
    --glitch-magenta: rgba(219, 39, 119, 0.4);
    --glow: rgba(37, 99, 235, 0.1);
    --menu-overlay-bg: linear-gradient(160deg, rgba(242, 245, 251, 0.97) 0%, rgba(216, 222, 240, 0.95) 100%);
    --logo-outline: #22375d;
    --logo-shadow: drop-shadow(0 1px 2px rgba(13, 19, 34, 0.3));

    color-scheme: light;
}

/* --- Reset & base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    background-image: var(--bg-image);
    background-position: top left;
    background-size: 100% auto;
    background-repeat: no-repeat;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Slow color drift over the whole background (both modes). A fixed
   gradient layer whose hue rotates over a minute; sits above the body
   background image, below all content. */
@keyframes bd-drift {
    from { filter: hue-rotate(0deg); }
    to   { filter: hue-rotate(360deg); }
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(
        115deg,
        rgba(76, 194, 255, 0.16) 0%,
        rgba(160, 120, 255, 0.10) 40%,
        rgba(244, 114, 182, 0.12) 70%,
        rgba(34, 211, 238, 0.14) 100%
    );
    animation: bd-drift 60s linear infinite;
    pointer-events: none;
    z-index: -1;
}

/* Scanlines - the distortion */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 3px,
        rgba(125, 140, 176, 0.045) 3px,
        rgba(125, 140, 176, 0.045) 4px
    );
    pointer-events: none;
    z-index: 999;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--t-fast);
}

a:hover {
    color: var(--text-strong);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    font: inherit;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
}

/* --- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    /* Translucent so the striped background bleeds through to the very
       top of the page; blur keeps the text readable over it. */
    background: color-mix(in srgb, var(--bg) 45%, transparent);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid var(--border);
}

.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

.header-inner {
    width: min(100% - 2.5rem, var(--content-width));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* nowrap: a long tagline must truncate, never push the menu
       button onto a second row */
    flex-wrap: nowrap;
    gap: var(--space-3);
    padding-block: 0.9rem;
}

.header-inner .menu-toggle {
    flex-shrink: 0;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.site-title {
    /* Visible content is the SVG logo; zero out text metrics so external
       CSS (typography plugins, leftover h1 rules) cannot inflate the
       header's line box. */
    font-size: 0;
    line-height: 0;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.site-title a {
    color: var(--text-strong);
    position: relative;
}

/* Chromatic glitch: links jitter and split on hover */
@keyframes bd-glitch {
    0% {
        text-shadow: -2px 0 var(--glitch-cyan), 2px 0 var(--glitch-magenta);
        transform: translate(0, 0);
    }
    25% {
        text-shadow: 2px 0 var(--glitch-cyan), -2px 0 var(--glitch-magenta);
        transform: translate(-1px, 1px);
    }
    50% {
        text-shadow: -1px 0 var(--glitch-cyan), 1px 0 var(--glitch-magenta);
        transform: translate(1px, -1px);
    }
    75% {
        text-shadow: 2px 0 var(--glitch-cyan), -2px 0 var(--glitch-magenta);
        transform: translate(-1px, 0);
    }
    100% {
        text-shadow: -2px 0 var(--glitch-cyan), 2px 0 var(--glitch-magenta);
        transform: translate(0, 0);
    }
}

.site-title a {
    display: block;
}

.site-logo {
    display: block;
    height: 38px;
    width: auto;
    filter: var(--logo-shadow);
}

/* Light mode: dark outline behind the white fill keeps the wordmark
   legible on the pale header. */
.site-logo .logo-main {
    stroke: var(--logo-outline);
    stroke-width: 1.25px;
    paint-order: stroke;
}

.site-title a:hover {
    color: var(--text-strong);
    animation: bd-glitch 240ms steps(2, jump-none) 2;
}

.site-tagline {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.5em;
}

@media (max-width: 700px) {
    .site-tagline {
        display: none;
    }
}

/* Hamburger */
.menu-toggle {
    padding: var(--space-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    border-radius: 50%;
    transition: color var(--t-fast), transform var(--t-fast);
}

.menu-toggle:hover {
    color: var(--accent);
    transform: scale(1.08);
}

/* --- Full-screen menu overlay --- */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: var(--menu-overlay-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-normal), visibility var(--t-normal);
}

.menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.menu-dialog {
    text-align: center;
    padding: var(--space-4);
}

.menu-close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    padding: var(--space-1);
    z-index: 10;
    color: var(--text-dim);
}

.menu-close:hover {
    color: var(--accent);
}

.menu-nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.menu-nav a {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 1.6rem + 3.5vw, 4.2rem);
    font-weight: 900;
    line-height: 1.15;
    display: block;
    color: var(--text-strong);
    transition: color var(--t-fast);
}

.menu-nav a:hover,
.menu-nav .current-menu-item a {
    color: var(--accent);
    animation: bd-glitch 240ms steps(2, jump-none) 2;
}

/* Day/night flip: bottom of the overlay */
.theme-flip {
    position: absolute;
    bottom: var(--space-5);
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 0.4em 1.2em;
    transition: color var(--t-fast), border-color var(--t-fast);
}

.theme-flip:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* --- Main --- */
.site-main {
    display: block;
}

.site-container {
    width: min(100% - 2.5rem, var(--content-width));
    margin-inline: auto;
    padding-block: clamp(1.75rem, 4vw, 3rem);
}

.page-header {
    margin-bottom: var(--space-3);
}

.page-header .page-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.page-header .page-title::before {
    content: '// ';
    color: var(--accent);
}

.no-results {
    font-family: var(--font-mono);
    color: var(--text-dim);
}

/* --- Post list --- */
.posts-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2);
    max-width: 56rem;
    margin-inline: auto;
}

/* Rainbow left edge, slowly cycling. No shadows, no hover motion. */
@keyframes bd-rainbow {
    0%   { border-left-color: hsl(0, 75%, 62%); }
    17%  { border-left-color: hsl(60, 75%, 58%); }
    33%  { border-left-color: hsl(120, 60%, 55%); }
    50%  { border-left-color: hsl(180, 70%, 55%); }
    67%  { border-left-color: hsl(240, 75%, 65%); }
    83%  { border-left-color: hsl(300, 70%, 62%); }
    100% { border-left-color: hsl(360, 75%, 62%); }
}

.card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-left: 4px solid hsl(200, 75%, 60%);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    animation: bd-rainbow 16s linear infinite;
}

/* Stagger the cycle so the list cascades through the spectrum */
.posts-list .card:nth-child(6n+2) { animation-delay: -2.7s; }
.posts-list .card:nth-child(6n+3) { animation-delay: -5.4s; }
.posts-list .card:nth-child(6n+4) { animation-delay: -8.1s; }
.posts-list .card:nth-child(6n+5) { animation-delay: -10.8s; }
.posts-list .card:nth-child(6n)   { animation-delay: -13.5s; }

/* Hover: soft glow pulsing at 1Hz. Runs alongside the rainbow border
   animation so the spectrum keeps cycling while hovered. */
@keyframes bd-glow-pulse {
    0%, 100% {
        box-shadow: 0 0 4px 0 var(--glow);
    }
    50% {
        box-shadow:
            0 0 14px 2px var(--glow),
            0 0 3px 0 color-mix(in srgb, var(--accent) 30%, transparent);
    }
}

.card:hover {
    animation:
        bd-rainbow 16s linear infinite,
        bd-glow-pulse 1s ease-in-out infinite;
}

.card-thumb {
    display: block;
    position: relative;
    width: clamp(104px, 20vw, 190px);
    aspect-ratio: 1;
    flex-shrink: 0;
    overflow: hidden;
    border-right: 1px solid var(--border);
    align-self: center;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.92);
}

/* Hover only: gentle static shimmer, clipped by the thumb's
   overflow:hidden so it never leaves its lane. Burst up front for
   immediate feedback, then rests and repeats. */
.card:hover .card-thumb img {
    animation: bd-img-glitch 2.8s linear infinite;
}

@keyframes bd-img-glitch {
    0%, 9%, 100% {
        transform: translateX(0);
        filter: saturate(0.92);
    }
    2% {
        transform: translateX(-1.5px);
        filter: saturate(1.06) hue-rotate(4deg);
    }
    4% {
        transform: translateX(1px);
        filter: saturate(0.85) hue-rotate(-3deg);
    }
    7% {
        transform: translateX(-0.5px);
        filter: saturate(1);
    }
}

/* Pre-rendered noise texture; only its opacity/position animate. */
.card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/><feColorMatrix type='matrix' values='0 0 0 0 0.75 0 0 0 0 0.85 0 0 0 0 1 0.6 0.6 0.6 0 0'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>");
    mix-blend-mode: screen;
    opacity: 0;
}

.card:hover .card-thumb::after {
    animation: bd-static-flicker 2.8s linear infinite;
}

@keyframes bd-static-flicker {
    0%, 9%, 100% { opacity: 0; }
    2% { opacity: 0.11; background-position: 0 0; }
    4% { opacity: 0.06; background-position: 40px 60px; }
    7% { opacity: 0.09; background-position: -30px 20px; }
}

/* No featured image: glitchy CRT photo, gradient behind as fallback
   while the image loads (or if it is missing). */
.card-thumb--empty {
    background:
        url('assets/images/placeholder-tv.jpg') center/cover no-repeat,
        linear-gradient(135deg, #12203f 0%, #0b1020 100%);
}

.card-body {
    padding: var(--space-2) var(--space-3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-1);
    flex: 1;
    min-width: 0;
}

.card-meta,
.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35em var(--space-2);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.card-meta a,
.post-meta a {
    color: var(--text-dim);
}

.card-meta a:hover,
.post-meta a:hover {
    color: var(--accent);
}

.card-title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 1.05rem + 1.1vw, 1.6rem);
    font-weight: 900;
    line-height: 1.3;
    text-wrap: balance;
}

.card-title a {
    color: var(--text-strong);
    display: block;
}

.card-title a:hover {
    color: var(--accent);
    text-shadow:
        -1.5px 0 var(--glitch-cyan),
        1.5px 0 var(--glitch-magenta);
    animation: bd-glitch 240ms steps(2, jump-none) 2;
}

.card-excerpt p {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-dim);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sticky .card-title::after,
article.sticky .card-title::after {
    content: ' *';
    color: var(--accent);
}

/* --- Single --- */
.single-article {
    max-width: var(--prose-width);
    margin-inline: auto;
}

.single-hero {
    /* Shrink-wrap: the border hugs the image even when an old upload is
       narrower than the column. */
    width: fit-content;
    max-width: 100%;
    margin: 0 auto var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.single-hero img {
    display: block;
}

.single-title {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 1.25rem + 2vw, 2.6rem);
    font-weight: 900;
    line-height: 1.2;
    text-wrap: balance;
    color: var(--text-strong);
    margin: var(--space-1) 0 var(--space-3);
}

.entry-content > * + * {
    margin-top: var(--space-2);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-strong);
    line-height: 1.3;
    margin-top: var(--space-4);
}

.entry-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--border-strong);
}

.entry-content a:hover {
    text-decoration-color: var(--accent);
}

.entry-content blockquote {
    font-family: var(--font-mono);
    font-size: 0.95em;
    border-left: 2px solid var(--accent);
    padding-left: var(--space-2);
    color: var(--text-dim);
}

.entry-content ul {
    list-style: square;
    padding-left: var(--space-3);
}

.entry-content ol {
    list-style: decimal;
    padding-left: var(--space-3);
}

.entry-content pre,
.entry-content code {
    font-family: var(--font-code);
    font-size: 0.9em;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.entry-content code {
    padding: 0.1em 0.4em;
}

.entry-content pre {
    padding: var(--space-2);
    overflow-x: auto;
}

.entry-content img {
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.entry-tags {
    margin-top: var(--space-4);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}

.entry-tags a {
    color: var(--text-dim);
}

.entry-tags a::before {
    content: '#';
    color: var(--accent);
}

.entry-tags a:hover {
    color: var(--accent);
}

/* --- Pagination / post navigation --- */
.pagination,
.post-navigation {
    margin-top: var(--space-4);
    font-family: var(--font-mono);
}

.pagination .nav-links,
.post-navigation .nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.post-navigation .nav-links {
    justify-content: space-between;
}

.pagination .page-numbers,
.post-navigation .nav-links a {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
}

.pagination a:hover,
.post-navigation .nav-links a:hover {
    color: var(--accent);
}

.pagination .page-numbers.current {
    color: var(--accent);
}

.pagination .page-numbers.current::before {
    content: '[';
}

.pagination .page-numbers.current::after {
    content: ']';
}

.pagination a.next::after,
.post-navigation .nav-previous a::after {
    content: '>>';
}

.pagination a.prev::before,
.post-navigation .nav-next a::before {
    content: '<<';
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: var(--space-5);
    padding: var(--space-4) 0;
}

.footer-inner {
    width: min(100% - 2.5rem, var(--content-width));
    margin-inline: auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

@media (min-width: 700px) {
    .footer-top {
        grid-template-columns: 2fr 1fr;
    }
}

.footer-heading {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: var(--space-2);
}

.footer-heading::before {
    content: '// ';
    color: var(--accent);
}

.footer-about p {
    font-size: 0.95rem;
    color: var(--text-dim);
    max-width: 46ch;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-nav a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}

.footer-nav a {
    display: inline-block;
}

.footer-nav a:hover {
    color: var(--accent);
    animation: bd-glitch 240ms steps(2, jump-none) 2;
}

.footer-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    padding-top: var(--space-3);
}

.footer-meta a {
    color: var(--text-dim);
}

.footer-meta a:hover {
    color: var(--accent);
}

/* --- Utilities --- */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    clip: auto;
    width: auto;
    height: auto;
    margin: 0;
    padding: var(--space-1) var(--space-2);
    background: var(--bg-panel);
    color: var(--accent);
    z-index: 100000;
    text-decoration: none;
}

.skip-link {
    position: absolute;
    top: 0;
    left: 0;
}

/* --- WordPress core classes --- */
.alignleft {
    float: left;
    margin: 0.5em 1.5em 1em 0;
}

.alignright {
    float: right;
    margin: 0.5em 0 1em 1.5em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text,
.gallery-caption {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: var(--space-1);
}

.bypostauthor {
    display: block;
}

/* --- Reduced motion: no glitch jitter --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Print --- */
@media print {
    .site-header,
    .site-footer,
    .pagination,
    .theme-flip {
        display: none;
    }

    body::before,
    body::after {
        display: none;
    }
}
