/*
Theme Name: Overmorrow
Author: Tar
Description: A premium, futuristic editorial theme replacing Oxygen Builder, featuring time-travel publishing.
Version: 2.0.0
Text Domain: overmorrow
*/

/* -------------------------------------------------------------
   VARIABLES & GLOBALS
------------------------------------------------------------- */
:root {
    --bg-color: #ffffff;
    --text-copy: #1a1a1a;
    --text-muted: #666666;
    --accent: #2c2c2c;
    --alert-red: #d13232;
    
    --font-ui: 'Inter', -apple-system, sans-serif;
    --font-body: 'Crimson Text', serif;
}

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-copy);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1100px; /* Nice wide layout for UI */
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
}

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

/* -------------------------------------------------------------
   BUTTONS
------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid #ccc;
}
.btn-secondary:hover {
    background-color: #f0f0f0;
    color: #111;
}

.btn-danger {
    background-color: var(--alert-red);
    color: #fff;
}
.btn-danger:hover {
    background-color: #a82727;
    box-shadow: 0 4px 12px rgba(209,50,50,0.3);
}

/* -------------------------------------------------------------
   HEADER & TOP SYSTEM BAR
------------------------------------------------------------- */
.top-system-bar {
    background-color: #fafafa;
    border-bottom: 1px solid #eaeaea;
    padding: 8px 0;
}

.temporal-confidence {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.blinking-dot {
    width: 6px;
    height: 6px;
    background-color: #00e676; /* Hacker Green indicator */
    border-radius: 50%;
    box-shadow: 0 0 5px #00e676;
    animation: blink 2s infinite ease-in-out;
}

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

.site-header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #f0f0f0;
}

/* When mobile menu is open, keep header above overlay */
.site-header.menu-open {
    z-index: 10001;
}

/* -- extracted header inline styles -- */
.top-system-bar-inner {
    display: flex; justify-content: space-between; align-items: center; 
    font-family: 'Inter', sans-serif; font-size: 0.75rem; color: #888; 
    letter-spacing: 1px; text-transform: uppercase;
}

.header-main {
    display: flex; justify-content: space-between; align-items: center; padding-top: 15px;
    padding-bottom: 15px;
}

.header-left {
    display: flex; align-items: center; gap: 25px;
}

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

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

.header-date-display {
    font-family: var(--font-ui); font-size: 0.85rem; font-weight: 700; color: #555; 
    border-left: 2px solid var(--accent); padding-left: 20px; letter-spacing: 1px; text-transform: uppercase;
}

.header-search-container {
    flex-grow: 1; max-width: 350px; margin: 0 40px; position: relative;
}

.om-search-input {
    box-sizing: border-box; width: 100%; padding: 12px 20px; padding-right: 40px; 
    border-radius: 30px; border: 1px solid #ccc; background: #f9f9f9; 
    font-family: var(--font-ui); font-size: 0.95rem; outline: none; transition: all 0.3s ease;
}

.om-search-results {
    display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; 
    border: 1px solid #eee; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
    margin-top: 10px; z-index: 1000; overflow: hidden;
}

.header-right {
    display: flex; align-items: center; gap: 30px;
}

#btn-neural-sync img {
    height: 18px; 
    width: auto; 
    margin-right: 8px;
}

.search-icon {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%); 
    width: 16px; height: 16px; fill: #666; pointer-events: none;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: #111;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.navbar-container {
    max-width: 1400px;
}

/* -------------------------------------------------------------
   FULL-WIDTH MEGA-NAVBAR & HIERARCHY
------------------------------------------------------------- */
.navbar-wrapper {
    width: 100%;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: rgba(255, 255, 255, 0.98);
    padding: 0; /* padding shifted to links for hit area */
    margin-top: 15px; 
}

/* Base Level Navbar Container */
.main-navigation > div > ul,
.main-navigation > ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 45px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* All List Items */
.main-navigation li {
    position: relative; /* REQUIRED for dropdown pinning */
    display: flex;
    align-items: center;
}

/* Base Links */
.main-navigation a {
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.3s ease, border-bottom 0.3s ease;
    padding: 15px 0; /* Larger hover area */
    border-bottom: 2px solid transparent;
}

