:root {
    --bg-void: #020c1b;
    --bg-deep: #0a192f;
    --bg-glass: rgba(17, 34, 64, 0.7);
    --bg-glass-strong: rgba(17, 34, 64, 0.9);
    --accent-primary: #64ffda;
    --accent-secondary: #00b4d8;
    --accent-alert: #ff6b6b;
    --accent-warning: #ffbd2e;
    --text-main: #e6f1ff;
    --text-muted: #8892b0;
    --border-ghost: rgba(100, 255, 218, 0.1);
    --shadow-glow: 0 0 20px rgba(100, 255, 218, 0.15);
    --font-heading: 'Inter', system-ui, sans-serif;
    --font-mono: 'Fira Code', monospace;
}

body.blog-article-page {
    background: radial-gradient(circle at 20% 20%, rgba(100, 255, 218, 0.05), transparent 30%), var(--bg-void);
    color: var(--text-main);
    font-family: var(--font-heading);
    overflow-x: hidden;
}

.legacy-hidden {
    display: none !important;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--accent-primary);
    box-shadow: 0 0 12px rgba(100, 255, 218, 0.45);
    width: 0%;
    z-index: 1200;
}

.reading-progress-bar {
    display: none !important;
}

/* === Cyber Hero === */
.cyber-hero {
    position: relative;
    padding: 150px 0 90px;
    overflow: hidden;
}

.hero-grid-bg {
    position: absolute;
    inset: -40% -20% -20% -20%;
    background-image:
        linear-gradient(rgba(100, 255, 218, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 180, 216, 0.08) 1px, transparent 1px);
    background-size: 80px 80px;
    transform: perspective(900px) rotateX(65deg) rotateZ(6deg);
    animation: gridDrift 22s linear infinite;
    opacity: 0.25;
    filter: drop-shadow(0 0 12px rgba(100, 255, 218, 0.08));
}

.hero-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(100, 255, 218, 0.08), transparent 35%),
        radial-gradient(circle at 80% 20%, rgba(0, 180, 216, 0.08), transparent 25%);
    mix-blend-mode: screen;
}

.hero-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 3rem;
    align-items: center;
}

.hero-kicker {
    font-family: var(--font-mono);
    letter-spacing: 2px;
    color: var(--accent-secondary);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 180, 216, 0.08);
    border: 1px solid var(--border-ghost);
    border-radius: 999px;
}

.hero-heading {
    font-size: clamp(2.8rem, 4vw, 4.4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -1px;
    margin: 18px 0 14px;
}

.hero-heading .typewriter-target {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding-left: 10px;
    color: var(--accent-primary);
}

.typewriter-target::after {
    content: '';
    width: 2px;
    height: 100%;
    background: var(--accent-primary);
    margin-left: 4px;
    animation: blink 1s step-start infinite;
}

.hero-subhead {
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 720px;
    margin-bottom: 24px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 16px 0;
    border-top: 1px solid var(--border-ghost);
    border-bottom: 1px solid var(--border-ghost);
    margin-bottom: 24px;
}

.author-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(17, 34, 64, 0.7);
    border: 1px solid var(--border-ghost);
    border-radius: 12px;
    box-shadow: var(--shadow-glow);
}

.author-chip img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--accent-primary);
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    padding: 8px 12px;
    border: 1px solid var(--border-ghost);
    border-radius: 10px;
    background: rgba(17, 34, 64, 0.6);
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
}

.cta-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(100, 255, 218, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}

.cta-primary .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-alert);
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.5);
    animation: pulseAlert 2s infinite;
}

.cta-primary .scan-glare {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 50%, transparent 100%);
    transform: translateX(-120%) skewX(-20deg);
}

.cta-primary:hover .scan-glare {
    animation: scan-glare 1.4s ease forwards;
}

.cta-primary:hover {
    transform: translateY(-2px);
    border-color: var(--accent-secondary);
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.25);
}

.cta-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border: 1px dashed var(--border-ghost);
    color: var(--text-main);
    font-family: var(--font-mono);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.cta-ghost:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.hero-hologram {
    position: relative;
    background: radial-gradient(circle at 50% 30%, rgba(100, 255, 218, 0.15), rgba(2, 12, 27, 0.95));
    border: 1px solid var(--border-ghost);
    border-radius: 18px;
    padding: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.hero-hologram::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(100, 255, 218, 0.15);
    border-radius: 14px;
    pointer-events: none;
}

.holo-ring {
    width: 140px;
    height: 140px;
    margin: 0 auto 18px;
    border-radius: 50%;
    border: 1px dashed rgba(100, 255, 218, 0.4);
    display: grid;
    place-items: center;
    position: relative;
    animation: spin 18s linear infinite;
}

.holo-core {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 255, 218, 0.3), rgba(0, 180, 216, 0.3));
    box-shadow: 0 0 30px rgba(100, 255, 218, 0.4);
    border: 1px solid rgba(100, 255, 218, 0.3);
}

.holo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.holo-metric {
    padding: 12px;
    border: 1px solid var(--border-ghost);
    border-radius: 12px;
    background: rgba(2, 12, 27, 0.75);
    box-shadow: var(--shadow-glow);
}

.holo-metric .label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 6px;
    display: block;
}

.holo-metric .value {
    font-size: 1.2rem;
    font-weight: 700;
}

.holo-metric.alert .value {
    color: var(--accent-alert);
}

.holo-metric.good .value {
    color: var(--accent-primary);
}

.hero-diagnostics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.hero-diagnostics .ultra-card {
    min-height: auto;
    padding: 14px;
}

.hero-diagnostics .status-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.hero-diagnostics .status-value {
    font-size: 1.35rem;
    margin-top: 6px;
}

