/* ==========================================
   BLOG STYLES
   Extends main styles.css
   ========================================== */

/* Header Links */
.home-link,
.log-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s var(--ease-out-expo);
}

.home-link:hover,
.log-link:hover {
    color: var(--terminal-green);
}

/* ==========================================
   LOG LISTING PAGE
   ========================================== */
.log-page {
    margin-bottom: var(--space-xxl);
}

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

.page-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-top: var(--space-md);
}

/* Tag Filter Header */
.tag-filter-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.tag-filter-header .filter-label {
    color: var(--text-muted);
}

.tag-filter-header .filter-tag {
    color: var(--text-primary);
    background: var(--bg-elevated);
    padding: 4px 10px;
    border-radius: 3px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.tag-filter-header .clear-filter {
    margin-left: auto;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 8px;
    transition: color 0.15s ease;
}

.tag-filter-header .clear-filter:hover {
    color: var(--accent-red);
}

/* Loading State */
.loading-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-xxl);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.loading-spinner {
    color: var(--gold);
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Log Entries List (Full Page) */
.log-entries-full {
    display: flex;
    flex-direction: column;
    gap: calc(var(--space-xxl) + 16px); /* Extra space for torn edges */
}

/* Paper variables for blog entries */
.log-entry-full {
    --paper-bg: #f4f1e8;
    --paper-cream: #ebe7dc;
    --paper-line: rgba(120, 180, 140, 0.25);
    --paper-hole: #c4c0b5;
    --paper-text: #1a1815;
    --paper-text-muted: #3a3835;
    --paper-heading: #0a0805;

    position: relative;
    display: block;
    padding: var(--space-xl);
    padding-left: calc(var(--space-xl) + 48px);
    padding-right: calc(var(--space-xl) + 48px);
    padding-top: calc(var(--space-xl) + 24px);
    padding-bottom: calc(var(--space-xl) + 16px);
    background: var(--paper-bg);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    cursor: pointer;

    /* Green-bar paper lines */
    background-image:
        repeating-linear-gradient(
            0deg,
            var(--paper-bg) 0px,
            var(--paper-bg) 28px,
            var(--paper-line) 28px,
            var(--paper-line) 30px,
            var(--paper-cream) 30px,
            var(--paper-cream) 56px
        );
    background-size: 100% 56px;

    /* Paper shadow */
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, 0.02),
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.2);

    transition: all 0.3s var(--ease-out-expo);
}

/* Torn perforated edge - top */
.log-entry-full::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 32px;
    right: 32px;
    height: 16px;
    background: var(--paper-bg);
    /* Create torn paper edge effect with irregular pattern */
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 16 L0 8 Q2 6 4 8 Q6 4 8 7 Q10 5 12 8 Q14 3 16 7 Q18 5 20 8 Q22 4 24 7 Q26 6 28 8 Q30 3 32 6 Q34 5 36 8 Q38 4 40 7 Q42 5 44 8 Q46 3 48 6 Q50 5 52 8 Q54 4 56 7 Q58 6 60 8 Q62 3 64 6 Q66 5 68 8 Q70 4 72 7 Q74 5 76 8 Q78 3 80 6 Q80 5 82 8 Q84 4 86 7 Q88 6 90 8 Q92 3 94 6 Q96 5 98 8 Q100 4 100 8 L100 16 Z' fill='white'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 16 L0 8 Q2 6 4 8 Q6 4 8 7 Q10 5 12 8 Q14 3 16 7 Q18 5 20 8 Q22 4 24 7 Q26 6 28 8 Q30 3 32 6 Q34 5 36 8 Q38 4 40 7 Q42 5 44 8 Q46 3 48 6 Q50 5 52 8 Q54 4 56 7 Q58 6 60 8 Q62 3 64 6 Q66 5 68 8 Q70 4 72 7 Q74 5 76 8 Q78 3 80 6 Q80 5 82 8 Q84 4 86 7 Q88 6 90 8 Q92 3 94 6 Q96 5 98 8 Q100 4 100 8 L100 16 Z' fill='white'/%3E%3C/svg%3E");
    mask-size: 50px 16px;
    -webkit-mask-size: 50px 16px;
    mask-repeat: repeat-x;
    -webkit-mask-repeat: repeat-x;
    filter: drop-shadow(0 -1px 1px rgba(0,0,0,0.1));
}