.main-navigation a:hover, .main-navigation li.current-menu-item > a {
    color: var(--accent);
    border-bottom-color: var(--alert-red);
}

/* -------------------------------------------------------------
   DROPDOWN MENUS (Subcategories)
------------------------------------------------------------- */
/* Target all nested ULs (Level 2+) */
.main-navigation li ul {
    display: block;
    position: absolute;
    top: 100%; /* Directly underneath parent */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ffffff;
    min-width: 240px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    border-top: 3px solid var(--accent);
    padding: 10px 0;
    margin: 0;
    list-style: none;
    
    /* Animation Hiding Mechanics */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 200;
}

/* Hover Reveal */
.main-navigation li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Sub-Category Link Styling */
.main-navigation li ul li {
    display: block;
    width: 100%;
}

.main-navigation li ul a {
    display: block;
    padding: 12px 25px;
    border-bottom: none;
    color: var(--text-copy);
    text-transform: none; /* Normalize reading text */
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0;
}

.main-navigation li ul a:hover {
    background: #fafafa;
    color: var(--alert-red);
    border-bottom: none; /* Remove bottom border from submenus */
}

/* Level 3: Sub-Sub Categories */
.main-navigation li ul ul {
    top: 0;
    left: 100%; /* Pin to the right side of the parent menu */
    transform: translateX(10px) translateY(0);
}

.main-navigation li ul li:hover > ul {
    transform: translateX(0) translateY(0);
}

/* -------------------------------------------------------------
   GLASSMORPHISM MODAL
------------------------------------------------------------- */
.custom-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px); /* Strong Glassmorphism */
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Animation States */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.custom-modal-content {
    background: #ffffff;
    padding: 50px;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0,0,0,0.05);
    
    /* Animation States */
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal-overlay.active .custom-modal-content {
    transform: scale(1) translateY(0);
}

.modal-headline {
    font-family: var(--font-ui);
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    color: #111;
}

.modal-body {
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* -------------------------------------------------------------
   MAIN CONTENT & GUTENBERG BLOCKS
------------------------------------------------------------- */
.site-main {
    padding: 80px 0;
    min-height: 60vh;
}

/* The tight, editorial reading column */
.entry-content {
    max-width: 720px;
    margin: 0 auto;
}

/* Editorial Typography */
.entry-content p {
    margin-bottom: 1.5em;
    font-size: 1.25rem; /* Larger font for easy reading */
}

/* Heavy, stark headings to break up content */
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 {
    font-family: var(--font-ui);
    color: #111;
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Gutenberg Quotes */
.entry-content blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 30px;
    margin: 40px 0;
    font-style: italic;
    font-size: 1.4rem;
    color: #444;
}

/* Gutenberg Code/Pre blocks (System logs) */
.entry-content code {
    font-family: 'Courier New', Courier, monospace;
    background: #f4f4f4;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #d13232;
}

.entry-content pre {
    background: #0f0f0f;
    color: #00e676; /* Hacker Green */
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
}
.entry-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Separators */
.wp-block-separator {
    border: none;
    border-bottom: 1px solid #e0e0e0;
    margin: 60px auto;
    max-width: 100px; /* Minimalist separator */
}

/* -------------------------------------------------------------
   POST METADATA & ARCHIVE (Futuristic Byline)
------------------------------------------------------------- */
.post-byline {
    font-family: var(--font-ui);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.author-name {
    font-weight: 700;
    color: var(--accent);
}

.future-date {
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 4px;
    color: #000;
    font-weight: 600;
}

/* -------------------------------------------------------------
   FOOTER
------------------------------------------------------------- */
.site-footer {
    background: #fafafa;
    color: var(--text-muted);
    padding: 40px 0;
    border-top: 1px solid #eaeaea;
}
.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
}
.site-footer a:hover {
    color: var(--accent);
}

/* -------------------------------------------------------------
   NEURAL SYNC ANIMATIONS
------------------------------------------------------------- */
.sync-process {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 150px;
}

.sync-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: sync-spin 1s ease-in-out infinite;
}

