/* Terminal CV - Main Styles */

/* Root Variables - Dark Mode (Default) */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-terminal: #1e1e1e;
    --text-primary: #00ff00;
    --text-secondary: #00d9ff;
    --text-white: #ffffff;
    --text-gray: #8b949e;
    --border-color: #30363d;
    --accent-cyan: #58a6ff;
    --accent-green: #3fb950;
    --accent-red: #ff6b6b;
    --accent-yellow: #f1fa8c;
}

/* Light Mode Variables */
body[data-theme="light"] {
    --bg-primary: #f5f5f0;
    --bg-secondary: #fafaf8;
    --bg-terminal: #fefefe;
    --text-primary: #24292f;
    --text-secondary: #0969da;
    --text-white: #24292f;
    --text-gray: #57606a;
    --border-color: #d0d7de;
    --accent-cyan: #0969da;
    --accent-green: #1a7f37;
    --accent-red: #cf222e;
    --accent-yellow: #9a6700;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: 'Fira Code', 'Source Code Pro', 'Courier New', monospace;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Subtle grid background effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
}

/* Grid for light mode */
body[data-theme="light"]::before {
    background-image: 
        linear-gradient(rgba(0,0,0,.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,.02) 1px, transparent 1px);
    opacity: 0.15;
}

/* Desktop Launcher */
.desktop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    z-index: 1000;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    user-select: none;
}

.desktop-icon:hover {
    background: rgba(0, 255, 0, 0.1);
    transform: scale(1.05);
}

.desktop-icon:active {
    transform: scale(0.95);
}

.desktop-icon.selected {
    background: rgba(0, 255, 0, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.icon-image {
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.5));
}

.icon-image svg {
    display: block;
}

.icon-label {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.desktop-hint {
    margin-top: 40px;
    color: var(--text-gray);
    font-size: 13px;
    opacity: 0.7;
    animation: pulse 2s ease-in-out infinite;
}

.desktop.launching {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Terminal Container */
.terminal-container {
    width: 90%;
    max-width: 1200px;
    min-height: 400px;
    background: var(--bg-terminal);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(0, 255, 0, 0.1);
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
}

@media screen and (min-width: 769px) {
    .terminal-container {
        min-width: 600px;
        resize: both;
    }
}

/* Terminal Header */
.terminal-header {
    background: var(--bg-secondary);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.terminal-header-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.terminal-controls {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.control.close {
    background: #ff5f56;
}

.control.minimize {
    background: #ffbd2e;
}

.control.maximize {
    background: #27c93f;
}

.terminal-title {
    color: var(--text-gray);
    font-size: 13px;
    font-weight: 500;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
}

.theme-toggle:hover {
    background: var(--bg-terminal);
    border-color: var(--accent-cyan);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    display: block;
    line-height: 1;
}

/* Terminal Body */
.terminal-body {
    padding: 20px;
    min-height: 500px;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg-terminal);
}

/* Custom Scrollbar */
.terminal-body::-webkit-scrollbar {
    width: 10px;
}

.terminal-body::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.terminal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-gray);
}

/* ASCII Art */
.ascii-art {
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: bold;
}

.ascii-art pre {
    margin: 0;
}

/* Output Styles */
.output {
    margin-bottom: 20px;
}

.output p {
    margin: 5px 0;
    color: var(--text-white);
}

.command-highlight {
    color: var(--accent-cyan);
    font-weight: bold;
    background: rgba(88, 166, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

#output-area {
    margin-bottom: 20px;
}

/* Content Sections */
.content-section {
    margin: 20px 0;
    animation: fadeIn 0.5s ease-in;
}

.section-title {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.section-content {
    color: var(--text-white);
    padding-left: 10px;
}

.section-content p {
    margin: 10px 0;
}

.section-content strong {
    color: var(--accent-green);
}

/* Skills Section */
.skills-category {
    margin: 20px 0;
}

.skills-category h3 {
    color: var(--accent-cyan);
    font-size: 16px;
    margin-bottom: 10px;
}

.skills-category ul {
    list-style: none;
    padding-left: 20px;
}

.skills-category li {
    margin: 5px 0;
    position: relative;
    padding-left: 20px;
}

.skills-category li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--text-primary);
}

/* Experience Section */
.experience-item {
    margin: 25px 0;
    padding: 15px;
    background: rgba(88, 166, 255, 0.05);
    border-left: 3px solid var(--accent-cyan);
    border-radius: 4px;
}

.experience-item h3 {
    color: var(--accent-cyan);
    font-size: 18px;
    margin-bottom: 5px;
}

.company-date {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 10px;
}

.experience-item ul {
    list-style: none;
    padding-left: 20px;
    margin: 10px 0;
}

.experience-item li {
    margin: 8px 0;
    position: relative;
    padding-left: 20px;
}

.experience-item li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-green);
}

.tech-stack {
    margin-top: 10px;
    color: var(--text-gray);
    font-size: 14px;
}

/* Education Section */
.education-item {
    margin: 20px 0;
    padding: 15px;
    background: rgba(63, 185, 80, 0.05);
    border-left: 3px solid var(--accent-green);
    border-radius: 4px;
}

