/* ==========================================================================
   Pneusmart Theme - Dark Industrial Magazine
   ========================================================================== */

/* Force dark mode everywhere - no toggle */
html {
    color-scheme: dark;
}

/* Override Ghost Portal to dark (matching slate palette) */
.gh-portal-popup-wrapper,
.gh-portal-popup-container {
    --grey0: #0f172a !important;
    --grey1: #1e293b !important;
    --grey2: #334155 !important;
    --grey13: #f1f5f9 !important;
    --grey12: #cbd5e1 !important;
    background: #0f172a !important;
    color: #f1f5f9 !important;
}

.gh-portal-popup-container * {
    color-scheme: dark !important;
}

/* ---------- Variables ---------- */
:root {
    /* Colors - Pneusmart Slate + Cyan Palette (matching wiki.pneusmart.io) */
    --color-bg: #0f172a;              /* slate-900 */
    --color-bg-elevated: #1e293b;     /* slate-800 */
    --color-bg-card: #1e293b;         /* slate-800 */
    --color-bg-hover: #334155;        /* slate-700 */
    --color-bg-footer: #020617;       /* slate-950 */
    --color-border: #334155;          /* slate-700 */
    --color-border-light: #475569;    /* slate-600 */

    /* Text - Slate palette */
    --color-text: #f1f5f9;            /* slate-100 */
    --color-text-secondary: #cbd5e1;  /* slate-300 */
    --color-text-muted: #94a3b8;      /* slate-400 */

    /* Accents - Cyan (Tailwind cyan palette) */
    --color-primary: #22d3ee;         /* cyan-400 */
    --color-primary-dark: #06b6d4;    /* cyan-500 */
    --color-primary-darker: #0891b2;  /* cyan-600 */
    --color-primary-light: #67e8f9;   /* cyan-300 */
    --color-primary-lighter: #a5f3fc; /* cyan-200 */
    --color-accent: #67e8f9;          /* cyan-300 */

    /* Status */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    /* Typography */
    --font-display: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'SF Mono', Consolas, monospace;

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

    /* Layout */
    --max-width: 1280px;
    --max-width-narrow: 720px;
    --header-height: 72px;

    /* Effects */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
    --transition: 0.2s ease;
}

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

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 var(--space-md);
    color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p {
    margin: 0 0 var(--space-md);
}

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

.site-main {
    flex: 1;
}

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

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

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.95);  /* slate-900 with transparency */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

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

.site-logo img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);  /* Makes logo white to match wiki/main site */
}

.site-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
}

.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: var(--space-xl);
}

.header-nav a {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    padding: var(--space-sm) 0;
    position: relative;
}

.header-nav a:hover {
    color: var(--color-text);
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition);
}

.header-nav a:hover::after {
    width: 100%;
}

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

.search-toggle {
    background: none;
    border: none;
    padding: var(--space-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: color var(--transition);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.875rem;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--color-primary-light);
    color: var(--color-bg);
}

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

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    padding: var(--space-xl);
    z-index: 99;
}

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

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-xl);
}

.mobile-nav a {
    display: block;
    padding: var(--space-md) 0;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.mobile-actions .btn {
    width: 100%;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: var(--space-3xl) 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
}

.hero-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--color-bg) 0%, transparent 30%, transparent 70%, var(--color-bg) 100%);
}

@media (orientation: portrait) {
    .hero-background {
        background-position: 25% center;
    }
}

.hero-content {
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-logo {
    max-width: 400px;
    width: 80%;
    height: auto;
    margin: 0 auto var(--space-xl);
    display: block;
    filter: brightness(0) invert(1);  /* Makes logo white */
}

.hero-description {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* ---------- Sections ---------- */
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-xl);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

/* Featured Section */
.featured-section {
    padding: var(--space-3xl) 0;
    background: var(--color-bg-elevated);
}

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

/* Tag Filters */
.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tag-filter {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    background: var(--color-bg-card);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all var(--transition);
}

.tag-filter:hover,
.tag-filter.active {
    background: var(--color-primary);
    color: var(--color-bg);
    border-color: var(--color-primary);
}

/* Posts Section */
.posts-section {
    padding: var(--space-3xl) 0;
}

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

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

/* ---------- Post Card ---------- */
.post-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

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

.post-card-link {
    display: block;
    color: inherit;
}

.post-card-link:hover {
    color: inherit;
}

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

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

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

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

.post-card-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    line-height: 1.3;
}