@keyframes sync-spin {
    to { transform: rotate(360deg); }
}

/* -------------------------------------------------------------
   SINGLE POST LAYOUT (GRID WITH SIDEBAR)
------------------------------------------------------------- */
.single-post-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 60px;
    align-items: start;
    margin-top: 50px;
}

.content-area {
    min-width: 0; /* Prevents flex/grid blowouts */
}

@media (max-width: 992px) {
    .single-post-layout {
        grid-template-columns: 1fr;
        gap: 40px;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .content-area, 
    #secondary {
        padding: 0 15px;
    }

    #secondary {
        position: static !important;
    }
}

/* -------------------------------------------------------------
   CUSTOM SHARE BUTTONS
------------------------------------------------------------- */
.custom-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid #d4d4d4;
    background: transparent;
    color: #333;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-share-btn.icon-only {
    padding: 10px;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    color: #444;
}

.custom-share-btn.icon-only:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.custom-share-btn:hover:not(.icon-only) {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0,0,0,0.02);
}

/* -------------------------------------------------------------
   FRONT PAGE: THE TEMPORAL NEXUS
------------------------------------------------------------- */
.front-page-nexus {
    margin-top: 0;
    padding-top: 0;
    max-width: 100%;
}

/* -- HERO MANIFESTO -- */
.nexus-hero {
    background: #111;
    color: #fff;
    padding: 100px 0 120px;
    border-bottom: 4px solid var(--accent);
    position: relative;
    overflow: hidden;
}

.nexus-hero .hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.system-status {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ffcc00;
    margin-bottom: 25px;
    display: inline-flex;
    align-items: center;
    padding: 6px 15px;
    background: rgba(255, 204, 0, 0.1);
    border: 1px solid rgba(255, 204, 0, 0.3);
    border-radius: 4px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #ffcc00;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    box-shadow: 0 0 10px #ffcc00;
    animation: blink 1.5s infinite;
}

.manifesto-headline {
    font-size: 4.5rem;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 30px;
    color: #f5f5f5;
}

.manifesto-headline .text-accent {
    color: var(--accent);
}

.manifesto-headline .text-alert {
    color: var(--alert-red);
}

.manifesto-body {
    font-family: var(--font-body);
    font-size: 1.35rem;
    line-height: 1.6;
    color: #a1a1a1;
    margin-bottom: 30px;
    max-width: 90%;
}

.manifesto-footer {
    font-family: var(--font-ui);
    font-size: 1.05rem;
    color: #d4d4d4;
    border-left: 4px solid var(--accent);
    padding-left: 20px;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.hero-actions .btn {
    padding: 18px 36px;
    font-size: 1rem;
    letter-spacing: 1px;
}

/* -- TEMPORAL RING VISUALIZER -- */
.temporal-ring-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
}

.ring-outer {
    width: 100%;
    height: 100%;
    border-top: 2px solid var(--accent);
    border-right: 2px solid transparent;
    animation: spin-slow 20s linear infinite;
}

.ring-middle {
    width: 75%;
    height: 75%;
    border-bottom: 2px solid var(--alert-red);
    border-left: 2px solid transparent;
    animation: spin-fast 10s linear infinite reverse;
}

.core-status {
    position: relative;
    z-index: 2;
    text-align: center;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 20px 25px;
    border-radius: 50%;
    width: 250px;
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.core-label {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: #888;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.core-value {
    font-family: var(--font-ui);
    font-size: 1.5rem;
    font-weight: 800;
    color: #4ade80;
    letter-spacing: 3px;
    margin-bottom: 12px;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.4);
}

.core-metrics {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    color: #ccc;
    letter-spacing: 1px;
}

@keyframes spin-slow { 100% { transform: rotate(360deg); } }
@keyframes spin-fast { 100% { transform: rotate(360deg); } }

/* -- DATA STREAM MARQUEE (Signal Pulse) -- */
.temporal-marquee {
    background: #ffcc00;
    color: #111;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', 'Monaco', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 2.5px;
    padding: 13px 0;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.temporal-marquee::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(209, 50, 50, 0.15) 15%, #d13232 35%, #ff6b35 50%, #d13232 65%, rgba(209, 50, 50, 0.15) 85%, transparent 100%);
    background-size: 200% 100%;
    animation: signal-pulse 4s ease-in-out infinite;
}

