/* ============================================
   CTN Ghost Theme - Consolidated CSS
   Changing the Narrative
   All styles merged: screen.css + theme-overrides.css + dark-mode-override.css
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&display=swap');

/* CSS Variables - Zenith Light Theme (Default) */
:root,
.color-scheme-Light {
    --gh-font-heading: 'Syne', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --gh-font-body: 'Syne', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --gh-font-secondary: 'Syne', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --color-primary: #1b1b1b;
    --color-primary-hover: #000000;
    --color-accent: #1b1b1b;
    --color-background: #ffffff;
    --color-background-alt: #f5f5f5;
    --color-text: #1b1b1b;
    --color-text-secondary: #767676;
    --color-text-tertiary: #a4a4a4;
    --color-border: #e5e5e5;
    --color-overlay: rgba(27, 27, 27, 0.75);
    --color-card-bg: #ffffff;
    --color-nav-bg: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 6px -1px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
    --scale: 1;
}

html.color-scheme-Dark {
    --gh-font-heading: 'Syne', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --gh-font-body: 'Syne', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --gh-font-secondary: 'Syne', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --color-primary: #ffffff;
    --color-primary-hover: #e5e5e5;
    --color-accent: #ffffff;
    --color-background: #1b1b1b;
    --color-background-alt: #2a2a2a;
    --color-text: #ffffff;
    --color-text-secondary: #a4a4a4;
    --color-text-tertiary: #767676;
    --color-border: #3a3a3a;
    --color-overlay: rgba(255, 255, 255, 0.1);
    --color-card-bg: #2a2a2a;
    --color-nav-bg: rgba(27, 27, 27, 0.95);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 40px -12px rgba(0, 0, 0, 0.7);
    --scale: 1;
}

/* ============================================
   Base Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

@media (min-width: 1920px) {
    :root {
        --scale: 0.8;
    }
}

body {
    font-family: var(--gh-font-body);
    font-weight: 400;
    line-height: 1.75;
    color: var(--color-text);
    background-color: var(--color-background);
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--gh-font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.03em;
}
h2 {
    font-size: 28px;
    letter-spacing: -0.2px;
}
h3 {
    font-size: 1.5rem;
    letter-spacing: -0.01em;
}
h4 {
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}
h5 {
    font-size: 1.125rem;
}
h6 {
    font-size: 1rem;
    font-weight: 600;
}

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

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

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

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 4vw;
}

/* ============================================
   Header & Navigation
   ============================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--color-nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.reading-progress {
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background-color: var(--color-primary);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 1000;
    transition: transform 0.1s ease;
    pointer-events: none;
    display: none;
}

/* Show progress bar only on post pages */
.post-template .reading-progress {
    display: block;
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    gap: 2rem;
}

.site-logo img {
    max-height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

.site-logo:hover img {
    transform: scale(1.05);
}

.site-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.03em;
}

.site-title a {
    color: var(--color-text);
    transition: color 0.2s ease;
}

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

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.site-nav > ul > li {
    position: relative;
    margin-bottom:-4px;
}

.site-nav a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.625rem 1rem;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-nav a:hover {
    color: var(--color-primary);
}

.site-nav .nav-current a {
    color: #ffffff;
}

.site-nav li.nav-has-children > a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
}

.site-nav li.nav-has-children:hover > a::after {
    transform: rotate(180deg);
}

.site-nav ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    flex-direction: column;
}

.site-nav li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-nav ul ul li {
    width: 100%;
}

.site-nav ul ul a {
    padding: 0.75rem 1.25rem;
    border-radius: 0;
}

.site-nav ul ul a:hover {
    background-color: var(--color-background-alt);
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .site-nav ul ul {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        transition: max-height 0.3s ease, opacity 0.2s ease;
    }

    .site-nav li.mobile-dropdown-active > ul {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
    }

    .site-nav li.mobile-dropdown-active > a::after {
        transform: rotate(180deg);
    }
}

/* Mobile Navigation Toggle */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: background-color 0.2s ease;
}

.menu-toggle:hover {
    background-color: var(--color-background-alt);
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background-color: var(--color-text);
    border-radius: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 768px) {
    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-nav-bg);
        border-bottom: 1px solid var(--color-border);
        padding: 1rem;
        display: none;
        box-shadow: var(--shadow-lg);
    }

    .site-nav.active {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 0.25rem;
    }

    .menu-toggle {
        display: flex;
    }
}

/* ============================================
   Featured Slider
   ============================================ */

.featured-slider {
    margin: 3rem 0 4rem;
    position: relative;
    padding-top: 0.5rem;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
}

.slider-nav:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.slider-nav svg {
    width: 24px;
    height: 24px;
}

.slider-prev {
    left: -24px;
}

.slider-next {
    right: -24px;
}

@media (max-width: 1024px) {
    .slider-prev {
        left: 0.5rem;
    }

    .slider-next {
        right: 0.5rem;
    }
}

@media (max-width: 640px) {
    .slider-nav {
        width: 40px;
        height: 40px;
    }

    .slider-nav svg {
        width: 20px;
        height: 20px;
    }
}

.featured-slider-inner {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 1rem;
}

.featured-slider-inner::-webkit-scrollbar {
    display: none;
}

.featured-post {
    flex: 0 0 calc(50% - 0.75rem);
    scroll-snap-align: start;
    position: relative;
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-post:hover {
    transform: translateY(-4px);
}

.featured-image {
    position: absolute;
    inset: 0;
}

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

.featured-post:hover .featured-image img {
    transform: scale(1.05);
}

.featured-content {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: #ffffff;
}

.featured-tag {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--color-primary);
    padding: 0.375rem 0.75rem;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.featured-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
    line-height: 1.2;
}

.featured-excerpt {
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

@media (max-width: 1024px) {
    .featured-post {
        flex: 0 0 calc(60% - 0.75rem);
    }
}

@media (max-width: 768px) {
    .featured-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 640px) {
    .featured-post {
        flex: 0 0 85%;
    }

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

    .featured-excerpt {
        display: none;
    }
}

/* ============================================
   Tags Slider
   ============================================ */

.tags-slider-section {
    padding: 3rem 0;
    background-color: var(--color-background-alt);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.tags-slider-wrapper {
    position: relative;
    margin-top: 2rem;
}

.tags-slider {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem 0 1rem;
    cursor: grab;
}

.tags-slider:active {
    cursor: grabbing;
}

.tags-slider::-webkit-scrollbar {
    display: none;
}

.tag-slide {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    overflow: hidden;
    position: relative;
}

.tag-slide:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.tag-slide-image {
    width: 100%;
    height: 200px;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.tag-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tag-slide:hover .tag-slide-image img {
    transform: scale(1.05);
}

.tag-slide-icon {
    width: 100%;
    height: 200px;
    background-color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tag-slide-icon svg {
    width: 48px;
    height: 48px;
    stroke: #ffffff;
}

.tag-slide-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tag-slide-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--color-text);
}

.tag-slide-count {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.tags-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
}

.tags-slider-arrow:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}

.tags-slider-arrow:hover svg {
    stroke: #ffffff;
}

.tags-slider-arrow svg {
    width: 20px;
    height: 20px;
}

.tags-slider-prev {
    left: -20px;
}

.tags-slider-next {
    right: -20px;
}

@media (max-width: 1024px) {
    .tags-slider-prev {
        left: 0.5rem;
    }

    .tags-slider-next {
        right: 0.5rem;
    }
}

@media (max-width: 640px) {
    .tag-slide {
        flex: 0 0 240px;
    }

    .tags-slider-arrow {
        display: none;
    }
}

/* ============================================
   Posts Grid
   ============================================ */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.post-card {
    background-color: var(--color-card-bg);
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--color-border);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-text-secondary);
}

.post-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--color-background-alt) 0%, var(--color-border) 100%);
}

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

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

/* Internal Tag Images in Post Meta */
.post-tags-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    float: left;
    margin-right: 0.75rem;
}

.tag-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-background);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.tag-avatar:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .tag-avatar {
        width: 28px;
        height: 28px;
    }
}

.post-card-content {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-tag {
    display: inline-block;
    background-color: var(--color-background-alt);
    color: var(--color-text);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.75rem;
    border-radius: 0;
    transition: all 0.2s ease;
}

.post-tag:hover {
    background-color: var(--color-primary);
    color: var(--color-background);
}

.post-card-title {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

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

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

.post-card-excerpt {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

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

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.reading-time::before {
    content: "•";
    margin: 0 0.5rem;
}

@media (max-width: 640px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ============================================
   Large Display Scaling (1920px+)
   ============================================ */

@media (min-width: 1920px) {
    html {
        font-size: 18px;
    }

    .container {
        max-width: 1400px;
    }

    .site-header .container {
        max-width: 1600px;
    }

    .post-content .container,
    .page-content .container {
        max-width: 1400px;
    }

    .posts-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .featured-slider-inner {
        max-width: 1600px;
    }
}

@media (min-width: 2560px) {
    html {
        font-size: 20px;
    }

    .container {
        max-width: 1600px;
    }

    .site-header .container {
        max-width: 1800px;
    }

    .post-content .container,
    .page-content .container {
        max-width: 1600px;
    }

    .posts-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ============================================
   Single Post/Page Styles
   ============================================ */

.post,
.page {
    margin-bottom: 4rem;
}

.post-header {
    margin-bottom: 3rem;
}

.post-header .container {
    max-width: 800px;
}

.post-header.header-style-Wide .container,
.page-header.header-style-Wide .container {
    max-width: 100%;
}

.post-tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background-color: var(--color-primary);
    color: #ffffff;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
}

.post-tag:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
}

.post-title,
.page-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
    margin-bottom: 1rem;
    text-align: left;
}

.page-template .page-title {
    text-align: center;
}

.post-excerpt {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: left;
}

.post-author-byline {
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-secondary);
}

.post-author-byline .author-by {
    color: var(--color-text-secondary);
}

.post-author-byline .author-name-link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.post-author-byline .author-name-link:hover {
    color: var(--color-primary);
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.post-publish-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
}

.post-publish-date span {
    color: var(--color-text-secondary);
}

.post-publish-date time {
    color: var(--color-text);
    font-weight: 500;
}

.post-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
}

.post-feature-image,
.page-feature-image {
    margin: 0;
    border-radius: 0;
    overflow: hidden;
}

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

.post-feature-image figcaption,
.page-feature-image figcaption {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin-top: 1rem;
    font-style: italic;
}

.post-content,
.page-content {
    margin-bottom: 3rem;
}

.post-content .container,
.page-content .container {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 300px 1fr 80px;
    gap: 3rem;
    position: relative;
}

/* When no TOC, center the content with share sidebar */
.post-content .container.no-toc,
.page-content .container.no-toc {
    grid-template-columns: 1fr 80px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    gap: 2rem;
}

.post-content-body,
.page-content-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text);
    max-width: 100%;
    margin: 0 auto;
    min-height: 200px;
    padding-top: 50px;
}

.post-content-body > *,
.page-content-body > * {
    margin-bottom: 1.5rem;
}

.post-content-body h2,
.page-content-body h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    line-height: 1.3;
}

