/* =============================================
   THRUTHADIGS GHOST THEME
   Monospace editorial music blog
   ============================================= */

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

/* Noka loaded via Adobe Fonts (Typekit) as 'noka' — add it to your kit at fonts.adobe.com */


:root {
    --red: #e8001e;
    --black: #000000;
    --white: #ffffff;
    --off-white: #f5f5f5;
    --gray: #888888;
    --light-gray: #dddddd;
    --font-mono: 'IBM Plex Mono', 'Courier New', Courier, monospace;
    --font-header: 'noka', 'IBM Plex Mono', 'Courier New', Courier, monospace;

    --header-height: 60px;
    --grid-gap: 24px;
    --page-padding: 24px;
    --max-width: 900px;
}

html {
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-mono);
    background-color: var(--white);
    color: var(--black);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

/* =============================================
   HEADER
   ============================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1001;
    background: var(--white);
    border-bottom: none;
    box-shadow: none;
}

.site-header-inner {
    width: 100%;
    padding: 10px var(--page-padding);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
}

.site-branding {
    display: flex;
    flex-direction: column;
    gap: 0;
    justify-self: start;
}

.site-header-center {
    display: none;
}

/* Header subscribe button — inherits base .newsletter-btn styles */

.site-title {
    font-family: var(--font-header);
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.01em;
    line-height: 1;
    text-decoration: none;
}

.site-title:hover {
    color: var(--black);
}

.site-tagline {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.site-header-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.site-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

.site-nav .nav-link {
    font-family: var(--font-mono);
    font-size: 0.77rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--black);
    line-height: 1.2;
}

.site-nav .nav-link:hover {
    color: var(--red);
}

.youtube-link {
    display: flex;
    align-items: center;
    color: var(--black);
    transition: color 0.15s;
}

.youtube-link:hover {
    color: #ff0000;
}

.youtube-icon {
    display: block;
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: 1px solid var(--light-gray);
    color: var(--black);
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}
.theme-toggle:hover {
    border-color: var(--black);
    color: var(--red);
}
/* Sun shows in dark mode, moon shows in light mode */
.icon-sun  { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun,
.icon-sun.visible   { display: block; }
[data-theme="dark"] .icon-moon,
.icon-moon.hidden   { display: none; }

/* =============================================
   MAIN & LAYOUT
   ============================================= */

.site-main {
    flex: 1;
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: var(--grid-gap) var(--page-padding);
}

/* =============================================
   POST GRID — INDEX PAGE
   ============================================= */

.post-grid-container {
    width: 100%;
}

.post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.post-card {
    display: flex;
    flex-direction: column;
    will-change: transform;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.post-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.post-card-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--white);
    margin-bottom: 12px;
}

.post-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.post-card-link:hover .post-card-image {
    opacity: 0.88;
}

.post-card-image--placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--off-white);
    padding: 16px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray);
}

.post-card-meta {
    padding: 0;
}

.post-card-title {
    font-family: var(--font-mono);
    font-size: 0.94rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.35;
    color: var(--black);
    margin-bottom: 3px;
}

.post-card-link:hover .post-card-title {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-card-date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
}

/* =============================================
   PAGINATION
   ============================================= */

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pagination .page-number {
    display: none;
}

.pagination a {
    font-weight: 700;
    border-bottom: 1px solid var(--black);
    padding-bottom: 1px;
}

.pagination a:hover {
    color: var(--red);
    border-color: var(--red);
}

/* =============================================
   SINGLE POST
   ============================================= */

.post-single,
.page-single {
    max-width: 680px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 28px;
}

.post-header-inner {
    max-width: 100%;
}

.post-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--red);
    margin-bottom: 10px;
}

.post-tag:hover {
    text-decoration: underline;
}

.post-title {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: var(--black);
    margin-bottom: 10px;
}

.post-meta {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.post-meta-sep {
    color: var(--light-gray);
}

.post-author {
    color: var(--black);
    font-weight: 700;
}

.post-author:hover {
    color: var(--red);
}

/* Feature image */
.post-feature-image {
    margin-bottom: 32px;
    margin-left: -24px;
    margin-right: -24px;
}

.post-feature-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-feature-image figcaption {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--gray);
    text-align: center;
    margin-top: 8px;
    padding: 0 24px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Ghost required width classes */
.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin: auto calc(50% - 50vw * 0.85);
}

