*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root,
[data-theme="light"] {
    --bg: #f4f1ec;
    --bg-panel: rgba(255, 253, 250, 0.72);
    --nav-bg: rgba(244, 241, 236, 0.6);
    --ink: #1a1d22;
    --ink-muted: #595f68;
    --ink-dim: #9299a2;
    --accent: #2c5a7a;
    --border: rgba(26, 29, 34, 0.1);

    /* Canvas palette — read by storm.js */
    --canvas-bg: #f4f1ec;
    --dot-1-r: 200; --dot-1-g: 195; --dot-1-b: 188;
    --dot-2-r: 120; --dot-2-g: 115; --dot-2-b: 128;
    --dot-3-r: 30;  --dot-3-g: 40;  --dot-3-b: 78;
}

[data-theme="tokyo"] {
    --bg: #07070d;
    --bg-panel: rgba(15, 16, 28, 0.72);
    --nav-bg: rgba(7, 7, 13, 0.65);
    --ink: #e8f4ff;
    --ink-muted: #5a6a82;
    --ink-dim: #3a4558;
    --accent: #64dcff;
    --border: rgba(100, 220, 255, 0.12);

    --canvas-bg: #07070d;
    --dot-1-r: 10;  --dot-1-g: 12;  --dot-1-b: 18;
    --dot-2-r: 45;  --dot-2-g: 130; --dot-2-b: 170;
    --dot-3-r: 200; --dot-3-g: 240; --dot-3-b: 255;
}

/* Neon glow on wordmark in Tokyo mode */
[data-theme="tokyo"] .wordmark {
    color: #e8f4ff;
    text-shadow:
        0 0 10px rgba(100, 220, 255, 0.8),
        0 0 30px rgba(100, 220, 255, 0.5),
        0 0 60px rgba(60, 180, 255, 0.3),
        0 0 120px rgba(60, 140, 255, 0.15);
    animation: neon-breathe 4s ease-in-out infinite, fade-up 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[data-theme="tokyo"] .panel-title {
    color: #e8f4ff;
    text-shadow: 0 0 10px rgba(100, 220, 255, 0.3);
}

[data-theme="tokyo"] .nav-brand {
    color: #e8f4ff;
    text-shadow: 0 0 8px rgba(100, 220, 255, 0.3);
}

@keyframes neon-breathe {
    0%, 100% {
        text-shadow:
            0 0 10px rgba(100, 220, 255, 0.8),
            0 0 30px rgba(100, 220, 255, 0.5),
            0 0 60px rgba(60, 180, 255, 0.3),
            0 0 120px rgba(60, 140, 255, 0.15);
    }
    50% {
        text-shadow:
            0 0 15px rgba(100, 220, 255, 0.9),
            0 0 40px rgba(100, 220, 255, 0.55),
            0 0 80px rgba(60, 180, 255, 0.35),
            0 0 140px rgba(60, 140, 255, 0.2);
    }
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.92rem;
    font-weight: 300;
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

#storm-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}

/* ---- Nav ---- */

nav {
    position: fixed; top: 0; left: 0;
    width: 100%; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 2.5rem;
    background: var(--nav-bg);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease;
}

.nav-brand {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
}
.nav-brand:hover { color: var(--accent); }

.nav-links { display: flex; gap: 0.3rem; align-items: center; }

.nav-links a {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-muted);
    text-decoration: none;
    padding: 0.5rem 0.9rem;
    transition: all 0.25s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active {
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
}

/* ---- Theme switcher ---- */


/* ---- Hero ---- */

.hero {
    position: fixed; inset: 0; z-index: 5;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    pointer-events: none;
}

.wordmark {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    letter-spacing: -0.04em;
    font-size: clamp(4rem, 14vw, 12rem);
    color: var(--ink);
    line-height: 0.9;
    animation: fade-up 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-sub {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.5vw, 1.25rem);
    color: var(--ink-muted);
    letter-spacing: 0.08em;
    margin-top: 1.8rem;
    max-width: 640px;
    padding: 0 1.5rem;
    text-align: center;
    line-height: 1.6;
    animation: fade-up 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    opacity: 0;
    transform: translateY(15px);
}

/* ---- Inner pages ---- */

.page-inner { cursor: default; }

.content-panel {
    position: relative; z-index: 10;
    display: flex; justify-content: center;
    padding-top: calc(65px + 2.5rem);
    padding-left: 2rem; padding-right: 2rem; padding-bottom: 3rem;
}

.panel {
    width: 100%; max-width: 620px;
    background: var(--bg-panel);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 3rem 3.5rem;
    box-shadow: 0 8px 30px rgba(26, 29, 34, 0.06);
    animation: panel-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(10px);
    align-self: flex-start;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.panel-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 2rem;
}

.panel-body p {
    margin-bottom: 1.1rem;
    color: var(--ink);
    line-height: 1.75;
}

.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.6rem;
    margin-top: 0.6rem;
}

.divider {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 2rem 0;
}

.service-block { margin-bottom: 0.5rem; }

/* ---- Links ---- */

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}
a:hover { border-bottom-color: var(--accent); }