/* Torn perforated edge - bottom */
.log-entry-full::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 32px;
    right: 32px;
    height: 16px;
    background: var(--paper-bg);
    /* Inverted torn edge */
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0 L0 8 Q2 10 4 8 Q6 12 8 9 Q10 11 12 8 Q14 13 16 9 Q18 11 20 8 Q22 12 24 9 Q26 10 28 8 Q30 13 32 10 Q34 11 36 8 Q38 12 40 9 Q42 11 44 8 Q46 13 48 10 Q50 11 52 8 Q54 12 56 9 Q58 10 60 8 Q62 13 64 10 Q66 11 68 8 Q70 12 72 9 Q74 11 76 8 Q78 13 80 10 Q80 11 82 8 Q84 12 86 9 Q88 10 90 8 Q92 13 94 10 Q96 11 98 8 Q100 12 100 8 L100 0 Z' fill='white'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0 L0 8 Q2 10 4 8 Q6 12 8 9 Q10 11 12 8 Q14 13 16 9 Q18 11 20 8 Q22 12 24 9 Q26 10 28 8 Q30 13 32 10 Q34 11 36 8 Q38 12 40 9 Q42 11 44 8 Q46 13 48 10 Q50 11 52 8 Q54 12 56 9 Q58 10 60 8 Q62 13 64 10 Q66 11 68 8 Q70 12 72 9 Q74 11 76 8 Q78 13 80 10 Q80 11 82 8 Q84 12 86 9 Q88 10 90 8 Q92 13 94 10 Q96 11 98 8 Q100 12 100 8 L100 0 Z' fill='white'/%3E%3C/svg%3E");
    mask-size: 50px 16px;
    -webkit-mask-size: 50px 16px;
    mask-repeat: repeat-x;
    -webkit-mask-repeat: repeat-x;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}

/* Feed hole strip - left side */
.log-entry-full .feed-strip-left {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 32px;
    background:
        /* Circular feed holes */
        repeating-radial-gradient(
            circle at 16px 28px,
            #d8d4c8 0px,
            #d8d4c8 4px,
            #a8a498 4px,
            #a8a498 5px,
            transparent 5px,
            transparent 56px
        ),
        /* Hole strip background */
        linear-gradient(90deg, #e8e4d8 0%, #f0ece0 100%);
    background-size: 32px 56px;
    border-right: 1px dashed rgba(0, 0, 0, 0.1);
    box-shadow: inset -2px 0 4px rgba(0, 0, 0, 0.03);
}

/* Feed hole strip - right side */
.log-entry-full .feed-strip-right {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 32px;
    background:
        /* Circular feed holes */
        repeating-radial-gradient(
            circle at 16px 28px,
            #d8d4c8 0px,
            #d8d4c8 4px,
            #a8a498 4px,
            #a8a498 5px,
            transparent 5px,
            transparent 56px
        ),
        /* Hole strip background */
        linear-gradient(90deg, #f0ece0 0%, #e8e4d8 100%);
    background-size: 32px 56px;
    border-left: 1px dashed rgba(0, 0, 0, 0.1);
    box-shadow: inset 2px 0 4px rgba(0, 0, 0, 0.03);
}

/* Report header styling */
.log-entry-full .report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-md);
    border-bottom: 2px solid var(--paper-text);
}

.log-entry-full .report-classification {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--paper-text);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 2px 8px;
    border: 1px solid var(--paper-text);
    background: transparent;
}