.post-content-body h3,
.page-content-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.post-content-body h4,
.page-content-body h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.post-content-body a,
.page-content-body a {
    color: var(--color-primary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.post-content-body a:hover,
.page-content-body a:hover {
    color: var(--color-primary-hover);
}

.post-content-body ul,
.page-content-body ul,
.post-content-body ol,
.page-content-body ol {
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.post-content-body li,
.page-content-body li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.post-content-body img,
.page-content-body img {
    max-width: 120%;
    height: auto;
    border-radius: 0;
    margin: 2rem -10%;
    display: block;
}

.post-content-body figure,
.page-content-body figure {
    margin: 2rem -10%;
    max-width: 120%;
}

.post-content-body figure img,
.page-content-body figure img {
    max-width: 100%;
    margin: 0 auto;
}

.post-content-body figcaption,
.page-content-body figcaption {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin-top: 0.75rem;
    font-style: italic;
}

.post-footer {
    padding-top: 3rem;
    margin-top: 3rem;
}

.share-buttons {
    margin-bottom: 3rem;
}

.share-buttons h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.share-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text);
    text-decoration: none;
    background: var(--color-background);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.share-link:hover {
    border-color: var(--color-primary);
    background-color: var(--color-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.share-link svg {
    width: 20px;
    height: 20px;
}

/* Copied tooltip for footer share buttons */
.share-link.share-copy.copied::after,
.share-link.share-discord.copied::after {
    content: 'Copied!';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1b1b1b;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 8px;
    animation: fadeInOut 2s ease-in-out;
}

/* Bookmark animation for footer */
.share-link.bookmark-post.bookmarked svg {
    fill: currentColor;
}

.share-link.bookmark-post.bookmarked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

/* Platform-specific colors for footer share buttons */
.share-link.share-linkedin:hover {
    background-color: #0A66C2;
    border-color: #0A66C2;
}

.share-link.share-bluesky:hover {
    background-color: #0085ff;
    border-color: #0085ff;
}

.share-link.share-reddit:hover {
    background-color: #FF4500;
    border-color: #FF4500;
}

.share-link.share-discord:hover {
    background-color: #5865F2;
    border-color: #5865F2;
}

.share-link.share-twitter:hover {
    background-color: #1DA1F2;
    border-color: #1DA1F2;
}

.share-link.share-facebook:hover {
    background-color: #1877F2;
    border-color: #1877F2;
}

.post-tags {
    margin-bottom: 3rem;
}

.post-tags h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.tag-list {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tag-item {
    padding: 0.5rem 1rem;
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 0;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.tag-item:hover {
    border-color: var(--color-primary);
    background-color: var(--color-primary);
    color: #ffffff;
}

.author-card {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 0;
    margin-bottom: 2rem;
}

.author-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info-full {
    flex: 1;
}

.author-info-full .author-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.author-bio {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.author-links {
    display: flex;
    gap: 1rem;
}

.author-link {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.author-link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.newsletter-cta {
    margin: 4rem 0;
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.newsletter-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    pointer-events: none;
}

.newsletter-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.newsletter-cta-content h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.newsletter-cta-content p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.newsletter-cta .button {
    flex-shrink: 0;
    background-color: #ffffff;
    color: var(--color-primary);
    border-color: #ffffff;
    font-weight: 700;
    padding: 0.875rem 2rem;
}

.newsletter-cta .button:hover {
    background-color: var(--color-background-alt);
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.sticky-share-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

.sticky-share-sidebar.visible {
    opacity: 1;
    visibility: visible;
}

.share-sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.share-sidebar-item {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: none !important;
    filter: none !important;
}

.share-sidebar-item svg {
    width: 22px;
    height: 22px;
}

.share-sidebar-item:hover {
    transform: translateY(-3px) scale(1.05);
}

.share-sidebar-item.share-twitter:hover {
    background-color: #1DA1F2;
    border-color: #1DA1F2;
    color: #ffffff;
}

.share-sidebar-item.share-facebook:hover {
    background-color: #1877F2;
    border-color: #1877F2;
    color: #ffffff;
}

.share-sidebar-item.share-linkedin:hover {
    background-color: #0A66C2;
    border-color: #0A66C2;
    color: #ffffff;
}

.share-sidebar-item.share-copy:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

.share-sidebar-item.share-copy.copied,
.share-sidebar-item.share-discord.copied {
    background-color: #10b981;
    border-color: #10b981;
    color: #ffffff;
    position: relative;
}

.share-sidebar-item.share-copy.copied::after,
.share-sidebar-item.share-discord.copied::after {
    content: 'Copied!';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1b1b1b;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 8px;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(5px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    90% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-5px); }
}

.share-sidebar-item.bookmark-post:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

.share-sidebar-item.bookmark-post.bookmarked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

.share-sidebar-item.share-bluesky:hover {
    background-color: #1185fe;
    border-color: #1185fe;
    color: #ffffff;
}

.share-sidebar-item.share-reddit:hover {
    background-color: #ff4500;
    border-color: #ff4500;
    color: #ffffff;
}

.share-sidebar-item.share-discord:hover {
    background-color: #5865f2;
    border-color: #5865f2;
    color: #ffffff;
}

html.color-scheme-Dark .share-sidebar-item.share-copy:hover {
    background-color: #ffffff;
    border-color: #000000;
    color: #000000;
}

html.color-scheme-Dark .share-sidebar-item.share-copy.copied::after,
html.color-scheme-Dark .share-sidebar-item.share-discord.copied::after {
    background-color: #ffffff;
    color: #1b1b1b;
}

html.color-scheme-Dark .share-sidebar-item.share-discord:hover {
    background-color: #5865f2;
    border-color: #5865f2;
    color: #ffffff;
}

html.color-scheme-Dark .share-sidebar-item.bookmark-post:hover {
    background-color: #ffffff;
    border-color: #000000;
    color: #000000;
}

html.color-scheme-Dark .share-sidebar-item.bookmark-post.bookmarked {
    background-color: #ffffff;
    border-color: #000000;
    color: #000000;
}

@media (max-width: 1024px) {
    .post-content .container,
    .page-content .container {
        grid-template-columns: 1fr;
    }

    .table-of-contents {
        position: static;
        max-width: 100%;
        margin-bottom: 2rem;
    }

    .sticky-share-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .post-title,
    .page-title {
        font-size: 2rem;
    }

    .post-excerpt {
        font-size: 1.125rem;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .post-content-body,
    .page-content-body {
        font-size: 1rem;
        max-width: 85%;
    }

    .post-content-body img,
    .page-content-body img,
    .post-content-body figure,
    .page-content-body figure,
    .kg-bookmark-card {
        max-width: 90%;
    }

    .author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .share-links {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
        gap: 0.75rem;
        max-width: 100%;
        justify-items: center;
    }

    .share-link {
        justify-content: center;
        width: 48px;
        height: 48px;
    }

    .newsletter-cta {
        padding: 2rem 1.5rem;
    }

    .newsletter-cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-cta-content h3 {
        font-size: 1.5rem;
    }

    .newsletter-cta-content p {
        font-size: 1rem;
    }

    .newsletter-cta .button {
        width: 100%;
    }
}

.more-from-author {
    background-color: var(--color-background-alt);
    padding: 4rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--color-border);
}

.more-from-author .section-title {
    margin-bottom: 2.5rem;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    background-color: var(--color-background-alt);
    margin-top: 6rem;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--color-text);
}

.footer-section p {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-section nav {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-section nav a {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    padding: 0.25rem 0;
}

.footer-section nav a:hover {
    color: var(--color-primary);
    padding-left: 0.5rem;
}

.footer-section nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section nav li {
    position: relative;
}

.footer-section nav > ul > li {
    margin-bottom: 0.625rem;
}

.footer-section nav ul ul {
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.footer-section nav ul ul li {
    margin-bottom: 0.5rem;
}

.footer-section nav ul ul a {
    font-size: 0.875rem;
    opacity: 0.9;
}

.footer-section nav li.nav-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.5rem;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    vertical-align: middle;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 1.25rem;
}

.footer-logo img {
    max-height: 50px;
    width: auto;
    display: block;
}

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

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 0;
    color: var(--color-text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-links a:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.social-links svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
}

.footer-bottom-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-membership-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
}

.footer-membership .button {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1.5rem;
}

.footer-align-Centre .footer-content {
    text-align: center;
}

.footer-align-Centre .footer-section nav {
    align-items: center;
}

.footer-align-Centre .social-links {
    justify-content: center;
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section nav {
        align-items: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* ============================================
   Hero Section
   ============================================ */

.hero-section {
    padding: 6rem 0 5rem;
    text-align: center;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    position: relative;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 3rem;
    font-weight: 400;
}

.hero-subscribe-form {
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 0;
    padding: 2.5rem 2rem;
    margin-top: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.hero-subscribe-form h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hero-subscribe-form > p {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.hero-form-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.hero-form-input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: 0;
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: inherit;
    transition: all 0.2s ease;
}

.hero-form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}

.hero-form-message {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    min-height: 1.25rem;
}

.hero-form-message.success {
    color: #10b981;
}

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

.hero-form-note {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.hero-cta {
    margin-top: 3rem;
}

.button-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.hero-form.loading .button-text {
    display: none;
}

.hero-form.loading .button-loader {
    display: block;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 8px 18px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 0;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.button-primary {
    background-color: var(--color-primary);
    color: var(--color-background);
    box-shadow: var(--shadow-sm);
}

.button-primary:hover {
    background-color: var(--color-primary-hover);
    box-shadow: var(--shadow-md);
    color: var(--color-background);
}

.button-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    font-weight: 600;
}

.button-secondary:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-background);
}

.button-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

.button-small {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 0;
    }

    .hero-subscribe {
        padding: 2rem 1.5rem;
    }
}

/* ============================================
   Newsletter Section
   ============================================ */

.newsletter-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: #ffffff;
    padding: 3rem 0;
    margin: 3rem 0;
    border-radius: 0;
    text-align: center;
}

.newsletter-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.newsletter-content p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    color: #ffffff;
}

.newsletter-section .button-primary {
    background-color: #ffffff;
    color: var(--color-primary);
}

.newsletter-section .button-primary:hover {
    background-color: var(--color-background-alt);
    transform: translateY(-2px);
}

/* ============================================
   Load More Pagination
   ============================================ */

.load-more-container {
    display: flex;
    justify-content: center;
    margin: 4rem 0 2rem;
}

.more-posts-notice {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    font-style: italic;
    margin: 0;
}

.load-more-button {
    position: relative;
    min-width: 180px;
}

.load-more-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-background);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.load-more-button.loading .load-more-text {
    opacity: 0;
}

.load-more-button.loading .load-more-loader {
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.load-more-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.older-posts svg,
.newer-posts svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   Search Modal
   ============================================ */

.advanced-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.advanced-search-modal.active {
    opacity: 1;
    pointer-events: all;
}

.advanced-search-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 1rem auto 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #ffffff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all 0.2s ease;
    max-width: 300px;
    justify-content: center;
}

.advanced-search-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.advanced-search-trigger svg {
    width: 18px;
    height: 18px;
}

.search-modal-content {
    background-color: var(--color-card-bg);
    border-radius: 0;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-xl);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.advanced-search-modal.active .search-modal-content {
    transform: translateY(0);
}

.api-key-setup {
    background: var(--color-background-alt);
    padding: 1.5rem;
    border-radius: 0;
    margin-bottom: 1.5rem;
    border: 2px solid var(--color-border);
}

.api-key-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.875rem;
}

.api-key-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.api-key-input {
    flex: 1;
    padding: 0.625rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: monospace;
    font-size: 0.875rem;
}

.api-key-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.api-key-save {
    padding: 0.625rem 1.25rem;
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.api-key-save:hover {
    background: var(--color-primary-dark);
}

.api-key-toggle-visibility {
    padding: 0.5rem;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.api-key-toggle-visibility:hover {
    background: var(--color-background-alt);
    border-color: var(--color-primary);
}

.api-key-toggle-visibility svg {
    width: 18px;
    height: 18px;
    color: var(--color-text-secondary);
}

.api-key-help {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.api-key-status {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.search-modal-header {
    margin-bottom: 1.5rem;
}

.search-modal-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: var(--color-text);
}

.search-modal-header p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.search-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: all 0.2s ease;
}

.search-close:hover {
    background-color: var(--color-background-alt);
    color: var(--color-text);
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.25rem;
    border: 2px solid var(--color-border);
    border-radius: 0;
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.search-input::placeholder {
    color: var(--color-text-secondary);
}

.search-results {
    margin-top: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.search-results-info {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-result-item {
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    border-color: var(--color-primary);
    background-color: var(--color-background-alt);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.search-result-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.search-result-excerpt {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.search-result-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.search-result-tag {
    color: var(--color-primary);
}

.search-loading {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-secondary);
}

.search-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-secondary);
}

.search-no-results svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    opacity: 0.3;
}

.search-error {
    text-align: center;
    padding: 2rem 1rem;
    color: #ef4444;
    font-size: 0.875rem;
}

.search-buttons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.search-toggle,
.advanced-search-button {
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: all 0.2s ease;
}

.search-toggle:hover,
.advanced-search-button:hover {
    background-color: var(--color-background-alt);
    color: var(--color-primary);
}

.search-toggle svg,
.advanced-search-button svg {
    width: 20px;
    height: 20px;
}

.advanced-search-button {
    position: relative;
}

.advanced-search-button::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
}

.reading-list-link {
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.reading-list-link:hover {
    background-color: var(--color-background-alt);
    color: var(--color-primary);
}

.reading-list-link svg {
    width: 20px;
    height: 20px;
}

.reading-list-link .bookmark-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ============================================
   Theme Toggle (Dark Mode)
   ============================================ */

.theme-toggle {
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: all 0.2s ease;
    position: relative;
}

.theme-toggle:hover {
    background-color: var(--color-background-alt);
    color: var(--color-primary);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.theme-toggle-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
    color: var(--color-text);
}

.theme-option:hover {
    background-color: var(--color-background-alt);
}

.theme-option.active {
    background-color: var(--color-primary);
    color: #ffffff;
}

.theme-option-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-option-icon svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   Post Enhancements
   ============================================ */

.post-card-footer {
    padding-top: 1rem;
    margin-top: auto;
}

.post-card-footer .button {
    width: 100%;
}

/* Reading progress bar styles moved to .site-header .reading-progress above */

.post-date-reading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   Table of Contents
   ============================================ */

.table-of-contents {
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 0;
    padding: 2rem;
    margin: 3rem 0;
    position: sticky;
    top: 100px;
}

.table-of-contents h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc-counter;
}

.toc-item {
    margin-bottom: 0.75rem;
    counter-increment: toc-counter;
}

.toc-item::before {
    content: counter(toc-counter) ". ";
    color: var(--color-text-secondary);
    font-weight: 600;
}

.toc-h3 {
    margin-left: 1.5rem;
}

.toc-h4 {
    margin-left: 3rem;
}

.toc-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9375rem;
    line-height: 1.6;
    display: inline-block;
}

.toc-link:hover {
    color: var(--color-primary);
}

.toc-link.active {
    color: var(--color-primary);
    font-weight: 600;
}

@media (max-width: 1200px) {
    .table-of-contents {
        position: relative;
        top: 0;
    }
}

/* ============================================
   Breadcrumbs
   ============================================ */

.breadcrumbs {
    padding: 1.5rem 0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9375rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--color-primary);
}

.breadcrumb-item.active {
    color: var(--color-text);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--color-text-secondary);
    user-select: none;
}

.breadcrumb-separator svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 640px) {
    .breadcrumbs {
        padding: 1rem 0;
    }

    .breadcrumb-list {
        font-size: 0.875rem;
    }
}

/* ============================================
   Koenig Editor Styles - Required Classes
   ============================================ */

.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin: auto calc(50% - 50vw);
    transform: translateX(calc(50vw - 50%));
}

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

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

.kg-image-card,
.kg-gallery-card {
    margin: 2rem 0;
}

.kg-image {
    border-radius: 0;
}

figcaption {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin-top: 0.75rem;
    font-style: italic;
}

/* ============================================
   Koenig Cards - Bookmark Card
   ============================================ */

.kg-bookmark-card {
    max-width: 120%;
    margin: 2rem -10%;
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none;
    border: 1px solid var(--color-border);
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kg-bookmark-container:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.kg-bookmark-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.kg-bookmark-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.kg-bookmark-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.kg-bookmark-icon {
    width: 20px;
    height: 20px;
    border-radius: 0;
}

.kg-bookmark-author::after {
    content: "•";
    margin: 0 0.5rem;
}

.kg-bookmark-publisher {
    font-weight: 500;
}

.kg-bookmark-thumbnail {
    min-width: 200px;
    max-width: 200px;
}

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

@media (max-width: 768px) {
    .kg-bookmark-container {
        flex-direction: column;
    }

    .kg-bookmark-thumbnail {
        min-width: 100%;
        max-width: 100%;
        aspect-ratio: 16 / 9;
    }

    .hero-section {
        padding: 4rem 0 3rem;
    }

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

    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-subscribe-form {
        padding: 2rem 1.5rem;
    }

    .hero-subscribe-form h3 {
        font-size: 1.5rem;
    }

    .hero-subscribe-form > p {
        font-size: 1rem;
    }

    .hero-form-group {
        flex-direction: column;
    }

    .hero-form-input {
        min-width: 100%;
    }
}

/* ============================================
   Koenig Cards - Button Card
   ============================================ */

.kg-button-card {
    margin: 2rem 0;
    text-align: center;
}

.kg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.0625rem;
    font-weight: 600;
    border-radius: 0;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.kg-btn-accent {
    background-color: var(--color-primary);
    color: #ffffff;
}

.kg-btn-accent:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: #ffffff;
}

/* ============================================
   Koenig Cards - Callout Card
   ============================================ */

.kg-callout-card {
    display: flex;
    padding: 1.5rem;
    border-radius: 0;
    margin: 2rem 0;
    border-left: 4px solid var(--color-primary);
    background-color: var(--color-background-alt);
}

.kg-callout-card-grey {
    border-left-color: var(--color-text-secondary);
}

.kg-callout-card-white {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
}

.kg-callout-card-blue {
    border-left-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.kg-callout-card-green {
    border-left-color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
}

.kg-callout-card-yellow {
    border-left-color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.1);
}

.kg-callout-card-red {
    border-left-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.kg-callout-card-pink {
    border-left-color: #ec4899;
    background-color: rgba(236, 72, 153, 0.1);
}

.kg-callout-card-purple {
    border-left-color: #8b5cf6;
    background-color: rgba(139, 92, 246, 0.1);
}

.kg-callout-card-accent {
    border-left-color: var(--color-primary);
}

.kg-callout-emoji {
    font-size: 1.75rem;
    line-height: 1;
    margin-right: 1rem;
    flex-shrink: 0;
}

.kg-callout-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
}

/* ============================================
   Koenig Cards - Toggle Card
   ============================================ */

.kg-toggle-card {
    margin: 2rem 0;
    border: 1px solid var(--color-border);
    border-radius: 0;
    overflow: hidden;
    background-color: var(--color-card-bg);
}

.kg-toggle-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}

