/*
Theme Name: NRWire
Theme URI: https://example.com/nrwire
Author: Your Name
Author URI: https://example.com
Description: Cyberpunk-themed tech blog with featured post hero, carousel, neon accents, and dark layout.
Version: 2.0.0
Requires at least: 5.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nrwire
Tags: dark, blog, tech, cyberpunk
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --cyan: #00ffff;
    --magenta: #ff00ff;
    --neon-green: #39ff14;
    --dark-bg: #0a0a12;
    --panel-bg: rgba(5, 5, 15, 0.85);
    --text-light: #e0e0ff;
    --text-dim: #6666aa;
    --glow-cyan: 0 0 8px var(--cyan), 0 0 20px rgba(0,255,255,0.4);
    --glow-magenta: 0 0 8px var(--magenta), 0 0 20px rgba(255,0,255,0.4);
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    font-family: 'Courier New', monospace;
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ===== OVERLAYS ===== */
.scanline-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999; pointer-events: none;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 2px,
        rgba(0, 255, 255, 0.02) 2px, rgba(0, 255, 255, 0.02) 4px
    );
}

.noise-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 998; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
}

#particleCanvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a12; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--cyan), var(--magenta)); border-radius: 3px; }

/* ===== NAVIGATION ===== */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(5, 5, 20, 0.92); backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.12);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.8rem 3rem;
}

.nav-brand { font-size: 1.4rem; font-weight: bold; color: var(--cyan); text-shadow: var(--glow-cyan); letter-spacing: 6px; position: relative; }
.nav-brand img { max-height: 40px; width: auto; display: block; }
.nav-brand::after { content: ''; display: inline-block; width: 6px; height: 16px; background: var(--magenta); margin-left: 10px; animation: blinkPulse 2s infinite; }

@keyframes blinkPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-light); font-size: 0.9rem; transition: all 0.3s ease; position: relative; display: block; padding: 4px 0; }
.nav-links a:hover, .nav-links a.active { color: var(--cyan); text-shadow: var(--glow-cyan); }
.nav-links a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--cyan); transition: width 0.3s ease; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-toggle { display: none; cursor: pointer; color: var(--text-light); font-size: 1.4rem; }
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links { display: none; }
    nav { padding: 0.6rem 1.5rem; justify-content: space-between; }
}

/* ===== FEATURED SECTION (Hero) ===== */
.featured-section {
    position: relative; z-index: 3;
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 100px 3rem 4rem;
}

.featured-wrapper { max-width: 1200px; width: 100%; }

.featured-post {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
    background: var(--panel-bg); border: 1px solid rgba(0,255,255,0.1);
    padding: 3rem; position: relative; overflow: hidden;
}

.featured-post::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
}

.featured-img {
    position: relative; overflow: hidden; height: 400px;
    border: 1px solid rgba(0,255,255,0.15);
}

.featured-img-inner { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.featured-post:hover .featured-img-inner { transform: scale(1.05); }

.featured-img-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 4rem; color: var(--cyan); background: rgba(0,255,255,0.03);
}

.featured-content { display: flex; flex-direction: column; gap: 1rem; }

.post-tag {
    font-size: 0.75rem; color: var(--neon-green); letter-spacing: 3px; text-transform: uppercase;
    display: inline-block; padding: 3px 8px; border: 1px solid rgba(57,255,20,0.3); background: rgba(57,255,20,0.05);
    width: fit-content;
}

.post-tag.small { font-size: 0.65rem; padding: 2px 6px; }
.post-date { font-size: 0.85rem; color: var(--text-dim); letter-spacing: 1px; }

.featured-title { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: bold; line-height: 1.3; letter-spacing: 2px; }
.featured-excerpt { color: var(--text-dim); font-size: 0.95rem; line-height: 1.7; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 0.9rem 2rem; font-family: inherit;
    font-size: 0.9rem; font-weight: bold; letter-spacing: 3px; text-transform: uppercase;
    border: 1px solid var(--cyan); color: var(--cyan); background: transparent;
    cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s ease; width: fit-content;
}

.btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(0,255,255,0.08), transparent); transform: translateX(-100%); transition: transform 0.3s ease; }
.btn:hover { box-shadow: var(--glow-cyan); background: rgba(0, 255, 255, 0.08); transform: translateY(-2px); }
.btn:hover::before { transform: translateX(100%); }

