/* ==========================================================================
   Cortex - A Bold Editorial Ghost Theme for AI & Tech Blogs
   Version: 1.0.0
   ========================================================================== */


/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */

:root {
    /* Color Palette — Dark Mode */
    --bg: #080808;
    --bg-elevated: #121212;
    --text: #F0F0F0;
    --text-secondary: #8A8A8A;
    --accent: var(--ghost-accent-color, #8B5CF6);
    --accent-hover: color-mix(in srgb, var(--accent) 80%, white);
    --accent-subtle: color-mix(in srgb, var(--accent) 80%, black);
    --accent-light: color-mix(in srgb, var(--accent) 10%, transparent);
    --accent-glow: color-mix(in srgb, var(--accent) 25%, transparent);
    --border: #1E1E1E;
    --card-bg: #141414;
    --code-bg: #0E0E18;
    --code-text: #D4D4D8;
    --surface-grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");

    /* Typography — Ghost custom font support */
    --gh-font-heading: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
    --gh-font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: var(--gh-font-heading);
    --font-body: var(--gh-font-body);
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --font-label: var(--font-body);

    /* Spacing */
    --gap: 2rem;
    --gap-sm: 1rem;
    --gap-lg: 3rem;
    --gap-xl: 4rem;

    /* Layout */
    --container: 1200px;
    --container-wide: 1400px;
    --container-narrow: 720px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Radii */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3), 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.35), 0 8px 10px rgba(0, 0, 0, 0.2);

    /* Header */
    --header-height: 72px;

    /* Z-index scale */
    --z-header: 100;
    --z-mobile-menu: 110;
    --z-overlay: 105;
    --z-sticky-cta: 90;
}


/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */

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

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    background-image: var(--surface-grain), radial-gradient(rgba(124, 58, 237, 0.06) 1px, transparent 1px);
    background-repeat: repeat, repeat;
    background-size: 256px 256px, 28px 28px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open,
body.no-scroll {
    overflow: hidden;
}

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

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

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

::selection {
    background-color: rgba(124, 58, 237, 0.2);
    color: var(--text);
}

::-moz-selection {
    background-color: rgba(124, 58, 237, 0.2);
    color: var(--text);
}


/* ==========================================================================
   3. Accessibility & Focus Styles
   ========================================================================== */

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Remove outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ==========================================================================
   4. Layout Containers
   ========================================================================== */

.container {
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--gap);
    padding-right: var(--gap);
}

.container-wide {
    max-width: var(--container-wide);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--gap);
    padding-right: var(--gap);
}

.container-narrow {
    max-width: var(--container-narrow);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--gap);
    padding-right: var(--gap);
}

.site-content {
    min-height: calc(100vh - var(--header-height));
    padding-top: var(--header-height);
}


/* ==========================================================================
   5. Site Header
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* Allow slight transparency for the blur effect */
    background-color: rgba(8, 8, 8, 0.92);
}

.site-header.header-hidden {
    transform: translateY(-100%);
}

.site-header.header-visible {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: var(--gap);
}

/* ---- Header Left: Logo ---- */

.site-header-left {
    flex-shrink: 0;
}

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

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

.site-logo-text {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

/* ---- Header Center: Navigation ---- */

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

.site-nav ul,
.site-nav .nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    display: inline-block;
    padding: 0.5rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius);
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.site-nav a:hover {
    color: var(--text);
    background-color: var(--accent-light);
}

.site-nav .nav-current a {
    color: var(--accent);
}

/* ---- Header Right ---- */

.site-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Ghost search button override */
.site-header-right .gh-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.site-header-right .gh-search:hover {
    color: var(--text);
    background-color: var(--accent-light);
}

/* Header Buttons */

.header-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.125rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.header-btn-subscribe {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #FFFFFF;
}

.header-btn-subscribe:hover {
    box-shadow: 0 2px 12px var(--accent-glow);
    transform: translateY(-1px);
}

.header-btn-upgrade {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #FFFFFF;
}

.header-btn-upgrade:hover {
    box-shadow: 0 2px 12px var(--accent-glow);
    transform: translateY(-1px);
}

.header-btn-account {
    border: 1px solid var(--border);
    color: var(--text);
}

.header-btn-account:hover {
    border-color: var(--accent);
    color: var(--accent);
}



/* ==========================================================================
   7. Hamburger / Mobile Menu Toggle
   ========================================================================== */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius);
    gap: 5px;
    transition: background-color var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background-color: var(--accent-light);
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition-fast);
    transform-origin: center;
}

/* Animate to X */
.mobile-menu-toggle.is-open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.is-open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.is-open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1023px) {
    .mobile-menu-toggle {
        display: flex;
    }
}


/* ==========================================================================
   8. Mobile Menu
   ========================================================================== */

.mobile-menu {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    width: min(360px, 85vw);
    z-index: var(--z-mobile-menu);
    background-color: var(--bg);
    border-left: 1px solid var(--border);
    padding: var(--gap-lg) var(--gap);
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: var(--gap-lg);
}

.mobile-menu.is-open {
    transform: translateX(0);
}

/* Overlay behind mobile menu */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    top: var(--header-height);
    z-index: var(--z-overlay);
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

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

.mobile-menu-nav ul,
.mobile-menu-nav .nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-nav a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: color var(--transition-fast);
}

.mobile-menu-nav a:hover {
    color: var(--accent);
}

.mobile-menu-cta {
    display: block;
    width: 100%;
    padding: 0.875rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: var(--radius);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.mobile-menu-cta:hover {
    box-shadow: 0 4px 16px var(--accent-glow);
    transform: translateY(-1px);
}

/* Hide desktop nav on mobile */
@media (max-width: 1023px) {
    .site-nav {
        display: none;
    }

    .header-btn-subscribe,
    .header-btn-upgrade,
    .header-btn-account {
        display: none;
    }
}


/* ==========================================================================
   9. Featured Post Hero
   ========================================================================== */

.featured-post {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin-top: calc(var(--header-height) * -1);
}

.featured-post-link {
    display: flex;
    align-items: flex-end;
    width: 100%;
    min-height: 70vh;
    color: #FFFFFF;
}

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

.featured-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: kenBurns 25s ease-in-out infinite alternate;
}

.featured-post-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.82) 0%,
            rgba(0, 0, 0, 0.4) 40%,
            rgba(0, 0, 0, 0.12) 100%
        ),
        linear-gradient(
            135deg,
            rgba(124, 58, 237, 0.15) 0%,
            transparent 60%
        );
    z-index: 1;
}

.featured-post-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: var(--gap-xl);
    padding-top: calc(var(--header-height) + var(--gap-xl));
}

