/* ==========================================================================
   HAZLO Theme - Ghost Blog Theme
   A minimalist brutalist theme for productivity and wellness
   ========================================================================== */

/* ==========================================================================
   0. CSS Variables / Design Tokens
   ========================================================================== */

:root {
    /* Primary Colors */
    --color-primary: #000000;
    --color-secondary: #FFFFFF;
    --color-background: #F3F4F6;
    --color-background-dark: #0A0A0A;
    --color-accent: #00BD56;

    /* State Colors (for calendar/tracking elements) */
    --color-state-amazing: #FFE500;
    --color-state-good: #00BD56;
    --color-state-regular: #FF8C00;
    --color-state-bad: #FF1E1E;

    /* Text Colors */
    --color-text: #000000;
    --color-text-secondary: #4B5563;
    --color-text-muted: #9CA3AF;

    /* Border Colors */
    --color-border: #E5E7EB;
    --color-border-dark: #374151;

    /* ==========================================================================
       Zone-Specific Backgrounds - Visual Hierarchy System
       ========================================================================== */

    /* Header Zone - Dark with subtle grid */
    --bg-header: #0A0A0A;
    --bg-header-text: #FFFFFF;
    --grid-header: rgba(255, 255, 255, 0.05);

    /* Hero Zone - Light gray, clean (no grid) */
    --bg-hero: #F3F4F6;
    --bg-hero-text: #000000;

    /* Content Zone - Pure white, maximum readability (no grid) */
    --bg-content: #FFFFFF;
    --bg-content-text: #1F2937;

    /* Secondary Zones (Author, Related Posts) - Light gray (no grid) */
    --bg-secondary: #F3F4F6;
    --bg-secondary-text: #000000;

    /* CTA Zone - Black with accent grid */
    --bg-cta: #000000;
    --bg-cta-text: #FFFFFF;
    --grid-cta: rgba(0, 189, 86, 0.15);

    /* Footer Zone - Dark, no grid */
    --bg-footer: #0A0A0A;
    --bg-footer-text: #9CA3AF;
    --border-footer: #1F2937;

    /* Ghost Font Variables - for custom font support from Ghost admin */
    --gh-font-heading: 'Antonio', sans-serif;
    --gh-font-body: 'Inter', sans-serif;

    /* Typography */
    --font-display: var(--gh-font-heading, 'Antonio', sans-serif);
    --font-body: var(--gh-font-body, 'Inter', sans-serif);
    --font-mono: 'JetBrains Mono', monospace;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    --text-7xl: 4.5rem;

    /* Line Heights */
    --leading-tight: 1.1;
    --leading-snug: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 1.75;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Layout */
    --max-width: 1200px;
    --max-width-content: 720px;
    --max-width-wide: 1400px;

    /* Borders - Brutalist style: no radius */
    --border-radius: 0px;
    --border-width: 2px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Grid Pattern */
    --grid-size: 40px;
    --grid-color: rgba(0, 0, 0, 0.05);

    /* Z-index layers */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --color-primary: #FFFFFF;
    --color-secondary: #000000;
    --color-background: #0A0A0A;
    --color-text: #FFFFFF;
    --color-text-secondary: #D1D5DB;
    --color-text-muted: #6B7280;
    --color-border: #374151;
    --grid-color: rgba(255, 255, 255, 0.05);

    /* Zone-Specific Dark Mode Overrides */
    --bg-header: #0A0A0A;
    --bg-header-text: #FFFFFF;
    --grid-header: rgba(255, 255, 255, 0.05);

    --bg-hero: #1A1A1A;
    --bg-hero-text: #FFFFFF;

    --bg-content: #0F0F0F;
    --bg-content-text: #E5E7EB;

    --bg-secondary: #1A1A1A;
    --bg-secondary-text: #FFFFFF;

    --bg-cta: #000000;
    --bg-cta-text: #FFFFFF;
    --grid-cta: rgba(0, 189, 86, 0.15);

    --bg-footer: #0A0A0A;
    --bg-footer-text: #6B7280;
    --border-footer: #1F2937;
}

