/*
Theme Name: Linux Terminal Agnoster
Theme URI: https://github.com/maford/linux_theme
Author: Terminal Theme Developer
Author URI: https://github.com/maford
Description: A WordPress theme inspired by the agnoster zsh theme with a Linux terminal aesthetic. Features a dark terminal-style interface with powerline-inspired design elements and Kitty terminal on GNOME styling.
Version: 1.6.4
Requires at least: 6.0
Tested up to: 6.8.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: linux-terminal-agnoster
Tags: dark, terminal, linux, tech, blog, one-column, custom-colors, custom-menu, editor-style, featured-images, threaded-comments
*/

/* ===========================
   CSS Variables - Agnoster Color Scheme
   =========================== */
:root {
    --terminal-bg: #1c1c1c;
    --terminal-fg: #d0d0d0;
    --agnoster-blue: #268bd2;
    --agnoster-cyan: #2aa198;
    --agnoster-green: #859900;
    --agnoster-yellow: #b58900;
    --agnoster-orange: #cb4b16;
    --agnoster-red: #dc322f;
    --agnoster-magenta: #d33682;
    --agnoster-violet: #6c71c4;
    --agnoster-base03: #002b36;
    --agnoster-base02: #073642;
    --agnoster-prompt-bg: #1c1c1c;
    --agnoster-prompt-bg-solid: #1c1c1c;
    --agnoster-base01: #586e75;
    --agnoster-base00: #657b83;
    --agnoster-base0: #839496;
    --agnoster-base1: #93a1a1;
    --agnoster-base2: #eee8d5;
    --agnoster-base3: #fdf6e3;
    --prompt-green: #5f875f;
    --prompt-blue: #005faf;
    --selection-bg: #264f78;
    --font-mono: 'Fira Code', 'Source Code Pro', 'Monaco', 'Menlo', 'Consolas', monospace;
}

/* ===========================
   Base Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--terminal-bg);
    color: var(--terminal-fg);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: var(--selection-bg);
    color: var(--terminal-fg);
}

/* ===========================
   Layout
   =========================== */
.terminal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.terminal-window {
    background-color: var(--agnoster-base03);
    border-radius: 8px 8px 4px 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.6);
}

.terminal-header {
    background: linear-gradient(to bottom, #353535, #2b2b2b);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #1a1a1a;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.terminal-title {
    color: #e0e0e0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    user-select: none;
}

.terminal-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.terminal-button {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    position: relative;
}

.terminal-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 0, 0, 0.4);
}

.terminal-button.minimize::before {
    content: '';
    width: 12px;
    height: 2px;
    background-color: #e0e0e0;
    position: absolute;
}

.terminal-button.minimize:hover {
    background-color: rgba(251, 184, 108, 0.3);
}

.terminal-button.maximize::before {
    content: '';
    width: 10px;
    height: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 2px;
    position: absolute;
}

.terminal-button.maximize:hover {
    background-color: rgba(129, 199, 132, 0.3);
}

.terminal-button.close::before {
    content: '×';
    color: #e0e0e0;
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
}

.terminal-button.close:hover {
    background-color: rgba(229, 115, 115, 0.8);
    border-color: rgba(198, 40, 40, 0.8);
}

.terminal-button.close:hover::before {
    color: #ffffff;
}

.terminal-content {
    padding: 20px;
    background-color: var(--terminal-bg);
    min-height: 400px;
}

/* ===========================
   Prompt/Header Navigation
   =========================== */
.terminal-prompt-wrapper {
    display: block;
    margin-bottom: 20px;
    white-space: nowrap;
    font-size: 14px;
    line-height: 26px;
    overflow: visible;
}

.prompt-context {
    color: #fff;
    font-weight: 600;
    padding: 4px 12px;
    background: var(--agnoster-blue);
    position: relative;
    padding-right: 12px;
    display: inline-block;
    vertical-align: top;
    line-height: 18px;
    height: 26px;
    box-sizing: border-box;
    overflow: visible;
}

.prompt-context::after {
    display: none;
}

.prompt-user {
    color: #fff;
    font-weight: bold;
}

.prompt-separator {
    color: rgba(255, 255, 255, 0.7);
}

.prompt-hostname {
    color: #fff;
}

.prompt-arrow {
    color: var(--agnoster-blue);
    font-weight: bold;
    font-size: 18px;
    margin: 0 0 0 4px;
    position: relative;
    z-index: 2;
    display: inline-block;
    vertical-align: top;
    line-height: 26px;
    height: 26px;
    font-family: 'DejaVu Sans Mono', 'Noto Sans Mono', 'Liberation Mono', 'Courier New', monospace;
}

.terminal-prompt-path {
    background: var(--agnoster-blue);
    color: #fff;
    padding: 4px 12px 4px 8px;
    position: relative;
    display: inline-block;
    vertical-align: top;
    font-weight: 600;
    margin-left: 0;
    line-height: 18px;
    height: 26px;
    box-sizing: border-box;
}

