/* ============================================================
   PageSifter v7.7 — Ghost Theme Stylesheet
   Vertical cards · Category ribbon · Lato titles
   3-column grid · Dark nav bar · Clean design
   ============================================================ */

/* --- Design Tokens --- */
:root {
    /* Light mode */
    --color-bg: #F7F7F7;
    --color-bg-card: #FFFFFF;
    --color-text: #1a1a1a;
    --color-text-secondary: #555555;
    --color-text-muted: #999999;
    --color-border: #e5e5e5;
    --color-shadow: rgba(0, 0, 0, 0.06);
    --color-shadow-hover: rgba(0, 0, 0, 0.12);
    --color-accent: #C4713B;
    --color-subscribe: #C4713B;
    --color-subscribe-hover: #A85D2F;
    --color-newsletter-bg: #EEEEEE;

    /* Nav bar */
    --nav-bg: #3B302A;
    --nav-text: #E8E0D2;
    --nav-hover: rgba(255,255,255,0.08);
    --nav-active-bg: rgba(255,255,255,0.12);

    /* CTA */
    --cta-bg: #1a1a1a;
    --cta-text: #F7F7F7;

    /* Category colors */
    --cat-ai: #1E40AF;
    --cat-business: #D97706;
    --cat-hardware: #047857;
    --cat-software: #0284C7;
    --cat-gaming: #EA580C;
    --cat-security: #DC2626;
    --cat-science: #0D9488;
    --cat-focus: #E11D48;

    /* Typography */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;

    /* Spacing & Shape */
    --gap-card: 20px;
    --radius: 8px;
    --radius-pill: 100px;
    --max-width: 1200px;
    --max-width-post: 760px;
    --header-height: 56px;
}

/* --- Dark mode --- */
html.dark {
    --color-bg: #0d0d0d;
    --color-bg-card: #1a1a1a;
    --color-text: #e5e5e5;
    --color-text-secondary: #a0a0a0;
    --color-text-muted: #666666;
    --color-border: #2a2a2a;
    --color-shadow: rgba(0, 0, 0, 0.3);
    --color-shadow-hover: rgba(0, 0, 0, 0.5);
    --color-accent: #D4894E;
    --color-subscribe: #D4894E;
    --color-subscribe-hover: #E09B60;
    --color-newsletter-bg: #1a1a1a;

    --nav-bg: #111111;
    --nav-text: #D6D3D1;

    --cta-bg: #151515;
    --cta-text: #e5e5e5;

    --cat-ai: #4D8BF5;
    --cat-business: #F0B429;
    --cat-hardware: #2BBF8A;
    --cat-software: #4DABF5;
    --cat-gaming: #F09D4A;
    --cat-security: #EF5350;
    --cat-science: #3DC7B5;
    --cat-focus: #F43F5E;
}

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

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

html.dark img { opacity: 0.9; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
    transition: background-color 0.3s ease;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.logo-svg {
    width: 30px; height: 30px;
    color: var(--color-accent);
    flex-shrink: 0;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border: none; background: none;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}
.btn-icon:hover { color: var(--color-text); background: var(--color-border); }

.theme-toggle .icon-sun { display: none; }
html.dark .theme-toggle .icon-sun { display: block; }
html.dark .theme-toggle .icon-moon { display: none; }

.btn-subscribe {
    padding: 8px 18px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--color-subscribe);
    color: #fff;
    border-radius: var(--radius);
    transition: background 0.2s ease;
}
.btn-subscribe:hover { background: var(--color-subscribe-hover); }

.btn-signin {
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
}
.btn-signin:hover { color: var(--color-text); }

.hamburger { display: none; }

/* ============================================
   NAV BAR — full width dark bar
   ============================================ */
.nav-bar {
    background: var(--nav-bg);
    width: 100%;
    transition: background 0.3s ease;
}

.nav-bar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav-bar-inner::-webkit-scrollbar { display: none; }

.nav-links {
    display: flex;
    align-items: center;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.nav-link {
    padding: 13px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--nav-text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    transition: background 0.2s ease;
    position: relative;
}

.nav-link:hover { background: var(--nav-hover); }
.nav-link.active { background: var(--nav-active-bg); }

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px; right: 16px;
    height: 2px;
    background: var(--color-accent);
}