.post-card-excerpt {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

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

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

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

.author-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
}

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

/* Featured Card */
.post-card-featured {
    grid-column: span 1;
}

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

/* ---------- Contributors ---------- */
.contributors-section {
    padding: var(--space-3xl) 0;
    background: var(--color-bg-elevated);
}

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

.contributor-card {
    display: block;
    text-align: center;
    padding: var(--space-xl);
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.contributor-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
}

.contributor-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-md);
    border-radius: 50%;
    overflow: hidden;
}

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

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: var(--color-bg);
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
}

.contributor-name {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.contributor-bio {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.contributor-count {
    font-size: 0.875rem;
    color: var(--color-primary);
    font-weight: 500;
}

/* ---------- CTA Section ---------- */
.cta-section {
    padding: var(--space-3xl) 0;
    background: linear-gradient(135deg, var(--color-bg-elevated) 0%, var(--color-bg-card) 100%);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

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

.cta-content h2 {
    margin-bottom: var(--space-md);
}

.cta-content p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    margin-bottom: var(--space-xl);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* ---------- Single Post ---------- */
.post-header {
    padding: var(--space-3xl) 0 var(--space-xl);
    text-align: center;
}

.post-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.post-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--space-lg);
}

.post-excerpt {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

.post-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.post-authors {
    display: flex;
    gap: var(--space-md);
}

.post-author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text);
}

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

.post-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.separator {
    opacity: 0.5;
}

/* Feature Image */
.post-feature-image {
    margin: 0 auto var(--space-2xl);
    max-width: 1000px;
}

.post-feature-image img {
    width: 100%;
    border-radius: var(--radius-lg);
}

.post-feature-image figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: var(--space-md);
}

/* Post Content */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h2 {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-lg);
}

.post-content h3 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

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

.post-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.post-content img {
    border-radius: var(--radius-md);
    margin: var(--space-xl) 0;
}

.post-content blockquote {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    padding-left: var(--space-xl);
    border-left: 4px solid var(--color-primary);
    background: var(--color-bg-card);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

.post-content pre {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    overflow-x: auto;
    margin: var(--space-xl) 0;
}

.post-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--color-bg-card);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

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

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

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

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-xl) 0;
}

.post-content th, .post-content td {
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    text-align: left;
}

.post-content th {
    background: var(--color-bg-card);
    font-weight: 600;
}

/* Post Footer */
.post-footer {
    padding: var(--space-2xl) 0;
    margin-top: var(--space-2xl);
    border-top: 1px solid var(--color-border);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.post-tags span {
    font-weight: 500;
    color: var(--color-text-secondary);
}

.post-tags .tag {
    font-size: 0.875rem;
    padding: var(--space-xs) var(--space-md);
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    color: var(--color-text);
}

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

.post-share {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.post-share span {
    font-weight: 500;
    color: var(--color-text-secondary);
}

.post-share a {
    color: var(--color-text-muted);
    transition: color var(--transition);
}

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

/* Author Card */
.post-author-card {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.author-avatar-large {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
}

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

.author-info .author-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    display: block;
    margin-bottom: var(--space-sm);
}

.author-info .author-bio {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin: 0;
}

/* Related Posts */
.related-posts {
    padding: var(--space-3xl) 0;
    background: var(--color-bg-elevated);
}

/* ---------- Archive Pages ---------- */
.archive-header {
    position: relative;
    padding: var(--space-3xl) 0;
    text-align: center;
    overflow: hidden;
}

.archive-header-background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
}

.archive-header-content {
    position: relative;
}

.archive-label {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.archive-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: var(--space-md);
}

.archive-description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-md);
}