.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.kg-width-wide img,
.kg-width-full img {
    width: 100%;
    height: auto;
}

/* =============================================
   POST CONTENT — GHOST EDITOR OUTPUT
   ============================================= */

.gh-content {
    font-family: var(--font-mono);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--black);
}

.gh-content > * + * {
    margin-top: 1.4em;
}

.gh-content h2 {
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2em;
    margin-bottom: 0.6em;
    line-height: 1.2;
}

.gh-content h3 {
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 1.8em;
    margin-bottom: 0.5em;
}

.gh-content p {
    margin-bottom: 0;
}

.gh-content a {
    color: var(--black);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gh-content a:hover {
    color: var(--red);
}

.gh-content strong {
    font-weight: 700;
}

.gh-content em {
    font-style: italic;
}

.gh-content blockquote {
    border-left: 3px solid var(--black);
    padding-left: 16px;
    margin-left: 0;
    color: var(--gray);
    font-style: italic;
}

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

/* Images inside content */
.gh-content figure {
    margin: 2em 0;
}

.gh-content figure img {
    width: 100%;
    height: auto;
}

.gh-content figure figcaption {
    font-size: 0.7rem;
    color: var(--gray);
    text-align: center;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Ghost gallery card */
.gh-content .kg-gallery-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    width: 100%;
}

.gh-content .kg-gallery-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.gh-content .kg-gallery-image {
    flex: 1;
    min-width: 0;
}

.gh-content .kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ghost embed/bookmark cards */
.gh-content .kg-embed-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

/* Force ALL iframes to full article width — covers YouTube, Vimeo, SoundCloud etc. */
.gh-content iframe,
.gh-content .kg-embed-card iframe,
.gh-content .kg-video-card iframe {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    border: none;
    display: block;
}

.gh-content .kg-video-card {
    position: relative;
    width: 100%;
}

.gh-content .kg-video-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
}

/* Bookmark card */
.gh-content .kg-bookmark-card {
    border: 1px solid var(--light-gray);
    display: flex;
    overflow: hidden;
}

.gh-content .kg-bookmark-content {
    padding: 12px 16px;
    flex: 1;
    min-width: 0;
}

.gh-content .kg-bookmark-title {
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.gh-content .kg-bookmark-description {
    font-size: 0.75rem;
    color: var(--gray);
    line-height: 1.4;
}

.gh-content .kg-bookmark-metadata {
    font-size: 0.7rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 8px;
}

.gh-content .kg-bookmark-thumbnail {
    width: 140px;
    flex-shrink: 0;
}

.gh-content .kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Audio card */
.gh-content .kg-audio-card {
    border: 1px solid var(--light-gray);
    padding: 12px 16px;
}

/* Code */
.gh-content pre {
    background: var(--off-white);
    border: 1px solid var(--light-gray);
    padding: 16px;
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.6;
}

.gh-content code {
    font-family: var(--font-mono);
    background: var(--off-white);
    padding: 1px 4px;
    font-size: 0.85em;
}

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

/* Callout card */
.gh-content .kg-callout-card {
    border-left: 3px solid var(--black);
    padding: 12px 16px;
    background: var(--off-white);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

/* Post footer / tags */
.post-footer {
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid var(--black);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tag-link {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid var(--black);
    padding: 2px 8px;
    color: var(--black);
}

.post-tag-link:hover {
    background: var(--black);
    color: var(--white);
}

/* =============================================
   TAG PAGE
   ============================================= */

.tag-header {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--black);
}

.tag-title {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--red);
}

.tag-description {
    font-size: 0.82rem;
    color: var(--gray);
    margin-top: 6px;
}

/* =============================================
   ERROR PAGE
   ============================================= */

.error-page {
    text-align: center;
    padding: 80px 24px;
}

.error-code {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 16px;
}

.error-message {
    font-size: 0.92rem;
    color: var(--gray);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.error-link {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--black);
    padding-bottom: 2px;
}

.error-link:hover {
    color: var(--red);
    border-color: var(--red);
}

/* =============================================
   FOOTER
   ============================================= */

.site-footer {
    border-top: none;
    padding: 14px var(--page-padding);
    margin-top: auto;
}

.site-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.copyright {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer-nav {
    display: flex;
    gap: 16px;
}

.footer-nav .nav-link {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray);
}

.footer-nav .nav-link:hover {
    color: var(--red);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 600px) {
    :root {
        --grid-gap: 16px;
        --page-padding: 16px;
    }

    .pagination-newsletter,
    .post-newsletter {
        display: none !important;
    }

    .site-title {
        font-size: 1.3rem;
    }

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

    .post-card-image-wrap {
        margin-bottom: 6px;
    }

    .post-card-title {
        font-size: 0.72rem;
    }

    .post-title {
        font-size: 1.1rem;
    }

    .post-feature-image {
        margin-left: -16px;
        margin-right: -16px;
    }

    .site-header-inner {
        padding: 8px 16px;
        gap: 8px;
    }

    /* Hide subscribe button on smallest screens to keep header clean */
    .header-subscribe-btn {
        display: none;
    }
}

/* =============================================
   MEMBERSHIP PAGE
   ============================================= */

.membership-page {
    max-width: 600px;
    margin: 0 auto;
}

.membership-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--black);
}