/* Nav bar action buttons (search, theme toggle, sign in, subscribe) */
.nav-actions .btn-icon {
    color: var(--nav-text);
    opacity: 0.7;
}
.nav-actions .btn-icon:hover {
    color: #fff;
    background: var(--nav-hover);
    opacity: 1;
}
.nav-actions .btn-signin {
    color: var(--nav-text);
    opacity: 0.8;
}
.nav-actions .btn-signin:hover {
    color: #fff;
    opacity: 1;
}

.ghost-nav ul {
    display: flex;
    align-items: center;
    list-style: none;
}

.ghost-nav li a {
    display: block;
    padding: 13px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--nav-text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    transition: background 0.2s ease;
}
.ghost-nav li a:hover { background: var(--nav-hover); }
.ghost-nav li.nav-current a { background: var(--nav-active-bg); }

/* Mobile menu (unchanged) */
.mobile-menu {
    display: none;
    position: fixed;
    top: calc(var(--header-height) + 44px);
    left: 0; right: 0; bottom: 0;
    background: var(--color-bg);
    z-index: 99;
    padding: 24px;
    overflow-y: auto;
}

.mobile-menu.open { display: block; }

.mobile-menu-cta {
    padding: 0 0 16px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 12px;
}

.mobile-subscribe {
    display: block;
    text-align: center;
    padding: 14px 24px;
    font-size: 1rem;
}

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

.mobile-nav a {
    display: block;
    padding: 14px 16px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: background 0.2s ease;
}
.mobile-nav a:hover { background: var(--color-border); }

/* ============================================
   MAIN CONTENT
   ============================================ */
.site-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 28px 24px 64px;
}

/* ============================================
   FEATURED ROW — 2 horizontal cards side by side
   ============================================ */
.featured-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-card);
    margin-bottom: 24px;
}

.featured-card {
    background: var(--color-bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 4px var(--color-shadow);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-2px);
}

/* Category glow on hover — featured */
.featured-card[data-category="ai"]:hover { box-shadow: 0 8px 24px rgba(30, 64, 175, 0.22); }
.featured-card[data-category="business"]:hover { box-shadow: 0 8px 24px rgba(217, 119, 6, 0.22); }
.featured-card[data-category="hardware"]:hover { box-shadow: 0 8px 24px rgba(4, 120, 87, 0.22); }
.featured-card[data-category="software"]:hover { box-shadow: 0 8px 24px rgba(2, 132, 199, 0.22); }
.featured-card[data-category="gaming"]:hover { box-shadow: 0 8px 24px rgba(234, 88, 12, 0.22); }
.featured-card[data-category="security"]:hover { box-shadow: 0 8px 24px rgba(220, 38, 38, 0.22); }
.featured-card[data-category="science"]:hover { box-shadow: 0 8px 24px rgba(13, 148, 136, 0.22); }

html.dark .featured-card[data-category="ai"]:hover { box-shadow: 0 8px 24px rgba(77, 139, 245, 0.2); }
html.dark .featured-card[data-category="business"]:hover { box-shadow: 0 8px 24px rgba(240, 180, 41, 0.2); }
html.dark .featured-card[data-category="hardware"]:hover { box-shadow: 0 8px 24px rgba(43, 191, 138, 0.2); }
html.dark .featured-card[data-category="software"]:hover { box-shadow: 0 8px 24px rgba(77, 171, 245, 0.2); }
html.dark .featured-card[data-category="gaming"]:hover { box-shadow: 0 8px 24px rgba(240, 157, 74, 0.2); }
html.dark .featured-card[data-category="security"]:hover { box-shadow: 0 8px 24px rgba(239, 83, 80, 0.2); }
html.dark .featured-card[data-category="science"]:hover { box-shadow: 0 8px 24px rgba(61, 199, 181, 0.2); }

.featured-card-link {
    display: flex;
    flex-direction: row;
    height: 100%;
    min-height: 320px;
}