.temporal-marquee::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(209, 50, 50, 0.15) 15%, #d13232 35%, #ff6b35 50%, #d13232 65%, rgba(209, 50, 50, 0.15) 85%, transparent 100%);
    background-size: 200% 100%;
    animation: signal-pulse 4s ease-in-out infinite reverse;
}

@keyframes signal-pulse {
    0%   { background-position: -200% 0; opacity: 0.3; }
    50%  { background-position: 200% 0; opacity: 1; }
    100% { background-position: -200% 0; opacity: 0.3; }
}

.marquee-content {
    display: inline-block;
    animation: marquee-scroll 45s linear infinite;
}

.marquee-item {
    padding: 0 55px;
}

.marquee-item .sig {
    color: #d13232;
    text-shadow: 0 0 6px rgba(209, 50, 50, 0.5), 0 0 20px rgba(209, 50, 50, 0.15);
    font-weight: 700;
}

@keyframes marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.temporal-marquee:hover .marquee-content {
    animation-play-state: paused;
}
.temporal-marquee:hover {
    color: #000;
}

/* -- PRIORITY INTERCEPTS (HORIZONTAL SCROLL) -- */
.priority-intercepts {
    padding: 100px 0 80px;
    background: #f7f7f7;
    border-bottom: 1px solid #eaeaea;
}

.intercept-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 30px;
    padding-bottom: 20px;
}

.intercept-card {
    background-color: #111;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
}

.intercept-card:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.intercept-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: border-color 0.3s ease;
    z-index: 10;
    pointer-events: none;
}

.intercept-card:hover::before {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Featured (First) Card Layout */
.intercept-grid .intercept-card:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    padding: 50px;
    min-height: 550px;
}

/* Secondary Cards Layout */
.intercept-grid .intercept-card:nth-child(2),
.intercept-grid .intercept-card:nth-child(3) {
    padding: 30px;
    min-height: 260px;
}

.intercept-grid .intercept-card:nth-child(2) .intercept-title,
.intercept-grid .intercept-card:nth-child(3) .intercept-title {
    font-size: 1.45rem;
    margin-bottom: 12px;
}

/* Mobile Fallback */
@media (max-width: 992px) {
    .intercept-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    .intercept-grid .intercept-card:nth-child(1) {
        grid-column: 1 / -1;
        grid-row: auto;
        padding: 40px;
        min-height: 450px;
    }
    .intercept-grid .intercept-card:nth-child(1) .intercept-title {
        font-size: 2rem;
    }
}

.intercept-content {
    position: relative;
    z-index: 20;
}

.intercept-cats {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--alert-red);
    margin-bottom: 15px;
}

.intercept-cats a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.intercept-cats a:hover {
    opacity: 0.8;
}

.intercept-title {
    font-size: 2.2rem;
    line-height: 1.25;
    letter-spacing: -1px;
    margin-bottom: 20px;
}

.intercept-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.intercept-title a:hover {
    color: var(--accent);
}

.intercept-meta {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: #d4d4d4;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 15px;
}

.intercept-meta .fut-date {
    color: #4ade80;
    font-weight: 600;
    font-style: italic;
}

.archive-date {
    font-style: italic;
    color: var(--text-muted);
}

.intercept-meta .sep {
    color: rgba(255,255,255,0.2);
}

/* -- NEXUS FEED -- */
.nexus-feed {
    padding: 100px 0;
}

.section-header h2 {
    font-size: 2.5rem;
    letter-spacing: -1.5px;
}

.section-header .header-line {
    height: 4px;
    width: 60px;
    background: var(--alert-red);
    margin-top: 15px;
}

