/* ============================================
   Gou3z THEME — Grey & Dark Wood
   Art/Media Blog
   Feed + Lenis + GSAP + Barba.js
   ============================================
   Edit the variables below to quickly customize
   colors, fonts, spacing, and effects.
   ============================================ */


/* ===========================================
   1. THEME VARIABLES
   =========================================== */
:root {
    /* --- Override Ghost admin accent color --- */
    --ghost-accent-color: #8B6B4A !important;

    /* --- Colors: Main Palette --- */
    --accent:             #8B6B4A;
    --accent-hover:       #A07D5A;
    --accent-glow:        rgba(139, 107, 74, 0.25);

    /* --- Colors: Backgrounds --- */
    --bg-primary:         #111110;
    --bg-secondary:       #161514;
    --bg-tertiary:        #1e1d1a;
    --bg-card:            #1a1918;
    --bg-card-hover:      #222120;

    /* --- Colors: Text --- */
    --text-primary:       #e0dcd6;
    --text-secondary:     #9a9285;
    --text-muted:         #5e574e;

    /* --- Colors: Borders --- */
    --border-color:       #252320;
    --border-subtle:      #1e1d1a;

    /* --- Liquid Glass --- */
    --glass-bg:           rgba(255, 255, 255, 0.03);
    --glass-bg-hover:     rgba(255, 255, 255, 0.06);
    --glass-border:       rgba(255, 255, 255, 0.06);
    --glass-border-hover: rgba(255, 255, 255, 0.12);
    --glass-blur:         16px;
    --glass-shadow:       0 4px 24px rgba(0, 0, 0, 0.3);
    --glass-highlight:    rgba(255, 255, 255, 0.08);
    --glass-shine-start:  rgba(255, 255, 255, 0.1);
    --glass-shine-end:    rgba(255, 255, 255, 0);

    /* --- Typography --- */
    --font-sans: 'Pretendard', 'HarmonyOS Sans SC', 'MiSans', 'Noto Sans SC', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-mono:          'SF Mono', 'Fira Code', monospace;
    --font-size-base:     13px;
    --line-height:        1.65;

    /* --- Font Sizes --- */
    --fs-xs:              0.68rem;
    --fs-sm:              0.72rem;
    --fs-body:            0.8rem;
    --fs-md:              0.85rem;
    --fs-lg:              0.95rem;
    --fs-xl:              1.15rem;
    --fs-2xl:             1.4rem;
    --fs-3xl:             1.75rem;
    --fs-4xl:             1.85rem;

    /* --- Layout --- */
    --sidebar-left-width: 200px;
    --sidebar-right-width:240px;
    --max-content-width:  1600px;
    --content-padding:    2rem 2.5rem;
    --feed-max-width:     100%;

    /* --- Border Radius --- */
    --radius-sm:          6px;
    --radius-md:          10px;
    --radius-lg:          14px;

    /* --- Spacing --- */
    --gap-xs:             0.25rem;
    --gap-sm:             0.5rem;
    --gap-md:             1rem;
    --gap-lg:             1.5rem;
    --gap-xl:             2rem;

    /* --- Effects & Transitions --- */
    --transition:         0.2s ease;
    --transition-slow:    0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --hover-lift:         translateY(0);
    --hover-shadow:       0 8px 24px rgba(0, 0, 0, 0.35);
    --hover-shadow-sm:    0 4px 12px rgba(0, 0, 0, 0.25);

    /* --- Text Hover Gradient --- */
    --hover-gradient-start:     #B8B0A8;
    --hover-gradient-mid:       #8A7D6F;
    --hover-gradient-end:       #5C4A3A;
    --hover-transition-duration: 0.12s;
}

/* --- Light Mode --- */
[data-theme="light"] {
    /* --- Colors: Backgrounds --- */
    --bg-primary:         #f5f3f0;
    --bg-secondary:       #edeae6;
    --bg-tertiary:        #e5e2dd;
    --bg-card:            #ffffff;
    --bg-card-hover:      #f9f7f5;

    /* --- Colors: Text --- */
    --text-primary:       #2a2520;
    --text-secondary:     #6b6258;
    --text-muted:         #9a9285;

    /* --- Colors: Borders --- */
    --border-color:       #d6d0c8;
    --border-subtle:      #e5e2dd;

    /* --- Liquid Glass (light mode) --- */
    --glass-bg:           rgba(255, 255, 255, 0.55);
    --glass-bg-hover:     rgba(255, 255, 255, 0.7);
    --glass-border:       rgba(0, 0, 0, 0.08);
    --glass-border-hover: rgba(0, 0, 0, 0.12);
    --glass-blur:         20px;
    --glass-shadow:       0 4px 24px rgba(0, 0, 0, 0.08);
    --glass-highlight:    rgba(255, 255, 255, 0.6);
    --glass-shine-start:  rgba(255, 255, 255, 0.8);
    --glass-shine-end:    rgba(255, 255, 255, 0);

    /* --- Effects & Transitions --- */
    --hover-shadow:       0 8px 24px rgba(0, 0, 0, 0.1);
    --hover-shadow-sm:    0 4px 12px rgba(0, 0, 0, 0.08);

    /* --- Text Hover Gradient (darker for light bg) --- */
    --hover-gradient-start:     #5C4A3A;
    --hover-gradient-mid:       #8A7D6F;
    --hover-gradient-end:       #B8B0A8;
}