.btn-small { padding: 0.5rem 1.2rem; font-size: 0.75rem; letter-spacing: 2px; }
.btn-secondary { border-color: var(--magenta); color: var(--magenta); }
.btn-secondary:hover { box-shadow: var(--glow-magenta); background: rgba(255,0,255,0.12); }

/* ===== RECENT POSTS CAROUSEL ===== */
.recent-section { position: relative; z-index: 3; padding: 4rem 3rem 6rem; max-width: 1400px; margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-subtitle { color: var(--text-dim); font-size: 0.95rem; margin-top: 0.8rem; letter-spacing: 1px; }
.section-title { font-size: 1.8rem; font-weight: bold; color: var(--cyan); text-shadow: var(--glow-cyan); letter-spacing: 6px; text-transform: uppercase; }

.carousel-wrapper { position: relative; max-width: 100%; overflow: hidden; }

.carousel-track { display: flex; gap: 1.5rem; transition: transform 0.5s ease; }

.carousel-card {
    flex: 0 0 calc(33.333% - 1rem); min-width: 280px;
    background: var(--panel-bg); border: 1px solid rgba(0,255,255,0.1);
    padding: 0; overflow: hidden; transition: all 0.4s ease; display: flex; flex-direction: column;
}

.carousel-card:hover { border-color: var(--cyan); box-shadow: 0 0 25px rgba(0,255,255,0.08); transform: translateY(-4px); }

.carousel-img { height: 180px; overflow: hidden; position: relative; }
.carousel-img-inner { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.carousel-card:hover .carousel-img-inner { transform: scale(1.08); }

.carousel-img-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: var(--cyan); background: rgba(0,255,255,0.03);
}

.carousel-content { padding: 1.2rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.carousel-title { font-size: 1rem; font-weight: bold; line-height: 1.4; }
.carousel-excerpt { color: var(--text-dim); font-size: 0.8rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }

/* Carousel Navigation */
.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-top: 2rem; }

.carousel-btn {
    width: 40px; height: 40px; border: 1px solid rgba(0,255,255,0.3); background: transparent;
    color: var(--cyan); cursor: pointer; font-size: 1rem; transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center;
}
.carousel-btn:hover { background: rgba(0,255,255,0.1); border-color: var(--cyan); box-shadow: var(--glow-cyan); }

.carousel-dots { display: flex; gap: 8px; }
.carousel-dot {
    width: 8px; height: 8px; border-radius: 50%; background: rgba(0,255,255,0.2);
    transition: all 0.3s ease; cursor: pointer;
}
.carousel-dot.active { background: var(--cyan); box-shadow: 0 0 8px rgba(0,255,255,0.5); }

/* Empty State */
.empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 3rem; color: var(--text-dim); }
.empty-state span { font-size: 3rem; }

/* ===== SECTIONS ===== */
section { position: relative; z-index: 3; }

/* ===== SUBSCRIBE ===== */
.subscribe-section { text-align: center; padding: 4rem 3rem; position: relative; z-index: 3; }
.subscribe-section h2 { font-size: 1.8rem; color: var(--cyan); letter-spacing: 6px; margin-bottom: 1rem; }

.subscribe-form { max-width: 500px; margin: 0 auto; display: flex; gap: 0.8rem; }
.subscribe-form input {
    padding: 0.9rem 1.2rem; font-family: inherit; background: rgba(0,255,255,0.04);
    border: 1px solid rgba(0,255,255,0.3); color: var(--text-light); outline: none; flex: 1; transition: all 0.3s ease;
}
.subscribe-form input:focus { box-shadow: 0 0 15px rgba(0,255,255,0.15); border-color: var(--cyan); }

/* ===== CONTACT FORM ===== */
.contact-section { padding: 6rem 3rem; max-width: 800px; margin: 0 auto; position: relative; z-index: 3; }

.contact-form { background: var(--panel-bg); border: 1px solid rgba(0,255,255,0.12); padding: 2.5rem; }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; color: var(--text-dim); font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 0.5rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 0.8rem 1rem; font-family: inherit; background: rgba(0,255,255,0.04);
    border: 1px solid rgba(0,255,255,0.25); color: var(--text-light); outline: none; transition: all 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--cyan); box-shadow: 0 0 12px rgba(0,255,255,0.15); }