/* =============================================================
   RESPONSIVE: TABLET (max-width: 992px)
============================================================= */
@media (max-width: 992px) {
    .nexus-hero {
        padding: 50px 0 60px;
    }
    
    .nexus-hero .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    /* Show manifesto FIRST on mobile, ring underneath */
    .hero-visualizer {
        order: 2;
    }

    .hero-manifesto {
        order: 1;
    }
    
    .manifesto-headline {
        font-size: 3rem;
    }
    
    .temporal-ring-container {
        width: 260px;
        height: 260px;
    }

    .core-status {
        width: 180px;
        height: 180px;
        padding: 15px;
    }

    .core-value {
        font-size: 1.2rem;
    }
    
    .intercept-card {
        min-width: auto;
        height: auto;
        padding: 30px;
    }
    
    .intercept-title {
        font-size: 1.8rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        padding: 16px 30px;
        font-size: 0.9rem;
        text-align: center;
        width: 100%;
    }

    /* -- Mobile Header & Navbar -- */
    .top-system-bar-inner {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        padding: 6px 0;
    }

    .header-main {
        flex-wrap: wrap;
        padding-top: 10px;
        padding-bottom: 10px;
        gap: 10px;
    }

    .header-search-container {
        order: 3;
        max-width: none;
        margin: 0;
        width: 100%;
    }

    .header-date-display {
        display: none;
    }

    /* Hide the desktop navbar bar on mobile, but allow fixed children to render */
    .navbar-wrapper {
        height: 0;
        overflow: visible;
        padding: 0 !important;
        border: none !important;
        margin: 0 !important;
    }

    .navbar-container {
        height: 0;
        overflow: visible;
        padding: 0 !important;
    }

    /* Burger Toggle */
    .mobile-menu-toggle {
        display: flex;
        z-index: 10002;
        position: relative;
    }
    
    .mobile-menu-toggle.is-active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background: var(--alert-red);
    }
    .mobile-menu-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.is-active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background: var(--alert-red);
    }

    /* The "Matrix Overlay" Mobile Menu */
    .main-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for iOS */
        background: rgba(8, 8, 8, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        z-index: 10001;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 100px 30px 40px; 
        visibility: hidden;
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-navigation.toggled {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    .main-navigation > div > ul,
    .main-navigation > ul {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        margin: 0;
        padding: 0;
        gap: 0;
    }

    .main-navigation li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .main-navigation.toggled > div > ul > li,
    .main-navigation.toggled > ul > li {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Staggered entrance */
    .main-navigation.toggled > div > ul > li:nth-child(1),
    .main-navigation.toggled > ul > li:nth-child(1) { transition-delay: 0.05s; }
    .main-navigation.toggled > div > ul > li:nth-child(2),
    .main-navigation.toggled > ul > li:nth-child(2) { transition-delay: 0.1s; }
    .main-navigation.toggled > div > ul > li:nth-child(3),
    .main-navigation.toggled > ul > li:nth-child(3) { transition-delay: 0.15s; }
    .main-navigation.toggled > div > ul > li:nth-child(4),
    .main-navigation.toggled > ul > li:nth-child(4) { transition-delay: 0.2s; }
    .main-navigation.toggled > div > ul > li:nth-child(5),
    .main-navigation.toggled > ul > li:nth-child(5) { transition-delay: 0.25s; }
    .main-navigation.toggled > div > ul > li:nth-child(6),
    .main-navigation.toggled > ul > li:nth-child(6) { transition-delay: 0.3s; }
    .main-navigation.toggled > div > ul > li:nth-child(7),
    .main-navigation.toggled > ul > li:nth-child(7) { transition-delay: 0.35s; }
    .main-navigation.toggled > div > ul > li:nth-child(8),
    .main-navigation.toggled > ul > li:nth-child(8) { transition-delay: 0.4s; }
    .main-navigation.toggled > div > ul > li:nth-child(9),
    .main-navigation.toggled > ul > li:nth-child(9) { transition-delay: 0.45s; }
    .main-navigation.toggled > div > ul > li:nth-child(10),
    .main-navigation.toggled > ul > li:nth-child(10) { transition-delay: 0.5s; }

    .main-navigation a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-family: var(--font-ui);
        font-size: 1.35rem;
        font-weight: 800;
        color: #f0f0f0;
        text-transform: uppercase;
        letter-spacing: 2px;
        padding: 18px 0;
        text-decoration: none;
        transition: color 0.3s ease;
        border-bottom: none;
    }
    
    .main-navigation a:hover,
    .main-navigation a:active {
        color: var(--alert-red);
        border-bottom: none;
    }

    /* Submenus - High Tech Accordion */
    .main-navigation li ul {
        display: none !important; 
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 0 10px 20px;
        margin-top: 0;
        border-left: 2px solid var(--alert-red);
        border-top: none;
        opacity: 1; 
        visibility: visible; 
        width: 100%;
        transform: none;
        min-width: auto;
    }
    
    .main-navigation li.submenu-expanded > ul {
        display: flex !important;
        flex-direction: column;
    }

    .main-navigation li ul li {
        border-bottom: none;
        padding: 0;
        opacity: 1;
        transform: none;
        transition: none;
    }

    .main-navigation li ul a {
        font-size: 1.05rem;
        font-weight: 600;
        padding: 12px 10px;
        color: #999;
        letter-spacing: 1px;
    }
    
    /* The Chevron Trigger */
    .submenu-trigger {
        background: transparent;
        border: 1px solid rgba(255,255,255,0.15);
        color: #fff;
        width: 38px;
        height: 38px;
        min-width: 38px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .submenu-trigger:active {
        background: rgba(255,255,255,0.1);
    }

    .submenu-expanded > a > .submenu-trigger {
        transform: rotate(180deg);
        border-color: var(--alert-red);
        color: var(--alert-red);
    }

    /* If any submenu is active, hide other root menu items for focus */
    .main-navigation.has-active-submenu > div > ul > li:not(.submenu-expanded),
    .main-navigation.has-active-submenu > ul > li:not(.submenu-expanded) {
        display: none;
    }

    .main-navigation li.submenu-expanded {
        border-bottom: none;
    }

    .main-navigation li.submenu-expanded > a {
        font-size: 0.8rem;
        opacity: 0.3;
        filter: blur(2px);
        margin-bottom: 15px;
        letter-spacing: 4px;
        pointer-events: none;
        transition: all 0.5s ease;
    }
    
    .main-navigation li.submenu-expanded .submenu-trigger {
        display: none !important;
    }

    .main-navigation li.submenu-expanded > ul {
        display: flex !important;
        flex-direction: column;
        border-left: 3px solid var(--alert-red);
        padding-left: 25px;
        animation: om-fade-in-blur 0.4s ease forwards;
        margin-left: 0;
    }

    .main-navigation li.submenu-expanded > ul a {
        font-size: 1.8rem;
        font-weight: 900;
        color: #fff;
        line-height: 1.2;
        padding: 14px 0;
        letter-spacing: -1px;
        text-transform: none;
    }

    @keyframes om-fade-in-blur {
        from { opacity: 0; filter: blur(10px); transform: translateX(20px); }
        to { opacity: 1; filter: blur(0); transform: translateX(0); }
    }

    .back-to-matrix a {
        color: var(--alert-red) !important;
        font-size: 0.8rem !important;
        letter-spacing: 3px !important;
        padding: 25px 0 !important;
        border-bottom: 1px dashed rgba(209, 50, 50, 0.3) !important;
        margin-bottom: 15px;
    }

    /* -- Mobile Footer -- */
    .footer-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        text-align: center;
        display: flex;
        justify-content: center;
        font-family: 'Inter', sans-serif; 
        font-size: 0.85rem;
    }

    /* Fix section spacings */
    .priority-intercepts {
        padding: 60px 0 50px;
    }

    .nexus-feed {
        padding: 60px 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .manifesto-body {
        font-size: 1.15rem;
        max-width: 100%;
    }

    .manifesto-footer {
        font-size: 0.95rem;
    }

    /* Archive Grid responsive */
    .archive-grid {
        grid-template-columns: 1fr;
    }

    /* Modal mobile */
    .custom-modal-content {
        margin: 20px;
        padding: 35px 25px;
        max-width: calc(100vw - 40px);
    }
}

/* =============================================================
   RESPONSIVE: SMALL PHONE (max-width: 480px)
============================================================= */
@media (max-width: 480px) {
    /* Compact system bar */
    .top-system-bar {
        padding: 5px 0;
    }
    .top-system-bar-inner {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
        gap: 2px;
    }

    /* Compact header */
    .header-main {
        padding-top: 8px;
        padding-bottom: 8px;
        gap: 8px;
    }

    .custom-logo {
        max-height: 32px;
    }

    /* Neural Sync button - smaller on phone */
    #btn-neural-sync {
        padding: 8px 14px;
        font-size: 0.7rem;
    }

    #btn-neural-sync img {
        height: 14px;
        margin-right: 5px;
    }

    #btn-neural-sync span {
        display: none; /* Hide text, show icon only */
    }

    /* Search bar */
    .om-search-input {
        padding: 10px 16px;
        padding-right: 36px;
        font-size: 0.85rem;
    }

    /* Hero section */
    .nexus-hero {
        padding: 35px 0 45px;
    }

    .system-status {
        font-size: 0.65rem;
        letter-spacing: 1px;
        padding: 5px 10px;
    }

    .manifesto-headline {
        font-size: 2.2rem;
        line-height: 1.1;
        letter-spacing: -1px;
        margin-bottom: 20px;
    }

    .manifesto-body {
        font-size: 1.05rem;
        line-height: 1.55;
        margin-bottom: 20px;
    }

    .manifesto-footer {
        font-size: 0.9rem;
        padding-left: 15px;
        margin-bottom: 25px;
    }

    .hero-actions .btn {
        padding: 14px 24px;
        font-size: 0.85rem;
    }

    /* Temporal ring - smaller on phone */
    .temporal-ring-container {
        width: 200px;
        height: 200px;
    }

    .core-status {
        width: 140px;
        height: 140px;
        padding: 12px;
    }

    .core-label {
        font-size: 0.6rem;
        letter-spacing: 1px;
    }

    .core-value {
        font-size: 1rem;
        letter-spacing: 1px;
        margin-bottom: 6px;
    }

    .core-metrics {
        font-size: 0.55rem;
    }

    /* Marquee */
    .temporal-marquee {
        font-size: 0.8rem;
        padding: 10px 0;
    }

    /* Priority Intercepts */
    .priority-intercepts {
        padding: 40px 0 35px;
    }

    .section-header h2 {
        font-size: 1.6rem;
        letter-spacing: -0.5px;
    }

    .intercept-grid .intercept-card:nth-child(1) {
        padding: 25px;
        min-height: 350px;
    }

    .intercept-grid .intercept-card:nth-child(1) .intercept-title {
        font-size: 1.6rem;
    }

    .intercept-grid .intercept-card:nth-child(2) .intercept-title,
    .intercept-grid .intercept-card:nth-child(3) .intercept-title {
        font-size: 1.2rem;
    }

    .intercept-grid .intercept-card:nth-child(2),
    .intercept-grid .intercept-card:nth-child(3) {
        padding: 20px;
        min-height: 220px;
    }

    .intercept-cats {
        font-size: 0.7rem;
        letter-spacing: 1.5px;
    }

    .intercept-meta {
        font-size: 0.8rem;
    }

    /* Feed */
    .nexus-feed {
        padding: 40px 0;
    }

    /* Mobile nav adjustments */
    .main-navigation {
        padding: 90px 20px 30px;
    }

    .main-navigation a {
        font-size: 1.15rem;
        letter-spacing: 1.5px;
        padding: 16px 0;
    }

    .main-navigation li.submenu-expanded > ul a {
        font-size: 1.5rem;
        padding: 12px 0;
    }

    /* Single post mobile */
    .site-main {
        padding: 40px 0;
    }

    .entry-content p {
        font-size: 1.1rem;
    }

    .entry-content blockquote {
        padding-left: 20px;
        margin: 25px 0;
        font-size: 1.15rem;
    }

    /* Modal */
    .custom-modal-content {
        padding: 30px 20px;
        margin: 15px;
    }

    .modal-headline {
        font-size: 1.3rem;
    }

    .modal-body {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }

    .modal-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Share buttons */
    .custom-share-btn {
        padding: 8px 12px;
        font-size: 0.7rem;
    }

    .custom-share-btn.icon-only {
        width: 36px;
        height: 36px;
    }

    /* Archive page */
    .post-archive-list {
        grid-template-columns: 1fr !important;
    }
}

