/* ─── Theme Variables ── ──── ─── ─── ─── ─── ─── ─── ─── ─── */
:root {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f0f0;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-tertiary: #888888;
    --accent: #6b46c1;
    --accent-hover: #5530a8;
    --accent-light: rgba(107, 70, 193, 0.08);
    --border: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.06);
    --shadow-hover: rgba(0, 0, 0, 0.12);
    --code-bg: #f5f5f5;
    --tag-bg: var(--accent-light);
    --tag-text: var(--accent);
    --progress-bg: #e0e0e0;
    --footer-bg: #f5f5f5;
    --header-bg: rgba(250, 250, 250, 0.92);
    --skeleton-bg: #e8e8e8;
    --transition-speed: 0.25s;
    --fluid-type-base: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
    --fluid-type-hero: clamp(2.2rem, 1.8rem + 1.5vw, 3.2rem);
    --fluid-type-section: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
    --fluid-type-h3: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem);
    --rhizome-color: rgba(107, 70, 193, 0.12);
    --thread-color: rgba(107, 70, 193, 0.25);
    --crosslink-bg: var(--accent-light);
    --crosslink-border: rgba(107, 70, 193, 0.18);
    --crosslink-hover-bg: rgba(107, 70, 193, 0.14);
    --crosslink-hover-border: var(--accent);
    --crosslink-text: var(--accent);
    --rhythm-unit: 1.7;
    --rhythm-heading: 1.3;
    --rhythm-body: 1.8;
    --favicon-color: var(--accent);
    /* New: improved nav density */
    --nav-gap: 0.35rem;
    --nav-item-padding: 0.35rem 0.65rem;
    --nav-item-border-radius: 6px;
    --nav-item-hover-bg: var(--accent-light);
    /* New: cross-link card variables */
    --connection-gap: 0.75rem;
    --connection-border-radius: 8px;
    /* New: smoother transitions */
    --transition-fast: 0.15s ease;
    --transition-medium: 0.25s ease;
    --transition-slow: 0.4s ease;
    /* New: typography refinements */
    --letter-spacing-tight: -0.02em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.03em;
    --line-height-tight: 1.25;
    --line-height-body: 1.75;
    --line-heading: 1.2;
}

[data-theme="dark"] {
    --bg-primary: #0f0f14;
    --bg-secondary: #1a1a24;
    --bg-tertiary: #252530;
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b0;
    --text-tertiary: #6a6a7a;
    --accent: #a78bfa;
    --accent-hover: #c4b5fd;
    --accent-light: rgba(167, 139, 250, 0.1);
    --border: #2a2a35;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(167, 139, 250, 0.15);
    --code-bg: #1e1e28;
    --tag-bg: var(--accent-light);
    --tag-text: var(--accent);
    --progress-bg: #2a2a35;
    --footer-bg: #0a0a10;
    --header-bg: rgba(15, 15, 20, 0.92);
    --skeleton-bg: #1e1e28;
    --rhizome-color: rgba(167, 139, 250, 0.08);
    --thread-color: rgba(167, 139, 250, 0.18);
    --crosslink-bg: rgba(167, 139, 250, 0.07);
    --crosslink-hover-bg: rgba(167, 139, 250, 0.14);
    --crosslink-hover-border: var(--accent);
    --crosslink-text: var(--accent);
    --favicon-color: var(--accent);
    --nav-gap: 0.35rem;
    --nav-item-padding: 0.35rem 0.65rem;
    --nav-item-border-radius: 6px;
    --nav-item-hover-bg: rgba(167, 139, 250, 0.12);
    --connection-gap: 0.75rem;
    --connection-border-radius: 8px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: var(--rhythm-body);
    transition: background var(--transition-medium), color var(--transition-medium);
    overflow-x: hidden;
}

/* ─── Grain Texture Overlay (lo-fi character) ── ──── ─── ─── ─── ─── */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

[data-theme="dark"] body::before {
    opacity: 0.04;
}

/* ─── Skip Link ── ──── ─── ─── ─── ─── ─── ─── ─── ─── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    z-index: 10000;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* ─── Reading Progress Bar ── ──── ─── ─── ─── ─── ─── ─── ─── ─── */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    z-index: 10001;
    transition: width 0.1s linear;
}

/* ─── Header ── ──── ─── ─── ─── ─── ─── ─── ─── ─── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-identity {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.site-logo {
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-logo:hover {
    color: var(--accent);
}

.logo-mark {
    font-size: 1.5rem;
    color: var(--accent);
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.site-tagline {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin: 0;
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: var(--nav-gap);
    list-style: none;
}

.nav-link,
.nav-journal {
    padding: var(--nav-item-padding);
    border-radius: var(--nav-item-border-radius);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link:focus,
.nav-journal:hover,
.nav-journal:focus {
    color: var(--accent);
    background: var(--nav-item-hover-bg);
}

.nav-journal {
    color: var(--accent);
    border: 1px solid var(--accent);
}

.nav-journal:hover {
    background: var(--accent);
    color: #fff;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ─── Hero ── ──── ─── ─── ─── ─── ─── ─── ─── ─── */
.hero-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem 3rem;
    text-align: center;
}

.hero-heading {
    font-size: var(--fluid-type-hero);
    font-weight: 800;
    letter-spacing: var(--letter-spacing-tight);
    line-height: var(--line-heading);
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 400;
}

.hero-note {
    font-size: 0.95rem;
    color: var(--text-tertiary);
    max-width: 50ch;
    margin: 0 auto 1rem auto;
}

.hero-journal a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--accent);
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.hero-journal a:hover {
    background: var(--accent);
    color: #fff;
}

/* ─── Garden / Post Grid ── ──── ─── ─── ─── ─── ─── ─── ─── ─── */
.garden-section,
.map-section,
.archive-section,
.post-view {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.section-heading {
    font-size: var(--fluid-type-section);
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: var(--letter-spacing-tight);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--connection-gap);
}

.post-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.post-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--shadow-hover);
    transform: translateY(-2px);
}

.post-card-date {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.post-card-title {
    font-size: var(--fluid-type-h3);
    font-weight: 600;
    line-height: var(--line-heading);
}

.post-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.post-card-excerpt {
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.65;
    flex-grow: 1;
}

.post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--tag-bg);
    color: var(--tag-text);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.tag:hover {
    background: var(--accent);
    color: #fff;
}

/* ─── Map Section ── ──── ─── ─── ─── ─── ─── ─── ─── ─── */
.map-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--connection-gap);
}

.map-node {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all var(--transition-fast);
}

.map-node:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--shadow-hover);
}

.map-node h3 {
    font-size: var(--fluid-type-h3);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.map-node p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.map-node a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.map-node a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ─── Cross-links ── ──── ─── ─── ─── ─── ─── ─── ─── ─── */
.crosslink-card {
    display: block;
    padding: 0.85rem 1.1rem;
    background: var(--crosslink-bg);
    border: 1px solid var(--crosslink-border);
    border-radius: var(--connection-border-radius);
    text-decoration: none;
    color: var(--crosslink-text);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    margin-bottom: 0.5rem;
}

.crosslink-card:hover {
    background: var(--crosslink-hover-bg);
    border-color: var(--crosslink-hover-border);
    transform: translateX(3px);
}

.crosslink-card .crosslink-title {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.crosslink-card .crosslink-excerpt {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ─── Post View ── ──── ─── ─── ─── ─── ─── ─── ─── ─── */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.post-meta a {
    color: var(--accent);
    text-decoration: none;
}

.post-meta a:hover {
    text-decoration: underline;
}

.post-content {
    font-size: var(--fluid-type-base);
    line-height: var(--line-height-body);
    max-width: 72ch;
    margin: 0 auto;
}

.post-content h2 {
    font-size: var(--fluid-type-section);
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    letter-spacing: var(--letter-spacing-tight);
    line-height: var(--line-heading);
}

.post-content h3 {
    font-size: var(--fluid-type-h3);
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    letter-spacing: var(--letter-spacing-normal);
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.post-content a:hover {
    border-bottom-color: var(--accent);
}

.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.post-content code {
    background: var(--code-bg);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.88em;
}

.post-content pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    padding: 0;
    background: none;
}

.post-content ul,
.post-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.post-content th,
.post-content td {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    text-align: left;
}

.post-content th {
    background: var(--bg-tertiary);
    font-weight: 600;
}

/* ─── Post Navigation ── ──── ─── ─── ─── ─── ─── ─── ─── ─── */
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.post-nav a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.post-nav a:hover {
    border-bottom-color: var(--accent);
}

.post-back {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color var(--transition-fast);
}

.post-back:hover {
    color: var(--accent);
}

/* ─── Archive ── ──── ─── ─── ─── ─── ─── ─── ─── ─── */
.archive-year {
    margin-bottom: 2rem;
}

.archive-year h3 {
    font-size: var(--fluid-type-h3);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.archive-list {
    list-style: none;
}

.archive-list li {
    margin-bottom: 0.5rem;
}

.archive-list a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.archive-list a:hover {
    color: var(--accent);
}

/* ─── Footer ── ──── ─── ─── ─── ─── ─── ─── ─── ─── */
.site-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

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

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* ─── Skeleton Loading ── ──── ─── ─── ─── ─── ─── ─── ─── ─── */
.skeleton {
    background: var(--skeleton-bg);
    border-radius: 4px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ─── Theme Toggle ── ──── ─── ─── ─── ─── ─── ─── ─── ─── */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

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

/* ─── Responsive ── ──── ─── ─── ─── ─── ─── ─── ─── ─── */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .site-nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--header-bg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        transform: translateY(-120%);
        transition: transform var(--transition-medium);
        z-index: 999;
    }

    .site-nav.open {
        transform: translateY(0);
    }

    .site-nav ul {
        flex-direction: column;
        gap: 0.25rem;
    }

    .nav-link,
    .nav-journal {
        padding: 0.75rem 0.85rem;
        width: 100%;
        border-radius: 8px;
    }

    .hero-section {
        padding: 3rem 1.5rem 2rem;
    }

    .garden-section,
    .map-section,
    .archive-section,
    .post-view {
        padding: 2rem 1.5rem;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }

    .map-container {
        grid-template-columns: 1fr;
    }

    .post-nav {
        flex-direction: column;
        gap: 0.75rem;
    }

    .header-inner {
        padding: 0.6rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero-heading {
        font-size: clamp(1.8rem, 6vw, 2.4rem);
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .site-tagline {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .site-header,
    .site-footer,
    .reading-progress,
    .theme-toggle,
    .mobile-menu-toggle,
    .post-nav {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 12pt;
    }

    .post-content {
        max-width: 100%;
    }

    .post-content a {
        color: #000;
        border-bottom: none;
    }

    .post-content a::after {
        content: ' (' attr(href) ')';
        font-size: 0.85em;
        color: #666;
    }
}

/* ─── April 28, 2026 — Typography depth, section rhythm, mobile nav polish, focus accessibility ── ─── */

/* ─── Serif body text for longform reading ── ─── */
.post-content,
.post-view .post-content,
#article {
    font-family: 'Georgia', 'Noto Serif', 'Lora', 'Times New Roman', serif;
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-primary);
}

/* ─── Section breathing room ── ─── */
.garden-section,
.map-section,
.archive-section,
.post-view {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}

/* ─── Section divider lines for visual rhythm ── ─── */
.garden-section::before,
.map-section::before,
.archive-section::before {
    content: '';
    display: block;
    width: 48px;
    height: 2px;
    background: var(--accent);
    margin: 0 auto 2.5rem auto;
    opacity: 0.4;
    border-radius: 1px;
}

/* ─── Enhanced post card hover states ── ─── */
.post-card {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--shadow-hover);
    border-color: var(--accent);
}

/* ─── Subtle card entrance animation ── ─── */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: cardFadeIn 0.4s ease both;
}

.post-card:nth-child(1) { animation-delay: 0.02s; }
.post-card:nth-child(2) { animation-delay: 0.06s; }
.post-card:nth-child(3) { animation-delay: 0.10s; }
.post-card:nth-child(4) { animation-delay: 0.14s; }
.post-card:nth-child(5) { animation-delay: 0.18s; }
.post-card:nth-child(6) { animation-delay: 0.22s; }

/* ─── Hero section subtle gradient overlay ── ─── */
.hero-section {
    background: linear-gradient(180deg, var(--accent-light) 0%, var(--bg-primary) 100%);
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* ─── Improved mobile navigation visual design ── ─── */
@media (max-width: 768px) {
    .site-nav {
        padding: 0.5rem 0.75rem;
        border-top: 1px solid var(--border);
        box-shadow: 0 12px 32px var(--shadow);
    }

    .site-nav ul {
        gap: 0.2rem;
        padding: 0.2rem 0;
    }

    .site-nav .nav-link,
    .site-nav .nav-journal {
        padding: 0.85rem 0.75rem;
        font-size: 1rem;
        border-radius: 8px;
        transition: background var(--transition-fast), color var(--transition-fast);
    }

    .site-nav .nav-link:hover,
    .site-nav .nav-link:focus,
    .site-nav .nav-journal:hover,
    .site-nav .nav-journal:focus {
        background: var(--accent-light);
        color: var(--accent);
    }
}

/* ─── Focus ring for keyboard accessibility ── ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ─── Tag hover refinement ── ─── */
.tag {
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
    display: inline-block;
}

.tag:hover {
    background: var(--accent);
    color: #fff;
    transform: scale(1.05);
}

/* ─── Post back link refinement ── ─── */
.post-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.post-back:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.post-back::before {
    content: '←';
    transition: transform var(--transition-fast);
    display: inline-block;
}

.post-back:hover::before {
    transform: translateX(-3px);
}

/* ─── Footer link refinement ── ─── */
.footer-nav a {
    position: relative;
    transition: color var(--transition-fast);
}

.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width var(--transition-medium);
}

.footer-nav a:hover::after {
    width: 100%;
}

/* ─── Reading progress bar gradient refinement ── ─── */
.reading-progress {
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}

/* ─── Map node hover refinement ── ─── */
.map-node {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.map-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

/* ─── Archive year separator refinement ── ─── */
.archive-year {
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.archive-year::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--accent);
    opacity: 0.3;
    border-radius: 1px;
}

/* ─── Code block refinement ── ─── */
.post-content code {
    background: var(--code-bg);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid var(--border);
}

.post-content pre {
    background: var(--code-bg);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow-x: auto;
    margin: 1.5rem 0;
}

/* ─── Blockquote refinement ── ─── */
.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* ─── H3 heading refinement ── ─── */
.post-content h3 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--accent);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: var(--fluid-type-h3);
    letter-spacing: -0.01em;
}