/* Auto Dark Mode (System Preference) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-primary: #FFFFFF;
        --color-secondary: #000000;
        --color-background: #0A0A0A;
        --color-text: #FFFFFF;
        --color-text-secondary: #D1D5DB;
        --color-text-muted: #6B7280;
        --color-border: #374151;
        --grid-color: rgba(255, 255, 255, 0.05);

        /* Zone-Specific Dark Mode Overrides */
        --bg-header: #0A0A0A;
        --bg-header-text: #FFFFFF;
        --grid-header: rgba(255, 255, 255, 0.05);

        --bg-hero: #1A1A1A;
        --bg-hero-text: #FFFFFF;

        --bg-content: #0F0F0F;
        --bg-content-text: #E5E7EB;

        --bg-secondary: #1A1A1A;
        --bg-secondary-text: #FFFFFF;

        --bg-cta: #000000;
        --bg-cta-text: #FFFFFF;
        --grid-cta: rgba(0, 189, 86, 0.15);

        --bg-footer: #0A0A0A;
        --bg-footer-text: #6B7280;
        --border-footer: #1F2937;
    }
}

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

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background-color: var(--color-background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Grid Pattern Background */
.has-grid-background {
    background-image:
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
}

/* ==========================================================================
   2. Typography
   ========================================================================== */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Antonio:wght@400;700&family=Inter:wght@300;400;600&family=JetBrains+Mono:wght@400;700&display=swap');

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

h1, .h1 {
    font-size: var(--text-5xl);
}

h2, .h2 {
    font-size: var(--text-4xl);
}

h3, .h3 {
    font-size: var(--text-3xl);
}

h4, .h4 {
    font-size: var(--text-2xl);
}

h5, .h5 {
    font-size: var(--text-xl);
}

h6, .h6 {
    font-size: var(--text-lg);
}

p {
    margin-bottom: var(--space-4);
}

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

a:hover {
    opacity: 0.8;
}

strong, b {
    font-weight: 600;
}

em, i {
    font-style: italic;
}

small {
    font-size: var(--text-sm);
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background-color: var(--color-border);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--border-radius);
}

pre {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    background-color: var(--color-primary);
    color: var(--color-secondary);
    padding: var(--space-4);
    overflow-x: auto;
    margin-bottom: var(--space-6);
    border-radius: var(--border-radius);
}

pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: var(--space-6);
    margin: var(--space-6) 0;
    font-size: var(--text-lg);
    font-style: italic;
    color: var(--color-text-secondary);
}

hr {
    border: none;
    border-top: var(--border-width) solid var(--color-border);
    margin: var(--space-8) 0;
}

/* ==========================================================================
   3. Layout Components
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-wide {
    max-width: var(--max-width-wide);
}

.container-content {
    max-width: var(--max-width-content);
}

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

.site-main {
    flex: 1;
}

/* ==========================================================================
   4. Header / Navigation
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background-color: var(--bg-header);
    color: var(--bg-header-text);
    border-bottom: var(--border-width) solid var(--color-border-dark);
    /* Header Grid Pattern */
    background-image:
        linear-gradient(var(--grid-header) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-header) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 var(--space-6);
}

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

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

.site-logo-text {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--bg-header-text);
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.site-logo-text:hover {
    opacity: 1;
    color: var(--bg-header-text);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    list-style: none;
}

.nav-item a {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--bg-header-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color var(--transition-fast);
}

.nav-item a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.nav-item.active a {
    color: var(--color-accent);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: var(--border-width) solid var(--bg-header-text);
    color: var(--bg-header-text);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: var(--border-radius);
}

.theme-toggle:hover {
    background-color: var(--bg-header-text);
    color: var(--bg-header);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: var(--border-width) solid var(--bg-header-text);
    cursor: pointer;
    gap: 5px;
    border-radius: var(--border-radius);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--bg-header-text);
    transition: all var(--transition-fast);
}

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

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

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

/* ==========================================================================
   5. Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border: var(--border-width) solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: var(--border-radius);
}

.btn:hover {
    transform: scale(1.05);
    opacity: 1;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-secondary);
    border-color: var(--color-accent);
}

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

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

.btn-secondary:hover {
    background-color: transparent;
    color: var(--color-primary);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

/* ==========================================================================
   6. Hero Section
   ========================================================================== */

.hero {
    position: relative;
    padding: var(--space-20) 0;
    background-color: var(--color-primary);
    color: var(--color-secondary);
    overflow: hidden;
    /* Hero Grid Pattern */
    background-image:
        linear-gradient(var(--grid-header) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-header) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
}

.hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-tag {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background-color: var(--color-secondary);
    color: var(--color-primary);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-6);
}

.hero-title {
    font-size: var(--text-6xl);
    color: var(--color-secondary);
    margin-bottom: var(--space-4);
}