/* --- Light Mode: Component Overrides --- */
[data-theme="light"] .tag-item {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}
[data-theme="light"] .tag-item:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .newsletter-input {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

[data-theme="light"] .menu-overlay,
[data-theme="light"] .tag-overlay,
[data-theme="light"] .search-overlay,
[data-theme="light"] .rss-overlay,
[data-theme="light"] .newsletter-overlay,
[data-theme="light"] .subscribe-overlay {
    background: rgba(0, 0, 0, 0.25);
}
[data-theme="light"] .menu-overlay-inner,
[data-theme="light"] .tag-overlay-inner,
[data-theme="light"] .search-overlay-inner,
[data-theme="light"] .rss-overlay-inner,
[data-theme="light"] .newsletter-overlay-inner,
[data-theme="light"] .subscribe-overlay-inner {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
}
[data-theme="light"] .overlay-input {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}
[data-theme="light"] .rss-url-input {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}
[data-theme="light"] .subscribe-benefit {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .gh-content {
    color: var(--text-primary);
}

/* --- Light Mode: Callout Cards (neutralize colors to warm palette) --- */
[data-theme="light"] .post-full-content .kg-callout-card-blue {
    background: rgba(139, 107, 74, 0.06);
    border-color: rgba(139, 107, 74, 0.15);
}
[data-theme="light"] .post-full-content .kg-callout-card-green {
    background: rgba(139, 107, 74, 0.08);
    border-color: rgba(139, 107, 74, 0.18);
}
[data-theme="light"] .post-full-content .kg-callout-card-purple {
    background: rgba(139, 107, 74, 0.06);
    border-color: rgba(139, 107, 74, 0.15);
}
[data-theme="light"] .post-full-content .kg-callout-card-pink {
    background: rgba(139, 107, 74, 0.05);
    border-color: rgba(139, 107, 74, 0.12);
}
[data-theme="light"] .post-full-content .kg-callout-card-red {
    background: rgba(160, 125, 90, 0.08);
    border-color: rgba(160, 125, 90, 0.18);
}
[data-theme="light"] .post-full-content .kg-callout-card-yellow {
    background: rgba(139, 107, 74, 0.07);
    border-color: rgba(139, 107, 74, 0.16);
}
[data-theme="light"] .post-full-content .kg-callout-card-grey {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .post-full-content .kg-callout-card-white {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
}

/* --- Light Mode: Mark/Highlight --- */
[data-theme="light"] .post-full-content mark {
    background: rgba(139, 107, 74, 0.2) !important;
    color: #2a2520 !important;
}

/* --- Light Mode: Header Cards --- */
[data-theme="light"] .post-full-content .kg-header-card.kg-style-dark {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
    color: var(--text-primary);
}
[data-theme="light"] .post-full-content .kg-header-card.kg-style-dark .kg-header-card-heading,
[data-theme="light"] .post-full-content .kg-header-card.kg-style-dark .kg-header-card-subheading {
    color: var(--text-primary);
}
[data-theme="light"] .post-full-content .kg-header-card.kg-style-light {
    background: #f5f3f0;
    border-color: #d6d0c8;
}
[data-theme="light"] .post-full-content .kg-header-card.kg-style-accent {
    background: rgba(139, 107, 74, 0.1);
    border-color: rgba(139, 107, 74, 0.2);
}

/* --- Light Mode: Signup Card --- */
[data-theme="light"] .post-full-content .kg-signup-card {
    background: #edeae6;
    border-color: #d6d0c8;
}

/* --- Light Mode: Product Card --- */
[data-theme="light"] .post-full-content .kg-product-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

/* --- Light Mode: Audio Card --- */
[data-theme="light"] .post-full-content .kg-audio-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

/* --- Light Mode: Toggle Card --- */
[data-theme="light"] .post-full-content .kg-toggle-card {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
}

/* --- Light Mode: Blockquote --- */
[data-theme="light"] .post-full-content blockquote {
    border-left-color: var(--accent);
}

/* --- Light Mode: Code Blocks --- */
[data-theme="light"] .post-full-content pre {
    background: #edeae6;
    border-color: #d6d0c8;
}
[data-theme="light"] .post-full-content code {
    background: rgba(0, 0, 0, 0.05);
}

/* --- Light Mode: Bookmark Card --- */
[data-theme="light"] .post-full-content .kg-bookmark-container {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .post-full-content .kg-bookmark-container:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
}

/* --- Light Mode: Override Ghost accent color injection --- */
[data-theme="light"] .gh-content .kg-callout-emoji,
[data-theme="light"] .post-full-content .kg-callout-text {
    color: var(--text-primary);
}

/* --- Light Mode: Newsletter Widget --- */
[data-theme="light"] .newsletter-btn {
    background: var(--accent);
    color: #fff;
}
[data-theme="light"] .widget {
    border-color: rgba(0, 0, 0, 0.06);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    :root {
        --transition: 0s;
        --transition-slow: 0s;
        --hover-transition-duration: 0s;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Liquid Glass SVG --- */
.liquid-glass-svg {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* --- Liquid Glass Shared --- */
.liquid-glass {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow),
                inset 0 1px 0 var(--glass-highlight);
    transition: border-color var(--transition-slow),
                background var(--transition-slow),
                box-shadow var(--transition-slow),
                transform var(--transition-slow);
}

.liquid-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        var(--glass-shine-start) 0%,
        var(--glass-shine-end) 50%,
        var(--glass-shine-start) 100%
    );
    background-size: 200% 200%;
    animation: liquid-shimmer 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.liquid-glass:hover::before {
    opacity: 1;
}

.liquid-glass:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 var(--glass-highlight),
                0 0 0 1px var(--glass-border);
}

@keyframes liquid-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Liquid Glass edge distortion — applied to decorative borders */
.liquid-edge {
    filter: url(#liquid-edge);
}


}

}

}

}


/* ===========================================
   2. RESET & BASE
   =========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: var(--line-height);
    overflow: hidden;
    height: 100vh;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition);
}

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

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

/* Phosphor icon sizing in nav/meta */
.ph, [class^="ph-"] {
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    line-height: 1;
}

.nav-link .ph, .nav-link [class^="ph-"] {
    font-size: 17px;
    opacity: 0.5;
    flex-shrink: 0;
    transition: opacity var(--transition), transform var(--transition);
}

.nav-link:hover .ph, .nav-link:hover [class^="ph-"] {
    opacity: 1;
    transform: scale(1.1);
}

.post-card-meta .ph {
    font-size: 12px;
}

.post-card-footer .ph {
    font-size: 12px;
}


/* ===========================================
   3. THREE-COLUMN LAYOUT
   =========================================== */
.site-wrapper {
    display: grid;
    grid-template-columns: var(--sidebar-left-width) 1fr var(--sidebar-right-width);
    height: 100vh;
    max-width: var(--max-content-width);
    margin: 0 auto;
    overflow: hidden;
}


/* ===========================================
   4. LEFT SIDEBAR
   =========================================== */
.sidebar-left {
    height: 100vh;
    background: var(--bg-primary);
    z-index: 10;
    overflow: hidden;
}

.sidebar-left-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: var(--gap-lg) var(--gap-md);
    overflow-y: auto;
}

.site-identity {
    margin-bottom: var(--gap-xl);
}

.site-logo {
    margin-bottom: var(--gap-sm);
}

.site-logo img {
    max-height: 24px;
    width: auto;
}

.site-title-text {
    font-size: var(--fs-xl);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    transition: color var(--transition);
}

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