.membership-title {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--red);
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.membership-desc {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.membership-tier {
    border: 1px solid var(--black);
    padding: 24px;
    margin-bottom: 16px;
}

.tier-name {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.tier-desc {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--gray);
    margin-bottom: 12px;
    line-height: 1.6;
}

.tier-price {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.tier-cta {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--black);
    color: var(--white);
    padding: 8px 20px;
    border: 1px solid var(--black);
    cursor: pointer;
    text-decoration: none;
}

.tier-cta:hover {
    background: var(--red);
    border-color: var(--red);
}

.account-page {
    max-width: 480px;
    margin: 0 auto;
}

.account-portal {
    margin-top: 24px;
}

/* =============================================
   PRIVATE LOGIN PAGE
   ============================================= */

.private-login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 320px;
    margin: 24px auto 0;
}

.private-login-input {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border: 1px solid var(--black);
    padding: 8px 12px;
    background: var(--white);
    color: var(--black);
    outline: none;
    width: 100%;
}

.private-login-input:focus {
    border-color: var(--red);
}

.private-login-btn {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--black);
    color: var(--white);
    border: 1px solid var(--black);
    padding: 8px 20px;
    cursor: pointer;
    align-self: flex-start;
}

.private-login-btn:hover {
    background: var(--red);
    border-color: var(--red);
}

.private-login-error {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* =============================================
   NEWSLETTER BUTTON
   ============================================= */

.newsletter-btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--black);
    color: var(--white);
    padding: 6px 16px;
    border: 1px solid var(--black);
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.newsletter-btn:hover {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}

/* Header subscribe button — compact to sit inline with nav */
.header-subscribe-btn {
    padding: 7px 18px;
    font-size: 0.72rem;
    flex-shrink: 0;
}

/* Below pagination on index/home pages */
.pagination-newsletter {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

/* Below tags at end of each post */
.post-newsletter {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

/* =============================================
   DARK MODE — system default + manual override
   ============================================= */

/* The actual dark-mode variable overrides, shared between
   the media query (system default) and the data-theme attribute (manual). */
.dark-vars {
    --black:      #e8e8e8;
    --white:      #0d0d0d;
    --off-white:  #181818;
    --gray:       #888888;
    --light-gray: #2a2a2a;
}

/* System default: dark */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --black:      #e8e8e8;
        --white:      #0d0d0d;
        --off-white:  #181818;
        --gray:       #888888;
        --light-gray: #2a2a2a;
    }
    :root:not([data-theme="light"]) .site-header {
        background: #0d0d0d;
        border-bottom: none;
        box-shadow: none;
    }
    :root:not([data-theme="light"]) .lb-close {
        background: rgba(18,18,18,0.92);
        border-color: #2a2a2a;
    }
    :root:not([data-theme="light"]) .lb-overlay {
        background: rgba(0,0,0,0.8);
    }
    /* Sun icon visible in dark mode (click to go light) */
    :root:not([data-theme="light"]) .icon-sun  { display: block; }
    :root:not([data-theme="light"]) .icon-moon { display: none; }
}