/* ---- Footer ---- */

footer {
    position: fixed; bottom: 0; left: 0;
    width: 100%; z-index: 20;
    padding: 0.9rem 2rem;
    display: flex; justify-content: center; align-items: center;
    gap: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
    border-top: 1px solid var(--border);
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.3s ease;
}

.page-inner {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.page-inner .content-panel { flex: 1; }
.page-inner footer { position: relative; z-index: 10; }

.footer-icon {
    color: var(--ink-muted);
    text-decoration: none;
    transition: all 0.25s ease;
    display: flex; align-items: center;
    border-bottom: none;
}
.footer-icon:hover {
    color: var(--accent);
    border-bottom: none;
}

/* ---- Floating theme toggle ---- */

.theme-toggle {
    position: fixed;
    bottom: 4rem;
    right: 1.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 0;
    z-index: 30;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.theme-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Light mode shows the Tokyo circle (what you'd switch to) */
[data-theme="light"] .theme-toggle {
    background: linear-gradient(135deg, #07070d 0%, #64dcff 100%);
    border-color: rgba(26, 29, 34, 0.2);
}

/* Tokyo mode shows the light circle — with neon glow */
[data-theme="tokyo"] .theme-toggle {
    background: #f4f1ec;
    border-color: rgba(100, 220, 255, 0.4);
    box-shadow:
        0 0 10px rgba(100, 220, 255, 0.5),
        0 0 25px rgba(100, 220, 255, 0.3),
        0 0 50px rgba(60, 180, 255, 0.2);
    animation: neon-breathe-toggle 4s ease-in-out infinite;
}

[data-theme="tokyo"] .theme-toggle:hover {
    box-shadow:
        0 0 15px rgba(100, 220, 255, 0.7),
        0 0 35px rgba(100, 220, 255, 0.45),
        0 0 70px rgba(60, 180, 255, 0.3);
}

@keyframes neon-breathe-toggle {
    0%, 100% {
        box-shadow:
            0 0 10px rgba(100, 220, 255, 0.5),
            0 0 25px rgba(100, 220, 255, 0.3),
            0 0 50px rgba(60, 180, 255, 0.2);
    }
    50% {
        box-shadow:
            0 0 15px rgba(100, 220, 255, 0.6),
            0 0 35px rgba(100, 220, 255, 0.4),
            0 0 70px rgba(60, 180, 255, 0.25);
    }
}

@media (max-width: 640px) {
.theme-toggle {
        width: 20px;
        height: 20px;
        bottom: 3.0rem;
        right: 0.9rem;
    }
}

/* ---- Animations ---- */

@keyframes fade-up {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes panel-in {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive ---- */

@media (max-width: 640px) {
    nav {
        flex-direction: column;
        gap: 0.7rem;
        padding: 0.9rem 1rem;
    }
    .hero-sub {
        font-size: 0.95rem;
        letter-spacing: 0.04em;
        padding: 0 1.5rem;
        line-height: 1.55;
        max-width: 90%;
    }
    .nav-brand { font-size: 1rem; }
    .nav-links { gap: 0.1rem; flex-wrap: wrap; justify-content: center; }
    .nav-links a { font-size: 0.68rem; padding: 0.35rem 0.6rem; letter-spacing: 0.12em; }
    .content-panel { padding: 8rem 1rem 3rem; }
    .panel { padding: 2rem 1.5rem; }
    .panel-title { font-size: 1.25rem; }
    footer { font-size: 0.65rem; padding: 0.7rem 1rem; }
    .page-inner .content-panel { padding-bottom: 1rem; }
}

/* ══════════════════════════════════════════════════════════
   HAMBURGER BUTTON
══════════════════════════════════════════════════════════ */

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 25;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animate to X when open */
.nav-open .nav-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-hamburger span:nth-child(2) { opacity: 0; }
.nav-open .nav-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════════════════════════
   OFF-CANVAS OVERLAY
══════════════════════════════════════════════════════════ */

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}
.nav-overlay.open {
    display: block;
    opacity: 1;
}

/* ══════════════════════════════════════════════════════════
   OFF-CANVAS PANEL
══════════════════════════════════════════════════════════ */

.nav-offcanvas {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    z-index: 50;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4rem 2.5rem 3rem;
    border-left: 1px solid var(--border);
}

.nav-offcanvas.open {
    transform: translateX(0);
}

.nav-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--ink-muted);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
}
.nav-close:hover { color: var(--ink); }

.offcanvas-links {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    width: 100%;
}

.offcanvas-links a {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 1.35rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    text-decoration: none;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s ease, padding-left 0.2s ease;
    border-right: none;
}
.offcanvas-links a:first-child { border-top: 1px solid var(--border); }
.offcanvas-links a:hover,
.offcanvas-links a.active {
    color: var(--ink);
    padding-left: 0.5rem;
}
.offcanvas-links a.active {
    border-bottom-color: var(--ink);
}

/* ══════════════════════════════════════════════════════════
   LANGUAGE SWITCHER
══════════════════════════════════════════════════════════ */

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: var(--ink-dim);
    padding: 0.35rem 0.4rem;
    transition: color 0.2s ease;
    line-height: 1;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.active {
    color: var(--ink);
    font-weight: 700;
}

.lang-sep {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--ink-dim);
    pointer-events: none;
    user-select: none;
}

/* Off-canvas lang strip at bottom */
.offcanvas-lang {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 2.5rem;
}
.offcanvas-lang .lang-btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.6rem;
    color: var(--ink-muted);
}
.offcanvas-lang .lang-btn.active { color: var(--ink); }
.offcanvas-lang .lang-sep { font-size: 0.75rem; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE OVERRIDES
══════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    /* Reset the old stacked nav */
    nav {
        flex-direction: row !important;
        gap: 0 !important;
        padding: 1rem 1.25rem !important;
        align-items: center;
        justify-content: space-between;
    }

    /* Hide desktop links on mobile */
    .nav-desktop { display: none !important; }

    /* Show hamburger on mobile */
    .nav-hamburger { display: flex; }
}

/* ══════════════════════════════════════════════════════════
   MOBILE NAV — centered brand with flanking hamburger
══════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    nav {
        /* Three-column grid: spacer | brand | hamburger */
        display: grid !important;
        grid-template-columns: 34px 1fr 34px;
        align-items: center;
    }

    /* Spacer occupies column 1 (mirrors hamburger width on right) */
    nav::before {
        content: '';
        display: block;
        width: 34px;
    }

    .nav-brand {
        grid-column: 2;
        text-align: center;
        justify-self: center;
    }

    .nav-hamburger {
        grid-column: 3;
        justify-self: end;
    }
}

