:root {
    /* Soft Brutalist Systems Lab Palette */
    --paper: #f2ece4;
    --paper-strong: #fffdf9;
    --ink: #1c1a17;
    --ink-soft: #4f4a44;
    --ink-faint: #746e66;
    --line: rgba(28, 26, 23, 0.16);
    --line-strong: rgba(28, 26, 23, 1);

    /* Accents - Used extremely sparingly */
    --accent-mint: #b5c29c;
    --accent-rose: #d7a9ae;
    --accent-yellow: #d8c488;

    --theme-paper: var(--paper);
    --theme-paper-strong: var(--paper-strong);
    --theme-ink: var(--ink);
    --theme-ink-soft: var(--ink-soft);
    --theme-ink-faint: var(--ink-faint);
    --theme-line: var(--line);
    --theme-line-strong: var(--line-strong);

    --font-display: 'Fraunces', serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --nav-height: clamp(5.75rem, 7vw, 6.75rem);

    /* Reveal ease */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* Brutalist Focus States (Accessibility) */
:focus-visible {
    outline: 2px solid var(--accent-mint);
    outline-offset: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.blog-post-card:focus-visible {
    outline: 2px solid var(--accent-mint);
    outline-offset: -2px; /* Inward outline for cards */
}

html {
    /* Full viewport scroll snapping */
    scroll-behavior: smooth;
    background-color: var(--paper); /* Set html background to paper to eliminate gaps */
    height: 100%;
}

body {
    min-height: 100%;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    scroll-behavior: smooth;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom Cursor */
.custom-cursor {
    display: none !important;
}

.js .custom-cursor {
    display: none !important;
}

.cursor-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.cursor-crosshair {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: all 0.4s var(--ease-out-expo);
}

/* Pointer State (Finger Cursor) */
.custom-cursor.is-pointer .cursor-crosshair {
    width: 48px;
    height: 48px;
    border-color: rgba(255, 255, 255, 1);
    border-width: 1px;
    transform: rotate(45deg);
}

.custom-cursor.is-pointer .cursor-dot {
    width: 2px;
    height: 2px;
    background: var(--accent-mint);
}

/* Selection / Text State (I-Beam style) */
.custom-cursor.is-text .cursor-crosshair {
    width: 2px;
    height: 24px;
    border-radius: 1px;
    border: none;
    background: rgba(255, 255, 255, 1);
    /* Center the bar within the fixed 20x20 container */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.custom-cursor.is-text .cursor-dot {
    opacity: 0;
}

/* Background Systems Grid */
body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* Background Systems Grid */
.bg-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(circle, rgba(28, 26, 23, 0.2) 1px, transparent 1px);
    background-size: 3vw 3vw;
    opacity: 0.5;
    mask-image: radial-gradient(ellipse at center, white 50%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse at center, white 50%, transparent 90%);
}

.section-dark .bg-grid {
    background-image: radial-gradient(circle, rgba(255, 253, 249, 0.08) 1px, transparent 1px);
}

/* ========================================
   TIER 2 — WORK SECTION ENHANCEMENTS
   ======================================== */

.work-wide-layout {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* Global Navigation (Fixed) */
.fixed-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--nav-height);
    padding: 1.25rem 5vw;
    background: var(--theme-paper);
    border-bottom: 1px solid var(--theme-line);
    pointer-events: none;
    /* Let clicks pass through empty areas */
}

#hero {
    padding-top: var(--nav-height);
}

.brand-block,
.nav-links {
    pointer-events: auto;
    /* Re-enable clicks to links */
}

.brand-block {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--theme-ink);
    text-decoration: none;
    line-height: 1;
}

.brand-sys {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--theme-ink-soft);
    margin-top: 0.25rem;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--theme-ink);
    position: relative;
    overflow: hidden;
    padding-bottom: 2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--theme-ink);
    transform: translateX(-101%);
    transition: transform 0.4s var(--ease-out-expo);
}

.nav-link:hover::after {
    transform: translateX(0);
}

/* Progress Indicator */
.scroll-progress {
    position: fixed;
    right: 2vw;
    bottom: 2vw;
    z-index: 100;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-line {
    width: 40px;
    height: 1px;
    background: var(--line);
    position: relative;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--ink);
    width: 0%;
    transition: width 0.3s ease-out;
}