/* Manual override: force dark */
:root[data-theme="dark"] {
    --black:      #e8e8e8;
    --white:      #0d0d0d;
    --off-white:  #181818;
    --gray:       #888888;
    --light-gray: #2a2a2a;
}
:root[data-theme="dark"] .site-header {
    background: #0d0d0d;
    border-bottom: none;
    box-shadow: none;
}
:root[data-theme="dark"] .lb-close {
    background: rgba(18,18,18,0.92);
    border-color: #2a2a2a;
}
:root[data-theme="dark"] .lb-overlay {
    background: rgba(0,0,0,0.8);
}
:root[data-theme="dark"] .icon-sun  { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

/* Manual override: force light */
:root[data-theme="light"] .icon-sun  { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }

/* =============================================
   INFINITE SCROLL LOADING INDICATOR
   ============================================= */

#is-sentinel {
    height: 1px;
}

.is-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 0;
    gap: 6px;
}
.is-loading span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--gray);
    animation: is-bounce 1.2s infinite ease-in-out;
}
.is-loading span:nth-child(2) { animation-delay: 0.2s; }
.is-loading span:nth-child(3) { animation-delay: 0.4s; }
@keyframes is-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1);   opacity: 1;   }
}

/* =============================================
   ABOUT PAGE
   ============================================= */

.about-page .post-title {
    color: var(--red);
    margin-bottom: 28px;
}

.about-lead {
    font-size: 1.05rem;
    line-height: 1.75;
    font-style: italic;
    color: var(--black);
    margin-bottom: 0;
}

.about-content h2 {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray);
    margin-top: 2em;
    margin-bottom: 0.6em;
}

.about-links {
    margin-top: 20px;
    margin-bottom: 4px;
}

.about-small {
    font-size: 0.72rem;
    color: var(--gray);
    line-height: 1.7;
}

/* =============================================
   PRINT
   ============================================= */

@media print {
    .site-header,
    .site-footer,
    .post-footer {
        display: none;
    }
}

/* =============================================
   LIGHTBOX / ALBUM PREVIEW OVERLAY
   ============================================= */

/* Cards are clickable */
.post-card {
    cursor: pointer;
}
.post-card:hover .post-card-image {
    opacity: 0.88;
}
.post-card:hover .post-card-title {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* =============================================
   SPLIT-PANEL PREVIEW OVERLAY
   ============================================= */

/* Prevent scroll when open */
body.lb-open {
    overflow: hidden;
}

/* Full-screen overlay */
.lb-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    background: #f2f0eb;
}
.lb-overlay.lb-visible {
    opacity: 1;
    pointer-events: all;
}

/* Top bar */
.lb-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    flex-shrink: 0;
}

/* Back button */
.lb-back {
    background: none;
    border: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1a1a1a;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}
.lb-back:hover { color: var(--red); }

/* Top-right nav links */
.lb-topnav {
    display: flex;
    gap: 24px;
}
.lb-topnav a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.15s;
}
.lb-topnav a:hover { color: var(--red); }

/* Split body — image left, content right */
.lb-split {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Left: image panel */
.lb-left {
    width: 42%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transform: translateX(-40px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                opacity   0.4s ease;
    background: #f2f0eb;
}
.lb-overlay.lb-visible .lb-left {
    transform: translateX(0);
    opacity: 1;
}
.lb-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    opacity: 0;
    transition: opacity 0.4s ease 0.15s;
}
.lb-image.lb-img-loaded {
    opacity: 1;
}

/* Right: full article content panel — scrollable */
.lb-right {
    flex: 1;
    background: #f2f0eb;
    display: flex;
    flex-direction: column;
    padding: 48px 56px 64px;
    transform: translateX(40px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.06s,
                opacity   0.4s ease 0.06s;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}
.lb-overlay.lb-visible .lb-right {
    transform: translateX(0);
    opacity: 1;
}

.lb-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--red);
    display: block;
    margin-bottom: 14px;
    flex-shrink: 0;
}
.lb-tag:empty { display: none; }

.lb-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.5rem, 2.6vw, 2.4rem);
    font-weight: 700;
    line-height: 1.1;
    color: #1a1a1a;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.lb-date {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 16px;
    flex-shrink: 0;
}