.log-entry-full .report-id {
    font-size: 0.625rem;
    color: var(--paper-text-muted);
    letter-spacing: 0.05em;
}

/* Entry date styling on paper */
.log-entry-full .entry-date {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.log-entry-full .date-day {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--paper-text);
}

.log-entry-full .date-month {
    font-size: 0.75rem;
    color: var(--paper-text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.log-entry-full .date-year {
    font-size: 0.75rem;
    color: var(--paper-text-muted);
}

/* Entry content on paper */
.log-entry-full .entry-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.log-entry-full .entry-title {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--paper-heading);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.3;
    transition: color 0.3s var(--ease-out-expo);
}

.log-entry-full:hover .entry-title {
    color: var(--paper-heading);
}

.log-entry-full .entry-excerpt {
    font-size: 0.875rem;
    color: var(--paper-text-muted);
    line-height: 1.8;
    margin-top: var(--space-sm);
}

.log-entry-full .entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.entry-tag {
    font-size: 0.5625rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    color: var(--paper-text);
    background: transparent;
    padding: 2px 6px;
    border: 1px solid var(--paper-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.entry-tag:hover {
    background: var(--paper-text);
    color: var(--paper-bg);
}

/* Hover effect - slight lift */
.log-entry-full:hover {
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, 0.02),
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 2px 6px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

/* ==========================================
   SINGLE POST PAGE
   ========================================== */
.post-page {
    margin-bottom: var(--space-xxl);
}

.post-header {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border-subtle);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.post-date {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.post-date-icon {
    color: var(--terminal-green);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.post-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    text-shadow: 0 0 30px var(--terminal-green-glow);
}

/* Post Content - Dot Matrix Paper Effect */
.post-content {
    --paper-bg: #f4f1e8;
    --paper-cream: #ebe7dc;
    --paper-line: rgba(120, 180, 140, 0.25);
    --paper-hole: #c4c0b5;
    --paper-text: #1a1815;
    --paper-text-muted: #2a2825;
    --paper-heading: #0a0805;
    --coffee-ring: rgba(139, 90, 43, 0.15);
    --coffee-stain: rgba(160, 110, 60, 0.08);

    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9375rem;
    line-height: 1.9;
    letter-spacing: -0.01em;
    color: var(--paper-text-muted);
    background: var(--paper-bg);
    position: relative;
    padding: var(--space-xl);
    padding-left: calc(var(--space-xl) + 40px);
    padding-right: calc(var(--space-xl) + 40px);
    margin-left: 0;

    /* Green-bar paper lines */
    background-image:
        repeating-linear-gradient(
            0deg,
            var(--paper-bg) 0px,
            var(--paper-bg) 28px,
            var(--paper-line) 28px,
            var(--paper-line) 30px,
            var(--paper-cream) 30px,
            var(--paper-cream) 56px
        );
    background-size: 100% 56px;

    /* Paper texture and edges */
    box-shadow:
        inset 0 0 100px rgba(0, 0, 0, 0.03),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Hide global scanlines on post pages - scanlines are added locally to post-content */
body:has(.post-page) .scanlines {
    display: none;
}

/* Local scanlines overlay for post content - sits below images */
.post-content .post-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    opacity: 0.3;
}

/* Coffee stain - randomly positioned via JS */
.post-content .coffee-stain {
    position: absolute;
    width: 240px;
    height: 240px;
    pointer-events: none;
    z-index: 1;
    border-radius: 50%;
    background:
        /* Outer ring - coffee cup mark */
        radial-gradient(
            circle at center,
            transparent 38%,
            rgba(101, 67, 33, 0.08) 40%,
            rgba(139, 90, 43, 0.2) 45%,
            rgba(139, 90, 43, 0.25) 48%,
            rgba(139, 90, 43, 0.2) 51%,
            rgba(101, 67, 33, 0.1) 55%,
            rgba(101, 67, 33, 0.03) 60%,
            transparent 65%
        ),
        /* Inner stain - spilled coffee */
        radial-gradient(
            ellipse 55% 50% at 52% 48%,
            rgba(139, 90, 43, 0.1) 0%,
            rgba(160, 110, 60, 0.06) 50%,
            transparent 80%
        ),
        /* Small drip */
        radial-gradient(
            ellipse 20% 30% at 75% 80%,
            rgba(139, 90, 43, 0.08) 0%,
            transparent 70%
        );
    transform: rotate(var(--stain-rotation, 0deg));
}

/* Override text colors for light paper */
.post-content p,
.post-content li {
    color: var(--paper-text-muted);
}

.post-content strong {
    color: var(--paper-text);
}

.post-content em {
    color: #8b5a2b;
}

.post-content h2 {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--paper-heading);
    text-shadow: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.post-content a {
    color: var(--paper-text);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: #000;
    text-decoration-style: solid;
}

/* Inline code on light paper */
.post-content code {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: var(--paper-text);
    font-weight: 500;
}

/* List styling on light paper */
.post-content ul {
    list-style: none;
}

.post-content ul li::before {
    content: '*';
    color: var(--paper-text);
    margin-right: 0.5em;
    margin-left: -1em;
}

.post-content ol {
    list-style: none;
    counter-reset: paper-counter;
}

.post-content ol li {
    counter-increment: paper-counter;
}

.post-content ol li::before {
    content: counter(paper-counter) '.';
    color: var(--paper-text);
    margin-right: 0.5em;
    margin-left: -1.5em;
}

/* Feed hole strip - left side */
.post-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 32px;
    background:
        /* Circular feed holes */
        repeating-radial-gradient(
            circle at 16px 28px,
            #d8d4c8 0px,
            #d8d4c8 4px,
            #a8a498 4px,
            #a8a498 5px,
            transparent 5px,
            transparent 56px
        ),
        /* Hole strip background */
        linear-gradient(90deg, #e8e4d8 0%, #f0ece0 100%);
    background-size: 32px 56px;
    border-right: 1px dashed rgba(0, 0, 0, 0.1);
    box-shadow: inset -2px 0 4px rgba(0, 0, 0, 0.03);
}

/* Feed hole strip - right side */
.post-content::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 32px;
    background:
        /* Circular feed holes */
        repeating-radial-gradient(
            circle at 16px 28px,
            #d8d4c8 0px,
            #d8d4c8 4px,
            #a8a498 4px,
            #a8a498 5px,
            transparent 5px,
            transparent 56px
        ),
        /* Hole strip background */
        linear-gradient(90deg, #f0ece0 0%, #e8e4d8 100%);
    background-size: 32px 56px;
    border-left: 1px dashed rgba(0, 0, 0, 0.1);
    box-shadow: inset 2px 0 4px rgba(0, 0, 0, 0.03);
}

/* Post header - inherit paper styling */
.post-header {
    position: relative;
    margin-left: -8px;
}

.post-content p {
    margin-bottom: var(--space-lg);
}


.post-content ul,
.post-content ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-lg);
}

.post-content li {
    margin-bottom: var(--space-sm);
}

/* Cassette Futurism Data Tablet - Cream Plastic */
.post-content pre {
    --crt-green: #33ff66;
    --crt-green-dim: #1a803a;
    --crt-bg: #050a05;
    --plastic-cream: #d8d4c4;
    --plastic-light: #e5e1d1;
    --plastic-dark: #c5c1b1;
    --plastic-shadow: #a8a498;
    --screen-bezel: #2a2a28;
    --led-glow: rgba(51, 255, 102, 0.8);

    background:
        /* Plastic body gradient */
        linear-gradient(180deg,
            var(--plastic-light) 0%,
            var(--plastic-cream) 3%,
            var(--plastic-cream) 50%,
            var(--plastic-dark) 94%,
            var(--plastic-shadow) 100%
        );
    margin: var(--space-xl) 0;
    position: relative;
    border-radius: 16px;
    padding: 16px;
    padding-bottom: 50px;
    overflow: visible;
    width: 85%;
    max-width: 700px;

    /* Chunky plastic casing */
    border: 3px solid var(--plastic-shadow);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1),
        inset 2px 0 0 rgba(255, 255, 255, 0.2),
        inset -2px 0 0 rgba(0, 0, 0, 0.05),
        /* Shadow on paper */
        0 6px 20px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2);

    /* Slight random rotation for casual look */
    transform: rotate(var(--tablet-rotation, 0deg));
}