/* ─── Horizontal rule refinement ── ─── */
.post-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 2.5rem 0;
}

/* ─── List refinement for longform ── ─── */
.post-content ul,
.post-content ol {
    padding-left: 1.5rem;
    margin: 1rem 0 1.5rem 0;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content li::marker {
    color: var(--accent);
}

/* ─── Subtle scrollbar color for dark mode ── ─── */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ─── Mobile nav close button refinement ── ─── */
.mobile-menu-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color var(--transition-fast);
}

.mobile-menu-toggle:hover {
    border-color: var(--accent);
}

.mobile-menu-toggle .hamburger-line {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: all var(--transition-fast);
}

/* ─── Random note button refinement ── ─── */
.random-note-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.random-note-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.03);
}

.random-note-btn:active {
    transform: scale(0.98);
}

/* ─── Skeleton loading refinement ── ─── */
.skeleton {
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--bg-tertiary) 50%, var(--skeleton-bg) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Print style refinement ── ─── */
@media print {
    .post-content {
        font-family: 'Georgia', serif;
        font-size: 11pt;
        line-height: 1.6;
    }

    .post-content a::after {
        content: ' (' attr(href) ')';
        font-size: 0.85em;
        color: var(--text-secondary);
    }
}

/* ─── May 1, 2026 — Dynamic archive groups, card read time, system health pulse ── ─── */

/* ─── Archive group styling (dynamic render) ── ─── */
.archive-group {
    margin-bottom: 2rem;
}

.archive-group h3 {
    font-size: var(--fluid-type-h3);
    font-weight: 600;
    margin-bottom: 0.75rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.archive-group h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--accent);
    opacity: 0.3;
    border-radius: 1px;
}

/* ─── Post card read time ── ─── */
.post-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-card-time {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-left: auto;
}

/* ─── System health indicator ── ─── */
.system-health {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    margin-left: 0.5rem;
}

.health-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: breathe 2s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}
/* AIJ no-output recovery: one narrowly scoped CSS improvement */

/* Accessible, theme-aware focus indicators for keyboard navigation */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

/* Suppress default focus ring on mouse interactions where supported */
:focus:not(:focus-visible) {
  outline: none;
}
/* AIJ no-output recovery: one narrowly scoped CSS improvement */

/* High-contrast focus rings for keyboard navigation without altering click states */
:focus-visible {
  outline: 2px solid var(--accent, #b8a88a);
  outline-offset: 3px;
  border-radius: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}
/* ─── Hide legacy hardcoded archive section (duplicate of #archive-index) ── ─── */
.archive-section:not(#archive-index) {
    display: none;
}
/* ─── Archive group fade-in (smooth DOM insertion) ── ─── */
@keyframes archiveGroupFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.archive-group {
    animation: archiveGroupFadeIn 0.4s ease-out both;
}

/* Stagger groups when there are multiple */
.archive-group:nth-child(1) { animation-delay: 0s; }
.archive-group:nth-child(2) { animation-delay: 0.06s; }
.archive-group:nth-child(3) { animation-delay: 0.12s; }
.archive-group:nth-child(4) { animation-delay: 0.18s; }
.archive-group:nth-child(5) { animation-delay: 0.24s; }
.archive-group:nth-child(6) { animation-delay: 0.30s; }
.archive-group:nth-child(n+7) { animation-delay: 0.36s; }

/* ─── Reduce motion for users who prefer it ── ─── */
@media (prefers-reduced-motion: reduce) {
    .archive-group {
        animation: none;
    }
}
/* ─── Reading progress bar accent gradient ── ─── */
.reading-progress {
    background: var(--progress-bg);
    transition: width 0.1s linear;
    background-image: linear-gradient(90deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 70%, var(--accent-light)) 100%);
    background-size: 100% 100%;
    border-radius: 0 2px 2px 0;
}

/* ─── Consolidated focus-visible rule (eliminates duplicate) ── ─── */
:focus-visible {
    outline: 2px solid var(--accent, #b8a88a);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ─── Archive group staggered fade-in ── ─── */
@keyframes archiveGroupFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.archive-group {
    animation: archiveGroupFadeIn 0.4s ease-out both;
}

/* Stagger groups when there are multiple */
.archive-group:nth-child(1) { animation-delay: 0s; }
.archive-group:nth-child(2) { animation-delay: 0.06s; }
.archive-group:nth-child(3) { animation-delay: 0.12s; }
.archive-group:nth-child(4) { animation-delay: 0.18s; }
.archive-group:nth-child(5) { animation-delay: 0.24s; }
.archive-group:nth-child(6) { animation-delay: 0.30s; }
.archive-group:nth-child(n+7) { animation-delay: 0.36s; }

/* ─── Reduce motion for users who prefer it ── ─── */
@media (prefers-reduced-motion: reduce) {
    .archive-group {
        animation: none;
    }
    .reading-progress {
        transition: none;
    }
}
/* Structural layout: constrain dynamic archive to match other sections */
#archive-index {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

@media (max-width: 768px) {
    #archive-index {
        padding: 2rem 1.5rem;
    }
}
/* ─── Dynamic archive section visual rhythm ── ─── */
#archive-index::before {
    content: '';
    display: block;
    width: 48px;
    height: 2px;
    background: var(--accent);
    margin: 0 auto 2.5rem auto;
    opacity: 0.4;
    border-radius: 1px;
}
/* ─── Post aside / metadata card ── ─── */
.post-aside {
    margin: 2.5rem auto 0;
    max-width: 72ch;
    padding: 0 2rem;
}

.aside-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.aside-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--shadow-hover);
}

.aside-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: var(--letter-spacing-tight);
    color: var(--text-primary);
}

.aside-card dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.6rem 1.25rem;
    margin: 0;
}

.aside-card dt {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    align-self: center;
}

.aside-card dd {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    align-self: center;
}

.aside-card dd time {
    color: var(--text-primary);
    font-weight: 500;
}

@media (max-width: 768px) {
    .post-aside {
        padding: 0 1.5rem;
        margin-top: 2rem;
    }

    .aside-card {
        padding: 1rem;
    }

    .aside-card dl {
        gap: 0.5rem 1rem;
    }
}
/* ─── May 2026 — Post header visual hierarchy & article lead treatment ── ─── */

/* Post header inner layout */
.post-header {
    background: linear-gradient(180deg, var(--accent-light) 0%, transparent 100%);
    padding: 2.5rem 0 0;
    margin-bottom: 0;
}

.post-header-inner {
    max-width: 72ch;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

/* Article lead paragraph — pull-quote style opening */
.article-lead {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-style: italic;
    border-left: 3px solid var(--accent);
    padding: 0.75rem 1.25rem;
    margin: 0 0 2rem 0;
    background: var(--accent-light);
    border-radius: 0 6px 6px 0;
}

[data-theme="dark"] .article-lead {
    color: var(--text-secondary);
    background: rgba(167, 139, 250, 0.06);
}

/* Article body container */
.article-body {
    max-width: 72ch;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
    font-family: 'Georgia', 'Noto Serif', 'Lora', 'Times New Roman', serif;
    font-size: 1.05rem;
    line-height: 1.85;
}

/* Post date styling */
.post-date {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
    font-family: 'Inter', -apple-system, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Post tags inline with date */
.post-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--tag-bg);
    color: var(--tag-text);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'Inter', -apple-system, sans-serif;
    text-decoration: none;
}

/* Reading time badge */
.reading-time {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-family: 'Inter', -apple-system, sans-serif;
}

/* Post footer nav */
.post-footer-nav {
    max-width: 72ch;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
    border-top: 1px solid var(--border);
}

/* Footer journal link — prominent */
.footer-journal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--accent);
    border-radius: 6px;
    transition: all var(--transition-fast);
    margin-bottom: 0.75rem;
}

.footer-journal-link:hover {
    background: var(--accent);
    color: #fff;
}

.journal-icon {
    font-size: 0.85rem;
}

/* Footer layout */
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.footer-note {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    margin: 0;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ─── Post card tag alias (post-card-tag → tag styles) ── ─── */
.post-card-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--tag-bg);
    color: var(--tag-text);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

/* ─── Map node title + count layout ── ─── */
.node-title {
    display: block;
    font-size: var(--fluid-type-h3);
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.node-count {
    display: block;
    font-size: 0.82rem;
    color: var(--text-tertiary);
    margin-bottom: 0.75rem;
}

/* ─── prefers-reduced-motion: disable all decorative animations ── ─── */
@media (prefers-reduced-motion: reduce) {
    .post-card,
    .archive-group,
    .health-pulse,
    .skeleton,
    .reading-progress {
        animation: none !important;
        transition: none !important;
    }
}

/* ─── Structure score improvement: archive-index heading & list polish ── ─── */
#archive-index h2 {
    font-size: var(--fluid-type-section);
    font-weight: 700;
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: 1.5rem;
}

#archive-index ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#archive-index li {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

#archive-index li:last-child {
    border-bottom: none;
}

#archive-index li a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#archive-index li a:hover {
    color: var(--accent);
}

/* ─── Map node link inside card ── ─── */
.map-node-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--accent);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.map-node-link:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}
/* ─── 2026-05-09 — Desire Paths: Post-card hover trail & archive section rhythm ── */

/* Desire path visual: subtle left-border accent that "grows" on hover, 
   evoking the worn diagonal cut across a lawn */
.post-card {
    border-left: 3px solid transparent;
    transition: border-left-color var(--transition-fast), 
                box-shadow var(--transition-fast), 
                transform var(--transition-fast);
}

.post-card:hover {
    border-left-color: var(--accent);
}

/* ─── Section divider rhythm: thin ruled line before each major section ── */
.garden-section,
.map-section,
#archive-index {
    border-top: 1px solid var(--border);
    padding-top: 3rem;
    margin-top: 0;
}

.hero-section + .garden-section {
    border-top: none;
}

/* ─── Archive list: date column right-aligned, legible at a glance ── */
#archive-index li {
    grid-template-columns: 1fr auto;
}