.site-description {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Navigation */
.nav-left {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: var(--gap-sm) 0.65rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: var(--fs-md);
    font-weight: 450;
    position: relative;
    transition: all var(--transition-slow);
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    border-radius: 0 2px 2px 0;
    background: var(--accent);
    transition: transform var(--transition-slow);
}

.nav-link:hover {
    background: var(--glass-bg-hover);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    box-shadow: inset 0 1px 0 var(--glass-highlight);
    color: var(--text-primary);
    padding-left: 0.85rem;
}

.nav-link:hover::before {
    transform: translateY(-50%) scaleY(1);
}

.nav-link.active {
    background: rgba(139, 107, 74, 0.25);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
    border: 1px solid rgba(139, 107, 74, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06),
                0 2px 8px rgba(139, 107, 74, 0.15);
    color: var(--accent-hover);
}

.nav-link.active::before {
    display: none;
}

.nav-link.active .ph {
    opacity: 1;
}

/* Sidebar Footer */
.sidebar-left-footer {
    margin-top: auto;
    padding-top: 1.25rem;
}

.social-links {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 16px;
    transition: all var(--transition-slow);
}

.social-link:hover {
    background: var(--glass-bg-hover);
    border: 1px solid var(--glass-border);
    color: var(--accent);
}

.theme-info {
    font-size: 0.7rem;
    color: var(--text-muted);
}


/* ===========================================
   5. MIDDLE CONTENT AREA
   =========================================== */
.content-middle {
    height: 100vh;
    padding: var(--content-padding);
    overflow-y: auto;
}

/* Barba transition */
.content-middle[data-barba="container"] {
    will-change: opacity;
}

/* Mobile Header (hidden on desktop) */
.mobile-header {
    display: none;
}


/* ===========================================
   6. HERO SECTION
   =========================================== */
.hero {
    margin-bottom: var(--gap-xl);
    padding-bottom: 1.75rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
}

.hero-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin-bottom: 0.35rem;
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.hero-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.hero-title {
    font-size: var(--fs-3xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--text-primary);
}

.hero-description {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.55;
    max-width: 500px;
}


/* ===========================================
   7. SECTION HEADINGS
   =========================================== */
.section-heading {
    font-size: var(--fs-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-heading .ph {
    font-size: 14px;
}


/* ===========================================
   8. SINGLE-COLUMN FEED (TikTok-style)
   =========================================== */
.feed {
    display: flex;
    flex-direction: column;
    gap: var(--gap-lg);
    max-width: var(--feed-max-width);
    margin: 0 auto;
}


/* ===========================================
   9. POST CARDS (Full-width single-column)
   =========================================== */
.post-card {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--glass-shadow),
                inset 0 1px 0 var(--glass-highlight);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition-slow), background var(--transition-slow);
}

.post-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        var(--glass-shine-start) 0%,
        var(--glass-shine-end) 50%,
        var(--glass-shine-start) 100%
    );
    background-size: 200% 200%;
    animation: liquid-shimmer 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

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

.post-card:hover {
    transform: var(--hover-lift);
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 var(--glass-highlight),
                0 0 0 1px var(--glass-border);
}

/* Image area */
.post-card-image-link {
    display: block;
    overflow: hidden;
    position: relative;
}

.post-card-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    background: var(--bg-tertiary);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* All images — show at natural ratio, full width, no cropping */
.post-card-image.is-landscape,
.post-card-image.is-portrait {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: cover;
}

.post-card:hover .post-card-image {
    transform: scale(1.03);
}

/* Video play badge on card */
.post-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 22px;
}

.post-card:hover .post-card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Video cards get portrait aspect */
.post-card--video .post-card-image {
    aspect-ratio: 9 / 16;
    object-fit: cover;
}

/* Text-only cards */
.post-card--text {
    border: 1px solid var(--glass-border);
}

.post-card--text .post-card-content {
    padding-top: 1.25rem;
}

/* Card content area */
.post-card-content {
    padding: 1rem 1.15rem 1.15rem;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-sm);
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.post-card-tag {
    color: var(--accent);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: color var(--transition);
}

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

.post-card-date {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.post-card-title {
    font-size: var(--fs-xl);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin-bottom: 0.4rem;
}

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

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

.post-card-excerpt {
    font-size: var(--fs-body);
    color: var(--text-secondary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.post-card-author,
.post-card-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}


/* ===========================================
   10. LAZY LOADING — Image/Video Fade-in
   =========================================== */
.lazy {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy.loaded {
    opacity: 1;
}


/* ===========================================
   11. INFINITE SCROLL SENTINEL
   =========================================== */
.scroll-sentinel {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    min-height: 60px;
}

.loading-spinner {
    color: var(--accent);
    font-size: 24px;
    animation: spin 1s linear infinite;
}

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

.feed-end {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Legacy load-more (fallback / hidden) */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: var(--gap-xl);
    padding-top: var(--gap-lg);
}

.load-more-btn {
    padding: var(--gap-sm) 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-slow);
}

.load-more-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: var(--hover-lift);
    box-shadow: var(--hover-shadow-sm);
}


/* ===========================================
   12. VIDEO FEED GRID (Featured strip)
   =========================================== */
.section-videos {
    margin-bottom: var(--gap-xl);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.video-thumb {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition-slow);
}

.video-thumb:hover {
    transform: var(--hover-lift);
    box-shadow: var(--hover-shadow);
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-thumb:hover img {
    transform: scale(1.08);
}

.video-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(0,0,0,0.8));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0.75rem;
}

.video-thumb-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-thumb-meta {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.7);
    margin-top: var(--gap-xs);
}

.video-thumb-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 18px;
}

.video-thumb:hover .video-thumb-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-thumb-play svg {
    width: 16px;
    height: 16px;
    fill: #fff;
    margin-left: 2px;
}


/* ===========================================
   13. TIKTOK VIDEO PLAYER OVERLAY
   =========================================== */
.video-player-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #000;
    display: none;
    flex-direction: column;
}

.video-player-overlay.is-active {
    display: flex;
}

.video-player-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--gap-md) 1.25rem;
    background: linear-gradient(rgba(0,0,0,0.6), transparent);
}

.video-player-close {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all var(--transition-slow);
}

.video-player-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.video-player-title {
    font-size: var(--fs-md);
    font-weight: 600;
    color: #fff;
    flex: 1;
    text-align: center;
    padding: 0 var(--gap-md);
}

.video-scroll-container {
    flex: 1;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}

.video-scroll-container::-webkit-scrollbar {
    display: none;
}

.video-slide {
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #000;
}

.video-slide video {
    max-height: 100vh;
    max-width: 100vw;
    object-fit: contain;
}

.video-slide-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4rem 1.5rem 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
}

.video-slide-post-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.video-slide-author {
    font-size: 0.75rem;
    opacity: 0.7;
}

.video-slide-actions {
    position: absolute;
    right: 1rem;
    bottom: 6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.video-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    border: none;
    background: none;
    color: #fff;
    cursor: pointer;
    transition: transform var(--transition);
}

.video-action-btn:hover {
    transform: scale(1.15);
}

.video-action-btn svg {
    width: 28px;
    height: 28px;
    fill: #fff;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.video-action-btn span {
    font-size: 0.65rem;
    opacity: 0.8;
}

.video-mute-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.video-mute-indicator.show {
    opacity: 1;
}

.video-mute-indicator svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.video-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.2);
}

.video-progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.25s linear;
}


/* ===========================================
   14. RIGHT SIDEBAR
   =========================================== */
.sidebar-right {
    height: 100vh;
    background: var(--bg-primary);
    overflow: hidden;
}

.sidebar-right-inner {
    display: flex;
    flex-direction: column;
    gap: var(--gap-lg);
    height: 100%;
    padding: var(--gap-xl) var(--gap-md);
    overflow-y: auto;
}

.widget {
    position: relative;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 0 var(--glass-highlight);
    transition: border-color var(--transition-slow), background var(--transition-slow), box-shadow var(--transition-slow);
}

.widget::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        var(--glass-shine-start) 0%,
        var(--glass-shine-end) 50%,
        var(--glass-shine-start) 100%
    );
    background-size: 200% 200%;
    animation: liquid-shimmer 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.widget:hover::before {
    opacity: 1;
}

.widget:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 var(--glass-highlight);
}

.widget:last-child {
    padding-bottom: 0;
}