.featured-post-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.featured-post-badge {
    display: inline-block;
    padding: 0.3rem 0.875rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #FFFFFF;
    background-color: var(--accent);
    border-radius: var(--radius-full);
}

.featured-post-badges .badge {
    font-size: 0.6875rem;
    padding: 0.3rem 0.875rem;
}

.featured-post-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
}

.featured-post-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.05;
    color: #FFFFFF;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

.featured-post-excerpt {
    font-size: 1.125rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    max-width: 620px;
}

.featured-post-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
}

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

.featured-post-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.featured-post-reading-time {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: 0.03em;
}

/* Staggered hero entrance */
.featured-post-badges,
.featured-post-tag,
.featured-post-title,
.featured-post-excerpt,
.featured-post-meta {
    opacity: 0;
    animation: heroReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.featured-post-badges { animation-delay: 0.15s; }
.featured-post-tag { animation-delay: 0.25s; }
.featured-post-title { animation-delay: 0.35s; }
.featured-post-excerpt { animation-delay: 0.5s; }
.featured-post-meta { animation-delay: 0.65s; }

/* When no feature image, adapt */
.featured-post:not(:has(.featured-post-image)) {
    background-color: var(--code-bg);
    min-height: 50vh;
}


/* ==========================================================================
   10. Post Feed Grid
   ========================================================================== */

.post-feed {
    padding: var(--gap-xl) 0;
}

.container:has(.section-label) + .post-feed {
    padding-top: 0;
}

.post-feed-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}

/* Mixed layout: first card spans 2 columns (homepage only) */
.post-feed-inner > .post-card:first-child {
    grid-column: span 2;
}

/* Archive pages: equal-width cards */
.tag-header ~ .post-feed .post-feed-inner > .post-card:first-child,
.author-header ~ .post-feed .post-feed-inner > .post-card:first-child,
.related-posts .post-feed-inner > .post-card:first-child {
    grid-column: span 1;
}

.tag-header ~ .post-feed .post-feed-inner > .post-card:first-child .post-card-link,
.author-header ~ .post-feed .post-feed-inner > .post-card:first-child .post-card-link,
.related-posts .post-feed-inner > .post-card:first-child .post-card-link {
    flex-direction: column;
}

.tag-header ~ .post-feed .post-feed-inner > .post-card:first-child .post-card-image,
.author-header ~ .post-feed .post-feed-inner > .post-card:first-child .post-card-image,
.related-posts .post-feed-inner > .post-card:first-child .post-card-image {
    width: 100%;
    min-height: auto;
    aspect-ratio: 16 / 9;
}

.tag-header ~ .post-feed .post-feed-inner > .post-card:first-child .post-card-title,
.author-header ~ .post-feed .post-feed-inner > .post-card:first-child .post-card-title,
.related-posts .post-feed-inner > .post-card:first-child .post-card-title {
    font-size: 1.25rem;
}

.post-feed-inner > .post-card:first-child .post-card-link {
    flex-direction: row;
}

.post-feed-inner > .post-card:first-child .post-card-image {
    width: 50%;
    flex-shrink: 0;
    aspect-ratio: auto;
    min-height: 280px;
}

.post-feed-inner > .post-card:first-child .post-card-content {
    padding: 1.75rem;
    justify-content: center;
}

.post-feed-inner > .post-card:first-child .post-card-title {
    font-size: 1.625rem;
    line-height: 1.25;
}

.post-feed-inner > .post-card:first-child .post-card-excerpt {
    -webkit-line-clamp: 3;
}

@media (max-width: 1023px) {
    .post-feed-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .post-feed-inner > .post-card:first-child {
        grid-column: span 1;
    }

    .post-feed-inner > .post-card:first-child .post-card-link {
        flex-direction: column;
    }

    .post-feed-inner > .post-card:first-child .post-card-image {
        width: 100%;
        min-height: auto;
        aspect-ratio: 16 / 9;
    }
}


/* ==========================================================================
   11. Post Card
   ========================================================================== */

.post-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(124, 58, 237, 0.2);
}

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

/* ---- Card Image ---- */

.post-card-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

/* Purple duotone overlay on hover */
.post-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.25) 0%, rgba(124, 58, 237, 0.05) 100%);
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 1;
}

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

.post-card:hover .post-card-image::after {
    opacity: 1;
}

/* ---- Shared Access Badges (cards + post page) ---- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-premium {
    background: linear-gradient(135deg, #f6d365, #fda085);
    color: #1a1a2e;
}

.badge-members {
    background: linear-gradient(135deg, #7C3AED, #a78bfa);
    color: #FFFFFF;
}

/* Card badge positioning */
.post-card-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
}

/* ---- Card Content ---- */

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

.post-card-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.post-card-tag::before {
    content: "> ";
    opacity: 0.7;
}

.post-card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 0.5rem;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.post-card:hover .post-card-title {
    color: var(--accent);
    transform: translateX(4px);
}

.post-card-excerpt {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex-grow: 1;

    /* 2 line clamp */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.post-card-author {
    font-weight: 500;
}

.post-card-meta .post-card-date::before {
    content: "\00B7";
    margin-right: 0.75rem;
}

.post-card-meta .post-card-reading-time::before {
    content: "\00B7";
    margin-right: 0.75rem;
}


/* ==========================================================================
   12. Single Post (post-full)
   ========================================================================== */

.post-full {
    padding-bottom: var(--gap-xl);
}

/* ---- Post Header ---- */

.post-full-header {
    position: relative;
    margin-bottom: var(--gap-lg);
}

.post-full-header.has-feature-image {
    margin-top: calc(var(--header-height) * -1);
    margin-bottom: 0;
}

/* Gradient fade from hero into content */
.post-full-header.has-feature-image::after {
    content: '';
    display: block;
    height: 60px;
    background: linear-gradient(
        0deg,
        var(--bg) 0%,
        transparent 100%
    );
    position: relative;
    z-index: 2;
    margin-top: -60px;
    pointer-events: none;
}

.post-full-image {
    position: relative;
    width: 100%;
    max-height: 60vh;
    overflow: hidden;
}

.post-full-image img {
    width: 100%;
    height: 60vh;
    object-fit: cover;
}

.post-full-image-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.85) 0%,
            rgba(0, 0, 0, 0.55) 35%,
            rgba(0, 0, 0, 0.15) 100%
        ),
        linear-gradient(
            135deg,
            rgba(124, 58, 237, 0.1) 0%,
            transparent 50%
        );
}

/* Header content positioned over image */
.has-feature-image .post-full-header-content {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    padding-bottom: var(--gap-lg);
    padding-top: var(--gap-xl);
    color: #FFFFFF;
}

.has-feature-image .post-full-title {
    color: #FFFFFF;
}