.hero-title span {
    color: var(--color-accent);
}

.hero-description {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto var(--space-8);
}

/* ==========================================================================
   7. Post Cards
   ========================================================================== */

.post-feed {
    display: grid;
    gap: var(--space-8);
}

.post-feed.grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

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

.post-card {
    display: flex;
    flex-direction: column;
    background-color: var(--color-secondary);
    border: var(--border-width) solid var(--color-border);
    transition: all var(--transition-base);
    border-radius: var(--border-radius);
    overflow: hidden;
}

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

.post-feed.list .post-card {
    flex-direction: row;
}

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

.post-feed.list .post-card-image {
    width: 280px;
    min-height: 180px;
    flex-shrink: 0;
    aspect-ratio: 3/2;
}

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

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

.post-card-content {
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
    flex: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-3);
}

.post-card-tag {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    font-weight: 600;
}

.post-card-date {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.post-card-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
}

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

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

.post-card-excerpt {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
    flex: 1;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

.post-card-author {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

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

.post-card-author-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
}

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

/* Featured Post */
.post-card.featured {
    border-color: var(--color-accent);
}

.post-card.featured::before {
    content: 'FEATURED';
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    padding: var(--space-1) var(--space-3);
    background-color: var(--color-accent);
    color: var(--color-secondary);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
    z-index: 1;
}

/* Members-only indicator */
.post-card-access {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.post-card-access svg {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   8. Single Post
   ========================================================================== */

.post-template .site-main {
    padding: var(--space-12) 0;
}

.post-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.post-header-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.post-tag {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    font-weight: 600;
}

.post-date {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.post-title {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-6);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.post-excerpt {
    font-size: var(--text-xl);
    color: var(--color-text-secondary);
    max-width: 700px;
    margin: 0 auto var(--space-8);
    line-height: var(--leading-relaxed);
}

.post-feature-image {
    margin-bottom: var(--space-10);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

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

/* Post Content */
.post-content {
    font-size: var(--text-lg);
    line-height: var(--leading-loose);
    color: var(--bg-content-text);
    background-color: var(--bg-content);
}

.post-content > * {
    max-width: var(--max-width-content);
    margin-left: auto;
    margin-right: auto;
}

.post-content h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: var(--space-12);
    margin-bottom: var(--space-4);
    color: var(--color-text);
}

.post-content h3 {
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
    color: var(--color-text);
}

.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
    color: var(--color-text);
}

.post-content p {
    margin-bottom: var(--space-6);
}

.post-content ul,
.post-content ol {
    margin-bottom: var(--space-6);
    padding-left: var(--space-6);
}

.post-content li {
    margin-bottom: var(--space-2);
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: var(--space-8) auto;
    display: block;
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
}

.post-content figure {
    margin: var(--space-8) auto;
    max-width: 100%;
}

.post-content figcaption {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-2);
}

/* Wide and Full Width Images */
.post-content .kg-width-wide {
    max-width: 1000px;
}

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

/* Members Content CTA */
.content-cta {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    background: var(--color-background);
    border: var(--border-width) solid var(--color-border);
    margin: var(--space-8) 0;
}

.content-cta h2 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
}

.content-cta p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
}

.content-cta .btn-primary {
    display: inline-block;
    background: var(--color-accent);
    color: white;
    padding: var(--space-4) var(--space-8);
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background var(--transition-base);
}

.content-cta .btn-primary:hover {
    background: #00a34a;
}

.content-cta-login {
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.content-cta-login a {
    color: var(--color-accent);
    text-decoration: underline;
}

/* Ghost Cards */
.kg-card {
    margin: var(--space-8) auto;
}

.kg-bookmark-card {
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none;
}

.kg-bookmark-content {
    flex: 1;
    padding: var(--space-6);
}

.kg-bookmark-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.kg-bookmark-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

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

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

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

/* Callout Card */
.kg-callout-card {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-6);
    border: var(--border-width) solid var(--color-border);
    background-color: var(--color-background);
    border-radius: var(--border-radius);
}

.kg-callout-emoji {
    font-size: var(--text-2xl);
}

.kg-callout-text {
    flex: 1;
}

/* Button Card */
.kg-button-card {
    text-align: center;
}

.kg-button-card a {
    display: inline-block;
    padding: var(--space-4) var(--space-8);
    background-color: var(--color-accent);
    color: var(--color-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--border-radius);
}