.widget-title {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.7rem;
}

.widget-description {
    font-size: var(--fs-body);
    color: var(--text-secondary);
    line-height: 1.5;
}


/* ===========================================
   15. NEWSLETTER WIDGET
   =========================================== */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    margin-top: 0.6rem;
}

.newsletter-input {
    width: 100%;
    padding: var(--gap-sm) 0.7rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    outline: none;
    transition: border-color var(--transition-slow), box-shadow var(--transition-slow);
}

.newsletter-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.newsletter-input::placeholder {
    color: var(--text-muted);
}

.newsletter-btn {
    width: 100%;
    padding: var(--gap-sm) 0.85rem;
    border: 1px solid rgba(139, 107, 74, 0.3);
    border-radius: var(--radius-sm);
    background: rgba(139, 107, 74, 0.2);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: var(--accent-hover);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all var(--transition-slow);
}

.newsletter-btn:hover {
    background: rgba(139, 107, 74, 0.3);
    border-color: rgba(139, 107, 74, 0.4);
    transform: var(--hover-lift);
    box-shadow: 0 4px 16px rgba(139, 107, 74, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.newsletter-btn:active {
    transform: none;
}

.newsletter-btn .ph {
    font-size: 14px;
    transition: transform var(--transition);
}

.newsletter-btn:hover .ph {
    transform: none;
}

.newsletter-message {
    font-size: var(--fs-sm);
    color: var(--accent);
}

.newsletter-message.error {
    color: #ef4444;
}


/* ===========================================
   16. TAG CLOUD
   =========================================== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tag-pill {
    display: inline-block;
    padding: var(--gap-xs) 0.6rem;
    border-radius: 100px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 0 var(--glass-highlight);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 450;
    transition: all var(--transition-slow);
}

.tag-pill:hover {
    background: rgba(139, 107, 74, 0.2);
    border-color: rgba(139, 107, 74, 0.3);
    color: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(139, 107, 74, 0.15),
                inset 0 1px 0 var(--glass-highlight);
}


/* ===========================================
   17. RECENT POSTS WIDGET
   =========================================== */
.recent-posts {
    display: flex;
    flex-direction: column;
}

.recent-post-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.45rem 0;
    transition: padding-left var(--transition);
}

.recent-post-item:last-child {
    padding-bottom: 0;
}

.recent-post-item:hover {
    padding-left: 0.4rem;
}

.recent-post-title {
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    transition: color var(--transition);
}

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

.recent-post-date {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    flex-shrink: 0;
}


/* ===========================================
   18. SINGLE POST / PAGE
   =========================================== */
.post-full {
    max-width: 100%;
}

.post-full-header {
    margin-bottom: 1.75rem;
}

.post-full-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
    font-size: 0.78rem;
    flex-wrap: wrap;
}

.post-full-meta .ph {
    font-size: 13px;
}

.post-full-tag {
    color: var(--accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.post-full-date,
.post-full-reading-time {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.post-full-title {
    font-size: var(--fs-4xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

.post-full-excerpt {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.post-full-image {
    margin-bottom: var(--gap-xl);
    border-radius: var(--radius-lg);
    overflow: hidden;
    width: 100%;
}

.post-full-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-slow);
}

/* Landscape images (16:9 — 3600×2160 / 1920×1080) */
.post-full-image.is-landscape img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Vertical images (9:16 — 1080×1920) — constrain width, center */
.post-full-image.is-portrait {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.post-full-image.is-portrait img {
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.post-full-image:hover img {
    transform: scale(1.02);
}

/* Post Content Typography */
.post-full-content {
    font-size: var(--fs-lg);
    line-height: 1.75;
    color: var(--text-primary);
    max-width: 720px;
}

.post-full-content h2 {
    font-size: var(--fs-2xl);
    font-weight: 700;
    margin: 2rem 0 0.85rem;
    letter-spacing: -0.02em;
}

.post-full-content h3 {
    font-size: var(--fs-xl);
    font-weight: 600;
    margin: 1.75rem 0 0.65rem;
}

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

.post-full-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition);
}

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

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

.post-full-content pre {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    overflow-x: auto;
    margin: 1.25rem 0;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.post-full-content code {
    background: var(--bg-tertiary);
    padding: 0.12rem 0.35rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85em;
}

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

.post-full-content img {
    border-radius: var(--radius-md);
    margin: 1.25rem 0;
}

.post-full-content ul,
.post-full-content ol {
    margin: 0.85rem 0 1.1rem 1.25rem;
}

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

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

.post-full-content figcaption {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.4rem;
}

/* Ghost width classes */
.post-full-content .kg-width-wide {
    margin-left: -2rem;
    margin-right: -2rem;
}

.post-full-content .kg-width-full {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    max-width: 100vw;
}

.post-full-content .kg-width-wide img,
.post-full-content .kg-width-full img {
    width: 100%;
}

/* Ghost content cards */
.post-full-content .kg-image-card,
.post-full-content .kg-gallery-card {
    margin: 1.25rem 0;
}

.post-full-content .kg-image {
    border-radius: var(--radius-md);
}

.post-full-content .kg-video-card {
    margin: 1.25rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.post-full-content .kg-bookmark-card {
    margin: 1.25rem 0;
}

.post-full-content .kg-bookmark-container {
    display: flex;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    transition: border-color var(--transition), box-shadow var(--transition-slow), background var(--transition-slow);
}

.post-full-content .kg-bookmark-container:hover {
    border-color: var(--accent);
    box-shadow: var(--hover-shadow-sm);
}

.post-full-content .kg-bookmark-content {
    flex: 1;
    padding: 0.85rem;
}

.post-full-content .kg-bookmark-title {
    font-weight: 600;
    font-size: var(--fs-md);
    color: var(--text-primary);
}

.post-full-content .kg-bookmark-description {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-full-content .kg-bookmark-thumbnail {
    width: 120px;
    flex-shrink: 0;
}

.post-full-content .kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
}

.post-full-content .kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.post-full-content .kg-bookmark-author::after {
    content: "·";
    margin-left: 0.4rem;
}

/* --- Callout Card --- */
.post-full-content .kg-callout-card {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    margin: 1.25rem 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.post-full-content .kg-callout-emoji {
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1.5;
}

.post-full-content .kg-callout-text {
    font-size: var(--fs-md);
    line-height: 1.6;
    color: var(--text-secondary);
}

.post-full-content .kg-callout-card-blue {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.15);
}

.post-full-content .kg-callout-card-green {
    background: rgba(34, 197, 94, 0.06);
    border-color: rgba(34, 197, 94, 0.15);
}

.post-full-content .kg-callout-card-yellow {
    background: rgba(234, 179, 8, 0.06);
    border-color: rgba(234, 179, 8, 0.15);
}

.post-full-content .kg-callout-card-red {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.15);
}

.post-full-content .kg-callout-card-pink {
    background: rgba(236, 72, 153, 0.06);
    border-color: rgba(236, 72, 153, 0.15);
}

.post-full-content .kg-callout-card-purple {
    background: rgba(168, 85, 247, 0.06);
    border-color: rgba(168, 85, 247, 0.15);
}

.post-full-content .kg-callout-card-grey {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--glass-border);
}

.post-full-content .kg-callout-card-white {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* --- Toggle / Accordion Card --- */
.post-full-content .kg-toggle-card {
    margin: 1.25rem 0;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    overflow: hidden;
}

.post-full-content .kg-toggle-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    cursor: pointer;
    gap: 0.75rem;
}

.post-full-content .kg-toggle-heading-text {
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.post-full-content .kg-toggle-card-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    transition: transform var(--transition);
}

.post-full-content .kg-toggle-card-icon svg {
    width: 20px;
    height: 20px;
}

.post-full-content .kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-card-icon {
    transform: rotate(180deg);
}

.post-full-content .kg-toggle-content {
    padding: 0 1rem 0.85rem;
    font-size: var(--fs-md);
    color: var(--text-secondary);
    line-height: 1.65;
    display: none;
}

.post-full-content .kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-content {
    display: block;
}

/* --- Button Card --- */
.post-full-content .kg-button-card {
    margin: 1.5rem 0;
    display: flex;
}

.post-full-content .kg-button-card.kg-align-center {
    justify-content: center;
}

.post-full-content .kg-button-card.kg-align-left {
    justify-content: flex-start;
}

.post-full-content .kg-btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: var(--fs-md);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-slow);
    cursor: pointer;
}

.post-full-content .kg-btn-accent {
    background: var(--accent) !important;
    color: #fff !important;
    border: 1px solid var(--accent) !important;
}

.post-full-content .kg-btn-accent:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    color: #fff !important;
    text-decoration: none;
}

/* --- Audio Card --- */
.post-full-content .kg-audio-card {
    margin: 1.25rem 0;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    overflow: hidden;
}

.post-full-content .kg-audio-player-container {
    padding: 1rem 1.15rem;
}

.post-full-content .kg-audio-title {
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.post-full-content .kg-audio-player {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.post-full-content .kg-audio-play-icon {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
}

.post-full-content .kg-audio-play-icon svg {
    width: 28px;
    height: 28px;
}

.post-full-content .kg-audio-seek-slider {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.post-full-content .kg-audio-seek-slider-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
}

.post-full-content .kg-audio-duration {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    flex-shrink: 0;
    font-family: var(--font-mono);
}

/* --- File Card --- */
.post-full-content .kg-file-card {
    margin: 1.25rem 0;
}

.post-full-content .kg-file-card-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition);
}

.post-full-content .kg-file-card-container:hover {
    border-color: var(--accent);
    background: var(--glass-bg-hover);
    text-decoration: none;
}

.post-full-content .kg-file-card-contents {
    flex: 1;
    min-width: 0;
}

.post-full-content .kg-file-card-title {
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-primary);
}