.has-feature-image .post-full-meta {
    color: rgba(255, 255, 255, 0.85);
}

.has-feature-image .post-full-meta a {
    color: #FFFFFF;
}

.has-feature-image .post-full-meta a:hover {
    color: #FFFFFF;
}

/* Without feature image */
.post-full-header:not(.has-feature-image) .post-full-header-content {
    padding-top: var(--gap-lg);
    padding-bottom: var(--gap);
}

/* ---- Post Badges (Tag + Premium) ---- */

.post-full-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

/* Slightly larger badges on post page */
.post-full-badges .badge {
    padding: 0.3rem 0.875rem;
    font-size: 0.6875rem;
}

.post-full-tag {
    display: inline-block;
    padding: 0.3rem 0.875rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #FFFFFF;
    background-color: var(--accent);
    border-radius: var(--radius-full);
    transition: background-color var(--transition-fast);
}

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

/* Without feature image, adjust tag color */
.post-full-header:not(.has-feature-image) .post-full-tag {
    color: #FFFFFF;
}

/* ---- Post Title ---- */

.post-full-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

/* ---- Post Meta ---- */

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

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

.post-full-meta-author a {
    font-weight: 500;
    color: var(--text);
}

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

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

.has-feature-image .author-avatar {
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.post-full-meta-date,
.post-full-meta-reading-time {
    display: flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    letter-spacing: 0.02em;
}

.post-full-meta-date::before,
.post-full-meta-reading-time::before {
    content: "\00B7";
    margin-right: 1rem;
    font-weight: 700;
}

/* Staggered hero entrance — matches homepage hero reveal */
.has-feature-image .post-full-tag,
.has-feature-image .post-full-title,
.has-feature-image .post-full-meta {
    opacity: 0;
    animation: heroReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.has-feature-image .post-full-tag { animation-delay: 0.15s; }
.has-feature-image .post-full-title { animation-delay: 0.3s; }
.has-feature-image .post-full-meta { animation-delay: 0.5s; }


/* ==========================================================================
   13. Post Content
   ========================================================================== */

.post-full-content {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text);
}

/* Spacing between content elements */
.post-full-content > * + * {
    margin-top: 1.5rem;
}

/* Headings — editorial presence with accent bar */
.post-full-content h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.625rem, 3vw, 2rem);
    margin-top: 4rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    position: relative;
}

/* Purple accent bar on h2 */
.post-full-content h2::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--accent);
}

.post-full-content h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    margin-top: 3rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.post-full-content h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1875rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.post-full-content h5 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.0625rem;
    margin-top: 1.75rem;
    margin-bottom: 0.25rem;
}

.post-full-content h6 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-top: 1.75rem;
    margin-bottom: 0.25rem;
}

/* Paragraphs */
.post-full-content p {
    margin-top: 1.25rem;
    margin-bottom: 0;
}

/* Links */
.post-full-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

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

/* Lists */
.post-full-content ul,
.post-full-content ol {
    padding-left: 1.75rem;
    margin-top: 1.25rem;
}

.post-full-content ul {
    list-style: disc;
}

.post-full-content ol {
    list-style: decimal;
}

.post-full-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.post-full-content li > ul,
.post-full-content li > ol {
    margin-top: 0.5rem;
}

/* Blockquotes */
.post-full-content blockquote {
    position: relative;
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--accent);
    background-color: rgba(139, 92, 246, 0.08);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

.post-full-content blockquote p {
    margin-top: 0;
    color: var(--text);
}

.post-full-content blockquote p + p {
    margin-top: 0.75rem;
}

/* Code - Inline */
.post-full-content code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 0.15em 0.4em;
    background-color: var(--accent-light);
    border-radius: var(--radius-sm);
    color: var(--accent);
    word-break: break-word;
}

/* Code - Block */
.post-full-content pre {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--code-bg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(124, 58, 237, 0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* Purple accent line on top of code blocks */
.post-full-content pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0.4;
}

.post-full-content pre code {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--code-text);
    background: none;
    padding: 0;
    border-radius: 0;
    white-space: pre;
    word-break: normal;
    tab-size: 4;
}

/* Custom scrollbar for code blocks */
.post-full-content pre::-webkit-scrollbar {
    height: 6px;
}

.post-full-content pre::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.post-full-content pre::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

/* Images */
.post-full-content img {
    display: block;
    margin: 2rem auto;
    border-radius: var(--radius);
    max-width: 100%;
    height: auto;
}

/* Figures */
.post-full-content figure {
    margin: 2rem 0;
}

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

/* Tables */
.post-full-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.post-full-content table thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
}

.post-full-content table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.post-full-content table tbody tr:nth-child(even) {
    background-color: var(--accent-light);
}

/* Horizontal Rule — editorial three-dot separator */
.post-full-content hr {
    border: none;
    margin: 3rem auto;
    width: auto;
    max-width: 100px;
    height: auto;
    background: none;
    text-align: center;
}

.post-full-content hr::after {
    content: "\2022\2009\2022\2009\2022";
    font-size: 1.25rem;
    letter-spacing: 0.3em;
    color: var(--accent);
    opacity: 0.5;
}

/* Embedded content (video, iframe) */
.post-full-content iframe {
    width: 100%;
    border: none;
    border-radius: var(--radius);
    margin: 2rem 0;
}

/* Strong & Emphasis */
.post-full-content strong {
    font-weight: 600;
    color: var(--text);
}

.post-full-content em {
    font-style: italic;
}

/* Superscript & Subscript */
.post-full-content sup,
.post-full-content sub {
    font-size: 0.75em;
}

/* Mark / Highlight */
.post-full-content mark {
    background-color: rgba(124, 58, 237, 0.15);
    padding: 0.1em 0.2em;
    border-radius: 2px;
}


/* ==========================================================================
   13. Post Layout Grid (Content + TOC Sidebar)
   ========================================================================== */

.post-layout {
    display: grid;
    grid-template-columns: minmax(0, var(--container-narrow)) 1fr;
    gap: 0 var(--gap-lg);
    align-items: start;
}

/* Content column — constrained to reading width */
.post-layout-content {
    min-width: 0;
    max-width: var(--container-narrow);
}

/* Remove container-narrow from children since layout handles width */
.post-layout .post-full-content,
.post-layout .post-full-footer {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Sidebar wrapper — single sticky container, children stacked */
.post-sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--gap-lg));
    max-height: calc(100vh - var(--header-height) - var(--gap-xl));
    overflow-y: auto;
    padding-top: var(--gap);
    display: grid;
}

.post-sidebar > * {
    grid-area: 1 / 1;
}

/* TOC Sidebar */
.post-toc {
}

/* JS sets opacity directly — this class used when too few headings */
.post-toc.is-hidden {
    display: none;
}