.kg-button-card a:hover {
    opacity: 0.9;
}

/* Post Footer */
.post-footer {
    margin-top: var(--space-12);
    padding-top: var(--space-8);
    border-top: var(--border-width) solid var(--color-border);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-8);
}

.post-tags a {
    padding: var(--space-2) var(--space-4);
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    font-size: var(--text-sm);
    color: var(--color-text);
    border-radius: var(--border-radius);
}

.post-tags a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    opacity: 1;
}

/* ==========================================================================
   9. Author Section
   ========================================================================== */

.author-box {
    display: flex;
    gap: var(--space-6);
    padding: var(--space-8);
    background-color: var(--color-background);
    border: var(--border-width) solid var(--color-border);
    margin: var(--space-10) auto;
    max-width: var(--max-width-content);
    border-radius: var(--border-radius);
}

.author-box-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.author-box-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.author-box-content {
    flex: 1;
}

.author-box-name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.author-box-name a {
    color: var(--color-text);
}

.author-box-bio {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
}

.author-box-social {
    display: flex;
    gap: var(--space-4);
}

.author-box-social a {
    color: var(--color-text-muted);
}

.author-box-social a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.author-box-social svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   10. Related Posts
   ========================================================================== */

.related-posts {
    margin-top: var(--space-16);
    padding-top: var(--space-12);
    border-top: var(--border-width) solid var(--color-border);
}

.related-posts-title {
    text-align: center;
    margin-bottom: var(--space-10);
}

/* ==========================================================================
   11. Newsletter / Subscribe
   ========================================================================== */

.subscribe-section {
    background-color: var(--bg-cta);
    color: var(--bg-cta-text);
    padding: var(--space-16) 0;
    text-align: center;
    /* CTA Grid Pattern with accent color */
    background-image:
        linear-gradient(var(--grid-cta) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-cta) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
}

.subscribe-title {
    color: var(--color-secondary);
    margin-bottom: var(--space-4);
}

.subscribe-description {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto var(--space-8);
}

.subscribe-form {
    display: flex;
    gap: var(--space-4);
    max-width: 500px;
    margin: 0 auto;
}

.subscribe-form input[type="email"] {
    flex: 1;
    padding: var(--space-4) var(--space-5);
    font-family: var(--font-body);
    font-size: var(--text-base);
    border: var(--border-width) solid var(--color-secondary);
    background-color: transparent;
    color: var(--color-secondary);
    border-radius: var(--border-radius);
}

.subscribe-form input[type="email"]::placeholder {
    color: var(--color-text-muted);
}

.subscribe-form input[type="email"]:focus {
    outline: none;
    border-color: var(--color-accent);
}

.subscribe-form button {
    padding: var(--space-4) var(--space-8);
    background-color: var(--color-accent);
    color: var(--color-secondary);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: var(--border-width) solid var(--color-accent);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: var(--border-radius);
}

.subscribe-form button:hover {
    background-color: transparent;
    color: var(--color-accent);
}

/* Inline Subscribe */
.subscribe-inline {
    padding: var(--space-8);
    background-color: var(--color-background);
    border: var(--border-width) solid var(--color-border);
    margin: var(--space-10) auto;
    max-width: var(--max-width-content);
    border-radius: var(--border-radius);
}

.subscribe-inline-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-2);
}

.subscribe-inline-description {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
}

/* ==========================================================================
   12. Footer
   ========================================================================== */

.site-footer {
    background-color: var(--bg-footer);
    border-top: var(--border-width) solid var(--border-footer);
    padding: var(--space-12) 0 var(--space-8);
    color: var(--bg-footer-text);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-10);
    margin-bottom: var(--space-10);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--bg-footer-text);
    text-transform: uppercase;
    margin-bottom: var(--space-4);
}

.footer-logo a {
    color: #FFFFFF;
}

.footer-tagline {
    font-size: var(--text-sm);
    color: var(--bg-footer-text);
    line-height: var(--leading-relaxed);
}

.footer-nav-title {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-4);
    color: #FFFFFF;
}

.footer-nav-list {
    list-style: none;
}

.footer-nav-list li {
    margin-bottom: var(--space-2);
}

.footer-nav-list a {
    font-size: var(--text-sm);
    color: var(--bg-footer-text);
}

.footer-nav-list a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-8);
    border-top: 1px solid var(--border-footer);
}

