/*
Theme Name: Javadi Terminal
Author: Alireza Javadi
Description: Cinematic Developer Portfolio Theme
Version: 1.0
*/

:root {
    --bg-color: #050505;
    --card-bg: #0a0a0a;
    --text-main: #e0e0e0;
    --text-dim: #666;
    --primary: #00ff88; 
    --secondary: #00d1ff; 
    --alert: #ff3333;
    --border: #222;
    --font-code: 'JetBrains Mono', 'Fira Code', monospace;
    --font-body: 'Inter', sans-serif;
    --scanline-color: rgba(0, 255, 136, 0.03);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* --- HEADER --- */
.terminal-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.brand {
    font-family: var(--font-code);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    margin-left: 20px;
    font-family: var(--font-code);
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-links a:hover { color: #fff; }

/* --- LAYOUT GRID (60/40) --- */
.split-container {
    display: flex;
    min-height: 100vh;
    padding-top: 60px;
    position: relative;
}

/* LEFT SIDE (Content) */
.content-stream {
    width: 55%; 
    padding: 60px 8%;
    border-right: 1px solid var(--border);
    background: linear-gradient(90deg, transparent 95%, rgba(0,255,136,0.02) 100%);
    position: relative;
    z-index: 10;
}

/* RIGHT SIDE (Visuals) */
.visual-sidebar {
    width: 45%;
    height: calc(100vh - 60px);
    position: sticky;
    top: 60px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- POST CARDS (Index) --- */
.terminal-card {
    margin-bottom: 15vh;
    opacity: 0.3;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
    border-left: 2px solid transparent;
    padding-left: 20px;
}

.terminal-card.active {
    opacity: 1;
    transform: translateY(0);
    border-left-color: var(--primary);
}

.cmd-line {
    font-family: var(--font-code);
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: block;
}

.cmd-line .prompt { color: var(--primary); margin-right: 8px; }

.post-title a {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    line-height: 1.1;
    display: block;
    margin-bottom: 15px;
}

.post-title a:hover { text-decoration: underline; text-decoration-color: var(--primary); }

.excerpt { color: #aaa; font-size: 1rem; margin-bottom: 20px; }

.btn-read {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--border);
    color: var(--primary);
    text-decoration: none;
    font-family: var(--font-code);
    font-size: 0.8rem;
    transition: 0.3s;
    background: rgba(0,255,136,0.05);
}

.btn-read:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary);
}

/* --- RIGHT SIDE VISUALS --- */
.sticky-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    perspective: 1000px;
}

.hud-grid-bg {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
    z-index: 0;
}

.cards-stack {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-card {
    position: absolute;
    width: 80%;
    max-width: 500px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

/* Active State for GSAP */
.visual-card.active {
    opacity: 1 !important;
    visibility: visible !important;
}

/* FRAMES */
.hud-frame {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hud-frame::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* CODE BLOCK STYLES */
.terminal-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #222;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.dot { width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }
.title { margin-left: auto; font-family: var(--font-code); font-size: 0.7rem; color: #555; }

.code-block {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: #a9b7c6;
    line-height: 1.5;
}

.keyword { color: #cc7832; }
.function { color: #ffc66d; }
.string { color: #6a8759; }
.variable { color: #9876aa; }
.comment { color: #808080; font-style: italic; }
.number { color: #6897bb; }

/* STATS BARS */
.server-stats .stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-family: var(--font-code);
    font-size: 0.8rem;
}
.server-stats .bar {
    width: 60%;
    height: 6px;
    background: #222;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
}
.server-stats .bar div {
    height: 100%;
    background: var(--secondary);
    animation: pulseBar 2s infinite;
}

@keyframes pulseBar {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* SINGLE PAGE SPECIFIC */
.single-mode .single-header {
    border-bottom: 1px dashed #333;
    padding-bottom: 30px;
    margin-bottom: 40px;
}

.single-mode .entry-title {
    font-size: 2.8rem;
    color: #fff;
    margin: 15px 0;
}

.single-mode .entry-content {
    font-size: 1.15rem;
    color: #ccc;
    line-height: 1.8;
}

.single-mode .entry-content p { margin-bottom: 20px; }
.single-mode .entry-content h2 { color: #fff; margin-top: 40px; }
.single-mode .entry-content code { background: #222; padding: 2px 5px; color: var(--primary); font-family: var(--font-code); }
.single-mode .entry-content pre { background: #111; padding: 15px; border: 1px solid #333; overflow-x: auto; margin: 20px 0; }

.back-cmd {
    font-family: var(--font-code);
    text-decoration: none;
    color: #666;
    display: block;
    margin-bottom: 30px;
}
.back-cmd:hover { color: var(--primary); }

/* RESPONSIVE */
@media (max-width: 900px) {
    .split-container { flex-direction: column; }
    .content-stream { width: 100%; border-right: none; }
    .visual-sidebar { display: none; }
    .terminal-nav { padding: 0 20px; }
}
