/* ===================================================================
   PhaseQ Ghost Theme — Cyberpunk CTF Design
   =================================================================== */

/* --- Variables --- */
:root {
    --bg:         #0a0a0f;
    --bg-card:    #111118;
    --bg-surface: #16161f;
    --bg-elevated:#1c1c28;
    --cyan:       #00d4ff;
    --cyan-dim:   rgba(0, 212, 255, 0.15);
    --cyan-glow:  rgba(0, 212, 255, 0.4);
    --green:      #39ff14;
    --green-dim:  rgba(57, 255, 20, 0.12);
    --green-glow: rgba(57, 255, 20, 0.35);
    --red:        #ff4040;
    --text:       #d8e8f0;
    --text-muted: #5a7080;
    --text-dim:   #3a5060;
    --border:     #1e2a3a;
    --border-glow:#00d4ff33;
    --font-heading: 'Rajdhani', 'Share Tech Mono', monospace;
    --font-mono:    'Share Tech Mono', monospace;
    --font-body:    'Inter', system-ui, sans-serif;
    --radius:     4px;
    --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: var(--cyan); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

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

/* --- Background Effects --- */
.hex-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(0,212,255,0.04) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(57,255,20,0.03) 0%, transparent 50%);
    pointer-events: none;
}

.scanline {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.03) 2px,
        rgba(0,0,0,0.03) 4px
    );
    pointer-events: none;
}

.site-main { position: relative; z-index: 2; }

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.site-header::after {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--green), transparent);
    opacity: 0.4;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 32px;
}

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

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

.site-logo-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.logo-bracket { color: var(--cyan); }
.logo-name {
    background: linear-gradient(135deg, var(--cyan), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 4px;
}

.site-nav { margin-left: auto; }

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-slash { color: var(--cyan); opacity: 0.6; font-size: 0.8rem; }

.nav-link:hover,
.nav-item.active .nav-link {
    color: var(--cyan);
    border-color: var(--border-glow);
    background: var(--cyan-dim);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--cyan);
    display: block;
    transition: all 0.3s;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--cyan);
    color: var(--bg);
    border-color: var(--cyan);
}
.btn-primary:hover {
    background: transparent;
    color: var(--cyan);
    box-shadow: 0 0 20px var(--cyan-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--cyan);
    border-color: var(--cyan);
}
.btn-ghost:hover {
    background: var(--cyan-dim);
    box-shadow: 0 0 15px var(--cyan-glow);
}

.btn-sm { padding: 6px 16px; font-size: 0.8rem; }

/* --- Hero Section --- */
.hero {
    min-height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}

.hero-badge {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--cyan);
    letter-spacing: 3px;
    margin-bottom: 16px;
    opacity: 0.8;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, var(--cyan) 50%, var(--green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat { text-align: center; }
.stat-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}
.stat-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}
.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* --- Terminal Component --- */
.terminal-header,
.hero-terminal .terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    border-radius: 6px 6px 0 0;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #28c840; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 8px;
}

.terminal-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 2;
}

.terminal-line { display: flex; align-items: baseline; gap: 8px; }

.prompt { color: var(--green); flex-shrink: 0; }
.cmd { color: var(--text); }
.output { color: var(--text-muted); padding-left: 20px; }
.output.red { color: var(--red); }

.typing::after {
    content: '_';
    animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-terminal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 0 40px rgba(0,212,255,0.08), 0 8px 32px rgba(0,0,0,0.5);
    overflow: hidden;
}

/* --- Section Styles --- */
.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    white-space: nowrap;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
}

.posts-section { padding: 80px 0; }

/* --- Post Grid --- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* --- Post Card --- */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 24px var(--cyan-glow), 0 4px 16px rgba(0,0,0,0.4);
    transform: translateY(-4px);
}

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

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, var(--bg-card));
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--cyan);
    background: var(--cyan-dim);
    border: 1px solid var(--border-glow);
    padding: 2px 8px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition);
}
.tag-badge:hover {
    background: var(--cyan);
    color: var(--bg);
}