.footer-copyright {
    font-size: var(--text-sm);
    color: var(--bg-footer-text);
}

.footer-social {
    display: flex;
    gap: var(--space-4);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-footer);
    color: var(--bg-footer-text);
    transition: all var(--transition-fast);
    border-radius: var(--border-radius);
}

.footer-social a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    opacity: 1;
}

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

/* ==========================================================================
   13. Pagination
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-12);
    padding-top: var(--space-8);
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 var(--space-4);
    border: var(--border-width) solid var(--color-border);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-radius: var(--border-radius);
}

.pagination-item:hover {
    border-color: var(--color-primary);
    opacity: 1;
}

.pagination-item.active {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    border-color: var(--color-primary);
}

.pagination-item.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* ==========================================================================
   14. Tag & Author Pages
   ========================================================================== */

.archive-header {
    text-align: center;
    padding: var(--space-16) 0;
    background-color: var(--color-primary);
    color: var(--color-secondary);
    /* Archive Header Grid Pattern */
    background-image:
        linear-gradient(var(--grid-header) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-header) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
}

.archive-tag {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background-color: var(--color-secondary);
    color: var(--color-primary);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-4);
}

.archive-title {
    font-size: var(--text-5xl);
    color: var(--color-secondary);
    margin-bottom: var(--space-4);
}

.archive-description {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.archive-count {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-4);
}

/* Author Page Specific */
.author-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.author-header-image {
    width: 120px;
    height: 120px;
    border: 4px solid var(--color-secondary);
    border-radius: 50%;
    overflow: hidden;
}

.author-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-header-info {
    text-align: left;
}

.author-social {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.author-social a {
    color: var(--color-text-muted);
}

.author-social a:hover {
    color: var(--color-secondary);
    opacity: 1;
}

/* ==========================================================================
   15. Error Page
   ========================================================================== */

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

.error-code {
    font-family: var(--font-display);
    font-size: 10rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-border);
    margin-bottom: var(--space-4);
}

.error-title {
    margin-bottom: var(--space-4);
}

.error-description {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
    max-width: 500px;
}

/* ==========================================================================
   16. Members / Portal Styles
   ========================================================================== */

.members-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    background-color: var(--color-accent);
    color: var(--color-secondary);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.content-cta {
    padding: var(--space-10);
    background-color: var(--color-background);
    border: var(--border-width) solid var(--color-border);
    text-align: center;
    margin: var(--space-8) auto;
    max-width: var(--max-width-content);
    border-radius: var(--border-radius);
}

.content-cta-title {
    margin-bottom: var(--space-4);
}

.content-cta-description {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
}

/* ==========================================================================
   17. Responsive Styles
   ========================================================================== */

@media (max-width: 1024px) {
    :root {
        --text-5xl: 2.5rem;
        --text-6xl: 3rem;
    }

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

    .footer-brand {
        grid-column: 1 / -1;
        max-width: none;
        margin-bottom: var(--space-4);
    }
}

@media (max-width: 768px) {
    :root {
        --text-4xl: 1.75rem;
        --text-5xl: 2rem;
        --text-6xl: 2.5rem;
    }

    .site-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--color-secondary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--space-8);
        transform: translateX(100%);
        transition: transform var(--transition-base);
        z-index: var(--z-fixed);
    }

    .site-nav.active {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        text-align: center;
    }

    .nav-item a {
        font-size: var(--text-2xl);
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding: var(--space-12) 0;
    }

    .hero-title {
        font-size: var(--text-4xl);
    }

    .post-feed.list .post-card {
        flex-direction: column;
    }

    .post-feed.list .post-card-image {
        width: 100%;
        aspect-ratio: 16/9;
    }

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

    .subscribe-form {
        flex-direction: column;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        margin: 0 auto;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
    }

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

    .author-box-image {
        margin: 0 auto;
    }

    .author-box-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    :root {
        --text-3xl: 1.5rem;
        --text-4xl: 1.75rem;
        --text-5xl: 2rem;
    }

    .container {
        padding: 0 var(--space-4);
    }

    .post-card-content {
        padding: var(--space-4);
    }

    .error-code {
        font-size: 6rem;
    }
}

/* ==========================================================================
   18. Utilities
   ========================================================================== */

.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;
}

.text-center {
    text-align: center;
}

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

.text-right {
    text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ==========================================================================
   19. Breadcrumb
   ========================================================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    font-size: var(--text-sm);
}