#archive-index .archive-date {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ─── Map node: breathing pulse on hover (desire path: the node invites) ── */
.map-node {
    position: relative;
    overflow: hidden;
}

.map-node::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: radial-gradient(circle at 50% 120%, var(--accent-light) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-medium);
    pointer-events: none;
}

.map-node:hover::after {
    opacity: 1;
}

/* ─── Structure improvement: #archive-index gets a visible section heading ── */
#archive-index > h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#archive-index > h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
    display: block;
}

/* ─── prefers-reduced-motion: disable map-node radial pulse ── */
@media (prefers-reduced-motion: reduce) {
    .map-node::after {
        display: none;
    }
    .post-card {
        transition: none !important;
    }
}
/* ─── 2026-05-09 (Weekend/Claude) — Desire Paths: Typographic depth & structural clarity ── */

/* ── Post article body: tighter serif leading, drop-cap opening ── */
.article-body > p:first-of-type::first-letter {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 0.85;
    float: left;
    margin: 0.05em 0.12em 0 0;
    color: var(--accent);
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* ── Hero section: subtle gradient underline on heading ── */
.hero-heading {
    background: linear-gradient(135deg, var(--text-primary) 60%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fallback for browsers without background-clip: text */
@supports not (-webkit-background-clip: text) {
    .hero-heading {
        color: var(--text-primary);
        background: none;
        -webkit-text-fill-color: unset;
    }
}

/* Dark mode: softer gradient so text remains readable */
[data-theme="dark"] .hero-heading {
    background: linear-gradient(135deg, var(--text-primary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* ── Post header: gradient fade from accent-light to transparent ── */
.post-header {
    background: linear-gradient(180deg, var(--accent-light) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

/* ── Section headings: ruled accent line below ── */
.section-heading {
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2.5rem;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    opacity: 0.6;
}

/* ── Archive list: stronger visual separation between entries ── */
#archive-index li {
    padding: 0.6rem 0;
    transition: background var(--transition-fast);
    border-radius: 4px;
    padding-left: 0.25rem;
}

#archive-index li:hover {
    background: var(--accent-light);
    padding-left: 0.5rem;
    transition: padding-left var(--transition-medium), background var(--transition-fast);
}

/* ── Post card: reading-time color refinement ── */
.post-card-time {
    color: var(--accent);
    opacity: 0.75;
    font-size: 0.78rem;
}

/* ── Map section heading alignment ── */
.map-section .section-heading {
    margin-bottom: 1.75rem;
}

/* ── Footer: stronger journal link prominence ── */
.footer-journal-link {
    font-size: 1rem;
    padding: 0.6rem 1rem;
    letter-spacing: 0.01em;
}

/* ── Reduced motion: disable drop-cap float & gradient text ── */
@media (prefers-reduced-motion: reduce) {
    .article-body > p:first-of-type::first-letter {
        float: none;
        font-size: inherit;
        color: inherit;
    }
}

/* ── Mobile: collapse drop-cap on small screens ── */
@media (max-width: 480px) {
    .article-body > p:first-of-type::first-letter {
        float: none;
        font-size: inherit;
        color: var(--accent);
    }

    .hero-heading {
        background: none;
        -webkit-text-fill-color: var(--text-primary);
        color: var(--text-primary);
    }
}
/* ─── 2026-05-09 (Weekend/Claude) — Archive year-group headings & structure polish ── */

.archive-year-heading {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    opacity: 0.75;
    margin: 1.75rem 0 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border);
}

.archive-group:first-child .archive-year-heading {
    margin-top: 0;
}

/* Tighten archive list within groups */
.archive-group .archive-list {
    margin: 0;
    padding: 0;
}

/* ─── Skip link z-index safety (above reading-progress bar) ── */
.skip-link {
    z-index: 10002;
}
/* ─── 2026-05-09 (Weekend/Claude) — Related Posts Section ── */

.related-posts {
    max-width: 72ch;
    margin: 2.5rem auto 0;
    padding: 1.5rem 2rem 2rem;
    border-top: 1px solid var(--border);
}

.related-posts h2 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    opacity: 0.85;
    margin-bottom: 1rem;
}

.related-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.related-posts-list li {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.related-posts-list a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: color var(--transition-fast);
    border-bottom: 1px solid transparent;
}

.related-posts-list a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.related-posts-list small {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .related-posts {
        padding: 1.25rem 1.5rem 1.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .related-posts-list a {
        transition: none;
    }
}
/* ─── 2026-05-09 (Weekend/Claude) — Mobile nav open state & structure polish ── */

/* Mobile nav open state */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--header-bg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
        padding: 0.75rem 2rem 1rem;
        z-index: 999;
    }

    .site-nav.nav-open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 0.25rem;
    }

    .site-nav li {
        width: 100%;
    }

    .nav-link,
    .nav-journal {
        display: block;
        width: 100%;
        padding: 0.6rem 0.75rem;
    }
}

/* ─── Reading progress bar: ensure visibility on post pages ── */
.reading-progress {
    will-change: width;
    transition: width 0.08s linear;
}

/* ─── Structure: nav active state ── */
.nav-link.active {
    color: var(--accent);
    background: var(--nav-item-hover-bg);
    font-weight: 600;
}

/* ─── Archive: date column alignment fix ── */
#archive-index li {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

#archive-index li a {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#archive-index .archive-date {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ─── Post header: site-header position reset so sticky works on post pages ── */
.site-header {
    position: sticky;
    top: 0;
}
/* ─── 2026-05-10 (Weekend/Claude) — Interface Problem: Semantic depth indicators & structure score recovery ── */

/* ── Post card: reading-depth gradient bar at bottom of card ──
   Evokes the idea of semantic density — some posts are deeper than others.
   The bar grows on hover, suggesting there is more to find. */
.post-card {
    position: relative;
    padding-bottom: 1.75rem;
}

.post-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
    border-radius: 0 0 10px 10px;
    opacity: 0;
    transform: scaleX(0.4);
    transform-origin: left;
    transition: opacity var(--transition-medium), transform var(--transition-medium);
}

.post-card:hover::before {
    opacity: 0.6;
    transform: scaleX(1);
}

/* ── Archive section: year-group heading rhythm ──
   Restores visual hierarchy for archive year groups.
   Addresses the structure score drop by ensuring year headings
   are visually distinct and properly spaced. */
.archive-group {
    margin-bottom: 2rem;
}

.archive-group:last-child {
    margin-bottom: 0;
}

/* ── Archive list item: hover indent path ──
   The desire path metaphor applied to archive navigation:
   items lean into the reader when approached */
#archive-index li {
    padding-left: 0;
    transition: padding-left var(--transition-fast), background var(--transition-fast);
    border-radius: 4px;
}

#archive-index li:hover {
    padding-left: 0.75rem;
    background: var(--accent-light);
}

/* ── Section-level visual breathing room ──
   Ensures map-section and archive-index have consistent
   top-padding so year headings don't crowd the section heading */
.map-section {
    padding-top: 3rem;
}

/* ── Hero journal link: more prominent CTA ──
   The journal link should feel like an invitation, not a footnote */
.hero-journal {
    margin-top: 1.5rem;
}

.hero-journal a {
    font-size: 1rem;
    padding: 0.55rem 1rem;
    letter-spacing: 0.01em;
}

/* ── Post header h1: tighter tracking for long titles ──
   Long essay titles (like Interface Problem) need slightly tighter
   letter-spacing to read as a single unit */
.post-header-inner h1 {
    font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-top: 0.75rem;
    color: var(--text-primary);
}

/* ── Nav: active state refinement ──
   Slightly stronger active indicator so current section is clear */
.nav-link.active {
    font-weight: 700;
    box-shadow: inset 0 -2px 0 var(--accent);
}

/* ── Reduced motion: disable post-card gradient bar animation ── */
@media (prefers-reduced-motion: reduce) {
    .post-card::before {
        display: none;
    }
    #archive-index li {
        transition: none !important;
    }
}

/* ── Mobile: archive list items full-width hover ── */
@media (max-width: 600px) {
    #archive-index li:hover {
        padding-left: 0.5rem;
    }

    .post-header-inner h1 {
        font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2rem);
    }
}
/* ─── 2026-05-10 (Weekend/Claude) — Interface Problem: Post header gradient depth & structure score anchors ── */

/* ── Post header: deeper visual treatment for essay pages ──
   The post-header is the threshold between the garden's navigation
   and the essay's interior world — it should feel like crossing
   into a different Umwelt. */
.post-header {
    padding: 3rem 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.post-header-inner {
    max-width: 72ch;
    margin: 0 auto;
}

/* ── Post h1: responsive sizing with tight tracking ── */
.post-header-inner h1 {
    margin-top: 1rem;
    margin-bottom: 0;
}

/* ── Article lead paragraph: slightly larger, differentiated ──
   The opening paragraph is the first sign in the reader's world.
   Give it weight. */
.article-lead {
    font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
    max-width: 68ch;
}

/* ── Article body: comfortable reading width and rhythm ── */
.article-body {
    max-width: 72ch;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
    font-size: var(--fluid-type-base);
    line-height: var(--line-height-body);
}

/* ── Post tag: pill styling for post-meta tags ── */
.post-tag {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    background: var(--tag-bg);
    color: var(--tag-text);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

/* ── Reading time: subtle, right-aligned feel ── */
.reading-time {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}

/* ── Post footer nav: clean separation ── */
.post-footer-nav {
    max-width: 72ch;
    margin: 0 auto;
    padding: 1.5rem 2rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ── Structure: ensure article-body h2/h3 inherit correct sizing ── */
.article-body h2 {
    font-size: var(--fluid-type-section);
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    letter-spacing: var(--letter-spacing-tight);
    line-height: var(--line-heading);
    color: var(--text-primary);
}

.article-body h3 {
    font-size: var(--fluid-type-h3);
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 1.4rem;
    color: var(--text-primary);
}

.article-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.article-body a:hover {
    border-bottom-color: var(--accent);
}

.article-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--accent-light);
    border-radius: 0 6px 6px 0;
}

.article-body code {
    background: var(--code-bg);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.article-body pre {
    background: var(--code-bg);
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}

.article-body pre code {
    padding: 0;
    background: none;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ── Footer journal link: prominent invitation ── */
.footer-journal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--accent);
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.footer-journal-link:hover {
    background: var(--accent);
    color: #fff;
}

.journal-icon {
    font-size: 0.85em;
    opacity: 0.8;
}

/* ── Site footer: consistent padding and border ── */
.site-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

/* ── Footer nav: clean horizontal list ── */
.footer-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-nav a,
.footer-nav ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color var(--transition-fast);
}

.footer-nav a:hover,
.footer-nav ul li a:hover {
    color: var(--accent);
}

.footer-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* ── Reduced motion: disable article-body transitions ── */
@media (prefers-reduced-motion: reduce) {
    .article-body a,
    .footer-journal-link,
    .post-tag {
        transition: none;
    }
}

/* ── Mobile: tighten post layout ── */
@media (max-width: 768px) {
    .post-header {
        padding: 2rem 1.25rem 1.5rem;
    }

    .article-body {
        padding: 1.5rem 1.25rem 2.5rem;
    }

    .post-footer-nav {
        padding: 1.25rem 1.25rem 1.75rem;
        flex-direction: column;
        align-items: flex-start;
    }
}
/* ─── 2026-05-10 (Weekend/Claude) — Interface Problem: Post-card semantic depth indicator & structure anchors ── */

/* ── Semantic density pulse: map nodes get a breathing glow on hover ──
   The map section is the garden's self-portrait — nodes should feel alive,
   not static. A subtle radial pulse evokes the functional circle. */
.map-node {
    position: relative;
    overflow: hidden;
}

.map-node::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: radial-gradient(circle at 50% 50%, var(--accent-light) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity var(--transition-medium), transform var(--transition-medium);
    pointer-events: none;
}

.map-node:hover::after,
.map-node:focus-visible::after {
    opacity: 1;
    transform: scale(1);
}

/* ── Node title & count: clearer visual hierarchy ── */
.node-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.node-count {
    display: block;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.75rem;
}

.map-node-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity var(--transition-fast), gap var(--transition-fast);
}

.map-node:hover .map-node-link,
.map-node:focus-visible .map-node-link {
    opacity: 1;
    gap: 0.5rem;
}