/* -- BREAKING NEWS BADGE -- */
.breaking-badge {
    display: inline-block;
    background-color: var(--alert-red);
    color: #fff !important;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 8px;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: bottom;
    text-decoration: none !important;
    animation: om-pulse-red 2s infinite;
}

@keyframes om-pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(209, 50, 50, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(209, 50, 50, 0); }
    100% { box-shadow: 0 0 0 0 rgba(209, 50, 50, 0); }
}


/* --- Footer Navigation Menu --- */
.footer-navigation {
    margin-bottom: 30px;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-menu li a {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-menu li a:hover {
    color: var(--accent);
}

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

.footer-container .site-info {
    font-size: 13px;
    margin-bottom: 10px;
}


/* -- GLOBAL CHRONAL FEED (FRONT PAGE) -- */
.chronal-feed-wrapper {
    position: relative;
    max-width: 900px !important;
}

.chronal-feed-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 20px;
}

.chronal-feed-card {
    display: flex;
    position: relative;
    padding-bottom: 40px;
    align-items: stretch;
}

.chronal-feed-card:last-child {
    padding-bottom: 0;
}

.chronal-feed-stem {
    position: relative;
    width: 60px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chronal-feed-node {
    width: 14px;
    height: 14px;
    background: var(--bg-color);
    border: 3px solid var(--accent);
    border-radius: 50%;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
    margin-top: 5px;
    transition: all 0.3s ease;
}

.chronal-feed-line {
    position: absolute;
    top: 25px;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: linear-gradient(to bottom, var(--accent) 0%, rgba(44, 44, 44, 0.1) 100%);
    z-index: 1;
}

.chronal-feed-card:last-child .chronal-feed-line {
    display: none;
}

.chronal-feed-content {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-image: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0) 100%);
}