/* Tablet positioning variants */
.post-content pre.tablet-left {
    margin-left: 0;
    margin-right: auto;
}

.post-content pre.tablet-center {
    margin-left: auto;
    margin-right: auto;
}

.post-content pre.tablet-right {
    margin-left: auto;
    margin-right: 0;
}

/* Grip ridges on left side */
.post-content pre .tablet-grip {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 60px;
    background:
        repeating-linear-gradient(
            180deg,
            var(--plastic-shadow) 0px,
            var(--plastic-shadow) 4px,
            var(--plastic-dark) 4px,
            var(--plastic-dark) 8px
        );
    border-radius: 2px;
    opacity: 0.7;
}

/* Top bezel with brand and model */
.post-content pre .tablet-bezel-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px 8px;
    position: relative;
    z-index: 5;
}

.post-content pre .tablet-brand {
    font-family: 'Arial Black', sans-serif;
    font-size: 10px;
    font-weight: 900;
    color: #7a7868;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.post-content pre .tablet-model {
    font-family: 'Arial', sans-serif;
    font-size: 8px;
    font-weight: bold;
    color: #8a8878;
    letter-spacing: 1px;
}

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

/* Hardware controls bar at bottom */
.post-content pre .tablet-buttons {
    position: absolute;
    bottom: 10px;
    right: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Orange rotary knob */
.post-content pre .tablet-dial {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%,
            #ff9544 0%,
            #e07020 40%,
            #c05a10 70%,
            #a04800 100%
        );
    border: 2px solid #803800;
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.4),
        inset 0 -2px 3px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.4);
    position: relative;
}