.kg-toggle-heading:hover {
    background-color: var(--color-background-alt);
}

.kg-toggle-heading-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.kg-toggle-card-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    color: var(--color-text-secondary);
}

.kg-toggle-card[open] .kg-toggle-card-icon {
    transform: rotate(180deg);
}

.kg-toggle-content {
    padding: 0 1.5rem 1.5rem;
    color: var(--color-text);
    line-height: 1.7;
}

/* ============================================
   Koenig Cards - Product Card
   ============================================ */

.kg-product-card {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 2rem;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid var(--color-border);
    border-radius: 0;
    background-color: var(--color-card-bg);
    align-items: start;
}

.kg-product-card-image {
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 1;
}

.kg-product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-product-card-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.kg-product-card-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #f59e0b;
}

.kg-product-card-rating-star {
    width: 18px;
    height: 18px;
}

.kg-product-card-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.kg-product-card-button {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 1.75rem;
    background-color: var(--color-primary);
    color: #ffffff;
    border-radius: 0;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.kg-product-card-button:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: #ffffff;
}

@media (max-width: 768px) {
    .kg-product-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

/* ============================================
   Koenig Cards - File, Audio, Video
   ============================================ */

.kg-file-card,
.kg-audio-card,
.kg-video-card {
    margin: 2rem 0;
}

.kg-file-card-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    background-color: var(--color-card-bg);
    transition: all 0.2s ease;
}

.kg-file-card-container:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.kg-file-card-contents {
    flex: 1;
}

.kg-file-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.kg-file-card-caption {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

.kg-file-card-metadata {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.kg-file-card-filename,
.kg-file-card-filesize {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.kg-audio-player,
.kg-video-player {
    width: 100%;
    border-radius: 0;
    overflow: hidden;
}

.kg-audio-player audio,
.kg-video-player video {
    width: 100%;
    display: block;
}

/* ============================================
   Koenig Cards - Gallery
   ============================================ */

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 2rem 0;
}

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

.kg-gallery-image {
    flex: 1;
    overflow: hidden;
    border-radius: 0;
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.kg-gallery-image:hover img {
    transform: scale(1.05);
}

/* ============================================
   Koenig Cards - Embed Cards
   ============================================ */

.kg-embed-card {
    margin: 2rem 0;
}

.kg-embed-card iframe,
.kg-embed-card video {
    width: 100%;
    border-radius: 0;
    border: 1px solid var(--color-border);
}

.kg-embed-card .fluid-width-video-wrapper {
    border-radius: 0;
    overflow: hidden;
}

/* ============================================
   Content Typography Enhancements
   ============================================ */


.post-content-body blockquote,
.page-content-body blockquote {
    position: relative;
    padding: 1.5rem 1.5rem 1.5rem 2.5rem;
    margin: 2rem 0;
    border-left: 4px solid var(--color-primary);
    background-color: var(--color-background-alt);
    border-radius: 0;
    font-style: italic;
}

.post-content-body blockquote::before,
.page-content-body blockquote::before {
    content: '"';
    position: absolute;
    top: 0.5rem;
    left: 0.75rem;
    font-size: 3rem;
    color: var(--color-primary);
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

.post-content-body pre,
.page-content-body pre {
    border-radius: 0;
    padding: 0;
    margin: 2rem 0;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.post-content-body pre[class*="language-"],
.page-content-body pre[class*="language-"] {
    margin: 2rem 0;
    padding: 1.5rem;
    overflow-x: auto;
}

.post-content-body code,
.page-content-body code {
    background-color: var(--color-background-alt);
    padding: 0.25rem 0.5rem;
    border-radius: 0;
    font-size: 0.9em;
    font-family: 'Monaco', 'Courier New', 'Consolas', monospace;
    color: var(--color-primary);
}

.post-content-body pre code,
.page-content-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

html.color-scheme-Dark pre[class*="language-"] {
    background-color: #1e293b !important;
}

.post-content-body table,
.page-content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border-radius: 0;
    overflow: hidden;
}

.post-content-body th,
.page-content-body th {
    background-color: var(--color-primary);
    color: #ffffff;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.post-content-body td,
.page-content-body td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.post-content-body tr:last-child td,
.page-content-body tr:last-child td {
    border-bottom: none;
}

.post-content-body tr:nth-child(even),
.page-content-body tr:nth-child(even) {
    background-color: var(--color-background-alt);
}

.post-content-body hr,
.page-content-body hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-border), transparent);
    margin: 3rem 0;
}

/* ============================================
   Pull Quotes & Advanced Typography
   ============================================ */

.pullquote,
.kg-blockquote-alt {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.4;
    font-style: italic;
    color: var(--color-text);
    margin: 3rem 0;
    padding: 2rem 0;
    position: relative;
    text-align: center;
    border-top: 3px solid var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
}

.pullquote::before,
.kg-blockquote-alt::before {
    content: '"';
    position: absolute;
    top: -1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 6rem;
    color: var(--color-primary);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.pullquote cite,
.kg-blockquote-alt cite {
    display: block;
    margin-top: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    font-style: normal;
    color: var(--color-text-secondary);
}

.pullquote cite::before,
.kg-blockquote-alt cite::before {
    content: "— ";
}

.lead-paragraph {
    font-size: 1.375rem;
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: 2rem;
    font-weight: 400;
}

.highlight-text {
    background: linear-gradient(180deg, transparent 50%, rgba(var(--color-primary-rgb), 0.2) 50%);
    padding: 0 0.25em;
}

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.scroll-to-top svg {
    width: 1.5rem;
    height: 1.5rem;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    .scroll-to-top svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

.post-series-nav {
    background: linear-gradient(135deg, var(--color-background-alt), var(--color-card-bg));
    border: 1px solid var(--color-border);
    border-radius: 0;
    padding: 2rem;
    margin: 3rem 0;
}

.series-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.series-title svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--color-primary);
}

.series-posts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.series-post-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 0;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.2s ease;
}

.series-post-item:hover {
    border-color: var(--color-primary);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.series-post-item.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    border-color: var(--color-primary);
    color: #ffffff;
    font-weight: 600;
}

.series-post-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background-color: var(--color-primary);
    color: #ffffff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.series-post-item.active .series-post-number {
    background-color: #ffffff;
    color: var(--color-primary);
}

.series-post-title {
    flex: 1;
    font-weight: 500;
}

.series-post-badge {
    padding: 0.25rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.reading-time-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.reading-time-indicator svg {
    width: 1rem;
    height: 1rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.reading-time-indicator span {
    white-space: nowrap;
}

.reading-time-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--color-border);
    border-radius: 0;
    overflow: hidden;
}

.reading-time-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 0;
}

/* ============================================
   Next/Previous Post Navigation
   ============================================ */

.post-navigation {
    margin: 4rem 0 3rem;
    padding: 3rem 0;
    border-bottom: 1px solid var(--color-border);
}

.post-navigation-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.post-nav-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    background-color: var(--color-card-bg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.post-nav-item:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.post-nav-item:hover .post-nav-image img {
    transform: scale(1.05);
}

.post-nav-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
}

.post-nav-label svg {
    flex-shrink: 0;
}

.post-nav-prev .post-nav-label {
    justify-content: flex-start;
}

.post-nav-next .post-nav-label {
    justify-content: flex-end;
}

.post-nav-image {
    width: 100%;
    height: 120px;
    border-radius: 0;
    overflow: hidden;
    background-color: var(--color-background-alt);
}

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

.post-nav-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-nav-prev {
    text-align: left;
}

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

.post-nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    text-decoration: none;
    transition: all 0.2s ease;
}

.post-nav-link:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.post-nav-direction {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
}

.post-nav-link:hover .post-nav-direction {
    color: #ffffff;
}

.post-nav-direction svg {
    width: 16px;
    height: 16px;
}

.post-nav-next .post-nav-direction {
    flex-direction: row-reverse;
}

.post-nav-link .post-nav-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
}

.post-nav-link:hover .post-nav-title {
    color: #ffffff;
}

.post-navigation-inner > :only-child {
    grid-column: 1 / -1;
    max-width: 50%;
}

.post-navigation-inner > .post-nav-next:only-child {
    margin-left: auto;
}