.form-group textarea { min-height: 120px; resize: vertical; }

/* ===== FOOTER ===== */
footer {
    background: rgba(0, 0, 10, 0.95); border-top: 1px solid rgba(0,255,255,0.1);
    padding: 3rem 3rem; text-align: center; position: relative; z-index: 3;
}
footer h4 { color: var(--cyan); letter-spacing: 8px; margin-bottom: 1rem; font-size: 1.2rem; text-transform: uppercase; }
footer p { color: var(--text-dim); font-size: 0.9rem; }
.footer-links { display: flex; align-items: center; justify-content: center; gap: 2rem; margin-top: 1rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-light); transition: color 0.3s; letter-spacing: 1px; }
.footer-links a:hover { color: var(--cyan); }
.footer-links ul { display: flex; align-items: center; gap: 2rem; list-style: none; flex-wrap: wrap; }

/* ===== FADE IN ANIMATION ===== */
.fade-in { opacity: 0; transform: translateY(30px); transition: all 0.7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== SEARCH ===== */
.search-container { max-width: 600px; margin: 4rem auto; position: relative; z-index: 3; }
.cybersearch-form { display: flex; gap: 0.5rem; }
.cybersearch-form input[type="text"] {
    padding: 1rem 1.5rem; font-family: inherit; background: rgba(0,255,255,0.04);
    border: 1px solid var(--cyan); color: var(--text-light); outline: none; flex: 1; transition: all 0.3s ease;
}
.cybersearch-form input[type="text"]:focus { box-shadow: 0 0 15px rgba(0,255,255,0.2); }

/* ===== SINGLE POST ===== */
.single-section { padding: 8rem 3rem 4rem; max-width: 900px; margin: 0 auto; position: relative; z-index: 3; }

.post-content { color: var(--text-light); font-size: 1rem; line-height: 1.9; margin-top: 2rem; }
.post-content img { margin: 2rem 0; border: 1px solid rgba(0,255,255,0.1); }

.single-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.single-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: bold; line-height: 1.3; letter-spacing: 2px; margin: 0 0 2rem; }
.single-thumb { margin: 0 0 2rem; border: 1px solid rgba(0,255,255,0.15); overflow: hidden; position: relative; }
.single-thumb-inner { width: 100%; height: auto; display: block; }
.single-tags { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; border-top: 1px solid rgba(0,255,255,0.1); padding-top: 1.5rem; margin-top: 2rem; }
.single-tags-label { color: var(--cyan); letter-spacing: 4px; font-size: 0.8rem; }
.single-back { margin-top: 2.5rem; }

/* ===== ARCHIVE ===== */
.archive-header { padding: 8rem 3rem 0; position: relative; z-index: 3; }
.archive-section { padding: 3rem 3rem 4rem; max-width: 1400px; margin: 0 auto; position: relative; z-index: 3; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.blog-grid .carousel-card { flex: none; min-width: 0; }
.blog-grid .empty-state { grid-column: 1 / -1; }

.archive-pagination { text-align: center; margin-top: 3rem; }
.archive-pagination .nav-links { justify-content: center; gap: 0.5rem; }
.archive-pagination .page-numbers { display: inline-block; padding: 0.5rem 1rem; border: 1px solid rgba(0,255,255,0.25); color: var(--text-light); text-decoration: none; font-size: 0.8rem; letter-spacing: 1px; transition: all 0.3s ease; }
.archive-pagination .page-numbers:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: var(--glow-cyan); }
.archive-pagination .page-numbers.current { border-color: var(--cyan); color: var(--cyan); background: rgba(0,255,255,0.08); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .featured-post { grid-template-columns: 1fr; }
    .featured-img { height: 250px; }
    .carousel-card { flex: 0 0 calc(50% - 0.75rem); min-width: 250px; }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .featured-section { padding: 100px 1.5rem 3rem; }
    .featured-post { padding: 2rem; }
    .recent-section { padding: 3rem 1.5rem 4rem; }
    .archive-header { padding: 7rem 1.5rem 0; }
    .archive-section { padding: 2rem 1.5rem 3rem; }
    .blog-grid { grid-template-columns: 1fr; }
    .single-section { padding: 6rem 1.5rem 3rem; }
    .carousel-card { flex: 0 0 100%; min-width: 100%; }
}