/* ══════════════════════════════════════════════════════════
   OFF-CANVAS HEADER — brand aligned with navbar
══════════════════════════════════════════════════════════ */

.offcanvas-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 65px;
    /* Three-column grid mirrors the mobile navbar exactly:
       close-btn-width | brand centered | close-btn */
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--border);
}

/* On desktop match the wider nav padding */
@media (min-width: 641px) {
    .offcanvas-header {
        grid-template-columns: 40px 1fr 40px;
        padding: 0 2.5rem;
    }
}

/* Empty first cell — spacer to balance the close button */
.offcanvas-header::before {
    content: '';
    display: block;
}

.offcanvas-brand {
    grid-column: 2;
    text-align: center;
    justify-self: center;
    border-bottom: none !important;
    padding: 0 !important;
    color: var(--ink) !important;
}
.offcanvas-brand:hover { color: var(--accent) !important; border-bottom: none !important; }

/* Close button sits in column 3 */
#nav-close {
    grid-column: 3;
    justify-self: end;
    /* Override the old absolute positioning */
    position: static;
    top: auto;
    right: auto;
}

/* Shift links section down below the header bar */
.nav-offcanvas {
    padding-top: calc(65px + 2.5rem) !important;
    justify-content: flex-start !important;
}

/* ══════════════════════════════════════════════════════════
   SUBDOMAIN NAV — shared by blog.fló.fo and avhending.fló.fo
   A distinct nav bar with a prominent back-link to the apex.
   Note: uses !important on the grid + padding to defeat the main-site
   mobile `nav` overrides earlier in this file, which otherwise force
   grid-template-columns: 34px 1fr 34px and inject a nav::before spacer —
   that was crushing the back-link into a 34px column on mobile.
══════════════════════════════════════════════════════════ */