.terminal-prompt-path::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 13px 0 13px 10px;
    border-color: transparent transparent transparent var(--agnoster-blue);
}

.prompt-path {
    color: #fff;
}

.prompt-cursor {
    color: var(--terminal-fg);
    font-weight: normal;
    margin-left: 8px;
    display: inline-block;
    vertical-align: top;
    animation: blink 1s infinite;
    position: relative;
    z-index: 10;
    line-height: 26px;
    height: 26px;
}

.prompt-separator {
    margin: 0;
}

.site-navigation {
    background-color: var(--agnoster-base02);
    padding: 15px 20px;
    margin-bottom: 20px;
    border-left: 3px solid var(--agnoster-cyan);
}

.site-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.site-navigation a {
    color: var(--agnoster-cyan);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.site-navigation a::before {
    content: '$ ';
    color: var(--agnoster-green);
}

.site-navigation a:hover {
    color: var(--agnoster-blue);
}

.site-navigation a.current {
    color: var(--agnoster-yellow);
}

/* ===========================
   Typography
   =========================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--agnoster-blue);
    margin: 20px 0 15px 0;
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: 2em;
    border-bottom: 2px solid var(--agnoster-blue);
    padding-bottom: 10px;
}

h2 {
    font-size: 1.5em;
    color: var(--agnoster-cyan);
}

h3 {
    font-size: 1.3em;
    color: var(--agnoster-green);
}

h1::before {
    content: '# ';
    color: var(--agnoster-green);
}

h2::before {
    content: '## ';
    color: var(--agnoster-green);
}

h3::before {
    content: '### ';
    color: var(--agnoster-green);
}

p {
    margin: 15px 0;
}

a {
    color: var(--agnoster-blue);
    text-decoration: underline;
    transition: color 0.2s;
}

a:hover {
    color: var(--agnoster-cyan);
}

code {
    background-color: var(--agnoster-base02);
    color: var(--agnoster-yellow);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--font-mono);
}

pre {
    background-color: var(--agnoster-base02);
    border-left: 3px solid var(--agnoster-cyan);
    padding: 15px;
    overflow-x: auto;
    margin: 15px 0;
    border-radius: 4px;
}

pre code {
    background: none;
    padding: 0;
}

blockquote {
    border-left: 4px solid var(--agnoster-yellow);
    padding-left: 20px;
    margin: 20px 0;
    color: var(--agnoster-base1);
    font-style: italic;
}

blockquote::before {
    content: '> ';
    color: var(--agnoster-yellow);
    font-weight: bold;
}

/* ===========================
   Posts and Articles
   =========================== */
article {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px dashed var(--agnoster-base01);
}

article:last-child {
    border-bottom: none;
}

.entry-header {
    margin-bottom: 20px;
}

.entry-title {
    margin: 0 0 10px 0;
}

.entry-title a {
    color: var(--agnoster-blue);
    text-decoration: none;
}

.entry-title a:hover {
    color: var(--agnoster-cyan);
}

.entry-meta {
    color: var(--agnoster-base01);
    font-size: 0.9em;
    margin-bottom: 15px;
}

.entry-meta::before {
    content: '[';
    color: var(--agnoster-green);
}

.entry-meta::after {
    content: ']';
    color: var(--agnoster-green);
}

.entry-meta span {
    margin-right: 15px;
}

.entry-meta span::before {
    content: '• ';
    color: var(--agnoster-cyan);
}

.entry-meta span:first-child::before {
    content: '';
}

.entry-content {
    line-height: 1.8;
}

.entry-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--agnoster-base01);
    color: var(--agnoster-base01);
    font-size: 0.9em;
}

.tags-links a,
.cat-links a {
    background-color: var(--agnoster-base02);
    color: var(--agnoster-cyan);
    padding: 4px 10px;
    border-radius: 3px;
    text-decoration: none;
    margin-right: 8px;
    display: inline-block;
    margin-top: 5px;
}

.tags-links a::before {
    content: '#';
    color: var(--agnoster-yellow);
}

.tags-links a:hover,
.cat-links a:hover {
    background-color: var(--agnoster-cyan);
    color: var(--terminal-bg);
}

/* ===========================
   Comments
   =========================== */
.comments-area {
    margin-top: 40px;
    padding: 20px;
    background-color: var(--agnoster-base02);
    border-radius: 4px;
}

.comments-title {
    color: var(--agnoster-cyan);
    margin-top: 0;
}

.comment-list {
    list-style: none;
}

.comment {
    padding: 15px;
    margin: 15px 0;
    background-color: var(--terminal-bg);
    border-left: 3px solid var(--agnoster-blue);
}

.comment-author {
    color: var(--agnoster-green);
    font-weight: bold;
}

.comment-metadata {
    color: var(--agnoster-base01);
    font-size: 0.85em;
    margin: 5px 0;
}

.comment-content {
    margin-top: 10px;
}

.reply {
    margin-top: 10px;
}

.reply a {
    background-color: var(--agnoster-blue);
    color: #fff;
    padding: 5px 12px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.9em;
}