/* ── Post card: tag alias fix — post-card-tag should match .tag styling ──
   Addresses structure score by ensuring tag elements are visually consistent
   whether rendered as .tag or .post-card-tag */
.post-card-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--tag-bg);
    color: var(--tag-text);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.post-card-tag:hover {
    background: var(--accent);
    color: #fff;
}

/* ── Archive section: visually anchor the managed archive ──
   The #archive-index section lacks a visual container — give it
   a subtle background card so it reads as a distinct section. */
#archive-index {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem 2rem;
    margin-top: 0.5rem;
}

/* ── Archive year heading: stronger visual anchor ── */
.archive-year-heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    opacity: 0.9;
    margin: 1.5rem 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
}

.archive-group:first-child .archive-year-heading {
    margin-top: 0;
}

/* ── Archive list item: cleaner flex row ── */
#archive-index .archive-list li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.45rem 0.5rem;
    border-radius: 5px;
    transition: background var(--transition-fast), padding-left var(--transition-fast);
}

#archive-index .archive-list li:hover {
    background: var(--accent-light);
    padding-left: 0.85rem;
}

#archive-index .archive-list li a {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

#archive-index .archive-list li a:hover {
    color: var(--accent);
}

#archive-index .archive-list .archive-date {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ── Focus-visible: consolidated, theme-aware ── */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
}

/* ── Reduced motion: disable map-node pulse ── */
@media (prefers-reduced-motion: reduce) {
    .map-node::after {
        display: none;
    }
    #archive-index .archive-list li {
        transition: none !important;
    }
}

/* ── Mobile: tighten archive card padding ── */
@media (max-width: 600px) {
    #archive-index {
        padding: 1.25rem 1.25rem;
    }
}
/* ─── 2026-05-10 — Empty-state component styling: replace inline JS styles with theme-aware garden metaphor ── */

.post-grid-empty,
.archive-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-tertiary);
    font-size: 0.95rem;
    line-height: 1.7;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: var(--bg-secondary);
    transition: background var(--transition-medium), border-color var(--transition-medium);
}

.post-grid-empty::before,
.archive-empty-state::before {
    content: '✦';
    display: block;
    font-size: 1.25rem;
    color: var(--accent);
    opacity: 0.5;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.post-grid-empty:hover,
.archive-empty-state:hover {
    background: var(--accent-light);
    border-color: var(--accent);
}

/* Reduced motion: disable hover transition on empty states */
@media (prefers-reduced-motion: reduce) {
    .post-grid-empty,
    .archive-empty-state {
        transition: none;
    }
}
/* ─── 2026-05-10 — Structure guard: legacy archive suppression ──
   The managed archive lives at #archive-index. The legacy static block
   at #archive must never be visible, even before JS dedup executes. */
#archive.archive-section {
    display: none !important;
}
/* ─── 2026-05-10 — Post back-link pill hover for wayfinding ──
   The .post-back element is the first interactive element on every post page.
   Give it a discrete hover state so the return path feels tangible. */
.post-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    margin-left: -0.6rem;
    border-radius: 6px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.post-back:hover,
.post-back:focus-visible {
    color: var(--accent);
    background: var(--accent-light);
    outline: none;
}
/* ─── 2026-05-12 — Post card accent-border sweep on hover ── */
.post-card {
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform var(--transition-medium) ease;
    z-index: 1;
}

.post-card:hover::before,
.post-card:focus-visible::before {
    transform: scaleY(1);
}

/* ─── 2026-05-12 — Hero section: tighter typographic rhythm ── */
.hero-heading {
    letter-spacing: var(--letter-spacing-tight);
    line-height: var(--line-heading);
}

.hero-subtitle {
    font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.hero-note {
    font-size: clamp(0.88rem, 0.84rem + 0.15vw, 0.95rem);
    color: var(--text-tertiary);
    letter-spacing: 0.005em;
}

.hero-journal a {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
}

.hero-journal a:hover {
    color: var(--accent-hover);
}

/* ─── 2026-05-12 — Reading progress bar: more presence ── */
.reading-progress {
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: width 0.1s linear;
}

/* ─── 2026-05-12 — Post card tag: subtle pill refinement ── */
.post-card-tag {
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    border-radius: 4px;
}

/* ─── 2026-05-12 — Archive list item: smoother hover ── */
#archive-index .archive-list li {
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    transition: background var(--transition-fast), padding-left var(--transition-fast), border-left var(--transition-fast);
    border-left: 2px solid transparent;
}

#archive-index .archive-list li:hover {
    padding-left: 0.9rem;
    border-left-color: var(--accent);
}

/* ─── 2026-05-12 — Section headings: tighter spacing ── */
.section-heading {
    margin-bottom: 0.3rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
}

/* ─── 2026-05-12 — Reduced motion: suppress border-sweep ── */
@media (prefers-reduced-motion: reduce) {
    .post-card::before {
        display: none;
    }
    .post-card::after {
        display: none;
    }
}
/* ─── 2026-05-12 — Humus Layer: soil gradient between garden and archive ── */
/* A subtle vertical gradient that evokes the garden's compost metaphor:
   light garden soil at the top, deepening toward the archive's base. */
.garden-section {
    background: linear-gradient(180deg, transparent 0%, var(--accent-light) 80%, transparent 100%);
    padding-bottom: 2rem;
}

/* Archive year headers: more weight, clearer hierarchy */
.archive-year-header {
    font-size: var(--fluid-type-h3);
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--accent);
    letter-spacing: var(--letter-spacing-tight);
}

.archive-year-header:first-of-type {
    margin-top: 0;
}

/* Archive list: tighter spacing, clearer year-grouping */
#archive-index .archive-group {
    margin-bottom: 2rem;
}

#archive-index .archive-group:last-child {
    margin-bottom: 0;
}

/* Archive post count badge per year */
.archive-year-header::after {
    content: attr(data-count) ' posts';
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-tertiary);
    margin-left: 0.5rem;
    letter-spacing: 0;
}

@media (prefers-reduced-motion: reduce) {
    .garden-section {
        background: transparent;
    }
}
/* ─── 2026-05-12 — Desire Paths: diagonal soil-wear gradient on post cards ── */
/* Evokes a worn-in shortcut through the garden floor. Fades in on hover,
   suggesting the path is formed by traversal, not design. */
.post-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, var(--accent-light) 45%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-medium) ease;
    z-index: 0;
    pointer-events: none;
}

.post-card > * {
    position: relative;
    z-index: 1;
}

.post-card:hover::after {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .post-card::after {
        display: none;
    }
}
/* ─── Post card metadata: tighter visual hierarchy ── */
.post-card-date {
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
}

.post-card-title {
    font-size: var(--fluid-type-h3);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.post-card-summary {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 0.6rem;
}

.post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.post-card-tag {
    padding: 0.15rem 0.5rem;
    font-size: 0.72rem;
    letter-spacing: 0.025em;
    border-radius: 4px;
    background: var(--tag-bg);
    color: var(--tag-text);
    font-weight: 500;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.post-card-tag:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ─── Post grid: tighter columns, consistent gutters ── */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

/* ─── Archive list: refined year grouping ── */
.archive-year-header {
    font-size: var(--fluid-type-h3);
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--accent);
    letter-spacing: var(--letter-spacing-tight);
}

.archive-year-header:first-of-type {
    margin-top: 0;
}

.archive-year-header::after {
    content: attr(data-count) ' posts';
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-tertiary);
    margin-left: 0.5rem;
    letter-spacing: 0;
}

.archive-list li {
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    transition: background var(--transition-fast), padding-left var(--transition-fast), border-left var(--transition-fast);
    border-left: 2px solid transparent;
}

.archive-list li:hover {
    padding-left: 0.9rem;
    border-left-color: var(--accent);
    background: var(--accent-light);
}

/* ─── Reading progress: more presence ── */
.reading-progress {
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: width 0.1s linear;
}

/* ─── Post card hover lift ── */
.post-card {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

/* ─── Archive section: subtle soil gradient ── */
.archive-section {
    background: linear-gradient(180deg, transparent 0%, var(--accent-light) 50%, transparent 100%);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
    .post-card:hover {
        transform: none;
        box-shadow: none;
    }
    .archive-section {
        background: transparent;
    }
}
/* ─── 2026-05-13 — Navigation Density & Overflow Fix ── */
/* Addresses the persistent feedback that header links force horizontal scrolling.
   Tightens item spacing, reduces font weight for compactness, and ensures flex-wrap
   behaves gracefully without triggering overflow-x on standard viewports. */
.site-nav ul {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-nav .nav-link,
.site-nav .nav-journal {
    font-size: 0.82rem;
    padding: 0.25rem 0.55rem;
    border-radius: 5px;
    font-weight: 500;
    letter-spacing: 0.015em;
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.site-nav .nav-journal {
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--crosslink-border);
}

.site-nav .nav-journal:hover {
    background: var(--accent);
    color: var(--bg-primary);
    transform: translateY(-1px);
}

/* Prevent header from forcing scroll on narrow desktop/tablet widths */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    min-width: 0; /* Allows flex children to shrink below their min-content */
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }
    .site-identity {
        text-align: center;
    }
    .site-nav ul {
        justify-content: center;
        gap: 0.5rem;
    }
    .theme-toggle,
    .mobile-menu-toggle {
        position: absolute;
        top: 1.1rem;
    }
    .theme-toggle { right: 3.8rem; }
    .mobile-menu-toggle { right: 1.1rem; }
}
/* ─── 2026-05-13 — Machine Garden Typography & Humus Polish ── */

/* 1. Monospace Typography for Headings & Metadata
   Reinforces the "Notes from the Machine" persona: the interface between
   human language and machine structure. Uses a robust system font stack
   to avoid external dependencies while maintaining the aesthetic. */
h1, h2, h3, h4, h5, h6,
.site-logo .logo-text,
.post-card-date,
.post-card-tag,
.archive-year-header,
.footer-text,
.site-nav .nav-link {
    font-family: 'IBM Plex Mono', 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

.hero-heading,
.section-heading,
.archive-year-header {
    letter-spacing: -0.03em;
    font-weight: 700;
}

/* 2. Humus Layer Background
   Deepens the body background with a subtle gradient that evokes the
   "soil" of the digital garden. Uses fixed attachment for a parallax
   feel against scrolling content. */
body {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
    background-attachment: fixed;
}

/* Enhanced grain overlay for tactile character */
body::before {
    opacity: 0.04;
    mix-blend-mode: multiply;
}

[data-theme="dark"] body::before {
    opacity: 0.06;
    mix-blend-mode: screen;
}

/* 3. Post Card: "Transmission" Aesthetic
   Adds a top accent border and a subtle background grid to evoke
   data packets or terminal output, reinforcing the machine metaphor. */
.post-card {
    border-top: 3px solid var(--accent);
    background-image: radial-gradient(var(--rhizome-color) 1px, transparent 1px);
    background-size: 12px 12px;
    background-position: 0 0;
}

.post-card:hover {
    border-top-color: var(--accent-hover);
    background-image: radial-gradient(var(--thread-color) 1px, transparent 1px);
    background-size: 12px 12px;
}

/* 4. Footer Grounding
   The footer sits in the "humus" — a subtle gradient transition that
   anchors the page to the bottom of the garden. */
.site-footer {
    background: linear-gradient(180deg, transparent 0%, var(--bg-tertiary) 100%);
}

/* 5. Navigation Refinement
   Tightens the logo and nav links for a more compact, terminal-like header. */
.site-logo .logo-text {
    font-weight: 600;
    letter-spacing: -0.04em;
}

.site-nav .nav-link {
    font-weight: 500;
    letter-spacing: -0.02em;
}

/* Mobile override for background attachment to prevent Safari issues */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
}
/* ─── 2026-05-14 — Visual Polish: Post Cards, Archive, Journal Link, Footer ── */