.post-full-content .kg-file-card-caption {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.post-full-content .kg-file-card-metadata {
    margin-top: 0.3rem;
}

.post-full-content .kg-file-card-filesize {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.post-full-content .kg-file-card-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: rgba(139, 107, 74, 0.1);
    border-radius: var(--radius-sm);
    margin-left: 1rem;
}

.post-full-content .kg-file-card-icon svg {
    width: 20px;
    height: 20px;
}

/* --- Header Card --- */
.post-full-content .kg-header-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    margin: 1.5rem 0;
    border-radius: var(--radius-lg);
    min-height: 240px;
}

.post-full-content .kg-header-card.kg-style-dark {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
}

.post-full-content .kg-header-card.kg-style-light {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.post-full-content .kg-header-card.kg-style-accent {
    background: rgba(139, 107, 74, 0.12);
    border: 1px solid rgba(139, 107, 74, 0.2);
}

.post-full-content .kg-header-card.kg-size-small {
    padding: 2rem 1.5rem;
    min-height: 140px;
}

.post-full-content .kg-header-card.kg-size-large {
    padding: 4rem 2.5rem;
    min-height: 320px;
}

.post-full-content .kg-header-card-heading {
    font-size: var(--fs-3xl);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0;
}

.post-full-content .kg-header-card.kg-size-large .kg-header-card-heading {
    font-size: 2.2rem;
}

.post-full-content .kg-header-card-subheading {
    font-size: var(--fs-lg);
    color: var(--text-secondary);
    margin: 0.5rem 0 0;
    max-width: 560px;
}

/* --- Video Card --- */
.post-full-content .kg-video-container {
    position: relative;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
}

.post-full-content .kg-video-container video {
    width: 100%;
    display: block;
}

/* --- Gallery Card --- */
.post-full-content .kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-full-content .kg-gallery-row {
    display: flex;
    gap: 0.5rem;
}

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

.post-full-content .kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin: 0;
}

/* --- Table --- */
.post-full-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: var(--fs-md);
}

