/*
Theme Name: Apex Telemetry
Author: Apex Design
Description: High-performance F1 Telemetry Dashboard Theme.
Version: 1.0
*/

:root {
    /* Color Palette */
    --bg-dark: #050505;
    --bg-panel: #0a0b10;
    --text-main: #e0e0e0;
    --text-muted: #8892b0;
    
    --neon-cyan: #00f3ff;
    --neon-red: #ff003c;
    --grid-line: rgba(255, 255, 255, 0.05);
    
    /* Typography */
    --font-display: 'Syncopate', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --container-width: 1400px;
    --gap-md: 2rem;
    --gap-lg: 4rem;
}

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-mono);
    line-height: 1.6;
    overflow-x: hidden;
    word-wrap: break-word;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--neon-cyan); }

::selection { background: var(--neon-red); color: #fff; }

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* Grid Background Effect */
.bg-grid-layer {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER (Floating/Tech) */
.site-header {
    padding: 20px 40px;
    border-bottom: 1px solid var(--grid-line);
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.site-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -1px;
    color: #fff;
    white-space: nowrap;
}
.logo-prefix { color: var(--neon-red); margin-right: 5px; }
.logo-highlight { color: transparent; -webkit-text-stroke: 1px #fff; }

.header-meta {
    display: none;
    font-size: 0.75rem;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    padding: 5px 15px;
    letter-spacing: 1px;
}
@media(min-width: 768px) { .header-meta { display: block; } }

/* Menu */
.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}
.main-navigation a {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
}
.main-navigation a:hover { color: var(--neon-cyan); }
.main-navigation a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px;
    background: var(--neon-cyan); transition: 0.3s;
}
.main-navigation a:hover::after { width: 100%; }

/* HERO SECTION (Asymmetry) */
.hero-section {
    min-height: 80vh;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}
@media(min-width: 992px) {
    .hero-section { grid-template-columns: 1.2fr 0.8fr; }
}

.hero-content { z-index: 2; }
.hero-label {
    display: block;
    color: var(--neon-red);
    font-size: 0.9rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 7.5rem);
    line-height: 0.9;
    margin-bottom: 30px;
    text-transform: uppercase;
}
.hero-title .outline-text {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-main);
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 40px;
    border-left: 2px solid var(--neon-cyan);
    padding-left: 20px;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: var(--text-main);
    color: var(--bg-dark);
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid var(--text-main);
}
.cta-button:hover {
    background: transparent;
    color: var(--text-main);
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

/* Hero Visual (Image) */
.visual-container {
    width: 100%;
    height: 500px;
    border: 1px solid var(--grid-line);
    position: relative;
    overflow: hidden;
}
.hero-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(80%) contrast(1.1);
    opacity: 0.8;
    transition: 0.5s;
}
.hero-section:hover .hero-banner-img {
    filter: grayscale(0%) contrast(1);
    opacity: 1;
    transform: scale(1.02);
}

.tech-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 2;
}

.scan-line {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    animation: scan 4s infinite linear;
    z-index: 3;
}
@keyframes scan {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* TELEMETRY STRIP */
.telemetry-strip-section {
    border-top: 1px solid var(--grid-line);
    border-bottom: 1px solid var(--grid-line);
    background: rgba(255,255,255,0.02);
    padding: 40px 0;
    margin: 40px 0;
}
.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: center;
}
.telemetry-item {
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--neon-cyan);
    padding-left: 15px;
    transition: 0.3s;
}
.telemetry-item:hover {
    border-left-color: var(--neon-red);
    padding-left: 20px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05), transparent);
}
.t-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 5px;
}
.t-value {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: #fff;
    text-transform: uppercase;
}
.c-soft { color: var(--neon-red); }

/* POST CARDS (Grid & Design) */
.posts-feed { padding: 80px 0; }
.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 20px;
}
.decorative-line {
    width: 100px; height: 4px; background: var(--neon-red); margin-bottom: 60px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.data-card {
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}
.data-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-cyan);
}

.card-media {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.card-media img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(100%);
    transition: 0.5s;
}
.data-card:hover .card-media img { filter: grayscale(0%); transform: scale(1.05); }

/* Fallback Pattern */
.fallback-pattern {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle, #222 1px, transparent 1px) 0 0 / 20px 20px;
    color: var(--text-muted);
    font-weight: bold;
    letter-spacing: 2px;
}

.cat-label {
    position: absolute;
    top: 10px; right: 10px;
    background: var(--neon-red);
    color: #fff;
    font-size: 0.6rem;
    padding: 4px 8px;
    text-transform: uppercase;
    font-weight: bold;
    z-index: 2;
}
.cat-label a { color: inherit; }