.post-date, .read-time {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}
.card-title a { color: var(--text); transition: color var(--transition); }
.card-title a:hover { color: var(--cyan); }

.card-excerpt {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
}

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

.card-author { display: flex; align-items: center; gap: 8px; }
.author-avatar-sm { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.author-name-sm { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

.read-more {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--cyan);
    transition: gap var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.read-more:hover { color: #fff; }
.read-more .arrow { transition: transform var(--transition); }
.read-more:hover .arrow { transform: translateX(4px); }

/* --- Featured Card --- */
.featured-post { margin-bottom: 40px; }

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 300px;
}

.featured-card .card-image { aspect-ratio: auto; }

.featured-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--bg);
    background: var(--cyan);
    padding: 4px 10px;
    letter-spacing: 2px;
}

.featured-card .card-content { padding: 32px; gap: 16px; }

/* --- Single Post --- */
.post-single { padding-bottom: 80px; }

.post-header {
    padding: 80px 0 40px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.post-meta-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.post-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    color: #fff;
}

.post-excerpt {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 24px;
}

.post-author-bar {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.author-info { display: flex; align-items: center; gap: 12px; }
.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.author-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cyan-dim);
    border: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    font-family: var(--font-heading);
    font-weight: 700;
}
.author-name { font-weight: 600; color: var(--text); font-size: 0.9rem; display: block; }
.author-bio { font-size: 0.8rem; color: var(--text-muted); display: block; }

.post-feature-image {
    margin-bottom: 48px;
}
.post-feature-image img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* --- Post Content (Ghost rich content) --- */
.gh-content {
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 720px;
    color: var(--text);
}

.gh-content h1, .gh-content h2, .gh-content h3,
.gh-content h4, .gh-content h5, .gh-content h6 {
    font-family: var(--font-heading);
    color: #fff;
    margin: 2em 0 0.8em;
    line-height: 1.3;
}

.gh-content h2 { font-size: 1.8rem; }
.gh-content h3 { font-size: 1.4rem; color: var(--cyan); }

.gh-content p { margin-bottom: 1.5em; }

.gh-content a { color: var(--cyan); border-bottom: 1px solid var(--border-glow); }
.gh-content a:hover { color: #fff; border-color: var(--cyan); }

.gh-content code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--green);
}

.gh-content pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--cyan);
    padding: 24px;
    overflow-x: auto;
    border-radius: var(--radius);
    margin: 2em 0;
}

.gh-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.88rem;
    color: var(--text);
}

.gh-content blockquote {
    border-left: 3px solid var(--cyan);
    padding: 16px 24px;
    margin: 2em 0;
    background: var(--cyan-dim);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.gh-content blockquote p {
    color: var(--text);
    font-style: italic;
    margin: 0;
}

.gh-content ul, .gh-content ol {
    padding-left: 24px;
    margin-bottom: 1.5em;
}

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

.gh-content ul li::marker { color: var(--cyan); }

.gh-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
    margin: 2.5em 0;
}

.gh-content img {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 1.5em auto;
}

.gh-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 0.9rem;
}

.gh-content th {
    font-family: var(--font-heading);
    background: var(--bg-elevated);
    color: var(--cyan);
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid var(--cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.gh-content td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

.gh-content tr:hover td { background: var(--bg-surface); }

.post-tags, .post-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.tags-label, .share-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.share-btn {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.share-btn:hover {
    color: var(--cyan);
    border-color: var(--border-glow);
    background: var(--cyan-dim);
}

/* --- Post Navigation --- */
.post-navigation { padding: 48px 0; border-top: 1px solid var(--border); }

.nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.nav-post {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    color: var(--text);
}

.nav-post:hover {
    border-color: var(--cyan);
    background: var(--cyan-dim);
    color: var(--cyan);
}

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

.nav-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-title { font-family: var(--font-heading); font-size: 1rem; font-weight: 600; }

/* --- Archive / Tag / Author --- */
.archive-header, .about-hero {
    padding: 80px 24px 60px;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border);
    margin-bottom: 60px;
}

.archive-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyan);
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.archive-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.archive-description {
    color: var(--text-muted);
    max-width: 560px;
    font-size: 1rem;
    line-height: 1.6;
}

.archive-count {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    display: block;
    margin-top: 12px;
}

/* --- Author Profile --- */
.author-profile {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.author-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.author-avatar-large.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cyan-dim);
    border-color: var(--border-glow);
    color: var(--cyan);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
}