/* === Article Layout === */
.article-shell {
    padding: 40px 0 100px;
    position: relative;
}

.article-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.5fr) minmax(280px, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.article-body {
    background: linear-gradient(180deg, rgba(17, 34, 64, 0.8), rgba(10, 25, 47, 0.9));
    border: 1px solid var(--border-ghost);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}

.article-body h2 {
    color: var(--accent-primary);
    font-size: 1.8rem;
    margin: 40px 0 12px;
}

.article-body h3 {
    color: var(--text-main);
    margin: 26px 0 10px;
}

.article-body p {
    color: var(--text-muted);
    line-height: 1.7;
}

.article-body ul,
.article-body ol {
    color: var(--text-muted);
    padding-left: 1.2rem;
    margin: 14px 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(17, 34, 64, 0.7);
    border: 1px solid var(--border-ghost);
}

.article-body th,
.article-body td {
    padding: 12px;
    border: 1px solid var(--border-ghost);
    color: var(--text-muted);
}

.article-body th {
    background: rgba(100, 255, 218, 0.05);
    color: var(--text-main);
}

.glow-box {
    border: 1px solid var(--border-ghost);
    border-radius: 14px;
    padding: 18px;
    background: linear-gradient(145deg, rgba(17, 34, 64, 0.8), rgba(10, 25, 47, 0.95));
    box-shadow: var(--shadow-glow);
}

.glow-box h4 {
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

.case-study {
    margin: 28px 0;
    border-left: 3px solid var(--accent-secondary);
}

.case-study-title {
    color: var(--accent-secondary);
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

.article-cta {
    margin: 30px 0 10px;
    border: 1px solid var(--border-ghost);
    border-radius: 12px;
    padding: 20px;
    background: rgba(17, 34, 64, 0.75);
}

.article-cta h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.article-cta p {
    color: var(--text-muted);
    margin-bottom: 14px;
}

.image-frame {
    position: relative;
    margin: 26px 0;
    border: 1px solid var(--border-ghost);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(2, 12, 27, 0.7);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

.image-frame img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.image-frame::before,
.image-frame::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(100, 255, 218, 0.35);
}

.image-frame::before {
    top: 10px;
    left: 10px;
    border-right: 0;
    border-bottom: 0;
}

.image-frame::after {
    bottom: 10px;
    right: 10px;
    border-left: 0;
    border-top: 0;
}

.gap-vs-solution {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 30px 0;
}

.block-bad,
.block-good {
    padding: 18px;
    border-radius: 12px;
    border: 1px solid var(--border-ghost);
    background: rgba(17, 34, 64, 0.75);
    position: relative;
}

.block-bad {
    border-color: rgba(255, 107, 107, 0.4);
}

.block-good {
    border-color: rgba(100, 255, 218, 0.4);
}

.block-title {
    font-family: var(--font-mono);
    letter-spacing: 1px;
    margin: 0 0 10px;
}

.block-title.bad {
    color: var(--accent-alert);
}

.block-title.good {
    color: var(--accent-primary);
}

.block-bad ul,
.block-good ul {
    margin: 0;
    padding-left: 16px;
    color: var(--text-muted);
}

.article-rail {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rail-card {
    background: rgba(17, 34, 64, 0.8);
    border: 1px solid var(--border-ghost);
    border-radius: 14px;
    padding: 18px;
    box-shadow: var(--shadow-glow);
}

.rail-card .mono-label {
    font-family: var(--font-mono);
    letter-spacing: 1px;
    color: var(--accent-primary);
    font-size: 0.8rem;
}

.rail-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
}

.rail-list li + li {
    margin-top: 12px;
}

.signal-item {
    display: flex;
    gap: 10px;
}

.good-icon {
    color: var(--accent-primary);
}

.bad-icon {
    color: var(--accent-alert);
}

.download-card {
    border: 1px dashed var(--border-ghost);
}

.ultra-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-ghost);
    border-radius: 14px;
    padding: 16px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.ultra-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.ultra-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: #64ffda;
}

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

/* === Micro Interactions === */
body.blog-article-page .nav-link {
    position: relative;
    overflow: hidden;
}

body.blog-article-page .nav-link::before,
body.blog-article-page .nav-link::after {
    content: '<';
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    color: var(--accent-primary);
    font-weight: 700;
}

body.blog-article-page .nav-link::after {
    content: '/>';
    transform: translateY(-50%) translateX(10px);
}

body.blog-article-page .nav-link:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(-2px);
}

body.blog-article-page .nav-link:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(2px);
}

.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text:hover {
    animation: glitch-skew 500ms linear infinite;
}

/* === Animations === */
@keyframes fade-up {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulseAlert {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.5); }
    70% { box-shadow: 0 0 0 12px rgba(255, 107, 107, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

@keyframes glitch-skew {
    20% { transform: skew(-8deg); }
    40% { transform: skew(6deg); }
    60% { transform: skew(-4deg); }
    80% { transform: skew(2deg); }
    100% { transform: none; }
}

@keyframes scan-glare {
    0% { transform: translateX(-120%) skewX(-20deg); }
    100% { transform: translateX(120%) skewX(-20deg); }
}

@keyframes gridDrift {
    0% { transform: perspective(900px) rotateX(65deg) rotateZ(6deg) translateX(0); }
    100% { transform: perspective(900px) rotateX(65deg) rotateZ(6deg) translateX(-120px); }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === Responsive === */
@media (max-width: 1100px) {
    .hero-layout {
        grid-template-columns: 1fr;
    }
    .article-grid {
        grid-template-columns: 1fr;
    }
    .article-rail {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .cyber-hero {
        padding: 120px 0 60px;
    }
    .article-body {
        padding: 20px;
    }
    .hero-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-ctas {
        flex-direction: column;
    }
}