.post-toc-inner {
    padding-left: var(--gap);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.post-toc-header {
    margin-bottom: 1rem;
}

.post-toc-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
}

.post-toc-label::before {
    content: "> ";
    color: var(--accent);
}

.post-toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.post-toc-link {
    display: block;
    padding: 0.375rem 0;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    position: relative;
}

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

.post-toc-link.is-active {
    color: var(--accent);
    font-weight: 500;
}

/* Indent h3 entries */
.post-toc-link[data-level="3"] {
    padding-left: 1rem;
    font-size: 0.75rem;
}

.post-toc-inner {
    position: relative;
}

/* Reading progress bar */
.post-toc-progress {
    margin-top: 1rem;
    height: 2px;
    background: var(--border);
    border-radius: 1px;
    overflow: hidden;
}

.post-toc-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.1s linear;
    border-radius: 1px;
}

/* Custom scrollbar for sidebar */
.post-sidebar::-webkit-scrollbar {
    width: 3px;
}

.post-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

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

/* Tablet and below: hide sidebar, single column */
@media (max-width: 1023px) {
    .post-layout {
        grid-template-columns: 1fr;
    }

    .post-layout-content {
        max-width: var(--container-narrow);
        margin-left: auto;
        margin-right: auto;
    }

    .post-sidebar {
        display: none;
    }
}

/* Sidebar Prev / Next Nav */
.post-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-left: var(--gap);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0;
    pointer-events: none;
}

.post-sidebar-nav-link {
    display: block;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.post-sidebar-nav-link:hover .post-sidebar-nav-title {
    color: var(--accent);
}

.post-sidebar-nav-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.post-sidebar-nav-label::before {
    color: var(--accent);
}

.post-sidebar-nav-prev .post-sidebar-nav-label::before {
    content: "\2190  ";
}

.post-sidebar-nav-next .post-sidebar-nav-label::before {
    content: "\2192  ";
}

.post-sidebar-nav-title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   14. Post Footer
   ========================================================================== */

.post-full-footer {
    padding-top: var(--gap-lg);
}

/* Tags */
.post-full-tags {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: var(--gap-lg);
}

.post-full-tags a {
    color: var(--accent);
    font-weight: 500;
    transition: color var(--transition-fast);
}

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


/* ==========================================================================
   15. Author Card
   ========================================================================== */

.author-card {
    padding-top: 0;
    margin-top: var(--gap-lg);
}

.author-card-inner {
    display: flex;
    gap: 1.25rem;
}

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

.author-card-content {
    flex-grow: 1;
}

.author-card-name {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.0625rem;
    margin-bottom: 0.25rem;
}

.author-card-name a {
    color: var(--text);
    transition: color var(--transition-fast);
}

.author-card-name a:hover {
    color: var(--accent);
}

.author-card-bio {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
}


/* ==========================================================================
   16. Related Posts
   ========================================================================== */

.related-posts {
    margin-top: var(--gap-lg);
}

/* Related posts use .post-feed-inner — inherit homepage grid layout */


/* ==========================================================================
   17. Comments
   ========================================================================== */

.post-comments {
    margin-top: var(--gap-lg);
}

.post-comments-cta {
    padding: var(--gap) 0;
}

.post-comments-prompt {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.post-comments-sub {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

/* Hide CTA when Ghost native comments are rendered */
.gh-comments ~ .post-comments-cta,
.ghost-comments ~ .post-comments-cta,
iframe[title*="comment"] ~ .post-comments-cta {
    display: none;
}


/* ==========================================================================
   17b. Content Gate (Premium Paywall)
   ========================================================================== */

/* Hide Ghost's default paywall CTA — we use our own custom gate */
.post-full-content-gated .gh-post-upgrade-cta {
    display: none !important;
}

.post-full-content-gated {
    position: relative;
}

.post-content-preview {
    position: relative;
}

/* Fade-out gradient over the last lines of preview text */
.post-content-gate {
    position: relative;
}

/* Content dissolve — tall fade with scan-line texture */
.post-content-gate-fade {
    height: 220px;
    margin-top: -220px;
    position: relative;
    z-index: 1;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(8, 8, 8, 0.15) 2px,
            rgba(8, 8, 8, 0.15) 3px
        ),
        linear-gradient(
            0deg,
            var(--bg) 0%,
            rgba(8, 8, 8, 0.95) 30%,
            rgba(8, 8, 8, 0.6) 60%,
            transparent 100%
        );
    pointer-events: none;
}

/* Gate card — layered dark surface with ambient glow */
.post-content-gate-inner {
    text-align: center;
    padding: 3.5rem var(--gap-lg) 3rem;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, var(--accent-light) 0%, transparent 50%),
        linear-gradient(180deg, #101014 0%, #0a0a0e 100%);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* Signal sweep border — animated light tracing the edge */
.post-content-gate-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background:
        conic-gradient(
            from var(--gate-border-angle, 0deg),
            transparent 0%,
            var(--accent) 10%,
            transparent 20%,
            transparent 80%,
            var(--accent) 90%,
            transparent 100%
        );
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    pointer-events: none;
    animation: gateBorderSweep 6s linear infinite;
}

/* Ambient top glow — soft halo behind the lock */
.post-content-gate-inner::after {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 180px;
    background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.7;
}

/* Lock icon — pulsing beacon */
.post-content-gate-lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, var(--accent-hover), var(--accent));
    color: #FFFFFF;
    margin-bottom: 1.75rem;
    box-shadow:
        0 0 0 1px var(--accent),
        0 0 0 8px rgba(255, 255, 255, 0.03),
        0 0 40px var(--accent-glow),
        0 0 80px var(--accent-light);
    position: relative;
    z-index: 1;
    animation: gateLockPulse 3s ease-in-out infinite;
}

.post-content-gate-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(1.625rem, 3.5vw, 2.25rem);
    color: #FFFFFF;
    margin-bottom: 0.625rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.post-content-gate .post-content-gate-description {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 440px;
    margin: 0 auto 2.5rem;
    line-height: 1.65;
    position: relative;
    z-index: 1;
}

/* CTA button — oversized, glowing, demands attention */
.post-full-content .post-content-gate-button {
    display: inline-block;
    padding: 1rem 3rem;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #FFFFFF;
    border-bottom: none;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 50%, var(--accent) 100%);
    background-size: 200% auto;
    border-radius: var(--radius-full);
    text-decoration: none;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 4px 20px var(--accent-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: box-shadow 0.3s ease, transform 0.2s ease, background-position 0.4s ease;
    position: relative;
    z-index: 1;
}