.card-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.meta-row { font-size: 0.75rem; color: var(--neon-cyan); margin-bottom: 10px; }

.card-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    line-height: 1.3;
    margin-bottom: 15px;
}
.card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more-btn {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.read-more-btn .arrow { transition: 0.3s; }
.read-more-btn:hover .arrow { transform: translateX(5px); color: var(--neon-cyan); }

/* Tech Corners */
.tech-corner {
    position: absolute;
    width: 10px; height: 10px;
    border: 2px solid var(--neon-cyan);
    opacity: 0; transition: 0.3s;
    pointer-events: none;
}
.top-left { top: -1px; left: -1px; border-bottom: 0; border-right: 0; }
.bottom-right { bottom: -1px; right: -1px; border-top: 0; border-left: 0; }
.data-card:hover .tech-corner { opacity: 1; }

/* PAGINATION */
.pagination-wrapper {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--grid-line);
    text-align: center;
}
.page-numbers {
    list-style: none;
    display: inline-flex;
    gap: 10px;
}
.page-numbers li a, .page-numbers li span {
    display: flex;
    align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: 700;
    transition: 0.3s;
}
.page-numbers li span.current {
    background: var(--neon-cyan);
    color: #000;
    border-color: var(--neon-cyan);
}
.page-numbers li a:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* ARCHIVE HEADER */
.archive-header-section {
    padding: 80px 0 40px;
    border-bottom: 1px solid var(--grid-line);
}
.archive-title {
    font-family: var(--font-display);
    font-size: 3rem;
    text-transform: uppercase;
    margin-bottom: 20px;
}

/* PAGE SPECIFIC TYPOGRAPHY */
.page-header-section {
    padding: 80px 0 40px;
    border-bottom: 1px solid var(--grid-line);
}
.page-title {
    font-family: var(--font-display);
    font-size: 3rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    line-height: 1.1;
}
.meta-label {
    display: block;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    margin-bottom: 10px;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.page-content-wrapper {
    padding: 60px 0;
}
.page-body-text {
    max-width: 800px;
    margin: 0 auto; 
    font-size: 1.1rem;
    color: #ccc;
}
.page-body-text h2, 
.page-body-text h3, 
.page-body-text h4 {
    font-family: var(--font-display);
    color: #fff;
    margin-top: 50px;
    margin-bottom: 25px;
    line-height: 1.2;
    text-transform: uppercase;
}
.page-body-text h2 { font-size: 2rem; border-left: 3px solid var(--neon-red); padding-left: 20px; }
.page-body-text h3 { font-size: 1.5rem; color: var(--neon-cyan); }
.page-body-text h4 { font-size: 1.2rem; }

.page-body-text p { margin-bottom: 25px; }

.page-body-text ul, 
.page-body-text ol {
    margin-bottom: 30px;
    padding-left: 20px;
}
.page-body-text li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
    list-style: none;
}
.page-body-text li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--neon-red);
    font-weight: bold;
}

.page-body-text strong {
    color: #fff;
    font-weight: 700;
}
.page-body-text a {
    color: var(--neon-cyan);
    border-bottom: 1px solid var(--neon-cyan);
}
.page-body-text a:hover {
    background: rgba(0, 243, 255, 0.1);
}
.page-body-text blockquote {
    border-left: 2px solid var(--neon-cyan);
    padding-left: 30px;
    margin: 40px 0;
    font-style: italic;
    color: var(--text-muted);
}

/* SINGLE POST */
.single-post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}
.single-post-content p { margin-bottom: 20px; }
.single-post-content h2, .single-post-content h3 { 
    font-family: var(--font-display); 
    margin: 40px 0 20px;
    color: #fff;
}

/* FOOTER */
.site-footer {
    border-top: 1px solid var(--grid-line);
    padding: 80px 0 40px;
    background: #020202;
}
.footer-grid {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 60px;
    padding: 0 20px;
}
.footer-title {
    font-family: var(--font-display);
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2rem;
}
.contact-list { list-style: none; color: var(--text-muted); }
.contact-list li { margin-bottom: 15px; display: flex; gap: 10px; align-items: flex-start; }
.contact-list .icon { color: var(--neon-red); font-weight: bold; min-width: 40px; }
.mission-text { color: var(--text-muted); }
.legal-block { color: rgba(255,255,255,0.3); font-size: 0.8rem; margin-top: 40px; text-align: center; }

/* Responsive */
@media(max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .posts-grid { grid-template-columns: 1fr; }
    .header-inner { justify-content: center; }
    .site-header { padding: 20px; }
    .page-body-text h2 { font-size: 1.5rem; }
    .telemetry-grid { grid-template-columns: 1fr 1fr; }
    .visual-container { height: 300px; }
}