/* Article body injected from fetch */
.lb-article-body {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.75;
    color: #2a2a2a;
    min-width: 0;
}

.lb-excerpt {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: #2a2a2a;
    margin: 0 0 1em;
}

/* Article content within lightbox — reuse gh-content rules */
.lb-article-body p { margin-bottom: 1.2em; }
.lb-article-body h2 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 2em 0 0.6em;
}
.lb-article-body h3 {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 1.6em 0 0.5em;
}
.lb-article-body a { color: #1a1a1a; text-decoration: underline; }
.lb-article-body a:hover { color: var(--red); }
.lb-article-body blockquote {
    border-left: 3px solid #1a1a1a;
    padding-left: 16px;
    color: #666;
    font-style: italic;
    margin: 1.4em 0;
}
.lb-article-body img,
.lb-article-body figure img {
    width: 100%;
    height: auto;
    display: block;
    margin: 1.4em 0;
}
.lb-article-body iframe {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    border: none;
    display: block;
    margin: 1.4em 0;
}
.lb-article-body .kg-embed-card,
.lb-article-body .kg-video-card {
    width: 100%;
    margin: 1.4em 0;
}
.lb-article-body figure { margin: 1.4em 0; }
.lb-article-body figcaption {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: #888;
    text-align: center;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.lb-article-body pre {
    background: #e8e6e0;
    padding: 14px;
    overflow-x: auto;
    font-size: 0.78rem;
    line-height: 1.6;
    margin: 1.2em 0;
}
.lb-article-body code {
    font-family: var(--font-mono);
    background: #e8e6e0;
    padding: 1px 4px;
    font-size: 0.85em;
}
.lb-article-body pre code { background: none; padding: 0; }

/* Loading dots inside lightbox */
.lb-loading-dots {
    display: flex;
    gap: 5px;
    padding: 16px 0;
}
.lb-loading-dots span {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: #888;
    border-radius: 50%;
    animation: is-bounce 1.2s infinite ease-in-out;
}
.lb-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.lb-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Dark mode overlay */
:root[data-theme="dark"] .lb-overlay { background: #111; }
:root[data-theme="dark"] .lb-right   { background: #111; }
:root[data-theme="dark"] .lb-left    { background: #111; }
:root[data-theme="dark"] .lb-topbar  { border-bottom-color: rgba(255,255,255,0.08); }
:root[data-theme="dark"] .lb-back,
:root[data-theme="dark"] .lb-topnav a,
:root[data-theme="dark"] .lb-title,
:root[data-theme="dark"] .lb-more    { color: #e8e8e8; }
:root[data-theme="dark"] .lb-more    { border-color: #e8e8e8; }
:root[data-theme="dark"] .lb-excerpt,
:root[data-theme="dark"] .lb-article-body { color: #aaa; }
:root[data-theme="dark"] .lb-article-body a { color: #e8e8e8; }
:root[data-theme="dark"] .lb-article-body pre,
:root[data-theme="dark"] .lb-article-body code { background: #1e1e1e; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .lb-overlay { background: #111; }
    :root:not([data-theme="light"]) .lb-right   { background: #111; }
    :root:not([data-theme="light"]) .lb-left    { background: #111; }
    :root:not([data-theme="light"]) .lb-topbar  { border-bottom-color: rgba(255,255,255,0.08); }
    :root:not([data-theme="light"]) .lb-back,
    :root:not([data-theme="light"]) .lb-topnav a,
    :root:not([data-theme="light"]) .lb-title,
    :root:not([data-theme="light"]) .lb-more    { color: #e8e8e8; }
    :root:not([data-theme="light"]) .lb-more    { border-color: #e8e8e8; }
    :root:not([data-theme="light"]) .lb-excerpt,
    :root:not([data-theme="light"]) .lb-article-body { color: #aaa; }
    :root:not([data-theme="light"]) .lb-article-body a { color: #e8e8e8; }
    :root:not([data-theme="light"]) .lb-article-body pre,
    :root:not([data-theme="light"]) .lb-article-body code { background: #1e1e1e; }
}

/* Mobile: lightbox completely disabled — cards navigate directly */
@media (max-width: 700px) {
    .lb-overlay {
        display: none !important;
    }
}
