/* Terminal Theme CSS */
:root {
    --terminal-bg: #282c34;
    --terminal-text: #abb2bf;
    --terminal-green: #98c379;
    --terminal-blue: #61afef;
    --terminal-yellow: #e5c07b;
    --terminal-red: #e06c75;
    --terminal-purple: #c678dd;
    --terminal-cyan: #56b6c2;
    --terminal-prompt: #98c379;
    --terminal-cursor: #61afef;
    --terminal-selection: rgba(97, 175, 239, 0.3);
    --terminal-comment: #5c6370;
    --terminal-font: 'Fira Code', 'Cascadia Code', 'Source Code Pro', monospace;
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--terminal-bg);
    color: var(--terminal-text);
    font-family: var(--terminal-font);
    line-height: 1.2;
}

/* Hide scrollbars but keep functionality */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Terminal Window */
.terminal-window {
    background-color: var(--terminal-bg);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin: 40px auto;
    overflow: hidden;
    width: 100%;
    max-width: 900px;
}

/* Full-screen Terminal */
.terminal-window.fullscreen {
    width: 100%;
    height: 100vh;
    max-width: none;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background: #21252b;
    height: 30px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    justify-content: flex-start;
    position: relative;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.terminal-close {
    background-color: #ff5f56;
}

.terminal-minimize {
    background-color: #ffbd2e;
}

.terminal-maximize {
    background-color: #27c93f;
}

.terminal-title {
    color: var(--terminal-comment);
    font-size: 12px;
    margin-left: 15px;
    margin-right: 20px;
}

.terminal-body {
    padding: 20px;
    flex: 1;
    height: auto;
    overflow-y: auto;
    position: relative;
}

/* Terminal Tabs */
.terminal-tabs {
    display: flex;
    margin-left: 20px;
}

.terminal-tab {
    color: var(--terminal-comment);
    text-decoration: none;
    padding: 0 15px;
    font-size: 14px;
    line-height: 30px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.terminal-tab:hover {
    color: var(--terminal-text);
}

.terminal-tab.active {
    color: var(--terminal-blue);
    border-bottom-color: var(--terminal-blue);
}

/* Terminal Text */
.terminal-line {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    position: relative; /* Add this to ensure proper positioning context */
}

.terminal-prompt {
    color: var(--terminal-prompt);
    margin-right: 10px;
    white-space: nowrap;
}

.terminal-prompt::before {
    content: "➜";
    margin-right: 8px;
}

.terminal-command {
    color: var(--terminal-text);
    font-weight: 500;
}

.terminal-output {
    width: 100%;
    padding: 10px 0 20px 25px;
    white-space: pre-wrap;
}

/* Command Input - Terminal Style */
.terminal-command-line {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    padding-left: 25px;
}

#command-input {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    /* Prevent scrolling when focusing this element */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.current-line {
    color: var(--terminal-text);
    white-space: pre;
    margin-left: 0;
    position: relative;
    display: inline-block;
    min-height: 1em;
}

.cursor {
    position: absolute;
    width: 8px;
    height: 15px;
    background-color: var(--terminal-cursor);
    animation: blink 1s infinite;
    top: 0px; /* Changed from 2px to 0px to align with text */
    left: 0;
    z-index: 10; /* Ensure cursor is visible */
}

/* Skills Grid - More Compact */
.terminal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.terminal-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 8px;
    border-left: 2px solid var(--terminal-blue);
}

.terminal-card h3 {
    color: var(--terminal-blue);
    margin: 0 0 5px 0;
    font-size: 0.9rem;
}

.terminal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.terminal-list li {
    margin-bottom: 4px;
    position: relative;
    padding-left: 12px;
    font-size: 0.9rem;
}

.terminal-list li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--terminal-green);
}

/* Social Links - Inline Layout */
.terminal-social {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.terminal-social span {
    position: relative;
    padding-left: 20px;
}

.terminal-social span::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--terminal-green);
}