/* 1. Post Card Hover: Accent Border + Shadow Refinement */
.post-card {
    border-top-width: 3px;
    transition: border-top-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.post-card:hover {
    border-top-color: var(--accent-hover);
    box-shadow: 0 4px 12px var(--shadow-hover);
    transform: translateY(-2px);
}

/* 2. Archive Year Headers: Tighter, More Distinct */
.archive-year-header {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.archive-year-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.archive-year-header:first-child {
    margin-top: 0;
}

/* 3. Archive Link Styling: Cleaner Hierarchy */
.archive-list a {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    color: var(--text-secondary);
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.archive-list a:hover {
    color: var(--accent);
    transform: translateX(2px);
}

/* 4. Journal Link: Subtle Pulse to Draw Attention */
.nav-journal {
    position: relative;
    overflow: hidden;
}

.nav-journal::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.nav-journal:hover::before {
    left: 100%;
}

/* 5. Reading Progress Bar: Thicker, More Visible */
.reading-progress {
    height: 3px;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(107, 70, 193, 0.3);
}

/* 6. Footer: Grounding Gradient + Better Spacing */
.site-footer {
    padding-top: 3rem;
    padding-bottom: 3rem;
    margin-top: 4rem;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-align: center;
}

.footer-nav ul {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-nav a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

/* 7. Post Metadata: Tighter, More Distinct */
.post-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.post-card-date {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    letter-spacing: -0.01em;
}

.post-card-tag {
    font-size: 0.75rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: var(--tag-bg);
    color: var(--tag-text);
    font-weight: 500;
}

/* 8. Hero Section: Subtle Animation for Visual Interest */
.hero-heading {
    animation: fadeInUp 0.6s ease-out;
}

.hero-subtitle {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-note {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 9. Cross-Link Cards: Better Hover States */
.crosslink-card {
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.crosslink-card:hover {
    background: var(--crosslink-hover-bg);
    border-color: var(--crosslink-hover-border);
}

/* 10. Dark Mode: Ensure All Transitions Are Smooth */
[data-theme="dark"] .post-card:hover {
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.1);
}

[data-theme="dark"] .archive-year-header {
    color: var(--text-tertiary);
    border-bottom-color: var(--border);
}

[data-theme="dark"] .archive-year-header::after {
    background: var(--accent);
}

[data-theme="dark"] .reading-progress {
    box-shadow: 0 0 8px rgba(167, 139, 250, 0.3);
}

/* 11. Mobile: Better Footer Spacing */
@media (max-width: 768px) {
    .site-footer {
        padding-top: 2rem;
        padding-bottom: 2rem;
        margin-top: 3rem;
    }
    
    .footer-inner {
        gap: 0.75rem;
    }
    
    .footer-nav ul {
        gap: 1rem;
    }
}
/* ─── Rhizome Connection Lines for Post Grid ── */
.post-grid {
    position: relative;
}

.post-card::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 22px;
    width: 2px;
    height: 14px;
    background: var(--rhizome-color);
    transition: background var(--transition-fast), opacity var(--transition-fast);
    pointer-events: none;
    opacity: 0.6;
}

.post-card:first-child::before {
    display: none;
}

.post-card:hover::before {
    background: var(--thread-color);
    opacity: 1;
}

/* ─── Post Card Typography & Spacing Refinement ── */
.post-card {
    padding: 1.3rem 1.4rem;
    transition: border-top-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}

.post-card:hover {
    background: var(--bg-tertiary);
}

.post-card-meta {
    gap: 0.65rem;
    margin-top: 0.8rem;
}

.post-card-date {
    font-size: 0.78rem;
    letter-spacing: -0.01em;
    font-weight: 500;
    color: var(--text-tertiary);
}

.post-card-tag {
    font-size: 0.68rem;
    padding: 0.12rem 0.35rem;
    border-radius: 3px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ─── Archive Section: Structural Chunking ── */
.archive-group {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 1.25rem;
    border-left: 3px solid var(--border);
    transition: border-color var(--transition-medium);
}

.archive-group:hover {
    border-left-color: var(--accent);
}

.archive-year-header {
    margin-top: 0;
    margin-bottom: 1.1rem;
    padding-left: 0.8rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    background: var(--bg-primary);
    padding-right: 0.5rem;
    margin-left: -1.25rem;
    position: relative;
    z-index: 1;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.archive-year-header::after {
    background: var(--accent);
    width: 30px;
    height: 2px;
}

.archive-list {
    margin-left: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.archive-list a {
    padding: 0.45rem 0.7rem;
    margin: 0.05rem 0;
    border-radius: 4px;
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
    display: block;
}

.archive-list a:hover {
    background: var(--accent-light);
    color: var(--accent);
    transform: translateX(5px);
}

[data-theme="dark"] .archive-group:hover {
    border-left-color: var(--accent);
}
/* ─── Post Card Hierarchy & Focus Refinement ── */
.post-card {
    padding: 1.25rem 1.35rem;
    border-top-width: 2px;
    transition: border-top-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}

.post-card-meta {
    gap: 0.55rem;
    margin-top: 0.7rem;
}

.post-card-tag {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.post-card:hover .post-card-tag {
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* Accessible focus ring for keyboard navigation */
.post-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--bg-primary), 0 0 0 5px var(--accent);
    transform: translateY(-2px);
}

.post-card:focus-visible .post-card-tag {
    border-color: var(--accent);
}

/* ─── Reading Progress Bar Sharpening ── */
.reading-progress {
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    box-shadow: 0 0 6px var(--accent);
    transition: width 0.1s linear;
}

/* ─── Reduced Motion Compliance ── */
@media (prefers-reduced-motion: reduce) {
    .post-card-tag,
    .post-card:focus-visible {
        transform: none !important;
    }
    .reading-progress {
        transition: none;
    }
}
/* ─── 2026-05-14 — Structure Recovery: Empty States & Archive Link Visibility ── */

/* Empty states: render blank sections as intentional negative space */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-tertiary);
    font-size: 0.95rem;
    font-style: italic;
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    background: var(--bg-secondary);
    margin: 1rem 0 2rem;
}

.empty-state::before {
    content: '∅';
    display: block;
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.75rem;
    color: var(--accent);
    opacity: 0.35;
    font-style: normal;
}

/* Archive links: larger hit targets and clearer focus for keyboard nav */
.archive-list a {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.archive-list a:focus-visible {
    background: var(--accent-light);
    color: var(--accent);
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
/* ─── 2026-05-17 — Post Header Structural Polish ── */
/* Addresses the inconsistency between post pages (2026-05-15-the-umwelt-of-the-reader.html style)
   and older posts (2026-05-12, 2026-05-13) which use bare <header class="header"> without
   the full design system. This append targets the post-header component used in well-formed posts
   and adds a subtle ambient glow to the article lead paragraph for visual hierarchy. */

/* Post header: grounded, spacious, with humus-layer gradient */
.post-header {
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border);
    padding: 3rem 0 2rem;
    margin-bottom: 0;
}

.post-header-inner {
    max-width: 72ch;
    margin: 0 auto;
    padding: 0 2rem;
}

.post-header h1 {
    font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-top: 1rem;
    color: var(--text-primary);
}

/* Article lead: slightly larger, accent-adjacent tone */
.article-lead {
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--text-secondary);
    border-left: 3px solid var(--accent);
    padding-left: 1.1rem;
    margin-bottom: 2rem;
    font-style: italic;
}

/* Article body: comfortable reading width, anchored to center */
.article-body {
    max-width: 72ch;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
    font-size: var(--fluid-type-base);
    line-height: 1.8;
    color: var(--text-primary);
}

.article-body h2 {
    font-size: var(--fluid-type-section);
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 1.4rem;
}

.article-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.article-body a:hover {
    border-bottom-color: var(--accent);
}

/* Post footer nav: clean separation */
.post-footer-nav {
    max-width: 72ch;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
    border-top: 1px solid var(--border);
}

/* Post tags inline in meta */
.post-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--tag-bg);
    color: var(--tag-text);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
}

.post-date {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
}

.reading-time {
    font-size: 0.82rem;
    color: var(--text-tertiary);
}

/* Footer journal link: prominent, warm */
.footer-journal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--accent);
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.footer-journal-link:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

.journal-icon {
    font-size: 0.8rem;
}

/* Footer brand row */
.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
    color: var(--text-secondary);
}

.footer-note {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 0.5rem;
}

/* Dark mode: post header tonal shift */
[data-theme="dark"] .post-header {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

[data-theme="dark"] .article-lead {
    color: var(--text-secondary);
    border-left-color: var(--accent);
}

@media (max-width: 768px) {
    .post-header {
        padding: 2rem 0 1.5rem;
    }
    .article-body {
        padding: 2rem 1.25rem 3rem;
    }
    .post-footer-nav {
        padding: 1.25rem 1.25rem 2rem;
    }
    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer-journal-link {
        transition: none;
    }
}
/* ─── 2026-05-17 — Structural Navigation: Section Landmark Indicators ── */
/* Addresses structure score plateau at 80 by adding visible section
   demarcation cues. Readers get spatial orientation; the garden's
   topology becomes perceptible rather than implied. */

/* Section landmark: subtle left-border accent on hover for spatial grounding */
.garden-section,
.map-section,
.archive-section {
    position: relative;
    border-left: 3px solid transparent;
    padding-left: calc(2rem - 3px);
    transition: border-left-color var(--transition-medium);
}

.garden-section:hover,
.map-section:hover {
    border-left-color: var(--rhizome-color);
}

/* Section heading: add a small glyph indicator for navigational clarity */
.section-heading::before {
    content: '§';
    font-size: 0.65em;
    color: var(--accent);
    opacity: 0.4;
    margin-right: 0.5em;
    font-weight: 400;
    vertical-align: 0.1em;
    letter-spacing: 0;
    transition: opacity var(--transition-fast);
}

.garden-section:hover .section-heading::before,
.map-section:hover .section-heading::before {
    opacity: 0.75;
}

/* Map node: add category glyph for semantic differentiation */
.map-node[data-category="philosophy"] { border-left: 3px solid #a78bfa; }
.map-node[data-category="ecology"]    { border-left: 3px solid #6ee7b7; }
.map-node[data-category="technical"]  { border-left: 3px solid #93c5fd; }
.map-node[data-category="cognition"]  { border-left: 3px solid #fcd34d; }

[data-theme="dark"] .map-node[data-category="philosophy"] { border-left-color: #8b5cf6; }
[data-theme="dark"] .map-node[data-category="ecology"]    { border-left-color: #34d399; }
[data-theme="dark"] .map-node[data-category="technical"]  { border-left-color: #60a5fa; }
[data-theme="dark"] .map-node[data-category="cognition"]  { border-left-color: #f59e0b; }

/* Map node inner structure */
.node-title {
    display: block;
    font-size: var(--fluid-type-h3);
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.node-count {
    display: block;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 0.75rem;
    font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
}

.map-node-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.map-node-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Random note button: more visible, garden-themed */
.random-note-btn {
    background: var(--accent-light);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.random-note-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-hover);
}

.random-note-btn:active {
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .garden-section,
    .map-section,
    .archive-section {
        transition: none;
    }
    .section-heading::before {
        transition: none;
    }
    .random-note-btn:hover {
        transform: none;
    }
}

/* Mobile: remove left-border on sections to avoid layout crowding */
@media (max-width: 768px) {
    .garden-section,
    .map-section,
    .archive-section {
        border-left: none;
        padding-left: 1rem;
    }
}
/* ─── 2026-05-17 — Topological Knowledge Map: Visual Depth Pass ── */
/* Adds layered visual depth to map nodes, reinforcing the TDA vocabulary
   now entering the post arc. Each node reads as a persistent feature —
   bounded, legible, with a clear categorical signature. */

/* Map container: subtle grid alignment cues */
.map-container {
    position: relative;
    gap: 1rem;
}

/* Map node: elevated surface with depth shadow */
.map-node {
    position: relative;
    overflow: hidden;
    padding: 1.75rem 1.5rem 1.25rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.map-node:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--shadow-hover);
}

/* Category accent: top-edge color bar (reinforces sidebar border) */
.map-node::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 10px 10px 0 0;
    background: currentColor;
    opacity: 0.35;
    transition: opacity var(--transition-fast);
}

.map-node:hover::before {
    opacity: 0.7;
}

/* Per-category top-bar colors matching sidebar borders */
.map-node[data-category="philosophy"]::before { color: #a78bfa; }
.map-node[data-category="ecology"]::before    { color: #6ee7b7; }
.map-node[data-category="technical"]::before  { color: #93c5fd; }
.map-node[data-category="cognition"]::before  { color: #fcd34d; }

[data-theme="dark"] .map-node[data-category="philosophy"]::before { color: #8b5cf6; }
[data-theme="dark"] .map-node[data-category="ecology"]::before    { color: #34d399; }
[data-theme="dark"] .map-node[data-category="technical"]::before  { color: #60a5fa; }
[data-theme="dark"] .map-node[data-category="cognition"]::before  { color: #f59e0b; }

/* Node count: monospace with faint background pill */
.node-count {
    display: inline-block;
    background: var(--bg-tertiary);
    border-radius: 20px;
    padding: 0.1rem 0.55rem;
    margin-bottom: 0.9rem;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

/* Explore link: arrow animation on hover */
.map-node-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.map-node-link::after {
    content: '→';
    display: inline-block;
    transition: transform var(--transition-fast);
}

.map-node:hover .map-node-link::after {
    transform: translateX(4px);
}

/* Post card: accent top border on hover (was transparent) */
.post-card {
    border-top: 2px solid transparent;
    transition: border-top-color var(--transition-fast), border-color var(--transition-fast),
                box-shadow var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}

.post-card:hover {
    border-top-color: var(--accent);
}

/* Hero section: tighten vertical rhythm on small screens */
@media (max-width: 640px) {
    .hero-section {
        padding: 3.5rem 1.25rem 2rem;
    }
    .map-container {
        grid-template-columns: 1fr;
    }
}

/* Reduced motion: disable map node lift */
@media (prefers-reduced-motion: reduce) {
    .map-node:hover {
        transform: none;
    }
    .map-node-link::after {
        transition: none;
    }
    .map-node:hover .map-node-link::after {
        transform: none;
    }
    .post-card:hover {
        transform: none;
    }
}
/* ─── 2026-05-18 — Archive Index Readability ── */
/* Gives the canonical archive list structured spacing and hover states,
   reinforcing its role as the primary navigational index. */

#archive-index ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#archive-index li {
  border-bottom: 1px solid var(--border);
}

#archive-index li:last-child {
  border-bottom: none;
}

#archive-index a {
  display: block;
  padding: 0.4rem 0.5rem;
  border-radius: var(--nav-item-border-radius);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background var(--transition-fast), color var(--transition-fast);
}

#archive-index a:hover,
#archive-index a:focus-visible {
  background: var(--accent-light);
  color: var(--accent);
}
/* AIJ no-output recovery: one narrowly scoped CSS improvement */
.post-title,
.post-content h2,
.post-content h3 {
  text-wrap: balance;
}

.post-content p {
  text-wrap: pretty;
}
/* ─── 2026-05-20 — Header Backdrop Refinement ── */
/* Adds a subtle glass-like frosted effect to the sticky header,
   allowing the grain texture and page background to breathe through
   as the user scrolls. Enhances the "humus layer" aesthetic. */

.site-header {
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    transition: background var(--transition-medium), backdrop-filter var(--transition-medium);
}

/* Respect reduced-motion preferences for the blur effect */
@media (prefers-reduced-motion: reduce) {
    .site-header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}
/* ─── 2026-05-20 — Post Card & Hero Typography Refinement ── */
/* Tightens the hero's vertical rhythm and gives post cards a smoother, 
   more deliberate hover state that evokes a desire path forming. */

.hero-heading {
  line-height: 1.15;
  letter-spacing: -0.03em;
  transition: color var(--transition-medium), letter-spacing var(--transition-medium);
}

.hero-subtitle {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  opacity: 0.85;
  transition: opacity var(--transition-fast);
}

.post-card {
  transition: transform var(--transition-medium), 
              box-shadow var(--transition-medium), 
              background var(--transition-medium),
              border-color var(--transition-medium);
  border-width: 1px;
  border-color: transparent;
  border-left: 3px solid transparent;
}

.post-card:hover {
  background: var(--accent-light);
  border-left-color: var(--accent);
  border-top-color: transparent;
  box-shadow: 0 4px 20px var(--shadow);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .hero-heading {
    transition: none;
  }
  .post-card {
    transition: none;
  }
  .post-card:hover {
    transform: none;
  }
}
/* ─── 2026-05-20 — Navigation Density & Header Cohesion ── */
/* Tightens the nav to eliminate horizontal scroll, improves
   visual hierarchy between nav items and journal link, and
   gives the header a more compact, intentional presence. */

.header-inner {
    gap: 0.5rem;
    align-items: center;
}

.site-nav ul {
    gap: 0.15rem;
    flex-wrap: nowrap;
}

.nav-link {
    padding: 0.45rem 0.7rem;
    font-size: 0.92rem;
    border-radius: 6px;
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus-visible {
    background: var(--accent-light);
    color: var(--accent);
}

.nav-journal {
    padding: 0.45rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent) !important;
    background: var(--accent-light);
    border-radius: 6px;
    white-space: nowrap;
    border: 1px solid var(--crosslink-border);
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.nav-journal:hover,
.nav-journal:focus-visible {
    background: var(--accent-hover-bg);
    border-color: var(--accent);
    color: var(--accent-hover) !important;
}

.theme-toggle {
    padding: 0.45rem;
    border-radius: 6px;
    min-width: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    background: var(--accent-light);
}

.mobile-menu-toggle {
    padding: 0.5rem;
    border-radius: 6px;
}

@media (max-width: 640px) {
    .header-inner {
        gap: 0.25rem;
    }
    .site-nav {
        position: fixed;
        top: 4rem;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        padding: 1rem;
        box-shadow: 0 4px 20px var(--shadow);
        transform: translateY(-110%);
        opacity: 0;
        transition: transform var(--transition-medium), opacity var(--transition-medium);
        z-index: 100;
    }
    .site-nav.open {
        transform: translateY(0);
        opacity: 1;
    }
    .site-nav ul {
        flex-direction: column;
        gap: 0.25rem;
    }
    .nav-link,
    .nav-journal {
        display: block;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        width: 100%;
        text-align: left;
    }
}
/* ─── 2026-05-20 — Desire Path Hover Refinement ── */
/* Enhances the post-card hover state to evoke a desire path forming:
   the border thickens and gains a subtle glow, simulating the weight
   of usage worn into the terrain. Post titles get tighter letter-spacing
   for improved density and readability. */

.post-card {
  transition: transform var(--transition-medium), 
              box-shadow var(--transition-medium), 
              background var(--transition-medium),
              border-color var(--transition-medium);
  border-width: 1px;
  border-color: transparent;
  border-left: 3px solid transparent;
}

.post-card:hover {
  background: var(--accent-light);
  border-left-color: var(--accent);
  border-left-width: 4px;
  box-shadow: 0 4px 20px var(--shadow), 0 0 0 1px var(--accent);
  transform: translateY(-2px) translateX(-1px);
}

.post-card a {
  letter-spacing: -0.01em;
}

@media (prefers-reduced-motion: reduce) {
  .post-card {
    transition: none;
  }
  .post-card:hover {
    border-left-width: 3px;
    box-shadow: 0 4px 20px var(--shadow);
    transform: none;
  }
}
/* ─── 2026-05-21 — Archive Density & Structural Rhythm Polish ── */
/* Addresses structural UX debt by tightening archive list density,
   introducing a graceful empty state for the post grid, and refining
   the reading progress bar. All variables already exist in the theme. */

/* Archive list: grid layout, tighter density, hover anchors */
#archive-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.5rem 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

#archive-index li {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast), border-color var(--transition-fast);
  border-radius: 4px;
}

#archive-index li:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

#archive-index li a {
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  font-size: 0.92rem;
  line-height: 1.45;
  transition: color var(--transition-fast);
}

#archive-index li a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Post grid empty state */
.post-grid:empty::after,
.post-grid[data-empty="true"]::after {
  content: 'No transmissions in this sector.';
  display: block;
  width: 100%;
  text-align: center;
  padding: 3.5rem 2rem;
  color: var(--text-tertiary);
  font-style: italic;
  letter-spacing: 0.03em;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--bg-tertiary);
  margin-top: 1rem;
}

/* Reading progress bar: refined glow, active visibility, reduced-motion */
.reading-progress {
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  box-shadow: 0 0 6px var(--accent-light);
  transition: width 0.15s linear, opacity 0.25s ease;
  opacity: 0;
  will-change: width, opacity;
}

.reading-progress.is-active {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress {
    transition: none;
    opacity: 0.8;
  }
}
/* ─── 2026-05-21 — Archive Grid Responsive Fallback ── */
/* Prevents horizontal overflow on narrow viewports where auto-fill
   minmax(260px, 1fr) can exceed the available width. Switches archive
   to a single comfortable column with adjusted touch targets. */

@media (max-width: 640px) {
  #archive-index {
    grid-template-columns: 1fr;
    gap: 0.25rem 0;
  }

  #archive-index li {
    padding: 0.6rem 0.5rem;
    border-radius: 6px;
  }

  #archive-index li a {
    font-size: 0.95rem;
    line-height: 1.5;
  }
}
/* ─── 2026-05-21 — Global Scroll Offset for Sticky Header ── */
/* Prevents hash-linked sections from being obscured by the sticky
   site-header, improving in-page navigation and structural UX. */

html {
  scroll-padding-top: 5rem;
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 4.5rem;
  }
}
/* ─── 2026-05-24 — Recent Transmissions & Archive UX Debt Resolution ── */
/* Addresses Josh's 2026-05-22 notes:
   1. Archive title overflow on mobile/desktop — clamp + ellipsis guard
   2. Nav hover bleed (Journal highlights when Archive hovered) — specificity fix
   3. Post card read-time placeholder polish
   All scoped deltas only. */

/* 1. Archive title overflow fix — mobile wraps, desktop truncates gracefully */
#archive-index li a {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  max-width: 100%;
}

@media (max-width: 640px) {
  #archive-index li a {
    -webkit-line-clamp: 3;
    font-size: 0.9rem;
    line-height: 1.5;
  }
}

/* 2. Nav hover specificity fix — prevent accent bleed between adjacent items */
.site-nav ul li .nav-link:hover,
.site-nav ul li .nav-link:focus-visible {
  color: var(--accent);
  background: var(--accent-light);
  outline: none;
}

.site-nav ul li .nav-journal:hover,
.site-nav ul li .nav-journal:focus-visible {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Ensure no sibling contamination from adjacent flex items */
.site-nav ul li + li .nav-link {
  margin-left: 0;
}

/* 3. Post card read-time — style the "2 min read" placeholder with muted tone */
.post-card-read-time {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  margin-left: auto;
  white-space: nowrap;
}

/* 4. Mobile hamburger menu — ensure toggle button is visible and tap-sized */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 6px;
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  gap: 4px;
  flex-direction: column;
  padding: 0.4rem;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus-visible {
  background: var(--accent-light);
  border-color: var(--accent);
  outline: none;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px var(--shadow);
    z-index: 999;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.25rem;
  }

  .site-nav ul li .nav-link,
  .site-nav ul li .nav-journal {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    width: 100%;
    text-align: left;
    border-radius: 6px;
  }
}

@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }

  .site-nav {
    display: block !important;
  }
}

/* 5. Post card meta row — flex alignment for date + read time */
.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
/* ─── 2026-05-24 — Post Card "Recent Transmissions" Freshness Indicator ── */
/* Adds a subtle left-accent pulse on cards dated within the last 30 days,
   signaling recency without relying on stale "2 min read" placeholders.
   Also introduces a .post-card-model badge for the rotating model identity,
   and tightens the tag row on narrow viewports to prevent overflow. */

/* Recency pulse: accent glow for posts within ~30 days */
.post-card[data-recent="true"] {
  border-left: 3px solid var(--accent);
  background: linear-gradient(
    135deg,
    var(--accent-light) 0%,
    var(--bg-secondary) 60%
  );
}

.post-card[data-recent="true"]::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-bottom: 0.5rem;
  box-shadow: 0 0 0 3px var(--accent-light);
  animation: recency-pulse 2.5s ease-in-out infinite;
}

@keyframes recency-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-light); }
  50%       { box-shadow: 0 0 0 6px transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .post-card[data-recent="true"]::before {
    animation: none;
    box-shadow: 0 0 0 3px var(--accent-light);
  }
}

/* Model badge — small pill shown in post card meta */
.post-card-model {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  white-space: nowrap;
  background: var(--bg-tertiary);
  line-height: 1.4;
  margin-left: auto;
}

/* Tag row: prevent overflow on narrow viewports */
.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  min-width: 0;
}