.post-full-content .post-content-gate-button:hover {
    color: #FFFFFF;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.15),
        0 8px 40px var(--accent-glow),
        0 0 80px var(--accent-light),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    background-position: right center;
}

.post-content-gate-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.post-content-gate-note a {
    color: var(--text);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
    transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

.post-content-gate-note a:hover {
    color: var(--accent);
    text-decoration-color: transparent;
}


/* ==========================================================================
   18. Membership CTA
   ========================================================================== */

.membership-cta {
    padding: var(--gap-xl) 0;
    text-align: center;
}

.membership-cta-inner {
    position: relative;
    padding: var(--gap-xl) var(--gap-lg);
    background: linear-gradient(135deg, var(--accent-light), rgba(124, 58, 237, 0.03), var(--accent-light));
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Decorative gradient border */
.membership-cta-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(
        135deg,
        var(--accent) 0%,
        rgba(124, 58, 237, 0.15) 40%,
        rgba(124, 58, 237, 0.15) 60%,
        var(--accent) 100%
    );
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    pointer-events: none;
}

/* Decorative corner glow */
.membership-cta-inner::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.5;
}

.membership-cta-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.membership-cta-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 1.5rem;
}

.membership-cta-button {
    display: inline-block;
    padding: 0.875rem 2.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 50%, var(--accent) 100%);
    background-size: 200% auto;
    border-radius: var(--radius-full);
    transition: box-shadow var(--transition), transform var(--transition-fast), background-position var(--transition);
}

.membership-cta-button:hover {
    box-shadow: 0 6px 28px var(--accent-glow);
    transform: translateY(-2px);
    background-position: right center;
}

.membership-cta-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.membership-cta-note a {
    color: var(--accent);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.membership-cta-note a:hover {
    color: var(--accent-hover);
}


/* ==========================================================================
   19. Pagination
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--gap-lg) 0;
    border-top: 1px solid var(--border);
}

.pagination-prev,
.pagination-next {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

.pagination-prev:hover,
.pagination-next:hover {
    border-color: var(--accent);
    color: var(--accent);
    background-color: var(--accent-light);
}

.pagination-prev svg,
.pagination-next svg {
    flex-shrink: 0;
}

.pagination-location {
    font-size: 0.875rem;
    color: var(--text-secondary);
}


/* ==========================================================================
   20. Archive Header (Tag & Author)
   ========================================================================== */

.archive-header {
    position: relative;
    padding: 0;
    overflow: hidden;
    background-color: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

/* Decorative scan-line texture overlay */
.archive-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(124, 58, 237, 0.04) 3px,
            rgba(124, 58, 237, 0.04) 4px
        );
    pointer-events: none;
    z-index: 1;
}

/* Feature image / cover support */
.archive-header-image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.archive-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: kenBurns 25s ease-in-out infinite alternate;
}

.archive-header-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.78) 0%,
            rgba(0, 0, 0, 0.4) 50%,
            rgba(0, 0, 0, 0.2) 100%
        ),
        linear-gradient(
            135deg,
            rgba(124, 58, 237, 0.12) 0%,
            transparent 60%
        );
    z-index: 1;
}

.archive-header.has-cover {
    border-bottom: none;
}

.archive-header.has-cover .archive-header-inner {
    color: #FFFFFF;
}

.archive-header.has-cover .archive-title {
    color: #FFFFFF;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

.archive-header.has-cover .archive-description {
    color: rgba(255, 255, 255, 0.8);
}

.archive-header.has-cover .archive-header-prefix,
.archive-header.has-cover .archive-count,
.archive-header.has-cover .author-header-location,
.archive-header.has-cover .author-header-website {
    color: rgba(255, 255, 255, 0.65);
}

/* Inner content */
.archive-header-inner {
    position: relative;
    z-index: 2;
    padding-top: calc(var(--header-height) + var(--gap-xl));
    padding-bottom: var(--gap-xl);
}

/* Monospace label prefix — matches theme ">" pattern */
.archive-header-label {
    margin-bottom: 1rem;
}

.archive-header-prefix {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
}

.archive-header-prefix::before {
    content: "> ";
}

/* Title — dramatic serif treatment */
.archive-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 0;
    color: var(--text);
}

/* Description */
.archive-description {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 580px;
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Meta row: count, location, website */
.archive-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.archive-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    padding: 0.3rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
}

.archive-header.has-cover .archive-count {
    border-color: rgba(255, 255, 255, 0.25);
}

/* Staggered entrance animation */
.archive-header-prefix,
.archive-title,
.archive-description,
.archive-meta,
.author-header-content {
    opacity: 0;
    animation: heroReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.archive-header-prefix { animation-delay: 0.1s; }
.archive-header .archive-title { animation-delay: 0.2s; }
.archive-header .archive-description { animation-delay: 0.35s; }
.archive-header .archive-meta { animation-delay: 0.45s; }

/* --- Tag Header --- */
.tag-header .archive-header-inner {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.tag-header.has-cover .archive-header-inner {
    min-height: 360px;
}

/* --- Author Header --- */
.author-header .archive-header-inner {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.author-header.has-cover .archive-header-inner {
    min-height: 360px;
}

.author-header-content {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    animation-delay: 0.15s;
}

.author-header-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--bg-elevated);
    box-shadow: var(--shadow-md), 0 0 0 1px var(--border);
}

.archive-header.has-cover .author-header-avatar {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

.author-header-info {
    flex-grow: 1;
}

.author-header-info .archive-title {
    margin-bottom: 0;
}

.author-header-info .archive-description {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.author-header-info .archive-meta {
    margin-top: 0.75rem;
}

.author-header-location {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.author-header-location::before {
    content: "\2302 ";
    font-size: 0.9rem;
}

.author-header-website {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    transition: opacity var(--transition-fast);
}

.author-header-website:hover {
    opacity: 0.7;
}

.archive-header.has-cover .author-header-website {
    color: rgba(255, 255, 255, 0.8);
}


/* ==========================================================================
   21. Page (page-full)
   ========================================================================== */

.page-full {
    padding-bottom: var(--gap-xl);
}

.page-full-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    margin-bottom: var(--gap-lg);
}

.page-full-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.page-full-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(2rem, 4.5vw, 3rem);
    letter-spacing: -0.02em;
    margin-bottom: var(--gap-lg);
    padding-top: var(--gap);
}

/* Full-width page variant */
.page-full-width .post-full-content {
    max-width: var(--container-wide);
}


/* ==========================================================================
   22. Error Page
   ========================================================================== */

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;
    padding: var(--gap-xl) var(--gap);
}

.error-code {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(6rem, 15vw, 12rem);
    line-height: 1;
    color: var(--accent);
    opacity: 0.15;
    margin-bottom: 0.5rem;
    letter-spacing: -0.04em;
}

.error-message {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--gap);
    max-width: 400px;
}