.subdomain-nav {
    display: grid !important;
    /* 1fr on each side so the brand stays optically centred in the viewport
       regardless of what's on either side (currently only the back-link). */
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center;
    gap: 1rem;
}

/* Kill the phantom spacer pseudo-element the main-site mobile rules add. */
.subdomain-nav::before { content: none !important; display: none !important; }

.subdomain-nav .back-link {
    grid-column: 1;
    justify-self: start;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--ink-muted);
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.subdomain-nav .back-link:hover {
    color: var(--ink);
    border-color: var(--ink-muted);
    background: var(--bg-panel);
}

/* Compound brand: "FLÓ / BLOG" or "FLÓ / AVHENDING" */
.subdomain-nav .nav-brand {
    grid-column: 2;
    justify-self: center;
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    white-space: nowrap;
}
.subdomain-nav .brand-sep {
    font-weight: 300;
    color: var(--ink-dim);
}
.subdomain-nav .brand-sub {
    font-weight: 400;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
    align-self: center;
    padding-top: 2px;
}

/* Single right-side link ([POSTS] or [YVIRLIT]) */
.subdomain-nav-link {
    grid-column: 3;
    justify-self: end;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-muted);
    text-decoration: none;
    padding: 0.5rem 0.9rem;
    white-space: nowrap;
    transition: color 0.25s ease;
    border-bottom: 1px solid transparent;
}
.subdomain-nav-link:hover { color: var(--ink); border-bottom-color: transparent; }
.subdomain-nav-link.active {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

@media (max-width: 640px) {
    .subdomain-nav {
        gap: 0.5rem;
        padding: 0.85rem 0.85rem !important;
    }
    .subdomain-nav .back-link {
        font-size: 0.58rem;
        padding: 0.25rem 0.4rem;
        letter-spacing: 0.08em;
    }
    .subdomain-nav .nav-brand {
        font-size: 0.9rem;
    }
    .subdomain-nav .brand-sub {
        font-size: 0.6rem;
        letter-spacing: 0.1em;
    }
    .subdomain-nav-link {
        font-size: 0.58rem;
        padding: 0.25rem 0.4rem;
        letter-spacing: 0.08em;
    }
}

/* ══════════════════════════════════════════════════════════
   BLOG SHELL — calm, reading-focused, no storm canvas
══════════════════════════════════════════════════════════ */

.blog-shell {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.blog-shell .reading-column {
    flex: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: calc(65px + 3rem) 2rem 4rem;
}

.blog-shell footer {
    position: relative;
    z-index: 10;
}

.blog-masthead {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.masthead-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.masthead-sub {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.88rem;
    color: var(--ink-muted);
    letter-spacing: 0.04em;
}

/* Post list entries — block-level link, date above title, preview below */
.post-list {
    display: flex;
    flex-direction: column;
}

.post-entry {
    border-bottom: 1px solid var(--border);
}

.post-entry-link {
    display: block;
    padding: 1.25rem 0;
    color: inherit;
    text-decoration: none;
    border-bottom: none !important;
    transition: padding-left 0.2s ease;
}
.post-entry-link:hover {
    padding-left: 0.5rem;
    border-bottom: none !important;
}
.post-entry-link:hover .post-entry-title {
    color: var(--accent);
}

.post-entry-date {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: 0.3rem;
}

.post-entry-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 0.35rem;
    transition: color 0.2s ease;
}

.post-entry-summary {
    color: var(--ink-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.post-empty {
    color: var(--ink-muted);
    padding: 2rem 0;
}

/* Single post view */
.post {
    padding-top: 0.5rem;
}

.post-back-top {
    margin-bottom: 1.5rem;
}
.post-back-top .post-back {
    display: inline-block;
}

.post-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: 0.6rem;
}

.post-title-lg {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 2rem;
    line-height: 1.25;
}

.post-body {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--ink);
}

.post-body h2,
.post-body h3 {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--ink);
    margin: 2rem 0 0.8rem;
    letter-spacing: -0.01em;
}
.post-body h2 { font-size: 1.15rem; }
.post-body h3 { font-size: 1rem; }

.post-body p { margin-bottom: 1.15rem; }

.post-body ul,
.post-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.15rem;
}
.post-body li { margin-bottom: 0.35rem; }

.post-body blockquote {
    border-left: 2px solid var(--accent);
    padding: 0.2rem 0 0.2rem 1.1rem;
    color: var(--ink-muted);
    margin: 1.25rem 0;
    font-style: italic;
}