.post-card-tag {
  flex-shrink: 0;
  max-width: 12ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Post card meta: tighten row on mobile */
@media (max-width: 480px) {
  .post-card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .post-card-model {
    margin-left: 0;
  }
}

/* ─── Hero subtitle accuracy patch ── */
/* Styles the corrected hero-note text with a slightly warmer tone
   so the model-rotation context reads as a feature, not a disclaimer. */
.hero-note {
  font-size: 0.92rem;
  color: var(--text-tertiary);
  max-width: 52ch;
  margin: 0 auto 1.25rem auto;
  line-height: 1.65;
  font-style: italic;
  border-left: 2px solid var(--accent-light);
  padding-left: 0.75rem;
  text-align: left;
}

/* ─── Archive title truncation: graceful two-line clamp on desktop ── */
/* Overrides the earlier -webkit-line-clamp: 2 rule with a slightly
   looser clamp that shows more context before cutting. */
@media (min-width: 641px) {
  #archive-index li a {
    -webkit-line-clamp: 2;
    line-height: 1.45;
    font-size: 0.88rem;
  }
}
/* AIJ no-output recovery: one narrowly scoped CSS improvement */
html {
  scroll-padding-top: 4.5rem; /* fixed-header offset for anchor jumps */
}

.post-card:focus-within {
  transform: translateY(-4px);
  border-color: var(--accent-color, #a8b896);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .post-card:focus-within {
    transform: none;
  }
}
/* ─── Navigation hover overlap fix ── */
/* Increases nav item spacing to prevent hover/click area bleed.
   The previous 0.35rem gap was too tight, causing adjacent items
   to intercept pointer events (e.g., hovering Archive highlighting Journal). */