.featured-img-wrap {
    width: 42%;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.featured-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.featured-card:hover .featured-img-wrap img {
    transform: scale(1.03);
}

.featured-img-wrap .post-card-image-placeholder {
    width: 100%;
    height: 100%;
}

/* Category ribbon — horizontal at bottom of image */
.featured-ribbon {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 7px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    background: var(--color-border);
}

.featured-body {
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    flex: 1;
}

.featured-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent);
}

.featured-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.featured-excerpt {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   POST FEED — 3 columns
   ============================================ */
.post-feed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-card);
}

/* ============================================
   VERTICAL POST CARD — proper card with color bar
   ============================================ */
.post-card {
    background: var(--color-bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 4px var(--color-shadow);
    transition: box-shadow 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.post-card:hover {
    transform: translateY(-3px);
}

/* Category glow on hover */
.post-card[data-category="ai"]:hover { box-shadow: 0 8px 24px rgba(30, 64, 175, 0.22); }
.post-card[data-category="business"]:hover { box-shadow: 0 8px 24px rgba(217, 119, 6, 0.22); }
.post-card[data-category="hardware"]:hover { box-shadow: 0 8px 24px rgba(4, 120, 87, 0.22); }
.post-card[data-category="software"]:hover { box-shadow: 0 8px 24px rgba(2, 132, 199, 0.22); }
.post-card[data-category="gaming"]:hover { box-shadow: 0 8px 24px rgba(234, 88, 12, 0.22); }
.post-card[data-category="security"]:hover { box-shadow: 0 8px 24px rgba(220, 38, 38, 0.22); }
.post-card[data-category="science"]:hover { box-shadow: 0 8px 24px rgba(13, 148, 136, 0.22); }

html.dark .post-card[data-category="ai"]:hover { box-shadow: 0 8px 24px rgba(77, 139, 245, 0.2); }
html.dark .post-card[data-category="business"]:hover { box-shadow: 0 8px 24px rgba(240, 180, 41, 0.2); }
html.dark .post-card[data-category="hardware"]:hover { box-shadow: 0 8px 24px rgba(43, 191, 138, 0.2); }
html.dark .post-card[data-category="software"]:hover { box-shadow: 0 8px 24px rgba(77, 171, 245, 0.2); }
html.dark .post-card[data-category="gaming"]:hover { box-shadow: 0 8px 24px rgba(240, 157, 74, 0.2); }
html.dark .post-card[data-category="security"]:hover { box-shadow: 0 8px 24px rgba(239, 83, 80, 0.2); }
html.dark .post-card[data-category="science"]:hover { box-shadow: 0 8px 24px rgba(61, 199, 181, 0.2); }

.post-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image — rounded only on top */
.post-card-image-wrap {
    overflow: hidden;
    width: 100%;
}

.post-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

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

/* Placeholder */
.post-card-image-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
}

.cat-bg-ai { background: linear-gradient(135deg, #1a3a8f, #3B82F6); }
.cat-bg-business { background: linear-gradient(135deg, #A16207, #F59E0B); }
.cat-bg-hardware { background: linear-gradient(135deg, #065F46, #10B981); }
.cat-bg-software { background: linear-gradient(135deg, #0369A1, #38BDF8); }
.cat-bg-gaming { background: linear-gradient(135deg, #B45309, #FB923C); }
.cat-bg-security { background: linear-gradient(135deg, #991B1B, #F87171); }
.cat-bg-science { background: linear-gradient(135deg, #115E59, #2DD4BF); }

.post-card.no-image .post-card-image-wrap { display: none; }
.post-card.no-image .post-card-ribbon { display: none; }

/* ============================================
   CATEGORY RIBBON — between image and text
   ============================================ */
.post-card-ribbon {
    padding: 7px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    background: var(--color-border);
}

.ribbon-ai { background: var(--cat-ai); }
.ribbon-business { background: var(--cat-business); }
.ribbon-hardware { background: var(--cat-hardware); }
.ribbon-software { background: var(--cat-software); }
.ribbon-gaming { background: var(--cat-gaming); }
.ribbon-security { background: var(--cat-security); }
.ribbon-science { background: var(--cat-science); }

/* Card content */
.post-card-content {
    display: flex;
    flex-direction: column;
    padding: 14px 16px 18px;
    flex: 1;
    gap: 6px;
}

.tag-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Tag dot + text colors */
.cat-ai .tag-dot { background: var(--cat-ai); }
.cat-business .tag-dot { background: var(--cat-business); }
.cat-hardware .tag-dot { background: var(--cat-hardware); }
.cat-software .tag-dot { background: var(--cat-software); }
.cat-gaming .tag-dot { background: var(--cat-gaming); }
.cat-security .tag-dot { background: var(--cat-security); }
.cat-science .tag-dot { background: var(--cat-science); }

.cat-ai { color: var(--cat-ai); }
.cat-business { color: var(--cat-business); }
.cat-hardware { color: var(--cat-hardware); }
.cat-software { color: var(--cat-software); }
.cat-gaming { color: var(--cat-gaming); }
.cat-security { color: var(--cat-security); }
.cat-science { color: var(--cat-science); }

.post-card-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

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

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}

.post-card-time {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

/* ============================================
   NEWSLETTER CTA
   ============================================ */
.newsletter-cta {
    grid-column: 1 / -1;
    background: var(--cta-bg);
    border-radius: var(--radius);
    padding: 32px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 4px 0;
}

.newsletter-cta-text h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cta-text);
    margin-bottom: 4px;
}

.newsletter-cta-text p {
    font-size: 0.85rem;
    color: var(--nav-text);
    opacity: 0.7;
}

.btn-cta {
    padding: 12px 28px;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--color-accent);
    color: #fff;
    border-radius: var(--radius);
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}
.btn-cta:hover { opacity: 0.9; }

/* Legacy newsletter section (post pages) */
.newsletter-section {
    grid-column: 1 / -1;
    background: var(--color-newsletter-bg);
    border-radius: var(--radius);
    padding: 40px;
    margin: 8px 0;
}

.newsletter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.newsletter-title {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.newsletter-desc {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

.btn-newsletter {
    display: inline-block;
    padding: 14px 28px;
    font-size: 0.875rem;
    font-weight: 700;
    background: var(--color-subscribe);
    color: #fff;
    border-radius: var(--radius);
    white-space: nowrap;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.btn-newsletter:hover { background: var(--color-subscribe-hover); }

/* ============================================
   TAG PAGE
   ============================================ */
.tag-header {
    position: relative;
    margin-bottom: 32px;
    padding: 32px 0;
    border-bottom: 1px solid var(--color-border);
}

.tag-header-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tag-header-desc {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-top: 6px;
}

.tag-header-count {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-top: 8px;
    display: inline-block;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 48px 0 16px;
    font-size: 0.875rem;
}

.pagination a {
    font-weight: 600;
    color: var(--color-accent);
    transition: opacity 0.2s;
}
.pagination a:hover { opacity: 0.7; }

.pagination-info { color: var(--color-text-muted); }

/* ============================================
   SINGLE POST
   ============================================ */
.post-full {
    max-width: var(--max-width-post);
    margin: 0 auto;
}

.post-full-header { margin-bottom: 32px; }

.post-full-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.post-full-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-secondary);
}

.post-full-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.post-full-excerpt {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-top: 12px;
    line-height: 1.5;
}

.post-full-image {
    margin-bottom: 32px;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-full-image img { width: 100%; }

.post-full-image figcaption {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-align: center;
    padding: 10px 0;
}

/* Post content */
.post-full-content {
    font-size: 1.0625rem;
    line-height: 1.75;
}

.post-full-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 40px 0 16px;
    letter-spacing: -0.01em;
}

.post-full-content h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 32px 0 12px;
}

.post-full-content p { margin-bottom: 20px; }

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

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

.post-full-content pre {
    background: var(--color-newsletter-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
    font-size: 0.875rem;
}

.post-full-content img {
    border-radius: var(--radius);
    margin: 24px 0;
}

.post-full-content ul, .post-full-content ol {
    margin: 16px 0 20px 24px;
}

.post-full-content li { margin-bottom: 8px; }

/* Ghost bookmark card */
.post-full-content .kg-bookmark-card {
    background: var(--color-newsletter-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 24px 0;
    transition: box-shadow 0.2s ease;
}
.post-full-content .kg-bookmark-card:hover { box-shadow: 0 4px 12px var(--color-shadow-hover); }

.post-full-content .kg-bookmark-container {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.post-full-content .kg-bookmark-content { flex: 1; padding: 20px; }
.post-full-content .kg-bookmark-title { font-size: 0.9375rem; font-weight: 700; line-height: 1.4; }

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

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

.post-full-content .kg-bookmark-icon { width: 16px; height: 16px; border-radius: 2px; }

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

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

/* Ghost width classes */
.post-full-content .kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin-left: calc(50% - 42.5vw);
    margin-right: calc(50% - 42.5vw);
}

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

.post-full-content .kg-width-full img { border-radius: 0; }

/* Ghost cards */
.post-full-content .kg-image-card { margin: 24px 0; }
.post-full-content .kg-image-card img { margin: 0 auto; }

.post-full-content .kg-image-card figcaption,
.post-full-content .kg-embed-card figcaption,
.post-full-content .kg-gallery-card figcaption {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-align: center;
    padding: 10px 0 0;
}

.post-full-content .kg-gallery-card { margin: 24px 0; }
.post-full-content .kg-gallery-container { display: flex; flex-direction: column; gap: 4px; }
.post-full-content .kg-gallery-row { display: flex; gap: 4px; }
.post-full-content .kg-gallery-image img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 2px; }

.post-full-content .kg-video-card { margin: 24px 0; }

.post-full-content .kg-callout-card {
    display: flex; gap: 12px; padding: 20px;
    border-radius: var(--radius); margin: 24px 0;
    background: var(--color-newsletter-bg);
    border: 1px solid var(--color-border);
}

.post-full-content .kg-toggle-card {
    margin: 24px 0; padding: 20px;
    background: var(--color-newsletter-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.post-full-content .kg-button-card { margin: 24px 0; text-align: center; }

.post-full-content .kg-button-card a {
    display: inline-block; padding: 12px 28px;
    font-weight: 700; font-size: 0.9375rem;
    background: var(--color-accent); color: #fff;
    border-radius: var(--radius); text-decoration: none;
}

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

/* Responsive video embeds (YouTube, Vimeo, etc.) */
.post-full-content .kg-embed-card > div,
.post-full-content .kg-embed-card > figure {
    position: relative;
    width: 100%;
}

.post-full-content .kg-embed-card iframe[src*="youtube"],
.post-full-content .kg-embed-card iframe[src*="youtu.be"],
.post-full-content .kg-embed-card iframe[src*="vimeo"] {
    aspect-ratio: 16 / 9;
    height: auto;
}

/* Fallback: if iframe has no recognizable src, still give it a reasonable size */
.post-full-content .kg-embed-card iframe:not([height]) {
    aspect-ratio: 16 / 9;
    height: auto;
}

/* Focus label */
.focus-post-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-newsletter-bg);
    border: 1px solid var(--color-border);
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin: 32px 0;
}
.focus-post-label span { font-weight: 700; color: var(--color-accent); }

/* Post footer */
.post-full-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

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

.post-tag-chip {
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--color-newsletter-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text-secondary);
    transition: all 0.2s ease;
}
.post-tag-chip:hover { background: var(--color-border); color: var(--color-text); }

/* Prev/Next */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.post-nav-item {
    display: flex; flex-direction: column; gap: 6px;
    padding: 20px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}
.post-nav-item:hover { box-shadow: 0 4px 12px var(--color-shadow); }

.post-nav-next { text-align: right; }

.post-nav-label {
    font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.post-nav-title {
    font-family: var(--font-heading);
    font-size: 0.9375rem; font-weight: 600; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* Author */
.post-full-author { color: var(--color-text-secondary); }
.author-header { display: flex; flex-direction: column; align-items: center; text-align: center; }
.author-avatar {
    width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
    margin-bottom: 12px; border: 3px solid var(--color-border);
}

/* Comments */
.post-comments {
    max-width: 760px; margin: 48px auto 0;
    padding-top: 32px; border-top: 1px solid var(--color-border);
}

/* ============================================
   RELATED POSTS
   ============================================ */
.related-posts {
    max-width: 760px; margin: 48px auto 0;
    padding-top: 32px; border-top: 1px solid var(--color-border);
}

.related-posts-title {
    font-family: var(--font-heading);
    font-size: 1.125rem; font-weight: 700; margin-bottom: 20px;
}

.related-posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.related-post-card {
    display: flex; flex-direction: column; gap: 10px;
    background: var(--color-bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    padding-bottom: 12px;
    transition: all 0.2s ease;
}
.related-post-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px var(--color-shadow-hover); }

.related-post-image {
    width: 100%; aspect-ratio: 16/10; object-fit: cover;
}
.related-post-placeholder { }

.related-post-title {
    font-family: var(--font-heading);
    font-size: 0.875rem; font-weight: 700; line-height: 1.35;
    padding: 0 12px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    transition: color 0.2s ease;
}
.related-post-card:hover .related-post-title { color: var(--color-accent); }

.related-post-time { font-size: 0.75rem; color: var(--color-text-muted); padding: 0 12px; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 48px 24px;
    margin-top: 32px;
}

.footer-inner { max-width: var(--max-width); margin: 0 auto; text-align: center; }

.footer-logo {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 1.125rem; font-weight: 800; margin-bottom: 4px;
}

.footer-tagline { font-size: 0.875rem; color: var(--color-text-muted); margin-bottom: 20px; }

.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 24px; font-size: 0.8125rem; }
.footer-links a { color: var(--color-text-secondary); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--color-text); }
.footer-links ul { display: flex; justify-content: center; gap: 24px; list-style: none; }

.footer-bottom { font-size: 0.8125rem; color: var(--color-text-muted); }
.footer-bottom p { margin-bottom: 4px; }
.footer-copy a { color: var(--color-accent); }

/* ============================================
   UTILITIES
   ============================================ */
.reading-progress {
    position: fixed; top: 0; left: 0;
    width: 0%; height: 3px;
    background: var(--color-accent);
    z-index: 200; transition: width 0.1s linear;
}

.back-to-top {
    position: fixed; bottom: 32px; right: 32px;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    box-shadow: 0 2px 8px var(--color-shadow);
    color: var(--color-text-secondary);
    cursor: pointer;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease; z-index: 50;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { color: var(--color-text); box-shadow: 0 4px 16px var(--color-shadow-hover); transform: translateY(-2px); }

/* Smooth transitions */
.post-card, .featured-card, .site-header, .site-footer, .newsletter-section, .newsletter-cta,
.post-nav-item, .post-tag-chip, .post-full-content pre,
.post-full-content .kg-bookmark-card {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .post-feed { grid-template-columns: repeat(2, 1fr); }
    .featured-row { grid-template-columns: 1fr; }
    .featured-card-link { flex-direction: column; height: auto; }
    .featured-img-wrap { width: 100%; }
    .featured-img-wrap img { height: 200px; }
    .newsletter-cta { flex-direction: column; text-align: center; }
}

@media (max-width: 640px) {
    :root {
        --gap-card: 14px;
        --header-height: 50px;
    }

    .post-feed { grid-template-columns: 1fr 1fr; }

    .nav-bar { display: none; }
    .hamburger { display: flex; }

    .header-inner { padding: 10px 16px; justify-content: space-between; }

    .site-logo { min-width: 0; overflow: hidden; }
    .site-logo-img { max-height: 36px; max-width: 160px; object-fit: contain; }

    .site-main { padding: 20px 16px 48px; }

    .featured-body { padding: 20px; }
    .featured-title { font-size: 1.2rem; }

    .post-full-title { font-size: 1.625rem; }
    .post-full-meta { flex-wrap: wrap; gap: 8px; }

    .newsletter-section { padding: 28px 20px; }
    .newsletter-inner { flex-direction: column; text-align: center; }

    .post-nav { grid-template-columns: 1fr; }
    .post-nav-next { text-align: left; }

    .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; }

    .post-full-content .kg-bookmark-container { flex-direction: column; }
    .post-full-content .kg-bookmark-thumbnail { width: 100%; height: 160px; }

    .related-posts-grid { grid-template-columns: 1fr; }
    .related-post-card { flex-direction: row; align-items: center; }
    .related-post-image { width: 80px; height: 60px; aspect-ratio: auto; flex-shrink: 0; }
}

@media (max-width: 400px) {
    .post-feed { grid-template-columns: 1fr; }
}