/* Knob grip ridges */
.post-content pre .tablet-dial::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background:
        repeating-conic-gradient(
            from 0deg,
            transparent 0deg,
            transparent 15deg,
            rgba(0, 0, 0, 0.15) 15deg,
            rgba(0, 0, 0, 0.15) 30deg
        );
}

/* Knob pointer */
.post-content pre .tablet-dial::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 6px;
    background: #401800;
    border-radius: 1px;
}

/* Toggle switch */
.post-content pre .tablet-toggle {
    width: 12px;
    height: 22px;
    border-radius: 3px;
    background: #3a3a38;
    border: 2px solid #2a2a28;
    box-shadow:
        inset 0 -8px 0 #4a4a48,
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 2px 3px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Toggle switch groove */
.post-content pre .tablet-toggle::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 28px;
    background: var(--plastic-shadow);
    border-radius: 3px;
    z-index: -1;
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.3);
}

/* Power button */
.post-content pre .tablet-power {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    background:
        linear-gradient(180deg,
            #4a4a48 0%,
            #3a3a38 50%,
            #2a2a28 100%
        );
    border: 2px solid #1a1a18;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.4);
    position: relative;
}

/* Power LED underneath */
.post-content pre .tablet-power-led {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--crt-green);
    border-radius: 50%;
    border: 1px solid #1a5a28;
    box-shadow:
        0 0 4px var(--crt-green),
        0 0 8px var(--led-glow);
    animation: ledPulse 2s ease-in-out infinite;
}

/* Vent slots */
.post-content pre .tablet-vents {
    position: absolute;
    left: 16px;
    bottom: 12px;
    width: 50px;
    height: 6px;
    background:
        repeating-linear-gradient(
            90deg,
            var(--plastic-shadow) 0px,
            var(--plastic-shadow) 3px,
            transparent 3px,
            transparent 5px
        );
    border-radius: 1px;
}