.chronal-feed-card:hover .chronal-feed-content {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-color: rgba(0, 0, 0, 0.1);
}

.chronal-feed-card:hover .chronal-feed-node {
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
}

.cf-meta-top {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.cf-divider {
    color: rgba(0,0,0,0.15);
}

.cf-main-row {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.cf-text-col {
    flex-grow: 1;
}

.cf-image-col {
    flex-shrink: 0;
    width: 220px;
}

.cf-image-col img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.chronal-feed-card:hover .cf-image-col img {
    transform: scale(1.02);
}

.cf-category {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.cf-category a {
    color: var(--text-muted);
    text-decoration: none;
    background: rgba(0,0,0,0.04);
    padding: 4px 8px;
    border-radius: 3px;
    transition: background 0.2s ease, color 0.2s ease;
}

.cf-category a:hover {
    background: var(--accent);
    color: #fff;
}

.cf-header {
    margin-bottom: 12px;
}

.cf-title {
    font-size: 1.6rem;
    line-height: 1.3;
    margin: 0;
    font-weight: 800;
    font-family: var(--font-body);
}

.cf-title a {
    color: var(--text-copy);
    text-decoration: none;
    transition: color 0.2s ease;
}

.cf-title a:hover {
    color: var(--alert-red);
}

.cf-excerpt {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.cf-excerpt p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cf-readmore {
    margin-top: 15px;
}

.btn-text {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    border-bottom: 2px solid rgba(0,0,0,0.1);
    padding-bottom: 4px;
    transition: all 0.3s ease;
}

.btn-text:hover {
    color: var(--alert-red);
    border-bottom-color: var(--alert-red);
}

@media (max-width: 768px) {
    .chronal-feed-list {
        padding-left: 0;
    }
    .chronal-feed-stem {
        display: none;
    }
    .cf-main-row {
        flex-direction: column-reverse;
    }
    .cf-image-col {
        width: 100%;
        margin-bottom: 20px;
    }
    .chronal-feed-content {
        padding: 20px;
    }
    .cf-title {
        font-size: 1.35rem;
    }
}