/* Footer */
.terminal-footer {
    background-color: var(--terminal-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    text-align: center;
    color: var(--terminal-comment);
    font-size: 0.9rem;
}

/* Languages */
.terminal-languages {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.terminal-languages span {
    position: relative;
    padding-left: 20px;
}

.terminal-languages span::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--terminal-green);
}

/* Responsive */
@media (max-width: 768px) {
    .terminal-window {
        margin: 20px auto;
    }
    
    .terminal-body {
        height: auto;
        min-height: 300px;
    }
    
    .terminal-grid {
        grid-template-columns: 1fr;
    }
}

/* Blinking Cursor */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Command Highlighting */
.command-keyword {
    color: var(--terminal-purple);
}

.command-string {
    color: var(--terminal-green);
}

.command-number {
    color: var(--terminal-yellow);
}

.command-comment {
    color: var(--terminal-comment);
    font-style: italic;
}

.command-function {
    color: var(--terminal-blue);
}

/* ASCII Art */
.ascii-art {
    color: var(--terminal-blue);
    font-family: monospace;
    white-space: pre;
    line-height: 1.2;
    margin: 20px 0;
}

/* Help Text */
.help-command {
    color: var(--terminal-yellow);
    font-weight: bold;
}

.help-description {
    color: var(--terminal-text);
    margin-left: 20px;
}

/* Matrix Effect (Optional) */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.05;
}

/* ASCII Table Style */
.ascii-table {
    font-family: var(--terminal-font);
    line-height: 1.2;
    white-space: pre;
    margin: 0;
    color: var(--terminal-text);
}

/* ASCII table box characters */
.ascii-table {
    color: var(--terminal-comment);
}

/* Table content */
.ascii-table a.post-link {
    color: var(--terminal-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.ascii-table a.post-link:hover {
    color: var(--terminal-cyan);
    text-decoration: underline;
}

/* Blog Post Content Styling */
.blog-post-content {
    padding: 10px 0;
}

.file-info-line {
    color: var(--terminal-comment);
    border-bottom: 1px dashed var(--terminal-comment);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.file-info-item {
    margin-right: 20px;
}

.file-content {
    position: relative;
    padding-left: 50px; /* Space for line numbers */
    counter-reset: line;
}

.line-number {
    position: absolute;
    left: 0;
    color: var(--terminal-comment);
    text-align: right;
    width: 40px;
    user-select: none;
}

.file-yaml-header {
    color: var(--terminal-comment);
    margin-bottom: 20px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.yaml-delimiter {
    color: var(--terminal-comment);
}

.yaml-key {
    color: var(--terminal-red);
}

.yaml-value {
    color: var(--terminal-green);
}

.file-markdown-content {
    position: relative;
}

.file-markdown-content h1,
.file-markdown-content h2,
.file-markdown-content h3 {
    color: var(--terminal-yellow);
    margin-top: 25px;
    margin-bottom: 15px;
}

.file-markdown-content p {
    margin-bottom: 15px;
    line-height: 1.5;
}

.file-markdown-content pre {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 15px 0;
}

.file-markdown-content code {
    font-family: var(--terminal-font);
    color: var(--terminal-green);
}

.post-tag {
    display: inline-block;
    background-color: rgba(97, 175, 239, 0.1);
    color: var(--terminal-cyan);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-right: 5px;
}

/* README section */
.readme-section {
    margin-top: 10px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--terminal-yellow);
    border-radius: 3px;
}

.readme-title {
    color: var(--terminal-yellow);
    margin-top: 0;
    margin-bottom: 10px;
}

.readme-commands {
    list-style: none;
    padding-left: 5px;
}

.readme-commands li {
    margin-bottom: 5px;
}

/* Stats section */
.stats-section {
    margin-top: 10px;
    padding: 10px 15px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.stats-content {
    display: flex;
    gap: 20px;
}

.stats-item {
    display: flex;
    align-items: center;
}

.stats-label {
    color: var(--terminal-purple);
    margin-right: 8px;
}

.stats-value {
    color: var(--terminal-text);
    font-weight: bold;
}