/* Sections */
.section-slide {
    position: relative;
    width: 100%;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--nav-height) 5vw 0;
    overflow: hidden;
    box-sizing: border-box;
}

#signature-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
}

/* Hero Annotation Block */
.hero-annotation-block {
    position: absolute;
    top: 10vw;
    right: 5vw;
    z-index: 10;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--ink-soft);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-left: 1px solid var(--accent-mint);
    padding-left: 1rem;
}

.anno-item span {
    color: var(--ink-faint);
    margin-right: 0.5rem;
}

/* Ticker Ribbon */
.ticker-wrap {
    display: none !important;
}

.ticker {
    display: flex;
    flex-shrink: 0;
    width: fit-content;
    animation: ticker 40s linear infinite;
}

.ticker__group {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-around;
    min-width: 100%;
}

.ticker__item {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--paper);
    white-space: nowrap;
    padding: 0 2.5rem;
    letter-spacing: 0.15em;
}

.ticker__item::after {
    content: '·';
    margin-left: 2.5rem;
    color: var(--accent-mint);
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Skills Matrix */
.skills-matrix {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--line);
    padding-top: 1.5rem;
}

.matrix-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.matrix-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--ink-faint);
    letter-spacing: 0.1em;
}

.matrix-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--ink);
}

/* Project Stats */
.work-header-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
}

.meta-stats {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--ink-faint);
    text-transform: uppercase;
}

/* Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4vw;
    align-items: center;
    height: 100%;
    position: relative;
    z-index: 10;
}

/* Typography elements */
.display-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 8rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 2rem;
}

.display-title span {
    display: block;
    overflow: hidden;
    padding-bottom: 0.12em;
    margin-bottom: -0.1em;
}

.display-title span i {
    font-style: italic;
    font-weight: 400;
}

.body-lead {
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    color: var(--ink-soft);
    max-width: 40ch;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.meta-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
    margin-bottom: 1rem;
    display: block;
}

/* Brutalist details */
.sys-line {
    width: 100%;
    height: 1px;
    background-color: var(--line-strong);
    margin: 2rem 0;
}

.sys-box {
    border: 1px solid var(--line-strong);
    padding: 2rem;
    background: rgba(242, 236, 228, 0.5);
    backdrop-filter: blur(10px);
}

/* Cards & Lists */
.work-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--line-strong);
}

.work-item {
    display: block;
    padding: 0;
    border-bottom: 1px solid var(--line-strong);
    color: var(--ink);
    transition: background 0.4s var(--ease-out-expo), color 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.work-item.is-expanded {
    background: var(--ink);
    color: var(--paper);
}

.work-item::before {
    /* Kept for subtle background layering if needed, but background color swap handles it */
    content: none;
}

.work-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding: 2rem 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: padding 0.4s var(--ease-out-expo);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.work-header:hover {
    padding: 2rem 1rem;
}

.work-item.is-expanded .work-header {
    padding: 2rem 1rem;
}

.work-item-index {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--ink-faint);
    margin-right: 3vw;
    transition: color 0.4s var(--ease-out-expo);
}

.work-item.is-expanded .work-item-index,
.work-item:hover .work-item-index {
    color: var(--accent-mint);
}

.work-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 4rem);
    line-height: 1;
    letter-spacing: -0.02em;
    flex-grow: 1;
    transition: color 0.4s var(--ease-out-expo);
}

.work-item.is-expanded .work-title {
    color: var(--accent-mint);
}

.work-meta {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: color 0.4s var(--ease-out-expo);
}

.work-toggle {
    font-size: 1.5rem;
    font-weight: 400;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    transition: transform 0.4s var(--ease-out-expo);
}

.work-item.is-expanded .work-toggle {
    transform: rotate(45deg);
}

.work-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s var(--ease-out-expo);
}

.work-item.is-expanded .work-body {
    grid-template-rows: 1fr;
}

.work-inner {
    overflow: hidden;
    opacity: 0;
    padding: 0 1rem;
    transition: opacity 0.4s ease, padding 0.4s var(--ease-out-expo);
}