.post-full-content thead th {
    text-align: left;
    padding: 0.6rem 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.post-full-content tbody td {
    padding: 0.55rem 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.post-full-content tbody tr:hover td {
    background: var(--glass-bg);
}

/* --- Mark / Highlight --- */
.post-full-content mark {
    background: rgba(139, 107, 74, 0.35) !important;
    color: #f0ece6 !important;
    padding: 0.12rem 0.3rem;
    border-radius: 3px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* --- Strikethrough --- */
.post-full-content s,
.post-full-content del {
    color: var(--text-muted);
}

/* --- H4 --- */
.post-full-content h4 {
    font-size: var(--fs-lg);
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
}

/* --- Heading Anchors --- */
.post-full-content h2 a,
.post-full-content h3 a,
.post-full-content h4 a {
    text-decoration: none;
    color: inherit;
}

/* --- Embedded Content (iframes) --- */
.post-full-content .kg-embed-card {
    margin: 1.25rem 0;
}

.post-full-content .kg-embed-card iframe {
    width: 100%;
    border-radius: var(--radius-md);
}

/* --- Product Card --- */
.post-full-content .kg-product-card {
    margin: 1.25rem 0;
    padding: 1rem 1.15rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
}

.post-full-content .kg-product-card-title {
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.post-full-content .kg-product-card-description {
    font-size: var(--fs-md);
    color: var(--text-secondary);
    margin-top: 0.4rem;
    line-height: 1.6;
}

/* --- Signup Card --- */
.post-full-content .kg-signup-card {
    margin: 1.5rem 0;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    text-align: center;
}

/* --- Text Hover Gradient Effect --- */
.post-full-content p,
.post-full-content h2,
.post-full-content h3,
.post-full-content h4,
.post-full-content li,
.post-full-content blockquote,
.post-full-content figcaption,
.post-card-title a,
.post-card-excerpt,
.post-card-tag,
.post-card-date,
.post-card-author,
.post-card-reading-time,
.hero-title,
.hero-description,
.site-description,
.widget-title,
.widget-description,
.recent-post-title,
.recent-post-date,
.section-heading,
.post-full-title,
.post-full-excerpt,
.post-full-tag,
.post-full-date,
.post-full-reading-time,
.nav-link span,
.tag-description,
.tag-count,
.author-name,
.author-bio,
.author-header-bio,
.video-meta h1,
.video-description,
.theme-info,
.feed-end {
    background-image: radial-gradient(
        ellipse at center,
        var(--hover-gradient-start),
        var(--hover-gradient-mid),
        var(--hover-gradient-end)
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: var(--text-primary);
    transition: -webkit-text-fill-color var(--hover-transition-duration) ease;
}

/* Muted text elements keep their own color until hovered */
.post-card-tag,
.post-full-tag { -webkit-text-fill-color: var(--accent); }
.post-card-date,
.post-card-author,
.post-card-reading-time,
.post-full-date,
.post-full-reading-time,
.recent-post-date,
.section-heading,
.widget-title,
.tag-count,
.theme-info,
.feed-end { -webkit-text-fill-color: var(--text-muted); }
.post-card-excerpt,
.hero-description,
.site-description,
.widget-description,
.post-full-excerpt,
.tag-description,
.author-bio,
.author-header-bio,
.video-description { -webkit-text-fill-color: var(--text-secondary); }
.nav-link span { -webkit-text-fill-color: var(--text-secondary); }

.post-full-content p:hover,
.post-full-content h2:hover,
.post-full-content h3:hover,
.post-full-content h4:hover,
.post-full-content li:hover,
.post-full-content blockquote:hover,
.post-full-content figcaption:hover,
.post-card-title a:hover,
.post-card-excerpt:hover,
.post-card:hover .post-card-tag,
.post-card:hover .post-card-date,
.post-card:hover .post-card-author,
.post-card:hover .post-card-reading-time,
.hero-title:hover,
.hero-description:hover,
.site-description:hover,
.widget-title:hover,
.widget-description:hover,
.recent-post-item:hover .recent-post-title,
.recent-post-item:hover .recent-post-date,
.section-heading:hover,
.post-full-title:hover,
.post-full-excerpt:hover,
.post-full-tag:hover,
.post-full-date:hover,
.post-full-reading-time:hover,
.nav-link:hover span,
.tag-description:hover,
.tag-count:hover,
.author-name:hover,
.author-bio:hover,
.author-header-bio:hover,
.video-meta h1:hover,
.video-description:hover,
.theme-info:hover,
.feed-end:hover {
    -webkit-text-fill-color: transparent;
}

/* Post Footer */
.post-full-footer {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
}

.post-full-author {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: transform var(--transition), box-shadow var(--transition);
}

.author-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.author-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.author-bio {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

/* Video post layout */
.post-video {
    max-width: 100%;
}

.post-video .video-player-inline {
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--gap-lg);
    width: 100%;
}

.post-video .video-player-inline video,
.post-video .video-player-inline .kg-video-card {
    width: 100%;
    border-radius: 0;
    margin: 0;
}

/* Landscape video (16:9) — full width */
.post-video .video-player-inline video {
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
}

/* Vertical video (9:16) — centered, constrained */
.post-video.is-portrait .video-player-inline {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.post-video.is-portrait .video-player-inline video {
    aspect-ratio: 9 / 16;
    object-fit: contain;
}

.post-video .video-meta h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--gap-sm);
}

.post-video .video-meta-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: var(--gap-md);
    flex-wrap: wrap;
}

.post-video .video-meta-info .ph {
    font-size: 13px;
}

.post-video .video-description {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text-secondary);
}


/* ===========================================
   19. TAG PAGE HEADER
   =========================================== */
.tag-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
}

.tag-description {
    font-size: var(--fs-md);
    color: var(--text-secondary);
    margin-top: 0.4rem;
}

.tag-count {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-top: 0.35rem;
    display: inline-block;
}


/* ===========================================
   20. AUTHOR PAGE HEADER
   =========================================== */
.author-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
}

.author-header-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
}

.author-header-bio {
    font-size: var(--fs-md);
    color: var(--text-secondary);
}


/* ===========================================
   21. MOBILE MENU OVERLAY
   =========================================== */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.is-active {
    display: flex;
    justify-content: flex-end;
    opacity: 1;
}

.mobile-menu-content {
    width: 260px;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border-left: 1px solid var(--glass-border);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
    padding: var(--gap-lg) 1.25rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.is-active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    margin-left: auto;
    margin-bottom: var(--gap-lg);
    transition: all var(--transition);
}

.mobile-menu-close:hover {
    background: var(--accent);
    color: #fff;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 450;
    transition: all var(--transition);
}

.mobile-nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding-left: 1.1rem;
}


/* ===========================================
   22. RESPONSIVE BREAKPOINTS
   =========================================== */

/* --- Responsive images --- */
picture { display: block; }
picture img {
    width: 100%;
    height: 100%;
    object-fit: inherit;
}
img {
    max-width: 100%;
    height: auto;
}

/* --- Large desktop (>1600px) — generous whitespace --- */
@media (min-width: 1601px) {
    .content-middle { padding: 2.5rem 3rem; }
}

/* --- Tablet landscape / small desktop (901–1100px) --- */
@media (max-width: 1100px) {
    .site-wrapper {
        grid-template-columns: var(--sidebar-left-width) 1fr;
    }

    .sidebar-right { display: none; }

    .content-middle { padding: var(--gap-lg); }

    .feed { max-width: 100%; }

    .video-grid { grid-template-columns: repeat(2, 1fr); }

    .post-full-image { border-radius: var(--radius-md); }
}

/* --- Tablet portrait (768–900px) --- */
@media (max-width: 900px) {
    :root {
        --sidebar-left-width: 170px;
    }

    .nav-link span { font-size: 0.72rem; }

    .content-middle { padding: 1.25rem; }

    .hero-title { font-size: 1.25rem; }

    .post-card-content { padding: 0.85rem; }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--gap-sm);
    }
}

/* --- Mobile (≤767px) — single column, mobile header visible --- */
@media (max-width: 767px) {
    body {
        overflow: auto;
        height: auto;
    }

    .site-wrapper {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

    .sidebar-left  { display: none; }
    .sidebar-right { display: none; }

    /* Mobile header — transparent, title left, menu right */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.6rem 0;
        margin-bottom: 0.5rem;
        position: sticky;
        top: 0;
        z-index: 100;
        background: transparent;
        pointer-events: none;
    }

    .mobile-header > * {
        pointer-events: auto;
    }

    .mobile-header .mobile-logo img {
        max-height: 18px;
    }

    .mobile-header .site-title-text {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-primary);
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: var(--radius-sm);
        background: rgba(17, 17, 16, 0.6);
        backdrop-filter: blur(12px) saturate(1.2);
        -webkit-backdrop-filter: blur(12px) saturate(1.2);
        color: var(--text-secondary);
        cursor: pointer;
        transition: all var(--transition);
        -webkit-tap-highlight-color: transparent;
    }

    .menu-toggle:active {
        transform: scale(0.92);
        background: rgba(17, 17, 16, 0.8);
    }

    /* Content */
    .content-middle {
        padding: var(--gap-md);
        height: auto;
        overflow: visible;
    }

    /* Hero */
    .hero { padding: var(--gap-md) 0; }
    .hero-title { font-size: 1.35rem; }
    .hero-description { font-size: var(--fs-md); }

    /* Feed */
    .feed { max-width: 100%; gap: var(--gap-md); }

    /* Post cards */
    .post-card { border-radius: var(--radius-md); }
    .post-card-content { padding: 0.85rem; }
    .post-card-title { font-size: var(--fs-lg); }
    .post-card-excerpt { font-size: var(--fs-sm); }
    .post-card-meta, .post-card-footer { font-size: var(--fs-xs); }

    /* Full post */
    .post-full-title { font-size: var(--fs-2xl); }
    .post-full-content { font-size: 0.9rem; max-width: 100%; }
    .post-full-image { border-radius: var(--radius-md); margin-bottom: var(--gap-lg); }
    .post-full-image.is-portrait { max-width: 280px; }
    .post-full-header { margin-bottom: var(--gap-lg); }
    .post-video.is-portrait .video-player-inline { max-width: 280px; }

    /* Sections */
    .section-posts { margin-bottom: var(--gap-lg); }
    .section-heading { font-size: var(--fs-sm); }

    /* Videos */
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--gap-sm);
    }
    .video-thumb { border-radius: var(--radius-sm); }

    /* Author & Tag pages */
    .author-header { padding: var(--gap-md) 0; }
    .author-header-avatar { width: 56px; height: 56px; }
    .tag-description { font-size: var(--fs-sm); }
}