.breadcrumb-item {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-item:hover {
    color: var(--color-accent);
    opacity: 1;
}

.breadcrumb-separator {
    color: var(--color-text-muted);
}

.breadcrumb-current {
    color: var(--color-text-secondary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

/* ==========================================================================
   20. Post Hero Section
   ========================================================================== */

.post-hero {
    padding: var(--space-8) 0 var(--space-10);
    text-align: center;
    background-color: var(--bg-hero);
    color: var(--bg-hero-text);
    /* Post Hero Grid Pattern */
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
}

.post-hero .post-title {
    margin-bottom: var(--space-4);
}

.post-hero .post-excerpt {
    margin-bottom: var(--space-6);
}

.post-hero .members-label {
    margin-bottom: var(--space-6);
}

/* Author Card in Hero */
.post-meta-author {
    display: flex;
    justify-content: center;
    margin-top: var(--space-6);
}

.author-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.author-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    background-color: var(--color-background);
    border: 2px solid var(--color-border);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-avatar-placeholder {
    background-color: var(--color-accent);
    color: var(--color-secondary);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-lg);
}

.author-info {
    text-align: left;
}

.author-name {
    display: block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--color-text);
    text-decoration: none;
}

.author-name:hover {
    color: var(--color-accent);
    opacity: 1;
}

.post-meta-details {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.meta-separator {
    color: var(--color-text-muted);
}

.reading-time {
    color: var(--color-text-muted);
}

/* ==========================================================================
   21. Post Layout with TOC Sidebar
   ========================================================================== */

.post-content-area {
    background-color: var(--bg-content);
}

.post-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: var(--space-10);
    max-width: calc(var(--max-width-content) + 280px);
    padding: var(--space-12) var(--space-4);
    margin: 0 auto;
}

.post-main {
    max-width: var(--max-width-content);
}

/* ==========================================================================
   22. Table of Contents Sidebar
   ========================================================================== */

.toc-sidebar {
    position: relative;
    background-color: var(--bg-content);
    border-right: 1px solid var(--color-border);
    padding-right: var(--space-4);
}

.toc-wrapper {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.toc-title {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--color-border);
}

.toc-nav {
    margin-bottom: var(--space-8);
}

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

.toc-list li {
    margin-bottom: var(--space-2);
}

.toc-list a {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    padding: var(--space-2) 0;
    padding-left: var(--space-3);
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
    line-height: var(--leading-snug);
}

.toc-list a:hover {
    color: var(--color-text);
    border-left-color: var(--color-border);
    opacity: 1;
}

.toc-list a.active {
    color: var(--color-accent);
    border-left-color: var(--color-accent);
    font-weight: 500;
}

/* TOC Share Section */
.toc-share {
    padding-top: var(--space-6);
    border-top: 2px solid var(--color-border);
}

.toc-share-label {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text);
    margin-bottom: var(--space-4);
}

/* Mobile TOC */
.toc-mobile {
    display: none;
    margin-bottom: var(--space-6);
    border: var(--border-width) solid var(--color-border);
    background-color: var(--color-secondary);
}

.toc-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-4);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
}

.toc-mobile-toggle-text {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.toc-mobile-chevron {
    transition: transform var(--transition-fast);
}

.toc-mobile-toggle[aria-expanded="true"] .toc-mobile-chevron {
    transform: rotate(180deg);
}

.toc-mobile-nav {
    display: none;
    padding: 0 var(--space-4) var(--space-4);
}

.toc-mobile-nav.open {
    display: block;
}

.toc-list-mobile a {
    padding: var(--space-2) var(--space-3);
}

/* ==========================================================================
   23. Share Buttons
   ========================================================================== */

.share-section {
    margin: var(--space-8) 0;
}

.share-label {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text);
    margin-bottom: var(--space-4);
}

.share-buttons {
    display: flex;
    gap: var(--space-3);
}

.share-buttons-vertical {
    flex-direction: column;
}

.share-buttons-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 40px;
    height: 40px;
    background: none;
    border: var(--border-width) solid var(--color-border);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    border-radius: var(--border-radius);
}

.share-buttons-horizontal .share-button {
    width: auto;
    padding: var(--space-2) var(--space-4);
}

.share-button:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    opacity: 1;
}

.share-button svg {
    flex-shrink: 0;
}

.share-button-text {
    font-size: var(--text-sm);
    font-weight: 500;
}

/* Share section in sidebar (desktop) - hide text */
.toc-share .share-button-text {
    display: none;
}