/* Tablet screen area */
.post-content pre .crt-screen {
    background:
        /* Noise texture */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E"),
        linear-gradient(180deg, #080f08 0%, #040804 100%);
    margin: 12px;
    margin-left: 20px;
    margin-bottom: 38px;
    padding: var(--space-lg);
    padding-bottom: calc(var(--space-lg) + 1.5em);
    border-radius: 6px;
    position: relative;
    overflow-x: auto;
    /* Recessed screen effect */
    border: 1px solid #000;
    box-shadow:
        inset 0 0 50px rgba(0, 0, 0, 0.9),
        inset 0 0 15px rgba(51, 255, 102, 0.04),
        inset 0 2px 4px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.03);
}

/* Scanlines */
.post-content pre::before {
    content: '';
    position: absolute;
    top: 44px;
    left: 20px;
    right: 12px;
    bottom: 50px;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 1px,
            rgba(0, 0, 0, 0.15) 1px,
            rgba(0, 0, 0, 0.15) 2px
        );
    pointer-events: none;
    z-index: 10;
    border-radius: 6px;
}

/* Screen curve vignette */
.post-content pre::after {
    content: '';
    position: absolute;
    top: 44px;
    left: 20px;
    right: 12px;
    bottom: 50px;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.5) 100%
    );
    pointer-events: none;
    z-index: 11;
    border-radius: 6px;
}

/* Hide old bezel screws - replaced by tablet elements */
.post-content pre .bezel-detail {
    display: none;
}

.post-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--crt-green);
    text-shadow:
        0 0 1px var(--crt-green),
        0 0 4px rgba(51, 255, 102, 0.4);
    display: block;
    position: relative;
}

/* Terminal prompt with blinking cursor */
.post-content pre .terminal-prompt {
    display: block;
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(51, 255, 102, 0.1);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--crt-green-dim);
    text-shadow: 0 0 2px rgba(51, 255, 102, 0.3);
    position: relative;
    z-index: 5;
}

.post-content pre .terminal-prompt .prompt-input {
    color: var(--crt-green);
    text-shadow: 0 0 4px rgba(51, 255, 102, 0.6);
}

.post-content pre .terminal-prompt .cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: var(--crt-green);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursorBlink 1s step-end infinite;
    box-shadow: 0 0 6px rgba(51, 255, 102, 0.6);
    transition: background 0.2s;
}

.post-content pre .terminal-prompt .cursor:hover {
    background: #66ff99;
    box-shadow: 0 0 10px rgba(51, 255, 102, 0.9);
}

.post-content pre .terminal-prompt .cursor.waiting {
    background: var(--crt-green);
    animation: cursorBlink 0.5s step-end infinite;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.post-content blockquote {
    margin: var(--space-lg) 0;
    margin-left: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    color: #1a1a1a;
    font-style: normal;
}

.post-content blockquote p {
    margin: 0 0 var(--space-sm) 0;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Images in post content - Polaroid style */
.post-content img {
    max-width: 90%;
    height: auto;
    display: block;
    margin: var(--space-xl) auto;
    /* Polaroid frame - white with thicker bottom */
    background: #fefefe;
    padding: 12px 12px 40px 12px;
    /* Subtle off-white/cream tint like real polaroid */
    border: 1px solid #e8e4dc;
    /* Polaroid shadow - slight curl effect */
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.08),
        /* Slight paper texture highlight */
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    /* Slight random rotation for casual look */
    transform: rotate(var(--polaroid-rotation, -1deg));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Sit above post-content scanlines overlay */
    position: relative;
    z-index: 2;
}

/* Vary rotation for visual interest */
.post-content p:nth-child(odd) img {
    --polaroid-rotation: 1.5deg;
}

.post-content p:nth-child(3n) img {
    --polaroid-rotation: -2deg;
}

.post-content p:nth-child(4n) img {
    --polaroid-rotation: 0.5deg;
}

/* Hover effect - lift and straighten */
.post-content img:hover {
    transform: rotate(0deg) translateY(-4px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.15),
        0 16px 32px rgba(0, 0, 0, 0.1);
}

/* Linked images - remove default link styling */
.post-content a:has(img) {
    text-decoration: none;
    display: block;
    width: fit-content;
    margin: var(--space-xl) auto;
}

.post-content a:has(img) img {
    margin: 0;
}

.post-content a:has(img):hover img {
    transform: rotate(0deg) translateY(-4px) scale(1.02);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.15),
        0 16px 32px rgba(0, 0, 0, 0.1);
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: var(--space-lg);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-subtle);
    margin-bottom: var(--space-xxl);
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    transition: all 0.3s var(--ease-out-expo);
    max-width: 45%;
}