/* --- Small mobile (≤480px) --- */
@media (max-width: 480px) {
    .content-middle { padding: 0.75rem; }

    .hero-title { font-size: 1.15rem; }
    .hero-description { font-size: var(--fs-sm); }

    .post-card-content { padding: 0.75rem; }
    .post-card-title { font-size: var(--fs-md); }

    .post-full-title { font-size: var(--fs-xl); }
    .post-full-content { font-size: 0.85rem; line-height: 1.7; }

    .video-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.35rem;
    }
    .video-thumb-title { font-size: 0.65rem; }

    /* Bigger touch targets */
    .tag-pill { padding: 0.35rem 0.65rem; font-size: 0.68rem; }
    .nav-link, .mobile-nav-link { min-height: 44px; }
}

/* --- Very small (≤360px) — ultra compact --- */
@media (max-width: 360px) {
    .content-middle { padding: 0.5rem; }
    .mobile-header { padding: 0.5rem 0 0.75rem; }
    .hero-title { font-size: 1rem; }
    .post-card-title { font-size: var(--fs-body); }
    .post-full-title { font-size: var(--fs-lg); }
    .video-grid { grid-template-columns: 1fr; gap: var(--gap-sm); }
}

/* --- Landscape phone (short + wide) --- */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-header { padding: 0.4rem 0 0.6rem; margin-bottom: 0.5rem; }
    .hero { padding: var(--gap-sm) 0; }
    .hero-avatar { width: 28px; height: 28px; }
    .hero-title { font-size: 1rem; }
    .video-grid { grid-template-columns: repeat(3, 1fr); }
    .video-player-overlay .video-slide { scroll-snap-align: start; }
}

/* --- High-DPI image sharpening --- */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .post-card-image,
    .post-full-image img,
    .video-thumb img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* --- Print --- */
@media print {
    .sidebar-left, .sidebar-right, .mobile-header,
    .video-player-overlay, .mobile-menu-overlay,
    .scroll-sentinel, .newsletter-form { display: none !important; }
    .site-wrapper { display: block !important; }
    .content-middle { padding: 0 !important; height: auto !important; overflow: visible !important; }
    .post-full-content { max-width: 100% !important; font-size: 12pt; }
    a { text-decoration: underline; }
}


/* ===========================================
   23. SCROLLBAR
   =========================================== */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}


/* ===========================================
   24. UTILITIES & MISC
   =========================================== */

/* Ghost member CTAs */
.gh-post-upgrade-cta-content,
.gh-post-upgrade-cta {
    display: none !important;
}

/* Selection */
::selection {
    background: var(--accent);
    color: #fff;
}

/* Picture element (AVIF/WebP fallback) */
picture.util-picture {
    display: block;
}

picture.util-picture img {
    width: 100%;
    height: 100%;
    object-fit: inherit;
}


/* ===========================================
   25. MINIMAL THEME OVERRIDES
   Single-column layout with floating glass identity
   =========================================== */

body.minimal {
    overflow: auto;
    height: auto;
}

body.minimal .site-wrapper {
    display: block;
    max-width: 900px;
    margin: 0 auto;
    height: auto;
    overflow: visible;
}

/* Hide original sidebars & mobile menu */
body.minimal .sidebar-left,
body.minimal .sidebar-right,
body.minimal .mobile-header,
body.minimal .mobile-menu-overlay {
    display: none !important;
}

/* Content fills the screen */
body.minimal .content-middle {
    height: auto;
    overflow: visible;
    padding: 70px var(--gap-lg) var(--gap-xl);
}

/* --- Floating Identity Block — liquid glass --- */
.site-identity-float {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    width: 100%;
    max-width: 900px;
    pointer-events: none;
    padding: 0 var(--gap-lg);
    box-sizing: border-box;
}

.site-identity-inner {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    width: auto;
    max-width: fit-content;
    margin-left: var(--gap-md);
    pointer-events: auto;
    background: rgba(17, 17, 16, 0.3);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 0.5rem 0.85rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 var(--glass-highlight);
    transition: border-color var(--transition-slow),
                box-shadow var(--transition-slow);
}

.site-identity-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        var(--glass-shine-start) 0%,
        var(--glass-shine-end) 50%,
        var(--glass-shine-start) 100%
    );
    background-size: 200% 200%;
    animation: liquid-shimmer 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.site-identity-inner:hover::before {
    opacity: 1;
}

.site-identity-inner:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 var(--glass-highlight),
                0 0 0 1px var(--glass-border);
}

.site-identity-float .site-logo {
    margin: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.site-identity-float .site-logo a {
    display: flex;
    align-items: center;
}

.site-identity-float .site-title-text {
    font-size: var(--fs-sm);
    font-weight: 600;
    white-space: nowrap;
}

.site-identity-float .site-description {
    font-size: 0.6rem;
    line-height: 1.35;
    color: var(--text-muted);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.site-identity-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding-top: 0;
    padding-left: 0.6rem;
    border-top: none;
    border-left: 1px solid var(--glass-border);
}

.site-identity-footer .social-links {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
}

.site-identity-footer .social-link {
    font-size: 0;
    color: var(--text-muted);
    transition: color var(--transition), background var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0.35rem;
    height: 25px;
    box-sizing: border-box;
    border-radius: var(--radius-sm);
}

.site-identity-footer .social-link i.ph {
    font-size: 14px;
    line-height: 1;
    display: block;
    width: 14px;
    height: 14px;
}

.site-identity-footer .social-link:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
}

.site-identity-footer .theme-info {
    font-size: 0.55rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* --- Search & Menu Buttons in Identity Bar --- */
.search-btn,
.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 0.35rem;
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.tag-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 0.35rem;
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.tag-btn i.ph {
    line-height: 1;
}

.search-btn:hover,
.tag-btn:hover,
.menu-btn:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
}