.reply a:hover {
    background-color: var(--agnoster-cyan);
}

/* ===========================
   Forms
   =========================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
    background-color: var(--agnoster-base02);
    border: 1px solid var(--agnoster-base01);
    color: var(--terminal-fg);
    padding: 10px;
    font-family: var(--font-mono);
    font-size: 14px;
    border-radius: 3px;
    width: 100%;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--agnoster-cyan);
    box-shadow: 0 0 0 2px rgba(42, 161, 152, 0.2);
}

button,
input[type="submit"],
.wp-block-button__link {
    background-color: var(--agnoster-blue);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-family: var(--font-mono);
    font-size: 14px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s;
}

button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
    background-color: var(--agnoster-cyan);
}

button::before,
input[type="submit"]::before {
    content: '> ';
    color: var(--agnoster-yellow);
}

/* ===========================
   Pagination
   =========================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    background-color: var(--agnoster-base02);
    color: var(--agnoster-cyan);
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.pagination a:hover {
    background-color: var(--agnoster-cyan);
    color: var(--terminal-bg);
}

.pagination .current {
    background-color: var(--agnoster-blue);
    color: #fff;
}

/* ===========================
   Footer
   =========================== */
.site-footer {
    margin-top: 40px;
    padding: 20px;
    background-color: var(--agnoster-base02);
    border-top: 2px solid var(--agnoster-cyan);
    text-align: center;
    color: var(--agnoster-base01);
}

.site-footer::before {
    content: '$ logout';
    display: block;
    color: var(--agnoster-green);
    margin-bottom: 10px;
}

/* ===========================
   Multiple Terminal Windows Layout
   =========================== */
.terminal-windows-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.terminal-window.main-terminal {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 370px); /* Leave space for sidebar + gap */
}

/* Sidebar as separate terminal window */
#secondary {
    flex: 0 0 350px;
    min-width: 350px;
    max-width: 350px;
    height: fit-content;
}

/* Sidebar position left */
body.sidebar-left .terminal-windows-wrapper {
    flex-direction: row-reverse;
}

/* No sidebar - single terminal window */
body.sidebar-none #secondary {
    display: none;
}

body.sidebar-none .terminal-window.main-terminal {
    max-width: 100%;
}

/* ===========================
   Widget Styles
   =========================== */
.sidebar-content {
    padding: 20px;
}

.widget {
    margin-bottom: 25px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    color: var(--agnoster-green);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.widget-title::before {
    content: '$ ';
    color: var(--agnoster-cyan);
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li::before {
    content: '› ';
    color: var(--agnoster-blue);
    margin-right: 5px;
}

.widget a {
    color: var(--agnoster-cyan);
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: var(--agnoster-green);
}

/* Search widget */
.widget_search .search-form {
    display: flex;
    gap: 5px;
}

.widget_search .search-field {
    flex: 1;
    background: var(--terminal-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--terminal-fg);
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 13px;
}

.widget_search .search-submit {
    background: var(--agnoster-blue);
    border: none;
    color: white;
    padding: 8px 16px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 13px;
    transition: background 0.3s ease;
}

.widget_search .search-submit:hover {
    background: var(--agnoster-cyan);
}

/* Categories and Archives */
.widget_categories ul li,
.widget_archive ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget_categories .count,
.widget_archive .count {
    color: var(--agnoster-base01);
    font-size: 12px;
}

/* ===========================
   Footer Widgets
   =========================== */
.footer-widgets-container {
    margin-top: 20px;
}

.terminal-window.footer-widgets-terminal {
    width: 100%;
}

.footer-widget-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
}

.footer-widget-column {
    min-width: 0;
}

.footer-widget-column .widget {
    margin-bottom: 25px;
}

.footer-widget-column .widget:last-child {
    margin-bottom: 0;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 1200px) {
    .terminal-windows-wrapper {
        gap: 15px;
    }
    
    #secondary {
        flex: 0 0 300px;
    }
}

@media (max-width: 768px) {
    .terminal-windows-wrapper {
        flex-direction: column;
    }
    
    #secondary {
        flex: 1;
        width: 100%;
    }
    
    .footer-widget-area {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }
    
    body {
        font-size: 13px;
    }

    .terminal-container {
        padding: 10px;
    }

    .terminal-content {
        padding: 15px;
    }

    .site-navigation ul {
        flex-direction: column;
        gap: 10px;
    }

    .terminal-prompt-path::after {
        display: none;
    }
}

/* ===========================
   Utility Classes
   =========================== */
.text-green {
    color: var(--agnoster-green);
}

.text-blue {
    color: var(--agnoster-blue);
}

.text-cyan {
    color: var(--agnoster-cyan);
}

.text-yellow {
    color: var(--agnoster-yellow);
}

.text-red {
    color: var(--agnoster-red);
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ===========================
   Animations
   =========================== */
@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.cursor-blink {
    animation: blink 1s infinite;
}

.terminal-loading::after {
    content: '█';
    animation: blink 1s infinite;
    color: var(--agnoster-green);
}