.archive-count {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* Author Header */
.author-header {
    padding: var(--space-3xl) 0;
    background: var(--color-bg-elevated);
}

.author-header-content {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.author-header .author-avatar-large {
    width: 120px;
    height: 120px;
}

.author-header .author-name {
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.author-header .author-bio {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.author-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.author-meta span, .author-meta a {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

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

/* ---------- Page ---------- */
.page-header {
    padding: var(--space-3xl) 0 var(--space-xl);
    text-align: center;
}

.page-title {
    font-size: clamp(2rem, 5vw, 3rem);
}

.page-excerpt {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-top: var(--space-md);
}

.page-feature-image {
    margin: 0 auto var(--space-2xl);
    max-width: 1000px;
}

.page-feature-image img {
    width: 100%;
    border-radius: var(--radius-lg);
}

.page-content {
    padding-bottom: var(--space-3xl);
}

/* ---------- Error Page ---------- */
.error-page {
    padding: var(--space-3xl) 0;
    text-align: center;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    line-height: 1;
}

.error-message {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.pagination a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-weight: 500;
    transition: all var(--transition);
}

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

.page-number {
    color: var(--color-text-muted);
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-bg-footer);
    border-top: 1px solid var(--color-border);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--color-border);
}

.footer-logo img {
    height: 36px;
    width: auto;
    margin-bottom: var(--space-md);
    filter: brightness(0) invert(1);  /* Makes logo white to match wiki/main site */
}

.footer-logo span {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
}

.footer-description {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.footer-column h4 {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.footer-column nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-column nav a {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    transition: color var(--transition);
}

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

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

.footer-bottom p {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin: 0;
}

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

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

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

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

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

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

    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    .header-nav,
    .header-right {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding: var(--space-2xl) 0;
    }

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

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .featured-grid,
    .posts-grid,
    .posts-grid-3,
    .contributors-grid {
        grid-template-columns: 1fr;
    }

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

    .tag-filters {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--space-sm);
    }

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

    .author-avatar-large {
        margin: 0 auto;
    }

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

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

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

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-cta .btn {
        width: 100%;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
    }

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

/* ---------- Ghost Specific ---------- */
.kg-card {
    margin: var(--space-xl) 0;
}

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

.kg-width-wide {
    max-width: 1000px;
    margin-left: calc(50% - 500px);
    margin-right: calc(50% - 500px);
}

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

@media (max-width: 1040px) {
    .kg-width-wide {
        margin-left: calc(-1 * var(--space-lg));
        margin-right: calc(-1 * var(--space-lg));
    }
}

.kg-callout-card {
    padding: var(--space-lg);
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-primary);
}

.kg-bookmark-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.kg-bookmark-content {
    padding: var(--space-lg);
}

.kg-bookmark-title {
    font-weight: 600;
    color: var(--color-text);
}

.kg-bookmark-description {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.kg-bookmark-metadata {
    margin-top: var(--space-md);
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.kg-bookmark-thumbnail img {
    object-fit: cover;
}

/* Gallery Card */
.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.kg-gallery-row {
    display: flex;
    gap: var(--space-md);
}

.kg-gallery-image {
    flex: 1;
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

/* Bookmark Card Extended */
.kg-bookmark-container {
    display: flex;
    text-decoration: none;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.kg-bookmark-container:hover {
    border-color: var(--color-primary);
}

.kg-bookmark-icon {
    width: 22px;
    height: 22px;
    margin-right: var(--space-sm);
}

.kg-bookmark-author {
    color: var(--color-text-secondary);
}

.kg-bookmark-author::before {
    content: "by ";
}

.kg-bookmark-publisher {
    color: var(--color-text-muted);
}

.kg-bookmark-publisher::before {
    content: " • ";
}

/* Toggle Card */
.kg-toggle-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.kg-toggle-heading {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
}

.kg-toggle-content {
    margin-top: var(--space-md);
    color: var(--color-text-secondary);
}

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

.kg-btn {
    display: inline-flex;
    align-items: center;
    padding: var(--space-md) var(--space-xl);
    background: var(--color-primary);
    color: var(--color-bg);
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background var(--transition);
}

.kg-btn:hover {
    background: var(--color-primary-light);
    color: var(--color-bg);
}

/* Header Card */
.kg-header-card {
    padding: var(--space-3xl);
    text-align: center;
}

.kg-header-card h2 {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

/* Signup Card */
.kg-signup-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
}

.kg-signup-card-content {
    max-width: 500px;
    margin: 0 auto;
}

/* NFT Card */
.kg-nft-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Before/After Card */
.kg-before-after-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}