.error-link {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: var(--radius-full);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.error-link:hover {
    box-shadow: 0 4px 16px var(--accent-glow);
    transform: translateY(-1px);
}

.error-search {
    margin-top: 2.5rem;
    width: 100%;
    max-width: 400px;
}

.error-search-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.error-recent {
    margin-top: 3rem;
    width: 100%;
    max-width: 480px;
    text-align: left;
}

.error-recent-heading {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.error-recent-heading::before {
    content: '> ';
    color: var(--accent);
}

.error-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-recent-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border);
}

.error-recent-item:first-child {
    border-top: 1px solid var(--border);
}

.error-recent-item a {
    font-weight: 500;
    color: var(--text);
    transition: color var(--transition-fast);
}

.error-recent-item a:hover {
    color: var(--accent);
}

.error-recent-item time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}


/* ==========================================================================
   23. Footer
   ========================================================================== */

.site-footer {
    background-color: #060606;
    border-top: 1px solid var(--border);
    padding: var(--gap-xl) 0 0;
    margin-top: var(--gap-xl);
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--gap-lg);
    padding-bottom: var(--gap-lg);
}

@media (max-width: 639px) {
    .site-footer-grid {
        grid-template-columns: 1fr;
        gap: var(--gap);
    }
}

.site-footer-col {
    display: flex;
    flex-direction: column;
}

.site-footer-logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    transition: color var(--transition-fast);
}

.site-footer-logo:hover {
    color: var(--accent);
}

.site-footer-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 360px;
}

.site-footer-heading {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.site-footer-nav a {
    display: block;
    padding: 0.375rem 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

/* Social Links */
.site-footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.social-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    background-color: var(--accent-light);
}

/* Footer Recommendations */
.site-footer-recommendations {
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
}

.site-footer-recommendations .site-footer-heading {
    margin-bottom: 0.75rem;
}

.recommendations-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.recommendation-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.recommendation-item:hover {
    color: var(--text);
    border-color: var(--accent);
}

.recommendation-favicon {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

/* Co-Author Display */
.post-full-meta-authors {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.post-full-meta-authors .author-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    border: 2px solid var(--bg);
}

.post-full-meta-authors .post-full-meta-author + .post-full-meta-author::before {
    content: ",";
    margin-right: 0.125rem;
    color: var(--text-secondary);
}

/* Footer Bottom */
.site-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.site-footer-powered a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.site-footer-powered a:hover {
    color: var(--accent);
}

@media (max-width: 639px) {
    .site-footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}


/* ==========================================================================
   24. Sticky CTA
   ========================================================================== */

.sticky-cta {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: var(--z-sticky-cta);
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-xl);
    min-width: 220px;
    text-align: center;

    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
}

.sticky-cta.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sticky-cta-text {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.sticky-cta-button {
    display: block;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: var(--radius);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.sticky-cta-button:hover {
    box-shadow: 0 2px 12px var(--accent-glow);
    transform: translateY(-1px);
}

.sticky-cta-dismiss {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.sticky-cta-dismiss:hover {
    color: var(--text);
}

@media (max-width: 639px) {
    .sticky-cta {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}


/* ==========================================================================
   25. Ghost Koenig Editor Cards
   ========================================================================== */

/* Image Cards */
.kg-image-card {
    margin: 2rem 0;
}

.kg-image-card img {
    border-radius: var(--radius);
}

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

/* Width modifiers */
.kg-width-wide {
    position: relative;
    width: 85vw;
    max-width: 1000px;
    left: 50%;
    transform: translateX(-50%);
    margin-left: auto;
    margin-right: auto;
}

.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    margin-left: auto;
    margin-right: auto;
}

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

/* Gallery Card */
.kg-gallery-card {
    margin: 2rem 0;
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.kg-gallery-row img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* Bookmark Card */
.kg-bookmark-card {
    margin: 2rem 0;
}

.kg-bookmark-container {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--transition-fast);
    text-decoration: none;
}

.kg-bookmark-container:hover {
    box-shadow: var(--shadow-md);
}

.kg-bookmark-content {
    flex-grow: 1;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    order: 1;
}

.kg-bookmark-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.35;
    color: var(--text);
    margin-bottom: 0.375rem;
}

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

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

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

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

.kg-bookmark-thumbnail {
    flex-shrink: 0;
    width: 200px;
    order: 2;
}

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

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

    .kg-bookmark-thumbnail {
        width: 100%;
        height: 200px;
        order: 0;
    }
}

/* Embed Card */
.kg-embed-card {
    margin: 2rem 0;
}

.kg-embed-card > * {
    margin-left: auto;
    margin-right: auto;
}

/* Video iframes responsive */
.kg-embed-card iframe {
    width: 100%;
    border-radius: var(--radius);
}

/* Callout Card */
.kg-callout-card {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem;
    border-radius: var(--radius);
    margin: 2rem 0;
}

.kg-callout-card-grey {
    background-color: var(--accent-light);
}

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

.kg-callout-card-blue {
    background-color: rgba(59, 130, 246, 0.08);
}

.kg-callout-card-green {
    background-color: rgba(16, 185, 129, 0.08);
}

.kg-callout-card-yellow {
    background-color: rgba(245, 158, 11, 0.08);
}

.kg-callout-card-red {
    background-color: rgba(239, 68, 68, 0.08);
}

.kg-callout-card-pink {
    background-color: rgba(236, 72, 153, 0.08);
}

.kg-callout-card-purple {
    background-color: rgba(124, 58, 237, 0.08);
}

.kg-callout-emoji {
    font-size: 1.25rem;
    line-height: 1.5;
}

.kg-callout-text {
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Toggle Card */
.kg-toggle-card {
    margin: 2rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.kg-toggle-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
}

.kg-toggle-content {
    padding: 0 1.25rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Button Card */
.kg-button-card {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.kg-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

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

.kg-btn-accent:hover {
    background-color: var(--accent-hover);
}

/* File Card */
.kg-file-card {
    margin: 2rem 0;
}

.kg-file-card-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: box-shadow var(--transition-fast);
}

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

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

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

.kg-file-card-caption {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.kg-file-card-metadata {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Header Card */
.kg-header-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--gap-xl) var(--gap);
    min-height: 40vh;
    margin: 2rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.kg-header-card-content {
    position: relative;
    z-index: 2;
}

.kg-header-card h2 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 0.75rem;
}

.kg-header-card p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}


/* Audio Card */
.kg-audio-card {
    margin: 2rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card-bg);
}

.kg-audio-card .kg-audio-thumbnail {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    object-fit: cover;
}

.kg-audio-card .kg-audio-player-container {
    padding: 1rem 1.25rem;
}

.kg-audio-card .kg-audio-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text);
}