.post-foot {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.post-back {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    border-bottom: none;
}
.post-back:hover { color: var(--accent); border-bottom: none; }

@media (max-width: 640px) {
    .blog-shell .reading-column {
        padding: calc(55px + 2rem) 1.25rem 2.5rem;
    }
    .masthead-title { font-size: 1.35rem; }
    .post-title-lg  { font-size: 1.45rem; }
    .post-body      { font-size: 0.9rem; }
}

/* ══════════════════════════════════════════════════════════
   WIKI SHELL — avhending.fló.fo, sidebar + content
══════════════════════════════════════════════════════════ */

.wiki-shell {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wiki-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding-top: 65px;
}

/* Sidebar */
.wiki-sidebar {
    border-right: 1px solid var(--border);
    padding: 2.5rem 1.5rem 2.5rem 2rem;
    position: sticky;
    top: 65px;
    align-self: start;
    height: calc(100vh - 65px - 3rem);
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
}

.wiki-sidebar-group { margin-bottom: 1.75rem; }

.wiki-sidebar-heading {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: 0.5rem;
}

.wiki-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wiki-sidebar li {
    margin-bottom: 0.2rem;
}

.wiki-sidebar a {
    display: block;
    font-size: 0.85rem;
    color: var(--ink-muted);
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border-left: 2px solid transparent;
    border-radius: 0 2px 2px 0;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    border-bottom: none;
}
.wiki-sidebar a:hover {
    color: var(--ink);
    background: var(--bg-panel);
    border-bottom: none;
}
.wiki-sidebar a.active {
    color: var(--ink);
    border-left-color: var(--accent);
    background: var(--bg-panel);
}

.wiki-placeholder {
    display: block;
    font-size: 0.8rem;
    color: var(--ink-dim);
    padding: 0.35rem 0.6rem;
    font-style: italic;
}

/* Content */
.wiki-content {
    padding: 2.5rem 2.5rem 4rem;
    min-width: 0; /* allow long code to overflow rather than stretch grid */
}

.wiki-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.wiki-breadcrumb {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: 0.6rem;
}

.wiki-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.7rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 0.6rem;
}

.wiki-lede {
    color: var(--ink-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 62ch;
}

.wiki-section {
    margin-bottom: 2rem;
    max-width: 70ch;
}
.wiki-section h2 {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 1.8rem 0 0.6rem;
    color: var(--ink);
}
.wiki-section p {
    color: var(--ink);
    line-height: 1.75;
    margin-bottom: 1rem;
}

.wiki-shell footer { position: relative; z-index: 10; }

/* Glossary / definition lists inside wiki content */
.wiki-glossary {
    display: grid;
    grid-template-columns: minmax(8rem, 12rem) 1fr;
    gap: 0.8rem 2rem;
    margin: 0;
}
.wiki-glossary dt {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--ink);
    padding-top: 0.15rem;
}
.wiki-glossary dd {
    margin: 0;
    color: var(--ink);
    line-height: 1.65;
}
@media (max-width: 640px) {
    .wiki-glossary {
        grid-template-columns: 1fr;
        gap: 0.3rem 0;
    }
    .wiki-glossary dt { padding-top: 0.8rem; }
    .wiki-glossary dt:first-child { padding-top: 0; }
}

@media (max-width: 900px) {
    .wiki-layout {
        grid-template-columns: 1fr;
    }
    .wiki-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1.5rem 1.25rem;
    }
    .wiki-content {
        padding: 1.5rem 1.25rem 3rem;
    }
    .wiki-title { font-size: 1.4rem; }
}

/* ══════════════════════════════════════════════════════════
   CODE — inline and fenced blocks (blog + wiki)
══════════════════════════════════════════════════════════ */

.code-inline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    background: var(--border);
    color: var(--accent);
    padding: 0.1em 0.4em;
    border-radius: 3px;
    white-space: nowrap;
}

.code-block {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.65;
    background: var(--bg-panel);
    color: var(--ink);
    padding: 1.1rem 1.3rem;
    border-radius: 3px;
    overflow-x: auto;
    margin: 1.3rem 0;
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
}

.code-block code {
    background: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
    white-space: pre;
}

/* Slightly stronger code backgrounds in Tokyo theme for contrast */
[data-theme="tokyo"] .code-block {
    background: rgba(100, 220, 255, 0.04);
    border-color: rgba(100, 220, 255, 0.18);
}
[data-theme="tokyo"] .code-inline {
    background: rgba(100, 220, 255, 0.1);
    color: #a8ecff;
}