.author-location, .author-website {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    display: block;
    margin-top: 6px;
}

/* --- About Page --- */
.about-hero { text-align: center; }
.about-title { font-size: clamp(3rem, 8vw, 5rem); }
.about-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 16px;
    max-width: 500px;
    margin-inline: auto;
}

.about-content { padding: 0 24px 80px; max-width: 1200px; margin: 0 auto; }

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    margin-bottom: 80px;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.2em;
    line-height: 1.8;
}

.about-terminal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0,212,255,0.06);
}

/* --- Specializations Grid --- */
.specializations { margin-bottom: 80px; }

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.spec-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.spec-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    opacity: 0;
    transition: opacity 0.3s;
}

.spec-card:hover {
    border-color: var(--cyan);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 16px var(--cyan-glow);
}

.spec-card:hover::before { opacity: 1; }

.spec-icon { font-size: 2rem; margin-bottom: 14px; }

.spec-card h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.spec-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

/* --- CTF Philosophy --- */
.ctf-philosophy { max-width: 720px; }

.cyber-quote {
    border-left: 3px solid var(--cyan);
    padding: 20px 28px;
    margin: 0 0 28px;
    background: var(--cyan-dim);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: #fff;
    font-style: italic;
    line-height: 1.5;
}

.philosophy-content p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1em;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.pagination a, .pagination .page-number {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: all var(--transition);
}

.pagination a:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: var(--cyan-dim);
}

/* --- Error Page --- */
.error-page {
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
}

.error-terminal {
    width: 100%;
    max-width: 560px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 32px;
    text-align: left;
}

.error-code {
    font-family: var(--font-heading);
    font-size: 8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 12px;
}

.error-message {
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* --- Footer --- */
.site-footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border);
    padding: 60px 24px 24px;
}

.footer-grid-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--green), transparent);
    opacity: 0.3;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-logo { height: 40px; margin-bottom: 12px; }

.footer-logo-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.footer-tagline { font-size: 0.88rem; color: var(--text-muted); max-width: 280px; line-height: 1.6; }

.footer-nav-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--cyan);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 16px;
}

.footer-nav ul, .footer-info ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer-nav a, .footer-info a {
    font-size: 0.88rem;
    color: var(--text-muted);
    transition: color var(--transition);
}
.footer-nav a:hover, .footer-info a:hover { color: var(--cyan); }

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copy, .footer-powered {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* --- Utility --- */
.cyan  { color: var(--cyan); }
.green { color: var(--green); }
.red   { color: var(--red); }

/* --- Glitch Effect --- */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

.glitch:hover::before {
    -webkit-text-fill-color: var(--cyan);
    color: var(--cyan);
    animation: glitch-1 0.3s infinite;
    clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
    transform: translate(-2px, 0);
}

.glitch:hover::after {
    -webkit-text-fill-color: var(--green);
    color: var(--green);
    animation: glitch-2 0.3s infinite;
    clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
    transform: translate(2px, 0);
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(-2px, 0); }
    50% { transform: translate(-4px, 1px); }
}
@keyframes glitch-2 {
    0%, 100% { transform: translate(2px, 0); }
    50% { transform: translate(4px, -1px); }
}