@media (max-width: 768px) {
    .post-navigation {
        margin: 3rem 0 2rem;
        padding: 2rem 0;
    }

    .post-navigation-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .post-nav-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .post-navigation-inner > :only-child {
        max-width: 100%;
    }

    .post-nav-image {
        height: 100px;
    }

    .post-nav-title {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .post-series-nav {
        padding: 1.5rem;
        margin: 2rem 0;
    }

    .series-title {
        font-size: 1.125rem;
    }

    .series-post-item {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }

    .series-post-number {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.8rem;
    }

    .series-post-title {
        font-size: 0.9375rem;
    }

    .series-post-badge {
        display: none;
    }
}

@media print {
    @page {
        margin: 2cm;
    }

    * {
        background: #ffffff !important;
        color: #000000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .site-header,
    .site-footer,
    .search-modal,
    .share-buttons,
    .related-posts,
    .comments,
    .pagination,
    .post-series-nav,
    .table-of-contents,
    .reading-progress,
    .scroll-to-top,
    .breadcrumbs,
    .header-actions,
    .theme-toggle,
    .search-toggle,
    .subscribe-button,
    .account-link,
    .newsletter-section,
    .load-more-button,
    .loading-spinner,
    .menu-toggle {
        display: none !important;
    }

    .site-main {
        max-width: 100%;
        padding: 0;
    }

    .post,
    .page {
        page-break-inside: avoid;
    }

    .post-header {
        border-bottom: 2px solid #000;
        padding-bottom: 1rem;
        margin-bottom: 2rem;
    }

    .post-title,
    .page-title {
        font-size: 24pt;
        font-weight: 700;
        margin-bottom: 0.5rem;
    }

    .post-meta,
    .page-meta {
        font-size: 10pt;
        color: #666 !important;
        margin-bottom: 1rem;
    }

    .post-feature-image,
    .page-feature-image {
        max-height: 400px;
        object-fit: cover;
        page-break-inside: avoid;
        margin-bottom: 2rem;
    }

    .post-content,
    .page-content {
        font-size: 11pt;
        line-height: 1.6;
    }

    .post-content-body h2,
    .page-content-body h2 {
        font-size: 18pt;
        font-weight: 700;
        margin-top: 2rem;
        margin-bottom: 1rem;
        page-break-after: avoid;
    }

    .post-content-body h3,
    .page-content-body h3 {
        font-size: 14pt;
        font-weight: 600;
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
        page-break-after: avoid;
    }

    .post-content-body h4,
    .page-content-body h4 {
        font-size: 12pt;
        font-weight: 600;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
        page-break-after: avoid;
    }

    .post-content-body p,
    .page-content-body p {
        margin-bottom: 1rem;
        orphans: 3;
        widows: 3;
    }

    .post-content-body a,
    .page-content-body a {
        text-decoration: underline;
        color: #000 !important;
    }

    .post-content-body a[href]::after,
    .page-content-body a[href]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666 !important;
    }

    .post-content-body img,
    .page-content-body img {
        max-width: 100% !important;
        page-break-inside: avoid;
        margin: 1rem 0;
    }

    .post-content-body blockquote,
    .page-content-body blockquote {
        border-left: 3px solid #000;
        padding-left: 1rem;
        margin: 1rem 0;
        font-style: italic;
        page-break-inside: avoid;
    }

    .post-content-body pre,
    .page-content-body pre,
    .post-content-body code,
    .page-content-body code {
        border: 1px solid #ccc;
        background: #f5f5f5 !important;
        padding: 0.5rem;
        font-family: 'Courier New', monospace;
        font-size: 9pt;
        page-break-inside: avoid;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    .post-content-body table,
    .page-content-body table {
        border-collapse: collapse;
        width: 100%;
        margin: 1rem 0;
        page-break-inside: avoid;
    }

    .post-content-body th,
    .page-content-body th,
    .post-content-body td,
    .page-content-body td {
        border: 1px solid #000;
        padding: 0.5rem;
        text-align: left;
    }

    .post-content-body th,
    .page-content-body th {
        font-weight: 700;
        background: #f0f0f0 !important;
    }

    .post-content-body ul,
    .page-content-body ul,
    .post-content-body ol,
    .page-content-body ol {
        margin: 1rem 0;
        padding-left: 2rem;
    }

    .post-content-body li,
    .page-content-body li {
        margin-bottom: 0.5rem;
    }

    .author-card {
        border-top: 1px solid #ccc;
        padding-top: 1rem;
        margin-top: 2rem;
        page-break-inside: avoid;
    }

    .author-avatar-large {
        display: none;
    }

    .author-name {
        font-size: 12pt;
        font-weight: 700;
        margin-bottom: 0.5rem;
    }

    .author-bio {
        font-size: 10pt;
        color: #666 !important;
    }

    .kg-card {
        page-break-inside: avoid;
        margin: 1rem 0;
    }

    .kg-bookmark-card {
        border: 1px solid #ccc;
        padding: 1rem;
    }

    .kg-bookmark-thumbnail {
        display: none;
    }

    .kg-callout-card {
        border: 1px solid #ccc;
        padding: 1rem;
        margin: 1rem 0;
    }

    .kg-toggle-card {
        border: 1px solid #ccc;
        padding: 1rem;
    }

    .kg-toggle-heading::before {
        content: "▶ ";
    }

    .container {
        max-width: 100%;
        padding: 0;
    }
}

.post-content-body strong,
.page-content-body strong {
    color: var(--color-text);
    font-weight: 700;
}

.post-content-body em,
.page-content-body em {
    font-style: italic;
    color: var(--color-text);
}

@media (max-width: 768px) {
    .pullquote,
    .kg-blockquote-alt {
        font-size: 1.375rem;
        padding: 1.5rem 0;
    }

    .pullquote::before,
    .kg-blockquote-alt::before {
        font-size: 4rem;
        top: -0.5rem;
    }

    .lead-paragraph {
        font-size: 1.25rem;
    }
}

/* ============================================
   Infinite Scroll / Load More
   ============================================ */

.load-more-button {
    display: inline-flex;
    margin: 3rem auto;
    font-size: 1.0625rem;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    gap: 1rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-spinner p {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
}

.post-card.fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Utilities
   ============================================ */

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header .section-title {
    margin-bottom: 0;
}

.section-link {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.section-link:hover {
    opacity: 0.7;
}

.section-footer {
    text-align: center;
    margin-top: 2rem;
}

/* Subscribe Section */
.subscribe-section {
    padding: 4rem 0;
    background: var(--color-secondary-bg);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.subscribe-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.subscribe-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.subscribe-tagline {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.subscribe-button {
    display: inline-block;
}

.tag-posts-section {
    padding: 4rem 0;
    border-top: 1px solid var(--color-border);
}

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

@media (max-width: 1024px) {
    .posts-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .posts-grid-3 {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .subscribe-section {
        padding: 3rem 0;
    }

    .subscribe-title {
        font-size: 1.75rem;
    }

    .subscribe-tagline {
        font-size: 1rem;
    }
}

.load-more {
    text-align: center;
    margin: 3rem 0;
}

.load-more button {
    background-color: var(--color-primary);
    color: #ffffff;
    border: none;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.load-more button:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Authentication Pages (Sign In / Sign Up)
   ============================================ */

.auth-content {
    background-color: var(--color-background);
    padding: 4rem 0 6rem;
}

.auth-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.auth-form-container {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 0;
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.auth-form-container h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--color-text);
}

.auth-form-container > p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin: 0 0 2rem 0;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.auth-form .form-group input[type="text"],
.auth-form .form-group input[type="email"] {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    background-color: var(--color-background);
    color: var(--color-text);
    transition: all 0.2s ease;
    font-family: inherit;
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}

.auth-form .newsletter-selection {
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    padding: 1.25rem;
    border-radius: 0;
}

.auth-form .newsletter-selection > label {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.auth-form .newsletter-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.auth-form .newsletter-option:last-child {
    margin-bottom: 0;
}

.auth-form .newsletter-option input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.auth-form .newsletter-option label {
    flex: 1;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
}

.auth-form .newsletter-option label strong {
    display: block;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.auth-form .newsletter-option label span {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.auth-form .form-message {
    display: none;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0;
    font-size: 0.9375rem;
    background-color: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #dc2626;
}

.auth-form.error .form-message {
    display: block;
}

.auth-form .button-primary {
    width: 100%;
    position: relative;
}

.auth-form .button-loader {
    display: none;
}

.auth-form.loading .button-text {
    opacity: 0;
}

.auth-form.loading .button-loader {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-background);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.auth-form-footer {
    margin-top: 2rem;
    text-align: center;
}

.auth-form-footer p {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin: 0.5rem 0;
}

.auth-form-footer a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-form-footer a:hover {
    text-decoration: underline;
}

.auth-form-footer .terms-notice {
    font-size: 0.8125rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.auth-success-message {
    display: none;
    text-align: center;
    padding: 2rem;
}

.auth-form.success {
    display: none;
}

.auth-form.success ~ .auth-success-message {
    display: block;
}

.auth-success-message svg {
    width: 64px;
    height: 64px;
    color: #10b981;
    margin: 0 auto 1.5rem;
}

.auth-success-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 1rem 0;
}

.auth-success-message p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.auth-additional-content {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-border);
}

.auth-already-signed-in {
    text-align: center;
    padding: 2rem;
}

.auth-already-signed-in svg {
    width: 64px;
    height: 64px;
    color: #10b981;
    margin: 0 auto 1.5rem;
}

.auth-already-signed-in h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 1rem 0;
}

.auth-already-signed-in p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin: 0 0 2rem 0;
}

.auth-signed-in-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .auth-form-container {
        padding: 2rem 1.5rem;
    }

    .auth-form-container h2 {
        font-size: 1.5rem;
    }

    .auth-signed-in-actions {
        flex-direction: column;
        width: 100%;
    }

    .auth-signed-in-actions .button {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(100%);
    }
}

.bookmark-post.bookmarked {
    color: var(--color-primary);
}

.bookmark-post.bookmarked svg {
    fill: currentColor;
}

/* ============================================
   Page Template Styles
   ============================================ */

.page-header {
    padding: 4rem 0 0 0;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.page-excerpt {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

.page-feature-image {
    margin: 2rem 0;
}

.page-feature-image img {
    width: 100%;
    border-radius: 12px;
}

.page-feature-image figcaption {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin-top: 1rem;
}

.page-content {
    padding: 3rem 0 4rem;
}

.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.page-content-body {
    font-size: 1.125rem;
    line-height: 1.8;
}

.page-content-body h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
}

.page-content-body h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
}

.page-content-body p {
    margin-bottom: 1.5rem;
}

.page-content-body ul,
.page-content-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.page-content-body li {
    margin-bottom: 0.5rem;
}

.page-content-body blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--color-text-secondary);
}

.page-content-body img {
    border-radius: 8px;
    margin: 2rem 0;
}

.page-content-body a {
    text-decoration: underline;
}

/* ============================================
   Contact Page Styles
   ============================================ */

.contact-page {
    padding-bottom: 4rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.contact-form-wrapper h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.contact-form-wrapper > p {
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: 0.5rem;
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-content {
    padding: 3rem 0;
}

.contact-info h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.contact-info > p {
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-method {
    display: flex;
    gap: 1rem;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background-color: var(--color-primary);
    color: #ffffff;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-details h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.contact-details p {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.contact-link {
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: var(--color-primary-hover);
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 968px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .page-excerpt {
        font-size: 1.125rem;
    }
}

/* ============================================
   Recommendations Section
   ============================================ */

.recommendations-section {
    padding: 4rem 0;
    background: var(--color-background-alt);
    border-top: 1px solid var(--color-border);
    margin-top: 4rem;
}

.recommendations-section .section-title {
    text-align: center;
    margin-bottom: 0.5rem;
}

.recommendations-section .section-description {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.recommendation-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.recommendation-favicon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.recommendation-favicon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommendation-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.recommendation-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.recommendation-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.recommendation-title a:hover {
    color: var(--color-primary);
}

.recommendation-excerpt {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.recommendation-subscribe {
    margin-top: auto;
    width: 100%;
}

@media (max-width: 768px) {
    .recommendations-grid {
        grid-template-columns: 1fr;
    }

    .recommendations-section {
        padding: 3rem 0;
    }
}

/* ============================================
   Comments Section
   ============================================ */

.comments-section {
    padding: 3rem 0 4rem;
    margin-top: 3rem;
}

.comments-login-prompt {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--color-background-alt);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.comments-login-prompt h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.comments-login-prompt p {
    color: var(--color-text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .comments-section {
        padding: 2rem 0 3rem;
        margin-top: 2rem;
    }

    .comments-login-prompt {
        padding: 3rem 1.5rem;
    }

    .comments-login-prompt h3 {
        font-size: 1.5rem;
    }
}

/* ============================================
   Koenig Editor Cards - Signup Card
   ============================================ */

.kg-signup-card {
    margin: 3rem 0;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--color-background-alt), var(--color-card-bg));
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-align: center;
}

.kg-signup-card.kg-width-wide {
    margin-left: -10%;
    margin-right: -10%;
    max-width: 120%;
}

.kg-signup-card.kg-width-full {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.kg-signup-card.kg-signup-card-style-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    text-align: left;
}

.kg-signup-card-image {
    background-size: cover;
    background-position: center;
    min-height: 300px;
    border-radius: 8px 0 0 8px;
}

.kg-signup-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kg-signup-card-heading {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.kg-signup-card-subheading {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.kg-signup-card form {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.kg-signup-card input[type="email"] {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.kg-signup-card input[type="email"]:focus {
    outline: none;
    border-color: var(--color-primary);
}

.kg-signup-card button {
    padding: 0.875rem 2rem;
    white-space: nowrap;
}

.kg-signup-card-success,
.kg-signup-card-error {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9375rem;
}

.kg-signup-card-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: rgb(22, 163, 74);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.kg-signup-card-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: rgb(220, 38, 38);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

@media (max-width: 768px) {
    .kg-signup-card {
        padding: 2rem 1.5rem;
    }

    .kg-signup-card.kg-signup-card-style-split {
        grid-template-columns: 1fr;
    }

    .kg-signup-card-image {
        min-height: 200px;
        border-radius: 8px 8px 0 0;
    }

    .kg-signup-card form {
        flex-direction: column;
    }

    .kg-signup-card-heading {
        font-size: 1.5rem;
    }
}

/* ============================================
   Koenig Editor Cards - Product Card
   ============================================ */

.kg-product-card {
    margin: 3rem 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--color-card-bg);
    transition: all 0.3s ease;
}

.kg-product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.kg-product-card-image {
    background-size: cover;
    background-position: center;
    min-height: 300px;
}

.kg-product-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kg-product-card-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.kg-product-card-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.kg-product-card-title a:hover {
    color: var(--color-primary);
}

.kg-product-card-description {
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.kg-product-card-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.kg-product-card-rating-star {
    display: flex;
    gap: 0.25rem;
}

.kg-product-card-rating-star svg {
    width: 18px;
    height: 18px;
    fill: #fbbf24;
}

.kg-product-card-rating-text {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.kg-product-card-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background-color: var(--color-primary);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.kg-product-card-button:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .kg-product-card {
        grid-template-columns: 1fr;
    }

    .kg-product-card-image {
        min-height: 200px;
    }

    .kg-product-card-content {
        padding: 1.5rem;
    }

    .kg-product-card-title {
        font-size: 1.5rem;
    }
}

/* ============================================
   Member Account Management
   ============================================ */

.account-section {
    padding: 3rem 0 4rem;
}

.account-header {
    text-align: center;
    margin-bottom: 3rem;
}

.account-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.account-header p {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.account-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
}

.account-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.account-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--color-background-alt);
    border-radius: 6px;
}

.account-info-label {
    font-weight: 600;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.account-info-value {
    font-size: 1rem;
    color: var(--color-text);
}

.subscription-card {
    background: linear-gradient(135deg, var(--color-background-alt), var(--color-card-bg));
    border: 2px solid var(--color-primary);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1rem;
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.subscription-tier {
    font-size: 1.25rem;
    font-weight: 700;
}

.subscription-status {
    padding: 0.375rem 0.75rem;
    background-color: rgba(34, 197, 94, 0.1);
    color: rgb(22, 163, 74);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.subscription-status.canceled {
    background-color: rgba(239, 68, 68, 0.1);
    color: rgb(220, 38, 38);
    border-color: rgba(239, 68, 68, 0.3);
}

.subscription-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.subscription-detail {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.subscription-detail-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.subscription-detail-value {
    font-size: 1.125rem;
    color: var(--color-text);
    font-weight: 600;
}

.subscription-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

@media (max-width: 968px) {
    .account-grid {
        grid-template-columns: 1fr;
    }

    .subscription-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .account-header h1 {
        font-size: 2rem;
    }

    .account-card {
        padding: 1.5rem;
    }

    .subscription-card {
        padding: 1.5rem;
    }

    .subscription-actions {
        flex-direction: column;
    }

    .subscription-actions .button {
        width: 100%;
    }
}


/* ========================================
   LIGHT MODE OVERRIDES (merged from theme-overrides.css)
   ======================================== */

/* ========================================
   LIGHT MODE THEME OVERRIDES
   ======================================== */

/* Header */
.site-header {
    background-color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid black;
    box-shadow: none;
}

.site-header .header-content {
    color: #000000;
    border-bottom: none;
}

.site-header .site-title {
    color: #000000;
}

.site-header .site-nav a {
    color: #000000;
}

.site-header .site-nav .nav-current a {
    color: #ffffff;
    padding: 0.5rem 1rem;
}

.site-header .header-actions button,
.site-header .header-actions a {
    color: #000000;
    border-color: rgba(0, 0, 0, 0.3);
}

.site-header .header-actions button:hover,
.site-header .header-actions a:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

.site-header .signin-button,
.site-header .account-link,
.site-header .subscribe-button {
    background-color: transparent;
    border: 1px solid black;
    color: #000000;
    padding: 0.5rem 1rem;
    border-radius: 0;
    font-weight: 400;
    transition: all 0.3s ease;
}

.site-header .signin-button:hover,
.site-header .account-link:hover,
.site-header .subscribe-button:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

/* Subscribe button with solid background */
.site-header .subscribe-button {
    background-color: black;
    color: white;
    border-color: black;
}

.site-header .subscribe-button:hover {
    background-color: white;
    color: black;
    border-color: black;
}

/* Main Content */
.site-main {
    background-color: #ffffff;
    position: relative;
    z-index: 10;
    margin: 0;
    padding: 0;
}

/* Newsletter Sections */
.newsletter-green-section,
.newsletter-cta {
    background-color: #ffffff;
    margin: 0;
    padding: 3rem 0;
    border-top: 1px solid black;
    border-bottom: 1px solid black;
}

.newsletter-green-section h3,
.newsletter-green-section p,
.newsletter-cta h3,
.newsletter-cta p {
    color: #000000;
}

.newsletter-section h3,
.newsletter-section p,
.newsletter-content h3,
.newsletter-content p {
    color: #ffffff;
}

.newsletter-green-section .button-primary,
.newsletter-cta .button-primary {
    background-color: #ffffff;
    border: 1px solid black;
    color: #000000;
}

.newsletter-green-section .button-primary:hover,
.newsletter-cta .button-primary:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

/* Post Footer */
.post-footer-dark,
.post-footer {
    background-color: #ffffff;
    color: #000000;
    margin: 0;
    padding: 3rem 0;
}

.post-footer-dark h4,
.post-footer-dark p,
.post-footer-dark a,
.post-footer h4,
.post-footer p,
.post-footer a {
    color: #000000;
}

.post-footer-dark .author-card-inner,
.post-footer .author-card-inner {
    border-color: rgba(0, 0, 0, 0.2);
}

.post-footer-dark .author-card-social a,
.post-footer .author-card-social a {
    border-color: #000000;
    color: #000000;
}

.post-footer-dark .author-card-social a:hover,
.post-footer .author-card-social a:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

.post-footer-dark .share-link,
.post-footer-dark .tag-item,
.post-footer .share-link,
.post-footer .tag-item {
    border-color: #000000;
    color: #000000;
}

.post-footer-dark .share-link:hover,
.post-footer-dark .tag-item:hover,
.post-footer .share-link:hover,
.post-footer .tag-item:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

/* Post Navigation */
.post-navigation,
.post-navigation-red {
    background-color: #ffffff;
    padding: 3rem 0;
    margin: 0 !important;
    border-bottom: 1px solid black !important;
}

.post-navigation-red .post-navigation-inner,
.post-navigation .post-navigation-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.post-navigation-red .post-navigation-inner:empty,
.post-navigation .post-navigation-inner:empty {
    display: none;
}

.post-navigation-red .post-nav-item,
.post-navigation .post-nav-item {
    background-color: #ffffff;
    border: 1px solid black;
    border-radius: 0;
    padding: 1.5rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
}

.post-navigation-red .post-nav-item:hover,
.post-navigation .post-nav-item:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #ffffff;
    transform: translateY(-2px);
}

.post-navigation-red .post-nav-item:hover .post-nav-label,
.post-navigation .post-nav-item:hover .post-nav-label,
.post-navigation-red .post-nav-item:hover .post-nav-title,
.post-navigation .post-nav-item:hover .post-nav-title {
    color: #ffffff;
}

.post-navigation-red .post-nav-label,
.post-navigation .post-nav-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #000000;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-navigation-red .post-nav-image,
.post-navigation .post-nav-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 0;
}

.post-navigation-red .post-nav-image img,
.post-navigation .post-nav-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-navigation-red .post-nav-title,
.post-navigation .post-nav-title {
    color: #000000;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .post-navigation-red .post-navigation-inner,
    .post-navigation .post-navigation-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Footer */
.site-footer {
    background-color: #ffffff;
    color: #000000;
    position: relative;
    z-index: 10;
    margin-top: 0;
}

.site-footer h3,
.site-footer p {
    color: #000000;
}

.site-footer .newsletter-section h3,
.site-footer .newsletter-section p,
.site-footer .newsletter-content h3,
.site-footer .newsletter-content p {
    color: #ffffff;
}

.site-footer .newsletter-green-section h3,
.site-footer .newsletter-green-section p,
.site-footer .newsletter-cta h3,
.site-footer .newsletter-cta p {
    color: #000000;
}

.site-footer h4,
.site-footer a {
    color: #000000;
}

.site-footer a:hover {
    opacity: 0.7;
}

.site-footer .social-links a {
    background-color: #ffffff;
    border: 1px solid black;
}

.site-footer .social-links a:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

.site-footer .footer-bottom {
    border-top: 1px solid black;
}

.footer-recommendations .footer-recommendation-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.footer-recommendation-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.footer-recommendation-favicon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
    object-fit: cover;
}

.footer-recommendation-item a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9375rem;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.footer-recommendation-item a:hover {
    color: var(--color-primary);
}


.site-footer .button-primary {
    background-color: #ffffff;
    border: 1px solid black;
    color: #000000;
}

.site-footer .button-primary:hover {
    background-color: #000000;
    color: #ffffff;
}

.site-footer .button-secondary:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

/* Comments Section */
.comments-section {
    background-color: #ffffff;
    padding: 3rem 0;
    margin: 0;
}

.comments-section .container {
    max-width: 800px;
}

.comments-login-prompt {
    text-align: center;
    padding: 3rem 2rem;
    background-color: #ffffff;
    border-radius: 0;
    border: 1px solid black;
}

.comments-login-prompt h3 {
    color: #000000;
    font-size: 1.75rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.comments-login-prompt p {
    color: #000000;
    font-size: 1rem;
    margin: 0 0 1.5rem 0;
    opacity: 0.8;
}

.comments-login-prompt .button-primary {
    display: inline-block;
    background-color: #ffffff;
    border: 1px solid black;
    color: #000000;
    padding: 0.75rem 2rem;
    border-radius: 0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.comments-login-prompt .button-primary:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #ffffff;
    transform: translateY(-2px);
}

/* Related Posts Grid */
.more-from-author,
.related-posts {
    background-color: #ffffff;
    padding: 3rem 0;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Remove section margins and borders */
.post-navigation,
.newsletter-cta,
.post-footer,
.more-from-author,
.related-posts,
.comments-section {
    margin: 0 !important;
    border-bottom: none !important;
    padding-top: 0 !important;
}

/* Tag Slides */
.tag-slide {
    background-color: #000000;
    border-color: #000000;
}

.tag-slide-icon {
    background-color: #ffffff;
}

.tag-slide-icon svg {
    stroke: #000000;
}

.tag-slide-name,
.tag-slide-count {
    color: #ffffff;
}

/* ========================================
   DARK MODE OVERRIDES (merged from dark-mode-override.css)
   All styles for Dark color scheme
   ======================================== */

/* Global */
html.color-scheme-Dark,
html.color-scheme-Dark body {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

html.color-scheme-Dark .site-wrapper {
    background-color: #1a1a1a !important;
}

/* Typography */
html.color-scheme-Dark h1,
html.color-scheme-Dark h2,
html.color-scheme-Dark h3,
html.color-scheme-Dark h4,
html.color-scheme-Dark h5,
html.color-scheme-Dark h6,
html.color-scheme-Dark p,
html.color-scheme-Dark a,
html.color-scheme-Dark li,
html.color-scheme-Dark span {
    color: #ffffff !important;
}

html.color-scheme-Dark .container {
    color: #ffffff !important;
}

/* Header */
html.color-scheme-Dark .site-header {
    background-color: #1a1a1a;
    border-bottom: 1px solid white;
}

html.color-scheme-Dark .site-header .header-content,
html.color-scheme-Dark .site-header .site-title,
html.color-scheme-Dark .site-header .site-nav a {
    color: #ffffff !important;
}

html.color-scheme-Dark .site-nav .nav-current a {
    color: #000000 !important;
    padding: 0.5rem 1rem;
}

html.color-scheme-Dark .header-bottom .site-nav a:hover,
html.color-scheme-Dark .header-bottom .site-nav .nav-current a {
    color: #ffffff !important;
    border-bottom-color: #ffffff !important;
}

html.color-scheme-Dark .site-header .header-actions button,
html.color-scheme-Dark .site-header .header-actions a {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

html.color-scheme-Dark .site-header .header-actions button:hover,
html.color-scheme-Dark .site-header .header-actions a:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

html.color-scheme-Dark .site-header .signin-button,
html.color-scheme-Dark .site-header .account-link,
html.color-scheme-Dark .site-header .subscribe-button {
    background-color: transparent !important;
    border: 1px solid white !important;
    color: #ffffff !important;
}

html.color-scheme-Dark .site-header .signin-button:hover,
html.color-scheme-Dark .site-header .account-link:hover,
html.color-scheme-Dark .site-header .subscribe-button:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

/* Subscribe button with solid white background in dark mode */
html.color-scheme-Dark .site-header .subscribe-button {
    background-color: white !important;
    color: black !important;
    border-color: white !important;
}

html.color-scheme-Dark .site-header .subscribe-button:hover {
    background-color: black !important;
    color: white !important;
    border-color: white !important;
}

/* Subscribe button in header-auth with white background in dark mode */
html.color-scheme-Dark .header-auth .subscribe-button {
    background-color: white !important;
    color: black !important;
    border-color: white !important;
}

html.color-scheme-Dark .header-auth .subscribe-button:hover {
    background-color: black !important;
    color: white !important;
    border-color: white !important;
}

/* Main Content */
html.color-scheme-Dark .site-main {
    background-color: #1a1a1a !important;
}

html.color-scheme-Dark article {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

/* Post Content */
html.color-scheme-Dark .post-content,
html.color-scheme-Dark .post-content p,
html.color-scheme-Dark .post-content li {
    color: #ffffff !important;
}

html.color-scheme-Dark .post-content h1,
html.color-scheme-Dark .post-content h2,
html.color-scheme-Dark .post-content h3,
html.color-scheme-Dark .post-content h4,
html.color-scheme-Dark .post-content h5,
html.color-scheme-Dark .post-content h6 {
    color: #ffffff !important;
}

html.color-scheme-Dark .post-content a {
    color: #ffffff !important;
}

html.color-scheme-Dark .post-content blockquote {
    border-left-color: #ffffff !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

html.color-scheme-Dark .post-content code {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

html.color-scheme-Dark .post-content pre {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border-color: #ffffff !important;
}

html.color-scheme-Dark .post-content table,
html.color-scheme-Dark .post-content th,
html.color-scheme-Dark .post-content td {
    border-color: #ffffff !important;
    color: #ffffff !important;
}

html.color-scheme-Dark .post-content hr {
    border-color: #ffffff !important;
}

/* Post Cards */
html.color-scheme-Dark .post-card {
    background-color: #1a1a1a !important;
    border-color: #ffffff !important;
}

html.color-scheme-Dark .post-card-title,
html.color-scheme-Dark .post-card-title a {
    color: #ffffff !important;
}

html.color-scheme-Dark .post-card-excerpt,
html.color-scheme-Dark .post-card-meta {
    color: #ffffff !important;
}

html.color-scheme-Dark .post-tag {
    background-color: #000000 !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

/* Featured Posts */
html.color-scheme-Dark .featured-slider,
html.color-scheme-Dark .featured-post {
    background-color: #1a1a1a !important;
    border-color: #ffffff !important;
}

html.color-scheme-Dark .featured-title,
html.color-scheme-Dark .featured-excerpt,
html.color-scheme-Dark .featured-meta {
    color: #ffffff !important;
}

html.color-scheme-Dark .featured-tag {
    background-color: transparent !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

html.color-scheme-Dark .slider-nav {
    background-color: #ffffff !important;
    border-color: #e5e5e5 !important;
}

html.color-scheme-Dark .slider-nav svg {
    stroke: currentColor !important;
}

html.color-scheme-Dark .slider-nav:hover {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

html.color-scheme-Dark .slider-nav:hover svg {
    stroke: #ffffff !important;
}

/* Tags */
html.color-scheme-Dark .tags-slider-section {
    background-color: #1a1a1a !important;
}

html.color-scheme-Dark .tag-slide {
    background-color: #000000 !important;
    border-color: #ffffff !important;
}

html.color-scheme-Dark .tag-slide-icon {
    background-color: #ffffff !important;
}

html.color-scheme-Dark .tag-slide-icon svg {
    stroke: #000000 !important;
}

html.color-scheme-Dark .tags-slider-arrow {
    background-color: #ffffff !important;
    border-color: #e5e5e5 !important;
}

html.color-scheme-Dark .tags-slider-arrow svg {
    stroke: currentColor !important;
}

html.color-scheme-Dark .tags-slider-arrow:hover {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

html.color-scheme-Dark .tags-slider-arrow:hover svg {
    stroke: #ffffff !important;
}

html.color-scheme-Dark .tag-slide-name,
html.color-scheme-Dark .tag-slide-count {
    color: #ffffff !important;
}

html.color-scheme-Dark .tag-item {
    background-color: #1a1a1a !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

/* Buttons */
html.color-scheme-Dark .button,
html.color-scheme-Dark .button-primary {
    background-color: #000000 !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

html.color-scheme-Dark .button:hover,
html.color-scheme-Dark .button-primary:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

/* Fix span color inside buttons on hover */
html.color-scheme-Dark .button:hover span,
html.color-scheme-Dark .button-primary:hover span,
html.color-scheme-Dark button:hover span {
    color: #000000 !important;
}

/* Newsletter Section */
html.color-scheme-Dark .newsletter-section,
html.color-scheme-Dark .newsletter-green-section,
html.color-scheme-Dark .newsletter-cta {
    background: #1a1a1a !important;
}

html.color-scheme-Dark .newsletter-content {
    background: #1a1a1a !important;
    border-top: none !important;
    border-bottom: none !important;
}

html.color-scheme-Dark .newsletter-section h3,
html.color-scheme-Dark .newsletter-section p,
html.color-scheme-Dark .newsletter-green-section h3,
html.color-scheme-Dark .newsletter-green-section p,
html.color-scheme-Dark .newsletter-cta h3,
html.color-scheme-Dark .newsletter-cta p,
html.color-scheme-Dark .newsletter-content h3,
html.color-scheme-Dark .newsletter-content p {
    color: #ffffff !important;
}

html.color-scheme-Dark .newsletter-green-section .button-primary,
html.color-scheme-Dark .newsletter-cta .button-primary {
    background-color: #1a1a1a !important;
    border: 1px solid white !important;
    color: #ffffff !important;
}

/* Post Footer */
html.color-scheme-Dark .post-footer-dark,
html.color-scheme-Dark .post-footer {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

html.color-scheme-Dark .post-footer-dark h4,
html.color-scheme-Dark .post-footer-dark p,
html.color-scheme-Dark .post-footer-dark a,
html.color-scheme-Dark .post-footer h4,
html.color-scheme-Dark .post-footer p,
html.color-scheme-Dark .post-footer a {
    color: #ffffff !important;
}

html.color-scheme-Dark .post-footer-dark .author-card-inner,
html.color-scheme-Dark .post-footer .author-card-inner {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

html.color-scheme-Dark .post-footer-dark .author-card-social a,
html.color-scheme-Dark .post-footer .author-card-social a {
    border-color: #ffffff !important;
    color: #ffffff !important;
}

html.color-scheme-Dark .post-footer-dark .author-card-social a:hover,
html.color-scheme-Dark .post-footer .author-card-social a:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

html.color-scheme-Dark .post-footer-dark .share-link,
html.color-scheme-Dark .post-footer-dark .tag-item,
html.color-scheme-Dark .post-footer .share-link,
html.color-scheme-Dark .post-footer .tag-item {
    border-color: #ffffff !important;
    color: #ffffff !important;
}

html.color-scheme-Dark .share-link,
html.color-scheme-Dark .tag-item {
    background-color: #1a1a1a !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

html.color-scheme-Dark .post-footer-dark .share-link:hover,
html.color-scheme-Dark .post-footer-dark .tag-item:hover,
html.color-scheme-Dark .post-footer .share-link:hover,
html.color-scheme-Dark .post-footer .tag-item:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

html.color-scheme-Dark .share-link svg {
    stroke: #ffffff !important;
}

html.color-scheme-Dark .share-link:hover svg {
    stroke: #000000 !important;
}

/* Dark mode tooltip for copied state */
html.color-scheme-Dark .share-link.share-copy.copied::after,
html.color-scheme-Dark .share-link.share-discord.copied::after {
    background-color: #ffffff;
    color: #000000;
}

/* Post Navigation */
html.color-scheme-Dark .post-navigation,
html.color-scheme-Dark .post-navigation-red {
    background-color: #1a1a1a !important;
}

html.color-scheme-Dark .post-navigation-red .post-nav-item,
html.color-scheme-Dark .post-navigation .post-nav-item {
    background-color: #1a1a1a !important;
    border: 1px solid white !important;
}

html.color-scheme-Dark .post-navigation-red .post-nav-item:hover,
html.color-scheme-Dark .post-navigation .post-nav-item:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

html.color-scheme-Dark .post-navigation-red .post-nav-item:hover .post-nav-label,
html.color-scheme-Dark .post-navigation .post-nav-item:hover .post-nav-label,
html.color-scheme-Dark .post-navigation-red .post-nav-item:hover .post-nav-title,
html.color-scheme-Dark .post-navigation .post-nav-item:hover .post-nav-title {
    color: #000000 !important;
}

html.color-scheme-Dark .post-navigation-red .post-nav-label,
html.color-scheme-Dark .post-navigation-red .post-nav-title,
html.color-scheme-Dark .post-navigation .post-nav-label,
html.color-scheme-Dark .post-navigation .post-nav-title {
    color: #ffffff !important;
}

/* Footer */
html.color-scheme-Dark .site-footer {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

html.color-scheme-Dark .site-footer h3,
html.color-scheme-Dark .site-footer h4,
html.color-scheme-Dark .site-footer p,
html.color-scheme-Dark .site-footer a,
html.color-scheme-Dark .site-footer span,
html.color-scheme-Dark .site-footer li {
    color: #ffffff !important;
}

html.color-scheme-Dark .site-footer .social-links a {
    background-color: #1a1a1a !important;
    border: 1px solid white !important;
}

html.color-scheme-Dark .site-footer .social-links a:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

html.color-scheme-Dark .site-footer .button-primary,
html.color-scheme-Dark .site-footer .button-secondary {
    background-color: #1a1a1a !important;
    border: 1px solid white !important;
    color: #ffffff !important;
}

html.color-scheme-Dark .site-footer .button-primary:hover,
html.color-scheme-Dark .site-footer .button-secondary:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
}

html.color-scheme-Dark .site-footer .footer-section nav a,
html.color-scheme-Dark .site-footer .footer-section ul li a {
    color: #ffffff !important;
}

/* Comments */
html.color-scheme-Dark .comments-section {
    background-color: #1a1a1a !important;
}

html.color-scheme-Dark .comments-login-prompt {
    background-color: #1a1a1a !important;
    border: 1px solid white !important;
}

html.color-scheme-Dark .comments-login-prompt h3,
html.color-scheme-Dark .comments-login-prompt p {
    color: #ffffff !important;
}

html.color-scheme-Dark .comments-login-prompt .button-primary {
    background-color: #1a1a1a !important;
    border: 1px solid white !important;
    color: #ffffff !important;
}

/* Related Posts */
html.color-scheme-Dark .related-posts,
html.color-scheme-Dark .more-from-author {
    background-color: #1a1a1a !important;
}

html.color-scheme-Dark .section-title {
    color: #ffffff !important;
}

/* Pagination */
html.color-scheme-Dark .pagination {
    border-color: #ffffff !important;
}

html.color-scheme-Dark .pagination-button {
    background-color: #1a1a1a !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

/* Search */
html.color-scheme-Dark .search-modal {
    background-color: rgba(26, 26, 26, 0.95) !important;
}

html.color-scheme-Dark .search-modal-content {
    background-color: #1a1a1a !important;
    border-color: #ffffff !important;
}

html.color-scheme-Dark .search-input {
    background-color: #1a1a1a !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

html.color-scheme-Dark .search-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

html.color-scheme-Dark .search-close {
    color: #ffffff !important;
}

/* Author Page */
html.color-scheme-Dark .author-header,
html.color-scheme-Dark .author-card {
    background-color: #1a1a1a !important;
}

html.color-scheme-Dark .author-name,
html.color-scheme-Dark .author-bio,
html.color-scheme-Dark .author-meta {
    color: #ffffff !important;
}

html.color-scheme-Dark .author-social a {
    background-color: #1a1a1a !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

/* Theme Controls */
html.color-scheme-Dark .theme-toggle-dropdown {
    background-color: #1a1a1a !important;
    border-color: #ffffff !important;
}

html.color-scheme-Dark .theme-option {
    color: #ffffff !important;
}

html.color-scheme-Dark .theme-option:hover,
html.color-scheme-Dark .theme-option.active {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

/* Load More Button */
html.color-scheme-Dark .load-more button,
html.color-scheme-Dark .load-more-button {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 1px solid white !important;
}

html.color-scheme-Dark .load-more button:hover,
html.color-scheme-Dark .load-more-button:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

html.color-scheme-Dark .load-more button:hover .load-more-text,
html.color-scheme-Dark .load-more-button:hover .load-more-text {
    color: #000000 !important;
}

/* Scroll to Top */
html.color-scheme-Dark .scroll-to-top {
    background-color: #1a1a1a !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

/* Authentication Pages */
html.color-scheme-Dark .auth-content {
    background-color: #1a1a1a !important;
}

html.color-scheme-Dark .auth-form-container {
    background-color: #1a1a1a !important;
    border-color: #ffffff !important;
}

html.color-scheme-Dark .auth-form-container h2,
html.color-scheme-Dark .auth-form-container > p,
html.color-scheme-Dark .auth-form .form-group label {
    color: #ffffff !important;
}

html.color-scheme-Dark .auth-form .form-group input[type="text"],
html.color-scheme-Dark .auth-form .form-group input[type="email"] {
    background-color: #1a1a1a !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

html.color-scheme-Dark .auth-form .form-group input:focus {
    border-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
}

html.color-scheme-Dark .auth-form .newsletter-selection {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: #ffffff !important;
}

html.color-scheme-Dark .auth-form .newsletter-selection > label {
    color: #ffffff !important;
}

html.color-scheme-Dark .auth-form .newsletter-option label {
    color: #ffffff !important;
}

html.color-scheme-Dark .auth-form .newsletter-option label strong {
    color: #ffffff !important;
}

html.color-scheme-Dark .auth-form .newsletter-option label span {
    color: rgba(255, 255, 255, 0.7) !important;
}

html.color-scheme-Dark .auth-form-footer p {
    color: rgba(255, 255, 255, 0.7) !important;
}

html.color-scheme-Dark .auth-form-footer a {
    color: #ffffff !important;
}

html.color-scheme-Dark .auth-form-footer .terms-notice {
    border-top-color: #ffffff !important;
}

html.color-scheme-Dark .auth-success-message h3,
html.color-scheme-Dark .auth-success-message p {
    color: #ffffff !important;
}

html.color-scheme-Dark .auth-already-signed-in h2,
html.color-scheme-Dark .auth-already-signed-in p {
    color: #ffffff !important;
}

html.color-scheme-Dark .auth-additional-content {
    border-top-color: #ffffff !important;
}

/* Tag Sections */
html.color-scheme-Dark .tag-posts-section {
    border-top-color: #ffffff !important;
}

html.color-scheme-Dark .section-link {
    color: #ffffff !important;
}

html.color-scheme-Dark .more-posts-notice {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Reading Progress Bar - Dark Mode */
html.color-scheme-Dark .reading-progress {
    background-color: #ffffff;
}





/* ============================================
   TWO-TIER HEADER REDESIGN
   ============================================ */

/* Header Top Section */
.header-top {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.header-top-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.header-social {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.header-social a {
    color: var(--color-text);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.header-social a:hover {
    color: var(--color-primary);
}

.header-social svg {
    width: 100%;
    height: 100%;
}

.header-logo-center {
    flex: 0 0 auto;
    text-align: center;
}

.header-logo-center .site-logo img {
    max-height: 40px;
    width: auto;
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    justify-content: flex-end;
}

.header-auth .signin-button,
.header-auth .subscribe-button,
.header-auth .account-link {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.header-auth .subscribe-button {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.header-auth .signin-button:hover,
.header-auth .account-link:hover {
    background-color: var(--color-text);
    color: var(--color-background);
}

.header-auth .subscribe-button:hover {
    background-color: white;
    color: black;
    border-color: black;
}

/* Header Bottom Section */
.header-bottom {
    position: relative;
    padding: 0;
}

.header-bottom-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-height: 48px;
}

.sidebar-toggle {
    position: absolute;
    left: 0;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.sidebar-toggle:hover {
    color: var(--color-primary);
}

.sidebar-toggle svg {
    width: 24px;
    height: 24px;
}

.header-bottom .site-nav {
    display: flex;
    justify-content: center;
}

.header-bottom .site-nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-bottom .site-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.938rem;
    font-weight: 500;
    padding-bottom: calc(0.5rem - 3px);
    border-bottom: 3px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.header-bottom .site-nav a:hover,
.header-bottom .site-nav .nav-current a {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.header-bottom .site-nav a:focus,
.header-bottom .site-nav a:focus-visible {
    outline: none;
    background: none;
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}


.header-utilities {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Bookmarks Link */
.bookmarks-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
    border: none;
    background: none;
    cursor: pointer;
}

.bookmarks-link:hover {
    color: var(--color-primary);
}

.bookmarks-link svg {
    width: 20px;
    height: 20px;
}

.bookmarks-link .bookmark-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

/* Dark mode bookmark counter */
html.color-scheme-Dark .bookmarks-link .bookmark-count {
    background: var(--color-primary) !important;
    color: #000000 !important;
}

/* Theme Toggle Switch */
.theme-toggle-wrapper {
    display: flex;
    align-items: center;
}

.theme-toggle {
    position: relative;
    width: 64px;
    height: 32px;
    background: var(--color-border);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    padding: 0;
}

.theme-toggle:hover {
    opacity: 0.9;
}

.color-scheme-Light .theme-toggle {
    background: var(--color-border);
}

html.color-scheme-Dark .theme-toggle {
    background: var(--color-primary);
}

.theme-toggle-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.theme-icon-sun,
.theme-icon-moon {
    width: 14px;
    height: 14px;
    opacity: 0.4;
    transition: opacity 0.3s ease, color 0.3s ease;
    z-index: 3;
    pointer-events: none;
}

.color-scheme-Light .theme-icon-sun {
    opacity: 1;
    color: #000000;
}

.color-scheme-Light .theme-icon-moon {
    opacity: 0.3;
    color: var(--color-text-secondary);
}

html.color-scheme-Dark .theme-icon-sun {
    opacity: 0.3;
    color: #94a3b8;
}

html.color-scheme-Dark .theme-icon-moon {
    opacity: 1;
    color: #ffffff;
}

.theme-toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

html.color-scheme-Dark .theme-toggle-slider {
    transform: translateX(32px);
    background: #1e293b;
}

/* Search Toggle */
.search-toggle {
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.search-toggle:hover {
    color: var(--color-primary);
}

.search-toggle svg {
    width: 20px;
    height: 20px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background-color: var(--color-background);
    border-right: 1px solid var(--color-border);
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 2rem;
}

.sidebar.active {
    left: 0;
}

.sidebar-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-close svg {
    width: 20px;
    height: 20px;
}

.sidebar-nav h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 1rem;
}

.sidebar-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1rem;
    display: block;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.sidebar-nav a:hover {
    color: var(--color-primary);
}

/* Hide first 4 items on desktop (they're in main nav) */
@media (min-width: 769px) {
    .sidebar-nav li:nth-child(-n+4) {
        display: none;
    }
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ============================================
   POST LAYOUT REDESIGN
   ============================================ */

/* Featured Image at Top (80% width, centered) */
.post-feature-image-top {
    width: 80%;
    max-width: 1200px;
    margin: 2rem auto;
    display: block;
}

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

.post-feature-image-top figcaption {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-style: italic;
}

/* Primary Tag Styling (Pink/Primary Color) */
.post-tag-primary {
    display: inline-block;
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    margin-bottom: 1rem;
    transition: opacity 0.2s ease;
}

.post-tag-primary:hover {
    opacity: 0.8;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-top-content,
    .header-bottom-content {
        gap: 1rem;
    }

    .header-social {
        gap: 0.75rem;
    }

    .header-auth {
        gap: 0.5rem;
    }

    .header-auth .signin-button,
    .header-auth .subscribe-button {
        padding: 0.4rem 0.75rem;
        font-size: 0.813rem;
    }

    .header-bottom .site-nav {
        display: none;
    }

    .post-feature-image-top {
        width: 90%;
        margin: 1.5rem auto;
    }

    .sidebar {
        width: 280px;
        left: -280px;
    }

    .theme-toggle-wrapper {
        gap: 0.375rem;
    }

    .theme-icon svg {
        width: 16px;
        height: 16px;
    }

    .header-utilities {
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .header-top {
        padding: 0.5rem 0;
    }

    .header-bottom-content {
        padding: 0.5rem 0;
    }

    .header-social {
        display: none;
    }

    .header-auth {
        flex: auto;
    }

    .post-feature-image-top {
        width: 100%;
        margin: 1rem auto;
    }

    .theme-icon {
        display: none;
    }

    .header-utilities {
        gap: 0.5rem;
    }

    .post-content-body,
    .page-content-body {
        max-width: 95%;
        font-size: 0.938rem;
    }

    .post-content-body img,
    .page-content-body img,
    .post-content-body figure,
    .page-content-body figure,
    .kg-bookmark-card {
        max-width: 100%;
    }

    .post-title,
    .page-title {
        font-size: 1.75rem;
    }
}

/* Share and Comments Buttons (in post meta) */
.post-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 0.938rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0;
}

.post-action-btn:hover {
    color: var(--color-primary);
}

.post-action-btn svg {
    width: 20px;
    height: 20px;
}

.post-action-btn.bookmark-post.bookmarked {
    color: var(--color-primary);
}

.post-action-btn.bookmark-post.bookmarked svg {
    fill: var(--color-primary);
}

/* Dark mode styles */
html.color-scheme-Dark .post-action-btn {
    color: var(--color-text);
}

html.color-scheme-Dark .post-action-btn:hover {
    color: var(--color-primary);
}

html.color-scheme-Dark .post-action-btn.bookmark-post.bookmarked {
    color: var(--color-primary);
}

html.color-scheme-Dark .post-action-btn.bookmark-post.bookmarked svg {
    fill: var(--color-primary);
}

.comment-count {
    color: var(--color-text-secondary);
}

.share-dropdown-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.share-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-radius: 4px;
    color: var(--color-text);
    font-size: 0.938rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
    text-align: left;
}

.share-dropdown-item:hover {
    background: var(--color-background);
}

.share-dropdown-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Author Bio Compact */
.post-tags-section {
    margin: 2.5rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.post-tags-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    text-transform: none;
}

.post-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-tag-link {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    color: var(--color-text);
    background: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.post-tag-link:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.author-bio-compact {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    max-width: 100%;
    margin: 3rem auto 2rem;
    padding: 1.5rem;
    background: var(--color-background-alt);
    border-radius: 8px;
}

.author-bio-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-bio-content {
    flex: 1;
}

.author-bio-name {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.author-bio-name:hover {
    color: var(--color-primary);
}

.author-bio-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin: 0;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .post-actions-bar,
    .share-dropdown,
    .author-bio-compact {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .post-actions-bar,
    .share-dropdown,
    .author-bio-compact {
        max-width: 100%;
    }

    .post-actions-bar {
        gap: 1rem;
    }

    .post-action-btn {
        font-size: 0.875rem;
    }

    .post-action-btn svg {
        width: 18px;
        height: 18px;
    }

    .author-bio-compact {
        padding: 1rem;
    }

    .author-bio-avatar {
        width: 40px;
        height: 40px;
    }
}

/* Update share dropdown to position relative to header */
.post-header {
    position: relative;
}

/* Share wrapper for positioning dropdown relative to button */
.share-wrapper {
    position: relative;
    display: inline-block;
}

.share-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

/* Author bio link */
.author-bio-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.author-bio-link:hover {
    opacity: 0.8;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .share-dropdown {
        left: 0;
        right: auto;
        transform: none;
        min-width: 200px;
    }
}

@media (max-width: 640px) {
    .post-action-btn {
        font-size: 0.875rem;
    }

    .post-action-btn svg {
        width: 18px;
        height: 18px;
    }
}
}

/* ==========================================================================
   Podcasts Archive Page
   ========================================================================== */

.podcasts-archive-content {
    padding: 2rem 0 4rem;
}

.podcasts-archive-content .page-content-body {
    max-width: 800px;
    margin: 0 auto 3rem;
    color: var(--color-text);
    line-height: 1.7;
}

.podcasts-archive-content .page-content-body p {
    margin-bottom: 1.25rem;
}

.podcast-tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    justify-content: center;
    padding: 0 1rem;
}

.tag-filter-item {
    position: relative;
    padding: 0;
    background: transparent;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-filter-item:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.tag-filter-item.active {
    border-color: var(--color-primary);
    background: var(--color-primary);
}

.tag-filter-image {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.tag-filter-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.95);
    color: #ffffff;
    font-weight: bold;
    font-size: 0.875rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tag-filter-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
}

.tag-filter-item:hover .tag-filter-tooltip {
    opacity: 1;
}

html.color-scheme-Dark .tag-filter-tooltip {
    background: rgba(255, 255, 255, 0.95);
    color: #000000;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

html.color-scheme-Dark .tag-filter-tooltip::after {
    border-top-color: rgba(255, 255, 255, 0.95);
}

.tag-filter-all {
    width: auto;
    min-width: 58px;
    padding: 0.75rem 1rem;
    border-radius: 29px;
}

.tag-filter-all-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.tag-filter-all.active .tag-filter-all-text {
    color: #ffffff;
}

.tag-filter-all:hover .tag-filter-all-text,
.tag-filter-all:focus .tag-filter-all-text {
    color: var(--color-text);
}

.tag-filter-all.active:hover .tag-filter-all-text,
.tag-filter-all.active:focus .tag-filter-all-text {
    color: #ffffff;
}

html.color-scheme-Dark .tag-filter-all:hover .tag-filter-all-text,
html.color-scheme-Dark .tag-filter-all:focus .tag-filter-all-text {
    color: #ffffff;
}

html.color-scheme-Dark .tag-filter-all.active .tag-filter-all-text {
    color: #000000 !important;
}

html.color-scheme-Dark .tag-filter-all.active:hover .tag-filter-all-text,
html.color-scheme-Dark .tag-filter-all.active:focus .tag-filter-all-text {
    color: #000000;
}

.post-card-wrapper {
    transition: opacity 0.3s ease;
}

.post-card-wrapper.hidden {
    display: none;
}

.podcasts-archive-content .posts-grid {
    margin-bottom: 4rem;
}

@media (max-width: 640px) {
    .podcast-tag-filter {
        gap: 0.75rem;
    }

    .tag-filter-item {
        width: 40px;
        height: 40px;
    }

    .tag-filter-image {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   Reading List Page
   ========================================================================== */

.reading-list-page {
    min-height: 70vh;
    padding: 4rem 0;
}

.reading-list-header {
    text-align: center;
    margin-bottom: 4rem;
}

.reading-list-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.reading-list-description {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.reading-list-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.reading-list-actions button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.reading-list-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    color: var(--color-text-secondary);
}

.spinner {
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.reading-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.reading-list-empty svg {
    width: 80px;
    height: 80px;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    opacity: 0.5;
}

.reading-list-empty h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.reading-list-empty p {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    max-width: 400px;
}

.bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.bookmark-card {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.bookmark-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bookmark-card-content {
    flex: 1;
    min-width: 0;
}

.bookmark-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.bookmark-card-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.bookmark-card-title a:hover {
    color: var(--color-primary);
}

.bookmark-card-meta {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.bookmark-card-actions {
    margin-left: 1rem;
}

.bookmark-remove {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: all 0.2s ease;
}

.bookmark-remove:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.bookmark-remove svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .reading-list-title {
        font-size: 2rem;
    }

    .bookmarks-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .bookmark-card {
        padding: 1.25rem;
    }
}

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

/* ==========================================================================
   Authors Grid Page
   ========================================================================== */

.authors-grid-page {
    padding: 4rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.author-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.author-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary);
}

.author-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.author-card-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.author-card-placeholder {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 700;
    color: white;
}

.author-card-content {
    padding: 1.5rem;
}

.author-card-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.author-card-bio {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.author-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.author-card-location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.author-card-location svg {
    flex-shrink: 0;
}

.no-authors {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-secondary);
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .authors-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   Articles Archive Page
   ========================================================================== */

.articles-archive-content {
    padding: 2rem 0 4rem;
}

.articles-archive-content .page-content-body {
    max-width: 800px;
    margin: 0 auto 3rem;
    color: var(--color-text);
    line-height: 1.7;
}

.articles-archive-content .page-content-body p {
    margin-bottom: 1.25rem;
}

.articles-archive-content .posts-grid {
    margin-bottom: 4rem;
}


/* ==========================================================================
   Photo Essays Archive Page
   ========================================================================== */

.photo-essays-archive-content {
    padding: 2rem 0 4rem;
}

.photo-essays-archive-content .page-content-body {
    max-width: 800px;
    margin: 0 auto 3rem;
    color: var(--color-text);
    line-height: 1.7;
}

.photo-essays-archive-content .page-content-body p {
    margin-bottom: 1.25rem;
}

.photo-essays-archive-content .posts-grid {
    margin-bottom: 4rem;
}


/* ==========================================================================
   Membership Page
   ========================================================================== */

.membership-page {
    padding-bottom: 4rem;
}

.page-header {
    padding: 4rem 0 2rem;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.page-excerpt {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

.membership-content {
    padding: 3rem 0;
}

.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 3rem;
}

.toggle-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
    cursor: pointer;
}

.toggle-label.active {
    color: var(--color-primary);
}

.toggle-badge {
    display: inline-block;
    background-color: var(--color-primary);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
    font-weight: 600;
}

.toggle-switch {
    position: relative;
    width: 56px;
    height: 32px;
    background-color: var(--color-border);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-switch.yearly {
    background-color: var(--color-primary);
}

.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.yearly .toggle-slider {
    transform: translateX(24px);
}

.membership-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.tier-card {
    background-color: var(--color-card-bg);
    border: 2px solid var(--color-border);
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tier-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary);
}

.tier-featured {
    border-color: var(--color-primary);
    border-width: 2px;
}

.tier-badge {
    position: absolute;
    top: -12px;
    right: 2rem;
    background-color: var(--color-primary);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.tier-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.tier-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tier-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.tier-price-amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-primary);
}

.tier-price-period {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

.tier-savings {
    margin-top: 0.5rem;
    color: var(--color-primary);
    font-size: 0.9375rem;
    font-weight: 600;
}

.tier-benefits {
    list-style: none;
    margin: 0 0 2rem 0;
    padding: 0;
    flex: 1;
}

.tier-benefits li {
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tier-benefits li::before {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
}

.tier-card .button {
    width: 100%;
}

.page-content-body {
    max-width: 800px;
    margin: 4rem auto;
    font-size: 1.125rem;
    line-height: 1.8;
}

.membership-faq {
    max-width: 800px;
    margin: 4rem auto 0;
}

.membership-faq h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.faq-item {
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-item summary {
    padding: 1.25rem 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background-color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    float: right;
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary:hover {
    background-color: var(--color-background-alt);
}

.faq-item p {
    padding: 0 1.5rem 1.25rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.membership-disabled {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-secondary);
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .membership-tiers {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   Tags Archive Page
   ========================================================================== */

.tags-grid-page {
    padding: 4rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
}

.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tag-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tag-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.tag-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.tag-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.tag-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tag-card:hover .tag-card-image img {
    transform: scale(1.05);
}

.tag-card-content {
    padding: 1.5rem;
}

.tag-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.tag-card-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.tag-card-name {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tag-card-description {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-card-meta {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 600;
}

.no-tags {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-secondary);
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .tags-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   Author Page
   ========================================================================== */

.author-archive {
    padding: 2rem 0 0;
}

.author-header {
    margin-bottom: 3rem;
}

.author-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 400px;
}

.author-cover-image {
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-profile-overlay {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--color-background);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
}

.author-profile-content {
    background-color: var(--color-background);
    padding: 3rem 3rem 3rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.author-location {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.author-name {
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    font-family: var(--font-serif, Georgia, serif);
}

.author-bio {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.author-social {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0;
}

.author-social a {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    transition: all 0.2s ease;
    color: var(--color-text);
    background-color: transparent;
}

.author-social a:hover {
    background-color: var(--color-text);
    border-color: var(--color-text);
    color: var(--color-background);
}

.author-posts {
    padding: 0 0 4rem;
}

.author-posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.author-posts-title {
    font-size: 2.5rem;
    font-weight: 400;
    margin: 0;
    font-family: var(--font-serif, Georgia, serif);
}

.author-posts-count {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
}

@media (max-width: 968px) {
    .author-header-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .author-cover-image {
        min-height: 300px;
    }

    .author-profile-content {
        padding: 2rem;
    }

    .author-name {
        font-size: 2.5rem;
    }

    .author-posts-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .author-header-inner {
        padding: 0 1.5rem;
    }

    .author-profile-content {
        padding: 1.5rem;
    }

    .author-name {
        font-size: 2rem;
    }

    .author-posts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .author-posts-title {
        font-size: 1.75rem;
    }

    .author-posts-count {
        font-size: 1rem;
    }
}


/* ==========================================================================
   Tag Page
   ========================================================================== */

.tag-archive {
    padding: 4rem 0;
}

.archive-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.archive-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.archive-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 700px;
    margin: 0 auto 0.5rem;
}

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


/* ==========================================================================
   Post Page
   ========================================================================== */

.author-card {
    margin: 3rem 0;
    border-top: 1px solid var(--color-border);
    padding-top: 3rem;
}

.author-card-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-width: 900px;
    margin: 0 auto;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

.author-card-cover {
    background-size: cover;
    background-position: center;
    min-height: 350px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-card-avatar {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-background);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
}

.author-card-content {
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.author-card-location {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.author-card-name {
    font-size: 2rem;
    font-weight: 400;
    margin: 0 0 1rem 0;
    font-family: var(--font-serif, Georgia, serif);
}

.author-card-name a {
    color: var(--color-text);
    text-decoration: none;
}

.author-card-name a:hover {
    color: var(--color-primary);
}

.author-card-bio {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.author-card-social {
    display: flex;
    gap: 0.625rem;
    margin-bottom: 1.5rem;
}

.author-card-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    transition: all 0.2s ease;
    color: var(--color-text);
}

.author-card-social a:hover {
    background-color: var(--color-text);
    border-color: var(--color-text);
    color: var(--color-background);
}

.author-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: gap 0.2s ease;
}

.author-card-link:hover {
    gap: 0.75rem;
}

.author-card-link svg {
    flex-shrink: 0;
}

/* Comments Section */
.post-comments {
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid var(--color-border);
}

@media (max-width: 968px) {
    .author-card-inner {
        grid-template-columns: 1fr;
    }

    .author-card-cover {
        min-height: 250px;
    }

    .author-card-content {
        padding: 2rem;
    }

    .author-card-name {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .author-card {
        margin: 2rem 0;
        padding-top: 2rem;
    }

    .author-card-inner {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .author-card-content {
        padding: 1.5rem;
    }

    .author-card-name {
        font-size: 1.5rem;
    }

    .author-card-social {
        flex-wrap: wrap;
    }
}


/* ==========================================================================
   Error 404 Page
   ========================================================================== */

.error-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.error-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    color: var(--color-primary);
}

.error-image svg {
    width: 100%;
    height: 100%;
}

.error-code {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--color-text);
    letter-spacing: -0.03em;
}

.error-message {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
}

.error-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.button-primary {
    background-color: var(--color-primary);
    color: white;
}

.button-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.button-secondary {
    background-color: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.button-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.error-suggestions {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-border);
}

.error-suggestions h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--color-text);
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.suggestion-card {
    display: flex;
    flex-direction: column;
}

.suggestion-image {
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.suggestion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.suggestion-card:hover .suggestion-image img {
    transform: scale(1.05);
}

.suggestion-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.suggestion-title a {
    color: var(--color-text);
    transition: color 0.2s ease;
}

.suggestion-title a:hover {
    color: var(--color-primary);
}

.suggestion-meta {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

@media (max-width: 640px) {
    .error-code {
        font-size: 3rem;
    }

    .error-message {
        font-size: 1.5rem;
    }

    .error-actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
        justify-content: center;
    }

    .suggestions-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   Error Page
   ========================================================================== */

.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
}

.error-content {
    text-align: center;
    max-width: 600px;
}

.error-code {
    font-size: 8rem;
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.error-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.error-button {
    display: inline-block;
    background-color: var(--color-primary);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.error-button:hover {
    background-color: var(--color-primary-hover);
    color: white;
}

@media (max-width: 768px) {
    .error-code {
        font-size: 5rem;
    }
    
    .error-message {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   Archive Pagination
   ========================================================================== */

.post-card-wrapper.paginated-hidden {
    display: none;
}

.archive-pagination {
    display: flex;
    justify-content: center;
    margin: 3rem 0 2rem;
}

.archive-pagination .load-more-button {
    position: relative;
}

.archive-pagination .button-loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

html.color-scheme-Dark .archive-pagination .button-loader {
    border-color: rgba(0, 0, 0, 0.3);
    border-top-color: #000000;
}