.work-item.is-expanded .work-inner {
    opacity: 1;
    padding: 0 1rem 2.5rem 1rem;
}

.work-item.is-expanded .body-lead {
    color: rgba(255, 253, 249, 0.78);
}

.work-item.is-expanded .work-meta {
    color: rgba(255, 253, 249, 0.88);
}

.work-item.is-expanded .btn-brutal {
    border-color: var(--paper);
    color: var(--paper);
}

.work-item.is-expanded .btn-brutal:hover {
    background: var(--paper);
    color: var(--ink);
}

.btn-brutal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-brutal:hover {
    background: var(--ink);
    color: var(--paper);
}

/* Animations Triggered by Classes */
.reveal-text {
    transform: translateY(100%);
    opacity: 0;
    transition: transform 1.2s var(--ease-out-expo), opacity 1.2s var(--ease-out-expo);
}

.is-inview .reveal-text {
    transform: translateY(0);
    opacity: 1;
}

.reveal-text.is-inview {
    transform: translateY(0);
    opacity: 1;
}

/* Staggering reveals */
.is-inview .delay-1 {
    transition-delay: 0.1s;
}

.is-inview .delay-2 {
    transition-delay: 0.2s;
}

.is-inview .delay-3 {
    transition-delay: 0.3s;
}

.is-inview .delay-4 {
    transition-delay: 0.4s;
}

.reveal-fade {
    opacity: 0;
    filter: blur(10px);
    transition: opacity 1s ease, filter 1s ease;
}

.is-inview .reveal-fade {
    opacity: 1;
    filter: blur(0);
}

.reveal-fade.is-inview {
    opacity: 1;
    filter: blur(0);
}

/* Image mask reveal */
.img-reveal {
    position: relative;
    overflow: hidden;
}

.img-reveal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    transition: transform 1.5s var(--ease-out-expo);
}

.is-inview .img-reveal img {
    transform: scale(1);
}

.img-reveal::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--paper);
    transform-origin: top;
    transition: transform 1s var(--ease-out-expo);
    transition-delay: 0.2s;
}

.is-inview .img-reveal::after {
    transform: scaleY(0);
}

/* Dark Section Mode — Deprecated by Variable Theme Engine, kept for specific overrides if needed */
.section-dark {
    background: var(--ink);
    color: var(--paper);
}

/* Footer / Contact */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 0.9;
}

.footer-link {
    text-decoration: none;
    color: var(--theme-ink);
    transition: opacity 0.3s ease;
}

.section-dark .footer-link {
    color: var(--paper);
}

.section-dark .footer-link:focus-visible {
    outline-color: var(--accent-mint);
}

.section-dark .meta-label {
    color: rgba(255, 253, 249, 0.62);
}

.section-dark .section-annotation {
    color: rgba(255, 253, 249, 0.48);
}

.footer-link:hover {
    opacity: 0.5;
    font-style: italic;
}

/* Atmosphere & Texture - Removed for clinical clarity */
body::after,
body::before {
    display: none !important;
}

.section-idx {
    display: none !important;
}

.section-annotation {
    position: absolute;
    bottom: 2vw;
    left: 2vw;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--theme-ink-faint);
    z-index: 2;
    opacity: 0.6;
}

/* Sections */
.section-slide {
    position: relative;
    width: 100%;
    min-height: 80vh; /* Allow natural flow instead of strict viewport locking */
    padding: 10vw 5vw;
    overflow: hidden;
    box-sizing: border-box;
    border-bottom: 1px solid var(--theme-line);
}

.meta-label::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 2px;
    background: var(--accent-mint);
    margin-right: 0.6rem;
    vertical-align: middle;
}

.accent-mark {
    color: var(--accent-yellow);
}

#hero .display-title::before {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--accent-mint);
    margin-bottom: 1.5rem;
    opacity: 0;
    transition: opacity 1s ease 0.6s, width 1s var(--ease-out-expo) 0.6s;
}

#hero.is-inview .display-title::before {
    opacity: 1;
    width: 40px;
}

@media (max-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .work-meta {
        flex-direction: column;
        gap: 0.2rem;
        align-items: flex-end;
    }
}