.post-nav-link:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.post-nav-link.prev {
    align-items: flex-start;
}

.post-nav-link.next {
    align-items: flex-end;
    margin-left: auto;
}

.post-nav-label {
    font-size: 0.625rem;
    font-family: var(--font-pixel);
    color: var(--terminal-green);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.post-nav-title {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    color: var(--text-primary);
    transition: color 0.3s var(--ease-out-expo);
}

.post-nav-link:hover .post-nav-title {
    color: var(--terminal-green);
}

/* Error State */
.error-message {
    text-align: center;
    padding: var(--space-xxl);
    color: var(--hp-red);
}

.error-message h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.error-message p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.error-message a {
    color: var(--terminal-green);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    /* Simplified paper on mobile - no feed strips */
    .log-entry-full {
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
        padding-top: calc(var(--space-lg) + 16px);
        padding-bottom: var(--space-lg);
    }

    .log-entry-full .feed-strip-left,
    .log-entry-full .feed-strip-right {
        display: none;
    }

    /* Simplified torn edges on mobile */
    .log-entry-full::before,
    .log-entry-full::after {
        left: 8px;
        right: 8px;
    }

    .log-entry-full .report-header {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: flex-start;
    }

    .log-entry-full .entry-title {
        font-size: 1rem;
    }

    .log-entry-full .entry-excerpt {
        font-size: 0.8125rem;
    }

    .post-navigation {
        flex-direction: column;
    }

    .post-nav-link {
        max-width: 100%;
    }

    .post-nav-link.next {
        align-items: flex-start;
    }

    /* Dot matrix paper - simplified on mobile */
    .post-content {
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
    }

    .post-content::before,
    .post-content::after {
        display: none;
    }

    /* Tablet code blocks - full width on mobile */
    .post-content pre,
    .post-content pre.tablet-left,
    .post-content pre.tablet-center,
    .post-content pre.tablet-right {
        width: calc(100% + 2 * var(--space-lg));
        max-width: none;
        margin-left: calc(-1 * var(--space-lg));
        margin-right: calc(-1 * var(--space-lg));
        transform: none;
        border-radius: 0;
    }

    .post-content pre .tablet-grip {
        display: none;
    }

    .post-content pre .crt-screen {
        margin-left: 12px;
        border-radius: 4px;
    }

    .post-content pre::before,
    .post-content pre::after {
        display: block;
        left: 12px;
        border-radius: 4px;
    }

    .post-content pre .tablet-vents {
        display: none;
    }

    .post-content pre .tablet-buttons {
        gap: 8px;
    }

    .post-content pre .tablet-dial {
        width: 24px;
        height: 24px;
    }

    .post-content pre .tablet-power {
        width: 22px;
        height: 22px;
    }
}

/* ==========================================
   IMAGE LIGHTBOX
   ========================================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    cursor: zoom-out;
    /* Reset polaroid styles */
    background: transparent;
    padding: 0;
    border: none;
    transform: none;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}