.kg-audio-card .kg-audio-play-icon,
.kg-audio-card .kg-audio-unmute-icon {
    color: var(--text);
}

.kg-audio-card .kg-audio-playback-rate {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.125rem 0.375rem;
}

.kg-audio-card .kg-audio-current-time,
.kg-audio-card .kg-audio-duration {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.kg-audio-card .kg-audio-seek-slider,
.kg-audio-card .kg-audio-volume-slider {
    accent-color: var(--accent);
}

/* Video Card */
.kg-video-card {
    margin: 2rem 0;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

.kg-video-card video {
    display: block;
    width: 100%;
}

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

.kg-video-container {
    position: relative;
}

.kg-video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    transition: opacity var(--transition-fast);
}

.kg-video-player-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
}

.kg-video-card .kg-video-play-icon {
    color: #FFFFFF;
}

.kg-video-card .kg-video-current-time,
.kg-video-card .kg-video-duration {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-mono);
}

.kg-video-card .kg-video-seek-slider,
.kg-video-card .kg-video-volume-slider {
    accent-color: var(--accent);
}

/* Product Card */
.kg-product-card {
    margin: 2rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card-bg);
}

.kg-product-card .kg-product-card-container {
    padding: 1.5rem;
}

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

.kg-product-card .kg-product-card-title-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.kg-product-card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
}

.kg-product-card .kg-product-card-rating-star {
    color: #F59E0B;
}

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

.kg-product-card .kg-product-card-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius);
    background-color: var(--accent);
    color: #FFFFFF;
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

.kg-product-card .kg-product-card-button:hover {
    background-color: var(--accent-hover);
}

/* Signup Card */
.kg-signup-card {
    margin: 2rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--gap-xl) var(--gap);
}

.kg-signup-card-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

.kg-signup-card h2 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 0.5rem;
}

.kg-signup-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.kg-signup-card .kg-signup-card-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius);
    background-color: var(--accent);
    color: #FFFFFF;
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

.kg-signup-card .kg-signup-card-button:hover {
    background-color: var(--accent-hover);
}

/* Blockquote */
blockquote.kg-blockquote-alt {
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.6;
    border-left: 3px solid var(--accent);
    padding-left: 1.25rem;
    margin: 2rem 0;
    color: var(--text-secondary);
}

/* Recommendations */
.recommendations {
    margin-top: var(--gap-lg);
}

.recommendations .gh-portal-recommendation-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    transition: box-shadow var(--transition-fast);
}

.recommendations .gh-portal-recommendation-item:hover {
    box-shadow: var(--shadow-md);
}

/* Tier Cards */
.tier-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    background: var(--card-bg);
    text-align: center;
    transition: box-shadow var(--transition);
}

.tier-card:hover {
    box-shadow: var(--shadow-lg);
}

.tier-card-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.tier-card-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.tier-card-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.tier-card-price span {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.tier-card-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius);
    background-color: var(--accent);
    color: #FFFFFF;
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

.tier-card-button:hover {
    background-color: var(--accent-hover);
}

.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--gap);
    margin-top: 1rem;
}


/* ==========================================================================
   27. Ghost Portal & Members Styles
   ========================================================================== */

/* Ghost search integration */
.gh-search-icon {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.gh-search-icon:hover {
    color: var(--text);
}


/* ==========================================================================
   28. Loading & Animation Utilities
   ========================================================================== */

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

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

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

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

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes signalPulse {
    0% { left: -30%; }
    100% { left: 100%; }
}

@keyframes gateBorderSweep {
    0% { --gate-border-angle: 0deg; }
    100% { --gate-border-angle: 360deg; }
}

@keyframes gateLockPulse {
    0%, 100% { box-shadow: 0 0 0 1px var(--accent), 0 0 0 8px rgba(255, 255, 255, 0.03), 0 0 40px var(--accent-glow), 0 0 80px var(--accent-light); }
    50% { box-shadow: 0 0 0 1px var(--accent), 0 0 0 12px rgba(255, 255, 255, 0.05), 0 0 60px var(--accent-glow), 0 0 100px var(--accent-light); }
}

@property --gate-border-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease both;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease both;
}

/* Scroll-triggered reveal */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.reveal-on-scroll:nth-child(3n+2) { transition-delay: 0.1s; }
.reveal-on-scroll:nth-child(3n) { transition-delay: 0.2s; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .featured-post-badges,
    .featured-post-tag,
    .featured-post-title,
    .featured-post-excerpt,
    .featured-post-meta {
        opacity: 1;
        animation: none;
    }

    .featured-post-image img,
    .archive-header-image img {
        animation: none;
    }

    .archive-header-prefix,
    .archive-header .archive-title,
    .archive-header .archive-description,
    .archive-header .archive-meta,
    .author-header-content {
        opacity: 1;
        animation: none;
    }

    .has-feature-image .post-full-tag,
    .has-feature-image .post-full-title,
    .has-feature-image .post-full-meta {
        opacity: 1;
        animation: none;
    }


    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .membership-cta-inner {
        animation: none;
    }
}


/* ==========================================================================
   29. Section Labels & Signal Line Dividers
   ========================================================================== */

.section-label {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: var(--gap) 0;
}

.section-label-text {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    white-space: nowrap;
}

.section-label-text::before {
    content: "> ";
    color: var(--accent);
}

.section-label-line {
    flex-grow: 1;
    height: 1px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}

.section-label-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -30%;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: signalPulse 4s ease-in-out infinite;
}

/* Standalone signal line divider */
.signal-line {
    height: 1px;
    background: var(--border);
    position: relative;
    overflow: hidden;
    margin: var(--gap-lg) 0;
}

.signal-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -30%;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: signalPulse 4s ease-in-out infinite;
}


/* ==========================================================================
   30. Responsive Adjustments
   ========================================================================== */

/* Large screens */
@media (min-width: 1400px) {
    :root {
        --gap: 2.5rem;
    }
}

/* Tablet */
@media (max-width: 1023px) {
    :root {
        --gap-xl: 3rem;
        --header-height: 64px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.625rem; }

    .featured-post {
        min-height: 55vh;
    }

    .featured-post-link {
        min-height: 55vh;
    }

    .featured-post-content {
        padding-bottom: var(--gap-lg);
    }
}