@media (min-width: 769px) and (max-height: 650px) {
    #hero {
        padding-top: 7rem;
        padding-bottom: 3rem;
    }

    #hero .split-layout {
        align-items: start;
    }

    #hero .display-title {
        font-size: clamp(3rem, 6vw, 5.5rem);
        margin-bottom: 1rem;
    }
}

/* ========================================
   MOBILE & RESPONSIVE SYSTEMS LAB
   ======================================== */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
    }

    .section-slide {
        height: auto;
        min-height: 100vh;
        /* Extra padding top/bottom for nav clearance */
        padding: 6rem 5vw 6rem 5vw; 
        justify-content: flex-start;
    }

    /* Typography Overrides */
    .display-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
        margin-bottom: 1.5rem;
        line-height: 1.05;
    }

    .body-lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        max-width: 100%;
        line-height: 1.6;
    }

    /* Mobile Navigation (Repositioned to Top & Bottom) */
    .fixed-nav {
        top: 0;
        left: 0;
        right: 0;
        background: var(--theme-paper);
        padding: 0.85rem 5vw;
        border-bottom: 1px solid var(--theme-line-strong);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.65rem;
        transition: background 0.3s ease, border-color 0.3s ease;
    }

    .brand-block {
        align-items: center;
        text-align: center;
    }

    .nav-links {
        position: static;
        inset: auto;
        width: auto;
        background: transparent;
        padding: 0;
        border: 0;
        justify-content: center;
        gap: 1rem;
        z-index: 100;
        pointer-events: auto;
        transition: background 0.3s ease, border-color 0.3s ease;
    }

    .nav-link {
        font-size: 0.62rem;
        padding-bottom: 4px;
    }

    /* Progress Hide */
    .scroll-progress {
        display: none;
    }

    /* Layout Constraints */
    .split-layout {
        gap: 2.5rem;
        padding-top: 2rem;
    }

    /* Section annotations clashing with bottom dock */
    .section-annotation {
        display: none; /* Hide on mobile to keep it clean */
    }

    /* Accordion / Cards adjustment */
    .work-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .work-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1.5rem 0;
    }

    .work-header:hover,
    .work-item.is-expanded .work-header {
        padding: 1.5rem 0;
    }

    .work-item-index {
        margin-bottom: 0.5rem;
        font-size: 1.5rem;
    }

    .work-item.is-expanded .work-inner {
        padding: 0 0 2rem 0;
    }

    .work-meta {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.75rem;
        margin-top: 0.5rem;
    }

    /* Project List Fixes */
    .work-list {
        width: 100%;
        max-width: 100vw;
    }

    .btn-brutal {
        width: 100%;
        padding: 1.25rem;
    }

    .hero-actions {
        width: 100%;
    }

    /* Footer adjustments */
    .footer-links {
        font-size: 2.5rem;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
}

/* ========================================
   BLOG / JOURNAL — Soft Brutalist Systems
   ======================================== */

/* Blog feed section — scrollable, not scroll-snap locked */
.section-blog-feed {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 8rem 5vw 6rem 5vw;
}

.blog-feed-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* Blog Feed Container */
.blog-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--line-strong);
}

/* Individual Post Card */
.blog-post-card {
    border-bottom: 1px solid var(--line-strong);
    cursor: pointer;
    transition: background 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.blog-post-card:hover {
    background: rgba(28, 26, 23, 0.03);
}

/* Post Header (always visible) */
.blog-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding: 1.75rem 0;
    transition: padding 0.3s var(--ease-out-expo);
}

.blog-post-card:hover .blog-post-header,
.blog-post-card.expanded .blog-post-header {
    padding: 1.75rem 1rem;
}

.blog-post-header-left {
    display: grid;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

/* Date */
.blog-post-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
}

/* Title */
.blog-post-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.8vw, 2.4rem);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
    transition: color 0.4s var(--ease-out-expo);
}

/* Tags */
.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.2rem;
}

.blog-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--line-strong);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    background: transparent;
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
    cursor: pointer;
}