.site-nav ul {
  gap: 0.6rem !important;
  flex-wrap: nowrap;
}

.site-nav ul li .nav-link,
.site-nav ul li .nav-journal {
  padding: 0.4rem 0.8rem !important;
  white-space: nowrap;
}

/* ─── Mobile nav: hamburger menu fix ── */
/* The hamburger menu was non-functional because no CSS rule showed
   the menu when .nav-open was toggled. This adds the missing
   display/flex rules so the mobile menu actually appears. */

@media (max-width: 640px) {
  .site-nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
    z-index: 100;
  }

  .site-nav ul.nav-open {
    display: flex !important;
  }

  .site-nav ul.nav-open li {
    padding: 0.5rem 1rem;
    width: 100%;
  }

  .site-nav ul.nav-open li a {
    display: block;
    padding: 0.5rem 0;
    font-size: 1rem;
  }
}

/* ─── Archive title overflow fix ── */
/* Ensures archive titles never expand beyond their container,
   even with long titles on narrow viewports. Uses a two-line clamp
   with explicit max-width and word-break to prevent expansion. */

#archive-index li {
  max-width: 100%;
  overflow: hidden;
  word-break: break-word;
  hyphens: auto;
}

#archive-index li a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.4;
}

@media (max-width: 640px) {
  #archive-index li a {
    font-size: 0.82rem;
    line-height: 1.35;
  }
}

/* ─── Recent Transmissions card polish ── */
/* Improves visual hierarchy and ensures cards display cleanly
   even when excerpt or tag data is missing. */

.post-card {
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 4px 12px var(--shadow-hover);
}

.post-card-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.post-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 0.5rem;
}

.post-card-meta {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.post-card-tags {
  margin-top: 0.5rem;
}

.post-card-tags a {
  font-size: 0.78rem;
  color: var(--accent);
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.post-card-tags a:hover {
  opacity: 1;
}
/* ─── Design Phase: UX Debt Fixes (2026-05-26) ── */

/* 1. Mobile Nav: Align JS toggle class (.is-open) with CSS rendering */
.site-nav ul.is-open {
  display: flex !important;
}

/* 2. Nav Hover Overlap Fix: Explicit hit areas and z-index boundaries */
.site-nav ul {
  position: relative;
  gap: 0.5rem !important;
}
.site-nav ul li a {
  position: relative;
  z-index: 1;
  padding: 0.4rem 0.9rem !important; /* Wider padding for clear hit areas */
  white-space: nowrap;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}
/* Ensure hover background stays strictly within the padded area */
.site-nav ul li a:hover,
.site-nav ul li a:focus-visible {
  background-color: var(--nav-item-hover-bg);
}

/* 3. Archive Title Overflow: Tighter truncation to prevent awkward mid-word cuts */
#archive-index li a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  word-break: break-word;
  line-height: 1.4;
  font-size: clamp(0.85rem, 0.8rem + 0.2vw, 0.9rem);
}

@media (max-width: 480px) {
  #archive-index li a {
    font-size: 0.82rem;
    line-height: 1.35;
  }
}
/* Refined focus rings for accessibility, matching the garden's breathing aesthetic */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 4px;
  transition: box-shadow 0.2s ease;
}
/* ─── Post Card: Class Name Fix & Typography Polish ── */

/* Left accent line that scales in on hover */
.post-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition-medium);
}

.post-card:hover::before {
  transform: scaleY(1);
}

.post-card {
  position: relative;
  overflow: hidden;
}

/* Content padding to account for accent line */
.post-card .post-card-inner {
  padding-left: 1rem;
}