.search-btn i.ph,
.menu-btn i.ph {
    line-height: 1;
}

/* --- Theme Toggle --- */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.35rem;
    font-size: 1.1rem;
    transition: color var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:hover {
    color: var(--accent);
}
.theme-toggle .ph-sun {
    display: none;
}
.theme-toggle .ph-moon {
    display: inline;
}
[data-theme="light"] .theme-toggle .ph-sun {
    display: inline;
}
[data-theme="light"] .theme-toggle .ph-moon {
    display: none;
}

/* --- Menu Overlay — liquid glass --- */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.menu-overlay-inner {
    width: 100%;
    max-width: 360px;
    margin: 0 var(--gap-lg);
    background: rgba(17, 17, 16, 0.45);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 var(--glass-highlight);
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.menu-overlay.is-active .menu-overlay-inner {
    transform: translateY(0);
}

.menu-overlay-inner {
    position: relative;
}

.menu-close {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    z-index: 1;
}

.menu-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.menu-nav {
    padding: 0.5rem 0.4rem;
}

.menu-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.7rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    transition: background var(--transition), color var(--transition);
}

.menu-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.menu-nav-item.is-active {
    color: var(--accent);
}

.menu-secondary {
    padding: 0.35rem 1rem 0.7rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.menu-secondary-item {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.menu-secondary-item:hover {
    color: var(--accent);
}

/* --- Tag Overlay — liquid glass --- */
.tag-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tag-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.tag-overlay-inner {
    width: 100%;
    max-width: 420px;
    margin: 0 var(--gap-lg);
    background: rgba(17, 17, 16, 0.45);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 var(--glass-highlight);
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.tag-overlay.is-active .tag-overlay-inner {
    transform: translateY(0);
}

.tag-overlay-inner {
    position: relative;
}

.tag-close {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    z-index: 1;
}

.tag-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 500;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.tag-item {
    cursor: pointer;
}

.tag-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.tag-item.is-selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    -webkit-text-fill-color: #fff;
}

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

.tag-item-count {
    font-size: 0.6rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1rem 0.35rem;
    border-radius: 100px;
    line-height: 1.3;
}

/* --- Search Overlay — liquid glass --- */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-inner {
    width: 100%;
    max-width: 560px;
    margin: 0 var(--gap-lg);
    background: rgba(17, 17, 16, 0.45);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 var(--glass-highlight);
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.search-overlay.is-active .search-overlay-inner {
    transform: translateY(0);
}

.search-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
}

.search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-input-icon {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: var(--fs-sm);
    font-family: inherit;
    padding: 0;
}

.search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.search-close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 0.2rem;
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.search-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.search-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.5rem;
}

.search-results:empty {
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.65rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: background var(--transition);
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.search-result-thumb {
    width: 48px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-tertiary);
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* --- Content offset for floating block --- */
body.minimal .content-scroll {
    padding-top: 0;
}

body.minimal .feed {
    max-width: 100%;
}

body.minimal .post-full {
    max-width: 100%;
}

body.minimal .post-full-content {
    max-width: 720px;
}

/* --- Responsive: minimal on tablet --- */
@media (max-width: 1100px) {
    body.minimal .site-wrapper {
        max-width: 100%;
    }
}

/* --- Responsive: minimal on mobile --- */
@media (max-width: 767px) {
    .site-identity-float {
        top: 0.75rem;
        padding: 0;
        max-width: calc(100% - 2 * var(--gap-sm));
    }

    .site-identity-inner {
        margin-left: auto;
        margin-right: auto;
        padding: 0.4rem 0.7rem;
        gap: 0.6rem;
    }

    .site-identity-float .site-description {
        display: none;
    }

    body.minimal .content-middle {
        padding: 60px var(--gap-md) var(--gap-md);
    }

    body.minimal .content-scroll {
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    body.minimal .content-middle {
        padding: 56px 0.75rem 0.75rem;
    }

    .site-identity-float {
        max-width: calc(100% - 1.5rem);
    }

    .site-identity-inner {
        padding: 0.5rem 0.7rem;
        gap: 0.5rem;
    }

    .site-identity-footer .theme-info {
        font-size: 0.5rem;
    }

    body.minimal .content-scroll {
        padding-top: 0;
    }
}

/* --- RSS / Newsletter / Subscribe Overlays — liquid glass --- */
.rss-overlay,
.newsletter-overlay,
.subscribe-overlay {
    position: fixed;
    inset: 0;
    z-index: 1010;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rss-overlay.is-active,
.newsletter-overlay.is-active,
.subscribe-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.rss-overlay-inner,
.newsletter-overlay-inner,
.subscribe-overlay-inner {
    width: 100%;
    max-width: 400px;
    margin: 0 var(--gap-lg);
    background: rgba(17, 17, 16, 0.45);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 var(--glass-highlight);
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.rss-overlay.is-active .rss-overlay-inner,
.newsletter-overlay.is-active .newsletter-overlay-inner,
.subscribe-overlay.is-active .subscribe-overlay-inner {
    transform: translateY(0);
}

.overlay-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem 0;
}

.overlay-header-icon {
    font-size: 18px;
    color: var(--accent);
    line-height: 1;
}

.overlay-header-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.overlay-body {
    padding: 0.6rem 1rem 1rem;
}

.overlay-description {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 0.75rem;
}

.overlay-form {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
}

.overlay-input {
    width: 100%;
    padding: var(--gap-sm) 0.7rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    outline: none;
    transition: border-color var(--transition-slow), box-shadow var(--transition-slow);
    box-sizing: border-box;
}

.overlay-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.overlay-input::placeholder {
    color: var(--text-muted);
}

.overlay-btn {
    width: 100%;
    padding: var(--gap-sm) 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all var(--transition-slow);
}

.overlay-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.overlay-btn.accent {
    border-color: rgba(139, 107, 74, 0.3);
    background: rgba(139, 107, 74, 0.2);
    color: var(--accent-hover);
}

.overlay-btn.accent:hover {
    background: rgba(139, 107, 74, 0.3);
    border-color: rgba(139, 107, 74, 0.4);
    box-shadow: 0 4px 16px rgba(139, 107, 74, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.overlay-form-message {
    font-size: var(--fs-sm);
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.overlay-form-message.error {
    color: #ef4444;
}

.rss-url-wrap {
    display: flex;
    gap: 0.4rem;
}

.rss-url-input {
    flex: 1;
    padding: var(--gap-sm) 0.7rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    outline: none;
    min-width: 0;
    box-sizing: border-box;
}

.rss-copy-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: var(--gap-sm) 0.65rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.rss-copy-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent);
    color: var(--accent);
}

.rss-copied-msg {
    font-size: var(--fs-xs);
    color: var(--accent);
    margin-top: 0.35rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.rss-copied-msg.is-visible {
    opacity: 1;
}

.subscribe-benefits {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.subscribe-benefit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.subscribe-benefit i.ph {
    color: var(--accent);
    font-size: 14px;
    flex-shrink: 0;
}

button.menu-secondary-item {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-sans);
    cursor: pointer;
}