.education-item h3 {
    color: var(--accent-green);
    font-size: 16px;
    margin-bottom: 5px;
}

.institution {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 8px;
}

/* Certifications Section */
.cert-item {
    margin: 15px 0;
    padding: 12px;
    background: rgba(241, 250, 140, 0.05);
    border-left: 3px solid var(--accent-yellow);
    border-radius: 4px;
}

.cert-item h3 {
    color: var(--accent-yellow);
    font-size: 16px;
    margin-bottom: 5px;
}

.cert-date {
    color: var(--text-gray);
    font-size: 13px;
}

/* Contact Section */
.contact-content a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-content a:hover {
    color: var(--text-white);
    text-decoration: underline;
}

.availability {
    margin-top: 15px;
    padding: 10px;
    background: rgba(63, 185, 80, 0.1);
    border-radius: 4px;
}

.status-available {
    color: var(--accent-green);
    font-weight: bold;
}

/* Help Section */
.help-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.help-content tr {
    border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}

.help-content td {
    padding: 10px 15px 10px 0;
}

.command-name {
    color: var(--accent-cyan);
    font-weight: bold;
    width: 150px;
}

.command-desc {
    color: var(--text-gray);
}

.tip {
    color: var(--text-gray);
    font-style: italic;
    font-size: 14px;
}

/* Command Line */
.command-line {
    display: flex;
    align-items: center;
    margin-top: 20px;
    padding: 10px 0;
}

.prompt {
    color: var(--accent-green);
    margin-right: 10px;
    font-weight: bold;
    white-space: nowrap;
}

.command-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-white);
    font-family: inherit;
    font-size: 14px;
    caret-color: var(--text-primary);
    margin-left: 8px;
}

/* Command Output Styling */
.command-output {
    margin: 10px 0;
}

.command-echo {
    color: var(--text-gray);
    margin-bottom: 10px;
}

.command-echo .prompt-echo {
    color: var(--accent-green);
}

.command-echo .command-text {
    color: var(--text-white);
}

.error-message {
    color: var(--accent-red);
    margin: 10px 0;
}

/* Autocomplete Matches */
.autocomplete-matches {
    color: var(--text-white);
    margin: 5px 0;
    padding: 5px 0;
    font-family: inherit;
    line-height: 1.8;
    column-count: 3;
    column-gap: 20px;
}

@media screen and (max-width: 768px) {
    .autocomplete-matches {
        column-count: 2;
    }
}

@media screen and (max-width: 480px) {
    .autocomplete-matches {
        column-count: 1;
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .terminal-container {
        border-radius: 4px;
    }

    .terminal-body {
        padding: 15px;
        max-height: 70vh;
    }

    .ascii-art {
        font-size: 8px;
        overflow-x: auto;
    }

    .section-title {
        font-size: 16px;
    }

    .experience-item h3,
    .education-item h3,
    .cert-item h3 {
        font-size: 15px;
    }

    .help-content table {
        font-size: 13px;
    }

    .command-name {
        width: 100px;
    }

    .prompt {
        font-size: 13px;
    }

    .command-input {
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .terminal-header {
        padding: 8px 12px;
    }

    .terminal-body {
        padding: 10px;
        min-height: 400px;
    }

    .ascii-art {
        font-size: 6px;
    }

    .experience-item,
    .education-item,
    .cert-item {
        padding: 10px;
    }

    .section-content {
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .terminal-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .terminal-controls {
        display: none;
    }

    .command-line {
        display: none;
    }
}

/* Certification verification links */
.cert-link {
    display: inline-block;
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 0.9em;
    margin-top: 0.3em;
    transition: color 0.3s ease;
}

.cert-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* PDF download link */
.download-link {
    color: var(--accent-cyan);
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid var(--accent-cyan);
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.download-link:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(88, 166, 255, 0.3);
}

/* =================================================================
   Version Footer
   ================================================================= */

.version-footer {
    position: fixed;
    bottom: 12px;
    right: 20px;
    font-size: 0.75rem;
    font-family: 'Fira Code', 'Courier New', monospace;
    color: var(--text-gray);
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.2s ease;
    z-index: 9999;
    pointer-events: none;
    user-select: none;
    text-align: right;
    line-height: 1.4;
}

.version-footer:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.version-text {
    color: var(--accent-cyan);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.commit-hash {
    color: var(--text-gray);
    font-size: 0.7rem;
    opacity: 0.7;
    margin-left: 2px;
}

.update-date {
    color: var(--text-gray);
    font-size: 0.7rem;
}

/* Hide on small mobile to avoid clutter */
@media screen and (max-width: 480px) {
    .version-footer {
        font-size: 0.65rem;
        bottom: 8px;
        right: 12px;
        opacity: 0.4;
    }
    
    .commit-hash {
        display: none;
    }
}

/* Reduce opacity when terminal is open */
body.terminal-active .version-footer {
    opacity: 0.25;
}

/* Light mode adjustments */
body[data-theme="light"] .version-footer {
    opacity: 0.6;
}

body[data-theme="light"] .version-footer:hover {
    opacity: 1;
}
