/*
Theme Name: CGH Tech Terminal
Theme URI: https://cgh.mx
Author: Antigravity
Description: A minimalist, high-performance terminal console theme in Amber/Gold.
Version: 1.1.0
License: GNU General Public License v2 or later
Text Domain: cgh-tech
*/

:root {
    --bg-color: #0a0a0a;
    --text-primary: #ffb000;
    /* Warm amber */
    --text-secondary: #cc8800;
    /* Darker amber */
    --text-accent: #ffd700;
    /* Gold */
    --font-mono: 'IBM Plex Mono', 'Courier New', Courier, monospace;
    --glow: 0 0 5px rgba(255, 176, 0, 0.5);
    --glow-strong: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* --- Reset & Core --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    line-height: 1.6;
    font-size: 16px;
    text-shadow: var(--glow);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* scanline effect */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 999;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

a {
    color: var(--text-accent);
    text-decoration: none;
    border-bottom: 1px dashed var(--text-secondary);
    transition: all 0.2s ease;
}

a:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
    text-shadow: none;
    border-bottom-color: transparent;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: bold;
    color: var(--text-accent);
    text-shadow: var(--glow-strong);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

ul,
ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    width: 100%;
}

.content-area {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.content-area .main-content {
    flex: 1;
    min-width: 0;
}

header.site-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--text-secondary);
    padding-bottom: 20px;
}

.terminal-header-info {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.site-branding {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.custom-logo-link {
    display: inline-block;
    border: none;
    margin-right: 20px;
}

.custom-logo-link:hover {
    background: transparent;
}

.image-logo {
    width: 100px !important;
    height: 100px !important;
    max-width: 100px !important;
    object-fit: contain;
    /* Reverted to soft amber drop-shadow to avoid artifacts */
    filter: drop-shadow(0px 0px 5px rgba(255, 176, 0, 0.5));
}

.site-title {
    font-size: 2.2em;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.site-title a {
    border: none;
}

.site-title a:hover {
    background: transparent;
    color: var(--text-accent);
    text-shadow: var(--glow-strong);
}

.site-description {
    color: var(--text-secondary);
    margin: 0;
}

nav.main-navigation {
    margin-top: 15px;
}

nav.main-navigation ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0;
}

nav.main-navigation a {
    border: none;
    text-decoration: none;
}

nav.main-navigation a::before {
    content: "[";
    color: var(--text-secondary);
    margin-right: 5px;
}

nav.main-navigation a::after {
    content: "]";
    color: var(--text-secondary);
    margin-left: 5px;
}

nav.main-navigation a:hover {
    background: transparent;
    color: var(--text-accent);
}

nav.main-navigation a:hover::before,
nav.main-navigation a:hover::after {
    color: var(--text-accent);
}

/* --- Main Content --- */
.main-content {
    margin-bottom: 60px;
}

article {
    margin-bottom: 40px;
}

.post-header {
    margin-bottom: 15px;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.post-meta::before {
    content: "$ ";
}

.post-title h2 {
    margin: 0;
}

.post-title h2 a {
    border: none;
}

.post-title h2 a:hover {
    background: transparent;
    text-shadow: var(--glow-strong);
}

.post-title h2::before {
    content: "> ";
    color: var(--text-secondary);
}

.post-excerpt {
    border-left: 2px solid var(--text-secondary);
    padding-left: 15px;
    margin-bottom: 15px;
}

.read-more {
    font-weight: bold;
    font-size: 0.9em;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    border-top: 1px dashed var(--text-secondary);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
}

.page-numbers {
    padding: 5px 10px;
    border: 1px solid transparent;
}

.page-numbers.current,
a.page-numbers:hover {
    border-color: var(--text-primary);
    background: transparent;
    color: var(--text-primary);
}

/* Single Post */
.single-post-meta {
    border: 1px solid var(--text-secondary);
    padding: 15px;
    margin-bottom: 30px;
    background: rgba(255, 176, 0, 0.05);
}

.post-content {
    margin-bottom: 40px;
}

/* --- Footer --- */
footer.site-footer {
    border-top: 1px solid var(--text-secondary);
    padding: 20px;
    text-align: center;
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: auto;
}

.cmd-line {
    margin-bottom: 10px;
}

.cmd-prompt {
    color: var(--text-primary);
}

/* --- Terminal Elements --- */
.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--text-primary);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Boot Sequence Overlay */
#boot-sequence {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 10000;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    font-family: var(--font-mono);
    color: var(--text-primary);
    font-size: 1.2rem;
    overflow: hidden;
}

.boot-line {
    margin-bottom: 10px;
    opacity: 0;
    /* Hidden initially, JS will reveal them */
    text-shadow: var(--glow);
}

.boot-line.visible {
    opacity: 1;
}

/* Allow users to skip boot sequence by clicking anywhere on it */
#boot-sequence.clickable {
    cursor: pointer;
}

#boot-sequence.hidden {
    display: none;
}

/* --- Sidebar --- */
#secondary.widget-area {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.sidebar-panel {
    border: 1px solid var(--text-secondary);
    padding: 15px;
    margin-bottom: 20px;
    background: rgba(255, 176, 0, 0.03);
}

.sidebar-panel .cmd-line {
    font-size: 0.8em;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-panel .panel-title {
    font-size: 0.85em;
    color: var(--text-accent);
    text-shadow: var(--glow-strong);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--text-secondary);
}

/* Category list */
.terminal-categories,
.terminal-recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.terminal-categories li,
.terminal-recent-posts li {
    margin-bottom: 4px;
}

.terminal-categories li a,
.terminal-recent-posts li a {
    display: block;
    padding: 4px 8px;
    font-size: 0.85em;
    border: none;
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.terminal-categories li a:hover,
.terminal-recent-posts li a:hover {
    background: rgba(255, 176, 0, 0.1);
    color: var(--text-accent);
    text-shadow: var(--glow-strong);
    padding-left: 12px;
}

.terminal-categories li a::before {
    content: "├── ";
    color: var(--text-secondary);
}

.terminal-categories li:last-child a::before {
    content: "└── ";
}

.cat-icon {
    margin-right: 4px;
}

.cat-count {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-left: 4px;
}

.terminal-recent-posts li a::before {
    content: "> ";
    color: var(--text-secondary);
}

.post-date-mini {
    color: var(--text-secondary);
    margin-right: 8px;
    font-size: 0.9em;
}

.terminal-categories .empty,
.terminal-recent-posts .empty {
    color: var(--text-secondary);
    font-size: 0.85em;
    padding: 4px 8px;
}

/* --- Live Clock --- */
#cgh-live-clock {
    color: var(--text-accent);
}

/* Media Queries */
@media (max-width: 768px) {
    .content-area {
        flex-direction: column;
    }

    #secondary.widget-area {
        width: 100%;
        position: static;
        margin-top: 40px;
        border-top: 1px dashed var(--text-secondary);
        padding-top: 20px;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 14px;
    }

    .site-title {
        font-size: 1.5em;
    }

    .custom-logo {
        max-width: 150px;
    }
}