/* Mobile share section */
.share-section-mobile {
    display: none;
    padding-top: var(--space-8);
    border-top: var(--border-width) solid var(--color-border);
    margin-top: var(--space-8);
}

/* ==========================================================================
   24. Enhanced Author Box
   ========================================================================== */

.author-section {
    background-color: var(--bg-secondary);
    padding: var(--space-12) 0;
}

.author-box-enhanced {
    margin: 0 auto;
    padding: var(--space-8);
    background-color: var(--bg-content);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
}

.author-box-inner {
    display: flex;
    align-items: flex-start;
    gap: var(--space-6);
}

.author-box-avatar {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    background-color: var(--color-secondary);
    border: 3px solid var(--color-border);
}

.author-box-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-box-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-accent);
    color: var(--color-secondary);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-2xl);
    border: none;
}

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

.author-box-enhanced .author-box-name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-2);
    text-transform: uppercase;
}

.author-box-enhanced .author-box-name a {
    color: var(--color-text);
    text-decoration: none;
}

.author-box-enhanced .author-box-name a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.author-box-enhanced .author-box-bio {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.author-box-meta {
    display: flex;
    gap: var(--space-4);
}

.author-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
    border-radius: var(--border-radius);
}

.author-link:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    opacity: 1;
}

/* ==========================================================================
   25. Related Posts Section
   ========================================================================== */

.related-posts-section {
    background-color: var(--bg-secondary);
    padding: var(--space-12) 0;
}

.related-posts-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.related-posts-section .related-posts-title {
    font-size: var(--text-2xl);
    margin-bottom: 0;
}

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

.related-post-card {
    background-color: var(--color-secondary);
    border: var(--border-width) solid var(--color-border);
    overflow: hidden;
    transition: all var(--transition-base);
    border-radius: var(--border-radius);
}

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

.related-post-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    background-color: var(--color-background);
}

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

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

.related-post-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-post-image-placeholder .placeholder-icon {
    color: var(--color-text-muted);
    opacity: 0.5;
}

.related-post-content {
    padding: var(--space-4);
}

.related-post-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.related-post-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    line-height: var(--leading-tight);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
}

.related-post-title a {
    color: var(--color-text);
    text-decoration: none;
}

.related-post-title a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.related-post-meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* ==========================================================================
   26. Post Template Responsive Updates
   ========================================================================== */