.blog-tag:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.blog-tag.active {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

/* Anchor Link Icon */
.blog-anchor-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    color: var(--ink-faint);
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.blog-post-card:hover .blog-anchor-link {
    opacity: 1;
}

.blog-anchor-link:hover {
    color: var(--accent-mint);
}

.blog-post-card.expanded .blog-anchor-link {
    color: rgba(246, 241, 232, 0.5);
    opacity: 1;
}

.blog-post-card.expanded .blog-anchor-link:hover {
    color: var(--accent-mint);
}

/* Expand icon */
.blog-expand-icon {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
    flex-shrink: 0;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    transition: transform 0.4s var(--ease-out-expo), border-color 0.3s ease, color 0.3s ease;
}

.blog-post-card.expanded .blog-expand-icon {
    transform: rotate(180deg);
    border-color: rgba(246, 241, 232, 0.35);
    color: rgba(246, 241, 232, 0.65);
}

/* Expanded state — warm dark stone background */
.blog-post-card.expanded {
    background: #3d3830;
    color: var(--paper);
}

.blog-post-card.expanded .blog-post-title {
    color: var(--accent-mint);
}

.blog-post-card.expanded .blog-post-date {
    color: var(--paper);
}

.blog-post-card.expanded .blog-tag {
    border-color: rgba(246, 241, 232, 0.3);
    color: rgba(246, 241, 232, 0.6);
}

/* Post Body (collapsible via grid-template-rows trick) */
.blog-post-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s var(--ease-out-expo);
}

.blog-post-card.expanded .blog-post-body {
    grid-template-rows: 1fr;
}

.blog-post-body-inner {
    overflow: hidden;
    opacity: 0;
    padding: 0 1rem;
    transition: opacity 0.35s ease, padding 0.4s var(--ease-out-expo);
}

.blog-post-card.expanded .blog-post-body-inner {
    opacity: 1;
    padding: 0 1rem 2.5rem 1rem;
}

/* Summary text */
.blog-post-summary {
    border-top: 1px solid rgba(246, 241, 232, 0.18);
    padding-top: 1rem;
    margin-bottom: 1rem;
}

.blog-post-summary p {
    color: rgba(246, 241, 232, 0.82);
    font-size: 1rem;
    line-height: 1.55;
    max-width: 64ch;
}

.blog-post-summary p+p {
    margin-top: 0.72rem;
}

/* Commit section */
.blog-post-commits {
    margin-top: 1.25rem;
}

.blog-post-commits-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(246, 241, 232, 0.5);
    margin-bottom: 0.6rem;
}

.blog-commit-list {
    list-style: none;
    display: grid;
    gap: 0.4rem;
}

.blog-commit-item {
    border: 1px solid rgba(246, 241, 232, 0.15);
    background: rgba(246, 241, 232, 0.05);
    padding: 0.45rem 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: rgba(246, 241, 232, 0.7);
}

/* Loading & Empty states */
.blog-loading,
.blog-empty {
    min-height: 160px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 0.6rem;
    padding: 2rem;
    color: var(--ink-faint);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.blog-empty h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-transform: none;
}

.blog-loading-spinner {
    width: 24px;
    height: 24px;
    border: 1px solid var(--line);
    border-top-color: var(--ink);
    animation: spin 0.9s linear infinite;
}

/* Blog-specific mobile overrides */
@media (max-width: 768px) {
    .section-blog-feed {
        padding: 6rem 5vw 4rem 5vw;
    }

    .blog-post-title {
        font-size: clamp(1.3rem, 6vw, 1.8rem);
    }

    .blog-post-header {
        gap: 1rem;
        padding: 1.25rem 0;
    }

    .blog-post-card:hover .blog-post-header,
    .blog-post-card.expanded .blog-post-header {
        padding: 1.25rem 0.5rem;
    }

    .blog-post-card.expanded .blog-post-body-inner {
        padding: 0 0.5rem 4rem 0.5rem;
    }
}

body[data-theme="dark"] {
    --theme-paper: var(--ink);
    --theme-paper-strong: #25211c;
    --theme-ink: var(--paper);
    --theme-ink-soft: rgba(255, 253, 249, 0.82);
    --theme-ink-faint: rgba(255, 253, 249, 0.58);
    --theme-line: rgba(255, 253, 249, 0.16);
    --theme-line-strong: rgba(255, 253, 249, 0.45);
}