/* --- Mobile Nav --- */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(10,10,15,0.98);
        border-bottom: 1px solid var(--border);
        padding: 20px 24px;
        transform: translateY(-110%);
        transition: transform 0.3s ease;
        z-index: 99;
    }
    .site-nav.open { transform: translateY(0); }
    .nav-list { flex-direction: column; align-items: flex-start; gap: 4px; }
    .nav-link { font-size: 1.1rem; padding: 10px 16px; width: 100%; }

    .hero {
        grid-template-columns: 1fr;
        padding: 40px 24px 60px;
        min-height: auto;
        gap: 40px;
    }
    .hero-terminal { display: none; }

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

    .about-grid { grid-template-columns: 1fr; }
    .nav-grid { grid-template-columns: 1fr; }

    .footer-inner { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; text-align: center; }

    .hero-stats { gap: 16px; }
    .author-profile { flex-direction: column; }
}

@media (max-width: 480px) {
    .hero-cta { flex-direction: column; }
    .btn { justify-content: center; }
    .spec-grid { grid-template-columns: 1fr; }
}

/* --- Ghost Koenig Editor Required Classes --- */
.kg-width-wide {
    margin-left: calc(50% - min(45vw, 720px));
    margin-right: calc(50% - min(45vw, 720px));
    width: min(90vw, 1440px);
    max-width: 100vw;
}

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

.kg-image { margin: 1.5em auto; }
.kg-image-card { margin: 2em 0; }
.kg-image-card img { border-radius: var(--radius); border: 1px solid var(--border); }

.kg-gallery-card { margin: 2em 0; }
.kg-gallery-container { display: flex; flex-wrap: wrap; gap: 8px; }
.kg-gallery-row { display: flex; gap: 8px; margin-bottom: 8px; width: 100%; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

.kg-embed-card { margin: 2em 0; }
.kg-embed-card iframe { border-radius: var(--radius); border: 1px solid var(--border); }

.kg-bookmark-card { margin: 2em 0; }
.kg-bookmark-container {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    transition: border-color var(--transition);
}
.kg-bookmark-container:hover { border-color: var(--cyan); }
.kg-bookmark-content { padding: 20px; flex: 1; }
.kg-bookmark-title { font-family: var(--font-heading); font-size: 1rem; color: #fff; margin-bottom: 6px; }
.kg-bookmark-description { font-size: 0.85rem; color: var(--text-muted); }
.kg-bookmark-metadata { margin-top: 10px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim); }
.kg-bookmark-thumbnail { width: 160px; flex-shrink: 0; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.kg-callout-card {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    margin: 2em 0;
}
.kg-callout-emoji { font-size: 1.5rem; flex-shrink: 0; }
.kg-callout-text { color: var(--text); line-height: 1.6; }

.kg-toggle-card { margin: 2em 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.kg-toggle-heading { padding: 16px 20px; background: var(--bg-elevated); }
.kg-toggle-content { padding: 16px 20px; color: var(--text-muted); }

.kg-audio-card { margin: 2em 0; }
.kg-video-card { margin: 2em 0; }
.kg-video-card video { border-radius: var(--radius); border: 1px solid var(--border); }

.kg-header-card {
    padding: 60px 40px;
    text-align: center;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    margin: 2em 0;
    border: 1px solid var(--border);
}
.kg-header-card-header { font-family: var(--font-heading); font-size: 2rem; color: #fff; margin-bottom: 12px; }
.kg-header-card-subheader { color: var(--text-muted); }
.kg-header-card-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 24px;
    background: var(--cyan);
    color: var(--bg);
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kg-product-card { margin: 2em 0; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; background: var(--bg-card); }

.kg-nft-card { margin: 2em 0; }
.kg-button-card { margin: 2em 0; text-align: center; }
.kg-button-card a {
    display: inline-block;
    padding: 10px 28px;
    background: var(--cyan);
    color: var(--bg);
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition);
}
.kg-button-card a:hover { background: transparent; color: var(--cyan); border: 1px solid var(--cyan); }

/* --- Logo sizing override for SVG --- */
.site-logo {
    height: 52px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.footer-logo {
    height: 64px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    margin-bottom: 12px;
}