@media (max-width: 1024px) {
    .post-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .toc-sidebar {
        display: none;
    }

    .toc-mobile {
        display: block;
    }

    .share-section-mobile {
        display: block;
    }

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

@media (max-width: 768px) {
    .post-hero {
        padding: var(--space-6) 0;
    }

    .breadcrumb {
        justify-content: center;
    }

    .breadcrumb-current {
        max-width: 150px;
    }

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

    .author-info {
        text-align: center;
    }

    .post-meta-details {
        justify-content: center;
    }

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

    .author-box-meta {
        justify-content: center;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons-horizontal {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .post-hero .post-title {
        font-size: var(--text-3xl);
    }

    .author-avatar {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   27. Print Styles
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .subscribe-section,
    .related-posts,
    .related-posts-section,
    .pagination,
    .toc-sidebar,
    .toc-mobile,
    .share-section,
    .share-section-mobile,
    .breadcrumb {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .post-content {
        font-size: 12pt;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    .post-layout {
        display: block;
    }
}

/* ==========================================================================
   28. Index Page Content Area
   ========================================================================== */

.index-content-area {
    background-color: var(--bg-content);
}

/* ==========================================================================
   29. Archive Pages Content Area
   ========================================================================== */

.archive-content-area {
    background-color: var(--bg-content);
}

/* ==========================================================================
   30. Compact Hero Section
   ========================================================================== */

.hero-compact {
    position: relative;
    padding: var(--space-10) 0;
    background-color: var(--color-primary);
    color: var(--color-secondary);
    text-align: center;
    min-height: auto;
    max-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Hero Grid Pattern */
    background-image:
        linear-gradient(var(--grid-header) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-header) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
}

.hero-compact-inner {
    max-width: 700px;
    margin: 0 auto;
}

/* Main headline - replaces the image text */
.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--color-secondary);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* Tagline with accent */
.hero-tagline {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-text-muted);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-6);
}

.hero-tagline .accent {
    color: var(--color-accent);
    font-weight: 500;
}

.hero-subscribe-form {
    display: flex;
    gap: var(--space-3);
    max-width: 480px;
    margin: 0 auto var(--space-4);
}

.hero-subscribe-form input[type="email"] {
    flex: 1;
    padding: var(--space-4) var(--space-5);
    font-family: var(--font-body);
    font-size: var(--text-base);
    border: var(--border-width) solid var(--color-secondary);
    background-color: transparent;
    color: var(--color-secondary);
    border-radius: var(--border-radius);
}

.hero-subscribe-form input[type="email"]::placeholder {
    color: var(--color-text-muted);
}

.hero-subscribe-form input[type="email"]:focus {
    outline: none;
    border-color: var(--color-accent);
}

.hero-subscribe-success {
    color: var(--color-accent);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

.hero-subscribe-error {
    color: var(--color-state-bad);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

.hero-social-proof {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .hero-compact {
        padding: var(--space-6) var(--space-4);
        max-height: none; /* Allow natural height on mobile */
    }

    .hero-headline {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .hero-tagline {
        font-size: var(--text-sm);
    }

    .hero-subscribe-form {
        flex-direction: column;
        gap: var(--space-3);
    }

    .hero-subscribe-form input,
    .hero-subscribe-form button {
        width: 100%;
    }
}

/* ==========================================================================
   31. Featured Post Section
   ========================================================================== */

.featured-section {
    padding: var(--space-12) 0;
    background-color: var(--bg-content);
    border-bottom: 1px solid var(--color-border);
}

.featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
    align-items: center;
}

.featured-post-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    border: var(--border-width) solid var(--color-border);
    transition: border-color var(--transition-base);
}

.featured-post:hover .featured-post-image {
    border-color: var(--color-primary);
}

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

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

.featured-post-image-placeholder {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1A1A1A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-post-image-placeholder .placeholder-content {
    color: var(--color-text-muted);
    opacity: 0.5;
}

.featured-post-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-post-meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.featured-post-tag {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    font-weight: 600;
}

.featured-post-date {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.featured-post-title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
}

.featured-post-title a {
    color: var(--color-text);
    text-decoration: none;
}

.featured-post-title a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.featured-post-excerpt {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-6);
}

.featured-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.featured-post-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.featured-post-author-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.featured-post-author-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-accent);
    color: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-base);
}

.featured-post-author-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
}

.featured-post-reading-time {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

@media (max-width: 1024px) {
    .featured-post {
        gap: var(--space-6);
    }

    .featured-post-title {
        font-size: var(--text-3xl);
    }
}

@media (max-width: 768px) {
    .featured-section {
        padding: var(--space-8) 0;
    }

    .featured-post {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .featured-post-title {
        font-size: var(--text-2xl);
    }

    .featured-post-excerpt {
        font-size: var(--text-base);
    }
}

/* ==========================================================================
   32. Tags Navigation
   ========================================================================== */

.tags-nav-section {
    background-color: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-4) 0;
}

.tags-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
}

.tag-nav-link {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    border-radius: var(--border-radius);
}

.tag-nav-link:hover {
    color: var(--color-text);
    border-color: var(--color-border);
    opacity: 1;
}

.tag-nav-link.active {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    border-color: var(--color-primary);
}

@media (max-width: 768px) {
    .tags-nav {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--space-2);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

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

    .tag-nav-link {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* ==========================================================================
   33. Posts Section
   ========================================================================== */

.posts-section {
    padding: var(--space-12) 0;
    background-color: var(--bg-content);
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: var(--space-10);
    color: var(--color-text);
}

/* Post card placeholder for posts without images */
.post-card:not(:has(.post-card-image)) {
    position: relative;
}

.post-card:not(:has(.post-card-image))::before {
    content: '';
    display: block;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--color-primary) 0%, #1A1A1A 100%);
}

/* Alternative approach for browsers without :has support */
.post-card-image-placeholder {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--color-border);
}

.post-card-image-placeholder .placeholder-icon {
    color: var(--color-text-muted);
    opacity: 0.4;
    width: 40px;
    height: 40px;
}

/* List view placeholder adjustments */
.post-feed.list .post-card-image-placeholder {
    aspect-ratio: 3/2;
    min-height: 180px;
}

@media (max-width: 768px) {
    .posts-section {
        padding: var(--space-8) 0;
    }

    .section-title {
        font-size: var(--text-xl);
        margin-bottom: var(--space-6);
    }
}
