/* Cornucopia Dev Logs - Shared Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #080808; color: #d4d4d4; line-height: 1.8; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: #7cb342; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #7cb342, #8bc34a);
    z-index: 9999;
    transition: width 0.1s linear;
    box-shadow: 0 0 6px rgba(124,179,66,0.4);
}

/* Header */
.header {
    padding: 28px 20px 18px;
    text-align: center;
    border-bottom: 1px solid #1a1a1a;
    background: linear-gradient(180deg, #0f0f0f 0%, #080808 100%);
    position: relative;
}
.header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #7cb342, transparent);
}
.header h1 {
    font-size: 1.7rem;
    color: #fff;
    margin-bottom: 4px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.header h1 a { color: #fff; }
.header h1 a:hover { text-decoration: none; color: #7cb342; }
.header .subtitle { color: #777; font-size: 0.85rem; margin-bottom: 14px; }
.header nav { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; align-items: center; }
.header nav a { color: #7cb342; font-size: 0.85rem; }
.header nav a[href*="steampowered"] { color: #66c0f4; }
.header nav a[href*="steampowered"]:hover { color: #a4d8f7; text-decoration: none; }
.header nav .subscribe-link {
    color: #0a0a0a;
    background: #7cb342;
    padding: 5px 18px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 0 12px rgba(124,179,66,0.2);
    transition: background 0.2s, box-shadow 0.2s;
}
.header nav .subscribe-link:hover { background: #8bc34a; box-shadow: 0 0 20px rgba(124,179,66,0.35); text-decoration: none; }
.header nav .rss-link {
    color: #888;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.header nav .rss-link:hover { color: #f89c1c; text-decoration: none; }
.header nav .rss-link svg { width: 14px; height: 14px; fill: currentColor; }

/* Layout */
.layout {
    max-width: 1060px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    padding: 20px 20px;
}

.main-content { flex: 1; min-width: 0; max-width: 760px; }

/* Sidebar */
.sidebar {
    width: 200px;
    flex-shrink: 0;
    position: sticky;
    top: 24px;
    align-self: flex-start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}
.sidebar h3 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #444;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1a1a1a;
}
.sidebar ul { list-style: none; }
.sidebar li { margin-bottom: 8px; }
.sidebar li a {
    color: #888;
    font-size: 0.8rem;
    display: block;
    padding: 3px 0;
    transition: color 0.15s;
    line-height: 1.4;
}
.sidebar li a:hover { color: #7cb342; text-decoration: none; }
.sidebar li a.active { color: #7cb342; }
.sidebar .post-date-sm { color: #3a3a3a; font-size: 0.7rem; display: block; margin-top: 1px; }
.sidebar .post-num { color: #4a4a4a; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; margin-right: 4px; font-variant-numeric: tabular-nums; }
.sidebar li a:hover .post-num, .sidebar li a.active .post-num { color: #7cb342; }
.sidebar .post-new {
    display: inline-block;
    background: #7cb342;
    color: #0d0d0d;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 1px 5px;
    border-radius: 2px;
    margin-left: 5px;
    vertical-align: 1px;
}

/* Posts */
.post {
    margin-bottom: 40px;
    padding: 32px 28px 36px;
    border: 1px solid #181818;
    border-radius: 12px;
    background: #0c0c0c;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    transition: border-color 0.3s;
}
.post:hover {
    border-color: #222;
}
.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}
.post-date { color: #888; font-size: 0.8rem; letter-spacing: 0.02em; }
.reading-time {
    color: #777;
    font-size: 0.78rem;
    padding-left: 12px;
    border-left: 1px solid #2a2a2a;
}
.post > h2 { font-size: 1.4rem; color: #fff; margin-bottom: 18px; font-weight: 500; line-height: 1.4; }
.post > h2 a { color: #fff; transition: color 0.2s; }
.post > h2 a:hover { color: #7cb342; text-decoration: none; }
.post-body { color: #d0d0d0; font-size: 1rem; line-height: 1.85; font-weight: 350; letter-spacing: 0.01em; }
.post-body p { margin-bottom: 22px; max-width: 640px; }
.post-body p:first-child { font-size: 1.05rem; color: #ddd; line-height: 1.9; }
.post-body p:first-child::first-letter {
    float: left;
    font-size: 3.2em;
    line-height: 0.8;
    padding-right: 8px;
    padding-top: 6px;
    color: #7cb342;
    font-weight: 700;
}
.post-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 24px 0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #111;
    padding: 4px;
    border: 1px solid #1a1a1a;
}
.post-images picture { display: block; border-radius: 6px; overflow: hidden; }
.post-images img {
    width: 100%;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s, filter 0.35s;
    object-fit: cover;
    aspect-ratio: 16/10;
    filter: brightness(0.95);
}
.post-images img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(0,0,0,0.7);
    z-index: 1;
    position: relative;
    filter: brightness(1.05);
}
.post-images.grid-3 { grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 32px; }
.post-tags { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 6px; }
.post-tags span {
    display: inline-block;
    background: #111;
    color: #666;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    border: 1px solid #1a1a1a;
    transition: color 0.2s, border-color 0.2s;
    cursor: pointer;
}
.post-tags span:hover { color: #7cb342; border-color: #333; }
.post-tags span.active-tag { color: #7cb342; border-color: #7cb342; background: rgba(124,179,66,0.1); }

/* Long-form post content */
.post-body h2 {
    font-size: 1.15rem;
    color: #eee;
    margin: 36px 0 16px;
    font-weight: 600;
    line-height: 1.4;
    padding-left: 14px;
    border-left: 3px solid #7cb342;
    scroll-margin-top: 20px;
}
.post-body h2 .anchor-link {
    color: #333;
    text-decoration: none;
    margin-left: 6px;
    font-size: 0.85em;
    opacity: 0;
    transition: opacity 0.2s;
}
.post-body h2:hover .anchor-link { opacity: 1; }
.post-body h2:hover .anchor-link:hover { color: #7cb342; }
.post-body h3 {
    font-size: 1rem;
    color: #ccc;
    margin: 24px 0 10px;
    font-weight: 600;
}
.post-body strong { color: #e8e8e8; font-weight: 600; }
.post-body hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, #1a1a1a, #282828, #1a1a1a);
    margin: 36px 0;
}
.post-body code {
    background: #151515;
    color: #8bc34a;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Consolas', 'Monaco', monospace;
}
.post-body pre {
    background: #0a0a0a;
    border: 1px solid #1e1e1e;
    border-left: 3px solid #7cb342;
    border-radius: 8px;
    padding: 20px 22px;
    overflow-x: auto;
    margin: 24px 0;
    line-height: 1.7;
}
.post-body pre code {
    background: none;
    padding: 0;
    font-size: 0.84rem;
    color: #b8b8b8;
}
.post-body .pullquote {
    font-size: 1.2rem;
    color: #7cb342;
    font-weight: 600;
    text-align: center;
    padding: 28px 24px;
    margin: 32px 0;
    border-top: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
    line-height: 1.5;
    background: linear-gradient(180deg, rgba(124,179,66,0.03) 0%, transparent 100%);
    border-radius: 8px;
    letter-spacing: -0.01em;
}

/* Inline post image (single image between text sections) */
.post-body .inline-img {
    width: 100%;
    border-radius: 8px;
    margin: 28px 0;
    max-width: 100%;
    cursor: pointer;
    transition: filter 0.3s;
    border: 1px solid #1a1a1a;
    filter: brightness(0.97);
}
.post-body .inline-img:hover {
    filter: brightness(1.05);
}

/* Figure with caption */
.post-body figure {
    margin: 28px 0;
    max-width: 100%;
}
.post-body figure img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #1a1a1a;
    cursor: pointer;
    transition: filter 0.3s;
    filter: brightness(0.97);
}
.post-body figure img:hover { filter: brightness(1.05); }
.post-body figcaption {
    color: #a8a8a8;
    font-size: 0.82rem;
    text-align: center;
    margin-top: 12px;
    font-style: italic;
    line-height: 1.5;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 12px;
}

/* Callout box */
.post-body .callout {
    background: rgba(124,179,66,0.05);
    border: 1px solid #1e1e1e;
    border-left: 3px solid #7cb342;
    border-radius: 8px;
    padding: 18px 22px;
    margin: 28px 0;
    font-size: 0.92rem;
    color: #bbb;
    max-width: 640px;
    line-height: 1.7;
}
.post-body .callout strong { color: #7cb342; }

/* Stat strip */
.post-body .stat-strip {
    display: flex;
    gap: 32px;
    justify-content: center;
    padding: 24px 0;
    margin: 28px 0;
    border-top: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
}
.stat-strip .stat { text-align: center; }
.stat-strip .stat-num { font-size: 1.8rem; color: #7cb342; font-weight: 700; display: block; line-height: 1.2; }
.stat-strip .stat-label { font-size: 0.72rem; color: #888; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; display: block; }

/* Author sign-off */
.post-signoff {
    color: #7cb342;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 8px;
    padding-top: 4px;
}

/* Excerpt on index page */
.post-excerpt { color: #a0a0a0; font-size: 0.92rem; line-height: 1.75; margin-bottom: 16px; }
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #7cb342;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 0;
    transition: gap 0.2s;
}
.read-more:hover { text-decoration: none; gap: 10px; }
.read-more svg { width: 14px; height: 14px; fill: currentColor; transition: transform 0.2s; }
.read-more:hover svg { transform: translateX(2px); }

/* Post number badge */
.post-number {
    display: inline-block;
    background: rgba(124,179,66,0.1);
    color: #7cb342;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
    border: 1px solid rgba(124,179,66,0.2);
    letter-spacing: 0.05em;
}

/* Tag filter bar */
.tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #151515;
}
.tag-filter-label {
    color: #444;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    align-self: center;
    margin-right: 6px;
}
.tag-filter button {
    background: #111;
    color: #666;
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 0.7rem;
    border: 1px solid #1a1a1a;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    font-family: inherit;
}
.tag-filter button:hover { color: #7cb342; border-color: #333; }
.tag-filter button.active { color: #7cb342; border-color: #7cb342; background: rgba(124,179,66,0.1); }
.post.tag-hidden { display: none; }

/* Comments */
.comments-section {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #1a1a1a;
}
.comments-section h3 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 16px;
    font-weight: 600;
}
.comment {
    background: #0e0e0e;
    border: 1px solid #191919;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}
.comment:hover { border-color: #252525; }
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.comment-author {
    color: #7cb342;
    font-weight: 600;
    font-size: 0.85rem;
}
.comment-date {
    color: #777;
    font-size: 0.72rem;
}
.comment-text {
    color: #bbb;
    font-size: 0.9rem;
    line-height: 1.6;
}
.comment-form {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    background: #0e0e0e;
    border: 1px solid #222;
    border-radius: 8px;
    color: #e0e0e0;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #7cb342;
}
.comment-form textarea {
    min-height: 80px;
    resize: vertical;
}
.comment-form button {
    align-self: flex-start;
    padding: 8px 24px;
    background: #7cb342;
    color: #0a0a0a;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}
.comment-form button:hover { background: #8bc34a; }
.comment-form button:disabled { opacity: 0.5; cursor: not-allowed; }
.comment-form .hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; }
.comment-msg {
    font-size: 0.8rem;
    margin-top: 6px;
    min-height: 1.2em;
}
.comment-msg.success { color: #7cb342; }
.comment-msg.error { color: #c62828; }
.no-comments { color: #444; font-size: 0.85rem; font-style: italic; }

/* Subscribe modal */
.subscribe-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 999;
    align-items: center;
    justify-content: center;
}
.subscribe-modal.active { display: flex; }
.subscribe-modal-content {
    background: #0e0e0e;
    border: 1px solid #222;
    border-radius: 14px;
    padding: 28px 24px 20px;
    max-width: 520px;
    width: 92%;
    text-align: center;
    position: relative;
}
.subscribe-modal-content h2 { color: #fff; font-size: 1.1rem; margin-bottom: 4px; }
.subscribe-modal-content .modal-sub { color: #666; font-size: 0.8rem; margin-bottom: 14px; }
.subscribe-modal-content iframe {
    width: 100%;
    max-width: 460px;
    height: 250px;
    border: none;
    border-radius: 10px;
    background: transparent;
}
.subscribe-modal .close-btn {
    position: absolute;
    top: 8px; right: 12px;
    color: #444;
    font-size: 1.4rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}
.subscribe-modal .close-btn:hover { color: #fff; }

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: rgba(124,179,66,0.15);
    border: 1px solid rgba(124,179,66,0.25);
    color: #7cb342;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, background 0.2s;
    z-index: 50;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: rgba(124,179,66,0.3); }

/* Share bar */
.share-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
    margin-bottom: 4px;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    background: #111;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    color: #666;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
    font-family: inherit;
}
.share-btn:hover { color: #7cb342; border-color: #333; text-decoration: none; }
.share-btn svg { width: 14px; height: 14px; fill: currentColor; }
.share-btn.copied { color: #7cb342; border-color: #7cb342; }

/* Image count badge */
.img-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.75);
    color: #ddd;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 500;
    z-index: 2;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.08);
    letter-spacing: 0.02em;
}

/* Collapsible section */
.collapsible-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px !important;
    margin-left: 0 !important;
    background: rgba(124,179,66,0.04);
    border: 1px solid #1e1e1e;
    border-left: 3px solid #7cb342;
    border-radius: 6px;
    transition: background 0.2s, border-color 0.2s;
}
.collapsible-header:hover {
    background: rgba(124,179,66,0.08);
    border-color: #2a2a2a;
}
.collapsible-header::after {
    content: '';
    display: inline-block;
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #7cb342;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.collapsible-header.open::after { transform: rotate(180deg); }
.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.collapsible-content.open { max-height: 5000px; }

/* Syntax highlighting */
.post-body pre code .kw { color: #c792ea; }
.post-body pre code .fn { color: #82aaff; }
.post-body pre code .num { color: #f78c6c; }
.post-body pre code .cm { color: #546e7a; }
.post-body pre code .str { color: #c3e88d; }

/* Gallery Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
}
.lightbox.active { display: flex; }
.lightbox.fade-in { opacity: 1; }
.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    transition: opacity 0.15s;
    box-shadow: 0 12px 60px rgba(0,0,0,0.6);
}
.lightbox-close {
    position: absolute;
    top: 16px; right: 20px;
    color: #666;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
}
.lightbox-close:hover { color: #fff; }
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #ccc;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.15); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    font-size: 0.8rem;
    z-index: 1001;
}
.lightbox-caption {
    position: absolute;
    bottom: 42px;
    left: 50%;
    transform: translateX(-50%);
    color: #777;
    font-size: 0.8rem;
    max-width: 600px;
    text-align: center;
    z-index: 1001;
    line-height: 1.4;
}

/* Sticky Steam CTA */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(8,8,8,0) 0%, rgba(8,8,8,0.96) 35%, #060606 100%);
    padding: 44px 20px 22px;
    z-index: 40;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}
.sticky-cta.visible { opacity: 1; pointer-events: auto; }
.sticky-cta-text { color: #9a9a9a; font-size: 0.88rem; letter-spacing: 0.01em; }
.sticky-cta .steam-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #1b2838, #2a475e);
    color: #e8f2fa;
    border-radius: 6px;
    font-size: 0.98rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    border: 1px solid rgba(124,179,66,0.35);
    box-shadow: 0 0 0 1px rgba(124,179,66,0.08), 0 6px 18px rgba(0,0,0,0.45);
}
.sticky-cta .steam-btn:hover {
    background: linear-gradient(135deg, #2a475e, #3d6d8f);
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: 0 0 0 1px rgba(124,179,66,0.5), 0 8px 22px rgba(0,0,0,0.5);
}
.sticky-cta .steam-btn svg { width: 19px; height: 19px; fill: currentColor; }

/* End-of-post wishlist CTA card */
.post-outro {
    margin: 56px 0 32px;
    padding: 32px 28px;
    background: linear-gradient(135deg, rgba(27,40,56,0.55), rgba(20,22,26,0.55));
    border: 1px solid #1f2a36;
    border-radius: 10px;
    text-align: center;
}
.post-outro-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f2f2f2;
    margin: 0 0 8px;
    letter-spacing: 0.01em;
}
.post-outro-text {
    color: #a8a8a8;
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 520px;
    margin: 0 auto 22px;
}
.post-outro .steam-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 30px;
    background: linear-gradient(135deg, #1b2838, #2a475e);
    color: #e8f2fa;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    border: 1px solid rgba(124,179,66,0.35);
    box-shadow: 0 0 0 1px rgba(124,179,66,0.08), 0 6px 18px rgba(0,0,0,0.45);
}
.post-outro .steam-btn:hover {
    background: linear-gradient(135deg, #2a475e, #3d6d8f);
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: 0 0 0 1px rgba(124,179,66,0.5), 0 8px 22px rgba(0,0,0,0.5);
}
.post-outro .steam-btn svg { width: 19px; height: 19px; fill: currentColor; }
.post-outro-links {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.post-outro-links a {
    color: #888;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.post-outro-links a:hover { color: #7cb342; text-decoration: none; }

/* Next/Prev post navigation */
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #1a1a1a;
}
.post-nav a {
    color: #888;
    font-size: 0.82rem;
    transition: color 0.2s;
    max-width: 45%;
}
.post-nav a:hover { color: #7cb342; text-decoration: none; }
.post-nav .nav-label {
    display: block;
    color: #444;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}
.post-nav .nav-next { text-align: right; margin-left: auto; }

/* Back to devlog link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 0.82rem;
    margin-bottom: 20px;
    transition: color 0.2s;
}
.back-link:hover { color: #7cb342; text-decoration: none; }
.back-link svg { width: 14px; height: 14px; fill: currentColor; }

/* Body padding for sticky CTA */
body.has-sticky-cta { padding-bottom: 96px; }

/* Comfort reading mode (wider line-height, extra letter-spacing) */
html.comfort-mode .post-body { line-height: 2.05; letter-spacing: 0.015em; }
html.comfort-mode .post-body p { margin-bottom: 26px; }
html.comfort-mode .post-body p:first-child { line-height: 2.1; }

/* Settings button (floating Aa) */
.settings-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 42px;
    height: 42px;
    background: rgba(124,179,66,0.15);
    border: 1px solid rgba(124,179,66,0.3);
    color: #7cb342;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    letter-spacing: -0.03em;
}
.settings-btn:hover {
    background: rgba(124,179,66,0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}
.settings-btn:focus-visible {
    outline: 2px solid #7cb342;
    outline-offset: 2px;
}

/* Settings panel popover */
.settings-panel {
    position: fixed;
    bottom: 76px;
    left: 24px;
    width: 260px;
    background: #0e0e0e;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 16px 16px 14px;
    z-index: 61;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.18s, transform 0.18s;
}
.settings-panel.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.settings-title {
    color: #888;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1a1a1a;
}
.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}
.settings-row:last-child { margin-bottom: 0; }
.settings-row-actions { justify-content: flex-end; margin-top: 4px; }
.settings-label {
    color: #bbb;
    font-size: 0.82rem;
}
.settings-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 3px;
}
.settings-group button {
    background: transparent;
    border: none;
    color: #bbb;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    min-width: 32px;
}
.settings-group button:hover { background: rgba(124,179,66,0.15); color: #7cb342; }
.settings-value {
    color: #7cb342;
    font-size: 0.72rem;
    font-weight: 600;
    min-width: 38px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.settings-toggle {
    background: #080808;
    border: 1px solid #1a1a1a;
    color: #888;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 8px;
    cursor: pointer;
    min-width: 60px;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.settings-toggle:hover { color: #7cb342; border-color: #333; }
.settings-toggle.active {
    color: #0a0a0a;
    background: #7cb342;
    border-color: #7cb342;
}
.settings-reset {
    background: transparent;
    border: 1px solid #1a1a1a;
    color: #888;
    font-family: inherit;
    font-size: 0.75rem;
    padding: 5px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.settings-reset:hover { color: #7cb342; border-color: #333; }
.settings-hint {
    color: #3d3d3d;
    font-size: 0.68rem;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #151515;
    line-height: 1.5;
    text-align: center;
}
.settings-hint kbd {
    background: #1a1a1a;
    border: 1px solid #262626;
    border-radius: 3px;
    padding: 1px 5px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.72rem;
    color: #999;
}

/* Resume reading toast */
.resume-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 30px);
    background: #0e0e0e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 10px 10px 10px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 80;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    max-width: 92vw;
}
.resume-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
.resume-text {
    color: #ddd;
    font-size: 0.85rem;
}
.resume-yes {
    background: #7cb342;
    color: #0a0a0a;
    border: none;
    border-radius: 8px;
    padding: 7px 16px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.resume-yes:hover { background: #8bc34a; }
.resume-no {
    background: transparent;
    border: none;
    color: #666;
    font-size: 1.2rem;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1;
}
.resume-no:hover { color: #ddd; background: #1a1a1a; }

/* Copy code button */
.post-body pre { position: relative; }
.copy-code-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(10,10,10,0.75);
    border: 1px solid #1e1e1e;
    color: #666;
    font-family: inherit;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, border-color 0.15s;
    letter-spacing: 0.02em;
}
.post-body pre:hover .copy-code-btn { opacity: 1; }
.copy-code-btn:hover { color: #7cb342; border-color: #333; }
.copy-code-btn.copied { opacity: 1; color: #7cb342; border-color: #7cb342; }

/* Print styles: content only */
@media print {
    .header nav, .sidebar, .sticky-cta, .back-to-top, .settings-btn, .settings-panel,
    .resume-toast, .share-bar, .tag-filter, .reading-progress, .comments-section,
    .lightbox, .subscribe-modal, .copy-code-btn, .post-nav {
        display: none !important;
    }
    body { background: #fff !important; color: #111 !important; padding-bottom: 0 !important; }
    .post { border: none !important; box-shadow: none !important; background: #fff !important; }
    .post > h2, .post-body h2, .post-body h3 { color: #111 !important; }
    .post-body, .post-body p, .post-body strong { color: #222 !important; }
    .post-body a { color: #000 !important; text-decoration: underline; }
    .post-body p:first-child::first-letter { color: #111 !important; }
    .layout { display: block; padding: 0; }
    .main-content { max-width: 100%; }
    a[href]:after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
}

/* Excerpt image links (no hover scale on index) */
a.post-images { display: grid; cursor: pointer; transition: border-color 0.3s; }
a.post-images img { cursor: pointer; }
a.post-images:hover { border-color: #2a2a2a; }
a.post-images:hover img { transform: scale(1.02); filter: brightness(1.08); }

/* Footer */
footer {
    text-align: center;
    padding: 28px 20px;
    color: #333;
    font-size: 0.75rem;
    border-top: 1px solid #111;
}
footer a { color: #555; }
footer a:hover { color: #7cb342; }

/* Tablet (cramped sidebar range) */
@media (max-width: 1040px) and (min-width: 769px) {
    .layout { gap: 24px; padding: 18px 16px; }
    .sidebar { width: 170px; }
    .sidebar li a { font-size: 0.78rem; }
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .layout { padding: 12px 10px; }
    .main-content { max-width: 100%; }
    .post { padding: 20px 16px 24px; margin-bottom: 20px; border-radius: 10px; }
    .post-images { grid-template-columns: 1fr; }
    .post-images.grid-3 { grid-template-columns: 1fr 1fr; }
    .header h1 { font-size: 1.3rem; }
    .header { padding: 24px 16px 16px; }
    .lightbox-nav { width: 36px; height: 36px; font-size: 1rem; }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .lightbox img { max-width: 95%; max-height: 80vh; }
    .sticky-cta { padding: 28px 12px 14px; gap: 10px; }
    .sticky-cta .steam-btn { padding: 11px 22px; font-size: 0.92rem; }
    .sticky-cta-text { display: none; }
    .post-nav { flex-direction: column; gap: 12px; }
    .post-nav a { max-width: 100%; }
    .post-nav .nav-next { text-align: left; margin-left: 0; }
    .post-outro { margin: 44px 0 24px; padding: 26px 18px; }
    .post-outro-title { font-size: 1.1rem; }
    .post-outro-text { font-size: 0.9rem; }
    .post-outro .steam-btn { padding: 12px 24px; font-size: 0.95rem; width: 100%; max-width: 320px; justify-content: center; }
    .post-outro-links { gap: 16px; font-size: 0.8rem; }
    .back-to-top { bottom: 20px; right: 16px; width: 36px; height: 36px; }
    body.has-sticky-cta { padding-bottom: 108px; }
    body.has-sticky-cta .back-to-top { bottom: 104px; }
    .settings-btn { bottom: 20px; left: 16px; width: 36px; height: 36px; font-size: 0.88rem; }
    body.has-sticky-cta .settings-btn { bottom: 104px; }
    .settings-panel { bottom: 60px; left: 16px; width: calc(100vw - 32px); max-width: 280px; }
    body.has-sticky-cta .settings-panel { bottom: 146px; }
    .resume-toast { bottom: 16px; padding: 8px 8px 8px 14px; }
    body.has-sticky-cta .resume-toast { bottom: 108px; }
    .resume-text { font-size: 0.78rem; }
    .tag-filter { padding: 12px 0; }
    .stat-strip { gap: 18px; padding: 18px 0; }
    .stat-strip .stat-num { font-size: 1.4rem; }
    .post-body .pullquote { font-size: 1.05rem; padding: 22px 18px; }
    .post-body figure { margin: 20px 0; }
    .post-body pre { padding: 14px 16px; font-size: 0.8rem; }
}

/* Very small screens (narrow phones) */
@media (max-width: 380px) {
    .header nav { gap: 12px; }
    .header nav a { font-size: 0.78rem; }
    .post > h2 { font-size: 1.2rem; }
    .sticky-cta .steam-btn { padding: 10px 18px; font-size: 0.88rem; }
}

/* Respect user motion preference */
@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;
    }
}

/* Accessibility: keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #7cb342;
    outline-offset: 3px;
    border-radius: 4px;
}
.sticky-cta .steam-btn:focus-visible,
.header nav .subscribe-link:focus-visible {
    outline-offset: 4px;
}
.post-images img:focus-visible,
.post-body .inline-img:focus-visible,
.post-body figure img:focus-visible {
    outline-offset: 4px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -48px;
    left: 8px;
    background: #7cb342;
    color: #0a0a0a;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 1000;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 8px;
    text-decoration: none;
}

/* Selection color */
::selection {
    background: rgba(124,179,66,0.35);
    color: #fff;
}

/* Scrollbar styling (WebKit) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 6px;
    border: 2px solid #0a0a0a;
}
::-webkit-scrollbar-thumb:hover {
    background: #333;
}
* {
    scrollbar-width: thin;
    scrollbar-color: #222 #0a0a0a;
}

/* Better link decoration for body links (readability) */
.post-body a:not(.anchor-link) {
    text-decoration: underline;
    text-decoration-color: rgba(124,179,66,0.4);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: text-decoration-color 0.15s, color 0.15s;
}
.post-body a:not(.anchor-link):hover {
    text-decoration-color: #7cb342;
    color: #8bc34a;
}

/* Anchor link visible on mobile (tap to copy) */
@media (max-width: 768px) {
    .post-body h2 .anchor-link { opacity: 0.35; }
    .post-body h2 .anchor-link:hover { opacity: 1; }
}