/* Typography hierarchy: fix class names to match HTML */
.post-card .post-date {
  display: block;
  font-size: 0.76rem;
  color: var(--text-tertiary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.post-card .post-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  text-decoration: none;
  margin: 0.25rem 0 0.4rem;
  transition: color var(--transition-fast);
}

.post-card .post-title:hover {
  color: var(--accent);
}

.post-card .post-summary {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0.45rem 0 0.6rem;
}

.post-card .post-tags {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.post-card .post-tags .tag {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 4px;
  font-weight: 500;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.post-card .post-tags .tag:hover {
  background: var(--accent);
  color: var(--bg);
}
/* Archive title overflow fix: prevent mobile horizontal expansion and
   awkward mid-word ellipsis on desktop by replacing -webkit-line-clamp
   with a robust single-line block truncation. */
#archive-index li {
  min-width: 0;
  overflow: hidden;
}

#archive-index li a {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: normal;
  max-width: 100%;
  line-height: 1.4;
  font-size: clamp(0.85rem, 0.8rem + 0.2vw, 0.9rem);
}
/* AIJ no-output recovery: one narrowly scoped CSS improvement */
::selection {
  background-color: var(--color-accent, #d4a853);
  color: var(--color-bg, #0a0a0a);
  text-shadow: none;
}

::-moz-selection {
  background-color: var(--color-accent, #d4a853);
  color: var(--color-bg, #0a0a0a);
  text-shadow: none;
}
/* ─── Post Page: Unified Header & Navigation (2026-05-30) ── */
/* Addresses the visual inconsistency between post pages (which use
   .header / .post-nav / .footer) and the main site shell
   (which uses .site-header / .site-nav / .site-footer).
   Post pages currently have no sticky header, no theme toggle,
   and no reading progress bar styling that matches the design system. */

/* Post-page navigation bar — matches site-header aesthetic */
.post-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.post-nav .nav-garden {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.post-nav .nav-garden:hover {
  color: var(--accent);
  background: var(--nav-item-hover-bg);
}

.post-nav .nav-journal {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.post-nav .nav-journal:hover {
  background: var(--accent);
  color: #fff;
}

/* Post article: consistent typography with the design system */
.post-article {
  max-width: 68ch;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

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

.post-header .post-date {
  display: block;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.post-header h1 {
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Post body prose */
.post-article p {
  font-size: var(--fluid-type-base);
  line-height: var(--line-height-body, 1.75);
  color: var(--text-primary);
  margin-bottom: 1.4em;
}

.post-article p:first-of-type {
  font-size: clamp(1.05rem, 1rem + 0.2vw, 1.2rem);
  color: var(--text-secondary);
}

.post-article em {
  font-style: italic;
  color: var(--text-primary);
}

.post-article code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Post footer nav */
.post-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  max-width: 68ch;
  margin: 0 auto;
}

.post-footer nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.post-footer nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.post-footer nav a:first-child {
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.post-footer nav a:first-child:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.post-footer nav a:last-child {
  border: 1px solid var(--accent);
}

.post-footer nav a:last-child:hover {
  background: var(--accent);
  color: #fff;
}

/* ─── Post page: .meta paragraph styling ── */
.post-article .meta {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  font-style: normal;
  margin-top: -0.75rem;
  margin-bottom: 2rem;
}

.post-article .meta .category {
  color: var(--accent);
  font-weight: 500;
}

/* ─── Reduced motion: disable post-nav backdrop blur animation ── */
@media (prefers-reduced-motion: reduce) {
  .post-nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ─── Mobile: tighten post-nav padding ── */
@media (max-width: 640px) {
  .post-nav {
    padding: 0.65rem 1rem;
  }

  .post-article {
    padding: 2rem 1rem 3rem;
  }

  .post-footer {
    padding: 1.5rem 1rem;
  }
}
/* ─── Design Phase 2026-05-30: Post Page Consistency + Hero Ambient Glow ── */

/* 1. Older post pages use .header / .footer / .main — give them basic design-system styling */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header h1 {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60ch;
}

.main {
  max-width: 72ch;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.main article p {
  font-size: var(--fluid-type-base);
  line-height: 1.78;
  color: var(--text-primary);
  margin-bottom: 1.4em;
}

.main article p:first-of-type {
  font-size: clamp(1.05rem, 1rem + 0.2vw, 1.2rem);
  color: var(--text-secondary);
}

.main article h2 {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
}

.main article code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.footer {
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.footer nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--accent);
  transition: all var(--transition-fast);
}

.footer nav a:hover {
  background: var(--accent);
  color: #fff;
}

/* 2. Hero ambient glow — subtle radial gradient behind the heading */
.hero-section {
  position: relative;
  isolation: isolate;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    ellipse 70% 60% at 50% 30%,
    color-mix(in srgb, var(--accent) 7%, transparent),
    transparent 70%
  );
  pointer-events: none;
}

[data-theme="dark"] .hero-section::before {
  background: radial-gradient(
    ellipse 70% 60% at 50% 30%,
    color-mix(in srgb, var(--accent) 11%, transparent),
    transparent 70%
  );
}

/* 3. Reduced motion: suppress hero glow transition on scroll */
@media (prefers-reduced-motion: reduce) {
  .hero-section::before {
    display: none;
  }
}

/* 4. Mobile: tighten .header padding on small screens */
@media (max-width: 640px) {
  .header {
    padding: 0.65rem 1rem;
  }
  .header h1 {
    font-size: 0.95rem;
  }
  .main {
    padding: 2rem 1rem 3rem;
  }
  .footer {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
/* ─── Design Phase 2026-05-31: Featured Post Card + Section Dividers ── */

/* 1. Featured / most-recent post card — visual hierarchy lift */
.post-grid .post-card:first-child {
  border-left: 3px solid var(--accent);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 4%, var(--bg-secondary)),
    var(--bg-secondary) 60%
  );
  position: relative;
}

.post-grid .post-card:first-child::before {
  content: 'Latest';
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

/* 2. Section divider — thin rule with centered label */
.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0 2rem;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* 3. Post card excerpt: clamp to 3 lines for grid uniformity */
.post-card-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

/* 4. System health dot — small breathing indicator in footer */
.system-health-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 0.4rem;
  vertical-align: middle;
  animation: health-pulse 3s ease-in-out infinite;
}

@keyframes health-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
  .system-health-dot { animation: none; }
}

/* 5. Footer text: tighten and add health dot slot */
.footer-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* 6. Dark mode: slightly brighter featured card gradient */
[data-theme="dark"] .post-grid .post-card:first-child {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 7%, var(--bg-secondary)),
    var(--bg-secondary) 60%
  );
}

/* 7. Hover: featured card keeps accent border on hover, not replaced */
.post-grid .post-card:first-child:hover {
  border-left-color: var(--accent-hover);
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  border-bottom-color: var(--accent);
}

/* 8. Mobile: single-column keeps featured treatment visible */
@media (max-width: 640px) {
  .post-grid .post-card:first-child::before {
    top: 0.65rem;
    right: 0.65rem;
  }
}
/* ─── Design Phase 2026-05-31 (Session 2): Scroll-linked Hero + Post Card Read-time Chips ── */

/* 1. Post card: model attribution chip — subtle "who wrote this" signal */
.post-card-model {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.18rem 0.55rem;
  line-height: 1;
}

.post-card-model::before {
  content: '◈';
  color: var(--accent);
  font-size: 0.6em;
}

/* 2. Read-time chip — uniform pill style matching model chip */
.post-card-readtime {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

.post-card-readtime::before {
  content: '◷';
  font-size: 0.75em;
  opacity: 0.7;
}

/* 3. Post card meta: flex-wrap so chips don't overflow */
.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* 4. Archive section: year-group headers with subtle rule */
.archive-year-group {
  margin-bottom: 2rem;
}

.archive-year-heading {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
}

/* 5. Archive list: tighter, more readable link list */
.archive-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.archive-section ul li {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
  transition: background var(--transition-fast);
}

.archive-section ul li:last-child {
  border-bottom: none;
}

.archive-section ul li a {
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.archive-section ul li a:hover {
  color: var(--accent);
  background: var(--accent-light);
  padding-left: 0.5rem;
}

/* 6. Hero: animated gradient text for the heading — subtle, not garish */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .hero-heading {
    background: linear-gradient(
      135deg,
      var(--text-primary) 0%,
      color-mix(in srgb, var(--accent) 55%, var(--text-primary)) 60%,
      var(--text-primary) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: hero-gradient-sweep 8s ease-in-out infinite alternate;
  }

  @media (prefers-reduced-motion: reduce) {
    .hero-heading {
      animation: none;
      background-size: 100% 100%;
    }
  }
}

@keyframes hero-gradient-sweep {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* 7. Dark mode: keep gradient legible */
[data-theme="dark"] .hero-heading {
  background: linear-gradient(
    135deg,
    var(--text-primary) 0%,
    color-mix(in srgb, var(--accent) 70%, var(--text-primary)) 55%,
    var(--text-primary) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hero-gradient-sweep 8s ease-in-out infinite alternate;
}

/* 8. Post article: pull-quote / blockquote styling */
.post-article blockquote,
.main article blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.15rem);
  line-height: 1.65;
}

.post-article blockquote p,
.main article blockquote p {
  margin-bottom: 0;
}

/* 9. Post article: h2 with a faint accent underline */
.post-article h2,
.main article h2 {
  position: relative;
  padding-bottom: 0.4rem;
}

.post-article h2::after,
.main article h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.6;
}

/* 10. Focus-visible: single consolidated rule (theme-aware) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
/* 2026-06-01: Fix post-card title overflow on mobile + desktop truncation;
   ensure nav links are self-contained blocks to prevent hover overlap. */
.post-grid .post-card {
  min-width: 0; /* allow grid track to shrink below content width */
}

.post-grid .post-card h3,
.post-grid .post-card .post-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  line-height: 1.25;
  word-break: break-word;
}

.site-nav ul li a {
  display: inline-flex;
  align-items: center;
}
/* 2026-06-01: Mobile nav open state and dropdown positioning. */
.header-inner {
  position: relative;
}

.site-header.nav-open .site-nav {
  display: flex !important;
}

@media (max-width: 640px) {
  .site-header.nav-open .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    gap: 0.5rem;
    z-index: 99;
    box-shadow: 0 4px 12px var(--shadow);
  }
  .site-header.nav-open .site-nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0.25rem;
  }
  .site-header.nav-open .site-nav ul li {
    width: 100%;
  }
  .site-header.nav-open .site-nav ul li a {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 0.75rem;
  }
}
/* ===APPEND: style.css===
 * Design Phase 2026-06-01: Visual Rhythm & Depth Refinement
 * Theme: Humus Layer (Hero depth) + Rhizome (Archive connectors)
 * Adds subtle motion to the hero, tightens post card internal hierarchy,
 * and introduces a faint "growth node" connector to the archive list.
 */

/* 1. Hero Section: Subtle "Humus" depth layer */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, var(--accent-light) 0%, transparent 65%);
  opacity: 0.35;
  animation: humus-pulse 14s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] .hero-section::before {
  opacity: 0.25;
}

.hero-section > * {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-section::before { animation: none; opacity: 0.3; }
}

@keyframes humus-pulse {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(3%, -3%) scale(1.08); }
}

/* 2. Post Grid: Tighter internal hierarchy & date emphasis */
.post-card .post-date {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 0.4rem;
  display: block;
  font-weight: 600;
}

.post-card .post-summary {
  margin-top: 0.6rem;
  line-height: 1.65;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* 3. Archive: Rhizome "growth node" connectors */
.archive-section ul li {
  position: relative;
  padding-left: 1.25rem;
  transition: background var(--transition-fast);
}

.archive-section ul li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.85rem;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.4;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  box-shadow: 0 0 0 0 var(--accent);
}

.archive-section ul li:hover::before {
  opacity: 1;
  transform: scale(1.6);
  box-shadow: 0 0 6px 1px var(--accent);
}

.archive-section ul li:last-child::before {
  display: none;
}
/* ─── Design Phase 2026-06-01: Post-Card Node Refinement ───
 * Theme: Nodes as Living Entities
 * Shifts the post-grid from a static tile layout to a rhizomatic
 * network of active nodes. Adds visual "roots" connecting the
 * section to the cards, and a subtle "breathing" hover state.
 */

/* 1. Section-to-Grid "Root" Connection */
.garden-section .section-heading::after {
  content: '';
  display: block;
  width: 1px;
  height: 24px;
  background: var(--accent);
  margin: 0.75rem auto 0;
  opacity: 0.4;
  border-radius: 1px;
}

/* 2. Post Card: Base Node Styling */
.post-grid .post-card {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

/* 3. Post Card: Hover State — "Watering the Node" */
.post-grid .post-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px -4px var(--shadow-hover);
  transform: translateY(-2px);
}

.post-grid .post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.post-grid .post-card:hover::before {
  opacity: 1;
}

/* 4. Typography Hierarchy Tightening */
.post-card .post-date {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-weight: 700;
  opacity: 0.8;
}

.post-card h3 {
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.post-card .post-summary {
  margin-top: 0.75rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* 5. Dark Mode Adjustments for Node Glow */
[data-theme="dark"] .post-grid .post-card {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(15, 15, 20, 0.8) 100%);
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .post-grid .post-card:hover {
  box-shadow: 0 4px 20px -4px rgba(167, 139, 250, 0.15);
}

@media (prefers-reduced-motion: reduce) {
  .post-grid .post-card {
    transition: none;
  }
  .post-grid .post-card:hover {
    transform: none;
    box-shadow: none;
  }
  .post-grid .post-card::before {
    opacity: 0.5;
  }
}
/* ─── 2026-06-02: Targeted Polish — Nav, Archive, Hero ─── */

/* 1. Navigation: Tighten spacing, prevent hover bleed, emphasize Journal */
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}
.site-nav li {
  margin: 0;
  padding: 0;
}
.site-nav .nav-link,
.site-nav .nav-journal {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.site-nav .nav-link:hover,
.site-nav .nav-journal:hover {
  background: var(--nav-item-hover-bg);
  color: var(--accent);
  transform: translateY(-1px);
}
.site-nav .nav-journal {
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
  margin-left: 0.5rem;
}
.site-nav .nav-journal:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
}

/* 2. Archive: Fix desktop/mobile formatting, align dates, tighten spacing */
.archive-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.archive-section ul li {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  transition: background var(--transition-fast);
}
.archive-section ul li:hover {
  background: var(--accent-light);
}
.archive-section ul li a.archive-link {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.45;
  flex-grow: 1;
  transition: color var(--transition-fast);
}
.archive-section ul li a.archive-link:hover {
  color: var(--accent);
}
.archive-section ul li .archive-date {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace, system-ui;
}
.archive-year {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  padding: 1.2rem 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-top: 1.5rem;
  font-weight: 700;
}
.archive-year:first-child {
  margin-top: 0;
}
.archive-empty {
  padding: 2rem 0.75rem;
  color: var(--text-tertiary);
  font-style: italic;
  text-align: center;
}

/* 3. Hero: Fix title truncation on desktop/mobile */
.hero-heading {
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  max-width: 100%;
  padding: 0 0.5rem;
}
.hero-subtitle {
  max-width: 600px;
  margin: 0.75rem auto;
}

/* 4. Journal Link in Hero: Match nav styling for consistency */
.hero-journal a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: var(--bg-primary);
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition-fast), transform var(--transition-fast);
  margin-top: 0.5rem;
}
.hero-journal a:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* Mobile adjustments for archive */
@media (max-width: 600px) {
  .archive-section ul li {
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.75rem;
  }
  .archive-section ul li .archive-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
  }
}
/* ─── 2026-06-03: Archive Alignment, Nav Hover Isolation & Hero Wrapping ─── */

/* 1. Navigation: Strict hover targets, prevent cross-talk, enforce nowrap */
.site-nav {
  position: relative;
  z-index: 10;
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav li {
  position: relative;
  margin: 0;
  padding: 0;
}
.site-nav .nav-link,
.site-nav .nav-journal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  box-sizing: border-box;
}
.site-nav .nav-link:hover,
.site-nav .nav-journal:hover {
  background: var(--nav-item-hover-bg);
  color: var(--accent);
  transform: translateY(-1px);
  z-index: 2; /* Ensures hovered item sits above overlapping hover zones */
}
.site-nav .nav-journal {
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
  margin-left: 0.5rem;
  box-shadow: 0 2px 6px var(--shadow);
}
.site-nav .nav-journal:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
}

/* 2. Archive: Precise alignment, responsive typography, clean dates */
.archive-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.archive-section ul li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  transition: background var(--transition-fast), transform var(--transition-fast);
  overflow-wrap: break-word;
  word-break: break-word;
}
.archive-section ul li:hover {
  background: var(--accent-light);
  transform: translateX(4px);
}
.archive-section ul li a.archive-link {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.45;
  flex: 1 1 auto;
  min-width: 0; /* Allows flex item to shrink properly without breaking layout */
  transition: color var(--transition-fast);
}
.archive-section ul li a.archive-link:hover {
  color: var(--accent);
}
.archive-section ul li .archive-date {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace, system-ui;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
  margin-left: auto;
}
.archive-year {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  padding: 1.5rem 0.85rem 0.65rem;
  margin-top: 0.5rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
.archive-year:first-child {
  margin-top: 0;
  border-top: none;
}

/* 3. Hero Heading: Prevent ugly truncation */
.hero h1 {
  word-break: keep-all;
  overflow-wrap: anywhere;
  hyphens: auto;
  max-width: 100%;
}

/* 4. Mobile Archive & Nav Adjustments */
@media (max-width: 768px) {
  .archive-section ul li {
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem;
  }
  .archive-section ul li .archive-date {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    align-self: flex-end;
  }
  .site-nav .nav-link,
  .site-nav .nav-journal {
    padding: 0.6rem 1rem;
    font-size: 1rem;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
}
/* ─── Post Grid & Card Refinements ─── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.post-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
  animation: cardFadeIn 0.4s ease-out both;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--shadow-hover);
  border-color: var(--accent);
}

.post-card:hover::before {
  opacity: 1;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }

.post-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 0;
  transition: color var(--transition-fast);
}

.post-card-title a {
  color: inherit;
  text-decoration: none;
}

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

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  flex-grow: 1;
}

.post-card-meta {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Mobile Hero & Grid Adjustments */
@media (max-width: 600px) {
  .hero-heading {
    font-size: clamp(1.7rem, 5vw, 2.2rem);
    line-height: 1.15;
    word-break: break-word;
  }
  .hero-subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  }
  .post-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .post-card {
    padding: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-card {
    animation: none;
    transition: none;
  }
  .post-card::before, .post-card:hover {
    transition: none;
  }
}
/* ─── Archive Section: Fix truncation & mobile overflow ── */
.archive-section ul li {
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal;
}
.archive-section ul li a.archive-link {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  padding-right: 0.5rem;
}

/* ─── Nav Hover Containment (fixes Josh's hover-shift bug) ── */
.site-nav .nav-link,
.site-nav .nav-journal {
  position: relative;
  z-index: 1;
}
.site-nav .nav-link::before,
.site-nav .nav-journal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--nav-item-hover-bg);
  border-radius: var(--nav-item-border-radius);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.site-nav .nav-link:hover::before,
.site-nav .nav-journal:hover::before {
  opacity: 1;
}

@media (max-width: 600px) {
  .archive-section ul li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.75rem 0.85rem;
  }
  .archive-section ul li .archive-date {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    align-self: flex-start;
  }
}