/* Mobile */
@media (max-width: 639px) {
    :root {
        --gap: 1.25rem;
        --gap-lg: 2rem;
        --gap-xl: 2.5rem;
    }

    body {
        font-size: 1rem;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }
    h3 { font-size: 1.25rem; }

    .site-header-inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .featured-post {
        min-height: 50vh;
    }

    .featured-post-link {
        min-height: 50vh;
    }

    .featured-post-title {
        font-size: 1.75rem;
    }

    .featured-post-excerpt {
        font-size: 1rem;
    }

    .post-full-image {
        max-height: 45vh;
    }

    .post-full-image img {
        height: 45vh;
    }

    .post-full-title {
        font-size: 1.75rem;
    }

    .post-full-content h2 {
        font-size: 1.375rem;
        margin-top: 3rem;
        padding-top: 1.5rem;
    }

    .post-full-content h3 {
        font-size: 1.1875rem;
    }

    .post-full-content pre {
        margin-left: calc(var(--gap) * -1);
        margin-right: calc(var(--gap) * -1);
        border-radius: 0;
        padding: 1.25rem var(--gap);
    }

    .membership-cta-inner {
        padding: var(--gap-lg) var(--gap);
    }

    .membership-cta-title {
        font-size: 1.375rem;
    }

    .post-full-meta {
        font-size: 0.875rem;
        gap: 0.5rem;
    }

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

    .archive-header-inner {
        padding-top: calc(var(--header-height) + var(--gap-lg));
        padding-bottom: var(--gap-lg);
    }

    .tag-header .archive-header-inner,
    .author-header .archive-header-inner {
        min-height: 180px;
    }

    .tag-header.has-cover .archive-header-inner,
    .author-header.has-cover .archive-header-inner {
        min-height: 280px;
    }

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

    .author-header-info .archive-description {
        margin-left: auto;
        margin-right: auto;
    }

    .author-header-info .archive-meta {
        justify-content: center;
    }

    /* Full-bleed wide images on mobile */
    .kg-width-wide {
        width: 100vw;
        max-width: 100vw;
    }

    .pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .site-footer-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   30. Auth Pages (Signup, Signin, Account)
   ========================================================================== */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height) - 120px);
    padding: var(--gap-xl) var(--gap);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--gap-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.auth-card-wide {
    max-width: 520px;
}

/* ---- Auth Header ---- */

.auth-header {
    text-align: center;
    margin-bottom: var(--gap-lg);
}

.auth-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.auth-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---- Auth Form ---- */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.auth-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.auth-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

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

/* ---- Newsletter Checkboxes ---- */

.auth-newsletters {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.auth-newsletters > .auth-label {
    margin-bottom: 0.125rem;
}

.auth-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
    padding: 0.625rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.auth-checkbox-label:hover {
    border-color: var(--accent);
    background-color: var(--accent-light);
}

.auth-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.auth-checkbox-mark {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-top: 2px;
    transition: all var(--transition-fast);
    position: relative;
}

.auth-checkbox:checked + .auth-checkbox-mark {
    background: var(--accent);
    border-color: var(--accent);
}

.auth-checkbox:checked + .auth-checkbox-mark::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-checkbox:focus-visible + .auth-checkbox-mark {
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-checkbox-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.auth-checkbox-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
}

.auth-checkbox-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ---- Auth Button ---- */

.auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
    text-align: center;
    text-decoration: none;
    letter-spacing: 0.02em;
    margin-top: 0.25rem;
}

.auth-button:hover {
    box-shadow: 0 4px 20px var(--accent-glow);
    transform: translateY(-1px);
    color: #FFFFFF;
}

.auth-button:active {
    transform: translateY(0);
}

.auth-button-spinner {
    display: none;
    animation: auth-spin 1s linear infinite;
}

@keyframes auth-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---- Auth Error ---- */

.auth-error {
    font-size: 0.8125rem;
    color: #EF4444;
    text-align: center;
    min-height: 0;
    margin: 0;
    transition: opacity var(--transition-fast);
}

.auth-error:empty {
    display: none;
}

/* ---- Auth Success State ---- */

.auth-success {
    display: none;
    text-align: center;
    padding: var(--gap) 0;
}

.auth-success.is-visible {
    display: block;
}

.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    margin-bottom: 1rem;
}

.auth-success-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.auth-success-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 360px;
    margin: 0 auto;
}

/* ---- Already Signed In ---- */

.auth-already {
    text-align: center;
    padding: var(--gap) 0;
}

.auth-already .auth-title {
    margin-bottom: 0.5rem;
}

.auth-already .auth-description {
    margin-bottom: 1.5rem;
}

/* ---- Auth Alternate Link ---- */

.auth-alternate {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.auth-alternate a {
    color: var(--accent);
    font-weight: 500;
}

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

/* ---- Loading State ---- */

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

.auth-form.is-loading .auth-button-spinner {
    display: inline-block;
}

.auth-form.is-loading .auth-button {
    pointer-events: none;
    opacity: 0.8;
}

.auth-form.is-loading .auth-input {
    pointer-events: none;
    opacity: 0.7;
}

/* ---- Account Page ---- */

.account-header {
    text-align: center;
    margin-bottom: var(--gap-lg);
}

.account-details {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.account-section {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}

.account-section:first-child {
    padding-top: 0;
}

.account-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.account-value {
    font-size: 0.9375rem;
    color: var(--text);
    text-align: right;
}

.account-manage-link {
    font-size: 0.9375rem;
    color: var(--accent);
    font-weight: 500;
    text-align: right;
}

.account-manage-link:hover {
    color: var(--accent-hover);
}

/* ---- Account Upgrade ---- */

.account-upgrade {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
}

.account-upgrade-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* ---- Account Actions ---- */

.account-actions {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
}

.account-signout {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.account-signout:hover {
    color: #EF4444;
}

/* ---- Auth Pages: Responsive ---- */

@media (max-width: 639px) {
    .auth-page {
        padding: var(--gap-lg) var(--gap);
        align-items: flex-start;
        padding-top: var(--gap-xl);
    }

    .auth-card {
        padding: var(--gap-lg) var(--gap);
        border-radius: var(--radius);
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .account-section {
        flex-direction: column;
        gap: 0.25rem;
    }

    .account-value {
        text-align: left;
    }
}


/* ==========================================================================
   31. Print Styles
   ========================================================================== */

@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

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

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    h2, h3 {
        page-break-after: avoid;
    }

    p {
        orphans: 3;
        widows: 3;
    }

    /* Hide non-essential elements */
    .site-header,
    .site-nav,
    .site-header-right,
    .mobile-menu,
    .mobile-menu-toggle,
    .mobile-menu-overlay,
    .site-footer,
    .membership-cta,
    .sticky-cta,
    .pagination,
    .related-posts,
    .post-comments,
    .post-toc,
    .header-btn,
    .post-card-badge,
    .post-full-tag,
    .gh-search {
        display: none !important;
    }

    .site-content {
        padding-top: 0;
    }

    .post-full-header.has-feature-image {
        margin-top: 0;
    }

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

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