/* Terminal Application - btop-inspired Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Default Theme - Matrix Green */
    --bg-primary: #0a0a0a;
    --bg-panel: #0f0f0f;
    --bg-header: #1a1a1a;
    --border-color: #00ff00;
    --border-dim: #005500;
    --text-primary: #00ff00;
    --text-secondary: #33ff33;
    --text-dim: #00aa00;
    --text-muted: #007700;
    --accent-cyan: #00ffff;
    --accent-yellow: #ffff00;
    --accent-red: #ff5555;
    --accent-blue: #5555ff;
}

/* Theme: Amber Classic */
[data-theme="amber"] {
    --bg-primary: #1a1000;
    --bg-panel: #1f1500;
    --bg-header: #2a2000;
    --border-color: #ffb000;
    --border-dim: #664400;
    --text-primary: #ffb000;
    --text-secondary: #ffd000;
    --text-dim: #cc8800;
    --text-muted: #996600;
    --accent-cyan: #ff8800;
    --accent-yellow: #ffdd00;
    --accent-red: #ff6644;
    --accent-blue: #ffaa44;
}

/* Theme: Cool Blue */
[data-theme="blue"] {
    --bg-primary: #000a1a;
    --bg-panel: #000f1f;
    --bg-header: #001a2a;
    --border-color: #00d4ff;
    --border-dim: #004466;
    --text-primary: #00d4ff;
    --text-secondary: #55eeff;
    --text-dim: #00aacc;
    --text-muted: #007799;
    --accent-cyan: #00ffaa;
    --accent-yellow: #88ddff;
    --accent-red: #ff6688;
    --accent-blue: #66aaff;
}

/* Theme: Dracula */
[data-theme="dracula"] {
    --bg-primary: #282a36;
    --bg-panel: #2e303e;
    --bg-header: #383a4a;
    --border-color: #bd93f9;
    --border-dim: #6272a4;
    --text-primary: #f8f8f2;
    --text-secondary: #ffffff;
    --text-dim: #e0e0dd;
    --text-muted: #b0b0aa;
    --accent-cyan: #8be9fd;
    --accent-yellow: #f1fa8c;
    --accent-red: #ff5555;
    --accent-blue: #bd93f9;
}

/* Theme: Monokai */
[data-theme="monokai"] {
    --bg-primary: #1e1f1c;
    --bg-panel: #252621;
    --bg-header: #2d2e27;
    --border-color: #a6e22e;
    --border-dim: #49483e;
    --text-primary: #f8f8f2;
    --text-secondary: #ffffff;
    --text-dim: #cfcfc2;
    --text-muted: #9d9d8e;
    --accent-cyan: #66d9ef;
    --accent-yellow: #e6db74;
    --accent-red: #f92672;
    --accent-blue: #ae81ff;
}

/* Theme: Nord */
[data-theme="nord"] {
    --bg-primary: #2e3440;
    --bg-panel: #343a48;
    --bg-header: #3b4252;
    --border-color: #88c0d0;
    --border-dim: #4c566a;
    --text-primary: #eceff4;
    --text-secondary: #ffffff;
    --text-dim: #d8dee9;
    --text-muted: #b8c0d0;
    --accent-cyan: #8fbcbb;
    --accent-yellow: #ebcb8b;
    --accent-red: #bf616a;
    --accent-blue: #81a1c1;
}

body {
    font-family: 'Courier New', 'Monaco', 'Consolas', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    line-height: 1.4;
}

@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }
}

/* Status Bars */
.status-bar {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    flex-shrink: 0;
}

.status-bar-bottom {
    border-bottom: none;
    border-top: 1px solid var(--border-color);
}

.status-left,
.status-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.status-item {
    color: var(--text-secondary);
}

.unix-time {
    color: var(--text-dim);
    font-size: 11px;
    font-family: 'Courier New', monospace;
}

kbd {
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: inherit;
    font-size: 11px;
    color: var(--accent-cyan);
}

/* Scroll to Top Button */
.scroll-top-btn {
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scroll-top-btn:hover,
.scroll-top-btn:active {
    border-color: var(--border-color);
    background: var(--bg-header);
    transform: translateY(-1px);
}

/* Show/hide based on viewport */
.status-item-desktop {
    display: inline;
}

.status-item-mobile {
    display: none;
}

/* Theme Selector */
.theme-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-label {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: bold;
}

.theme-dropdown {
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-dropdown:hover {
    border-color: var(--border-color);
    background: var(--bg-header);
}

.theme-dropdown:focus {
    outline: none;
    border-color: var(--border-color);
    box-shadow: 0 0 0 2px var(--border-dim);
}

.theme-dropdown option {
    background: var(--bg-panel);
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border-dim);
    overflow: hidden;
}

@media (max-width: 768px) {
    .main-content {
        overflow: visible;
        height: auto;
    }
}

/* Panels */
.panel {
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.panel-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 12px;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
}

.panel-title {
    color: var(--text-secondary);
    font-weight: bold;
    font-size: 13px;
    letter-spacing: 1px;
    white-space: nowrap;
}

.panel-line {
    flex: 1;
    color: var(--text-secondary);
    font-weight: bold;
    font-size: 13px;
    overflow: hidden;
    white-space: nowrap;
}

.panel-line::before {
    content: '═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════';
}

.panel-end {
    color: var(--text-secondary);
    font-weight: bold;
    font-size: 13px;
}

.panel-body {
    padding: 16px;
    flex: 1;
}

/* Profile Info */
.info-block {
    margin-bottom: 16px;
}

.info-label {
    color: var(--accent-cyan);
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.info-value {
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
}

/* Skills */
.skill-category {
    margin-bottom: 20px;
}

.skill-header {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: bold;
}

.skill-header.collapsible {
    cursor: pointer;
    user-select: none;
    padding: 8px;
    background: var(--bg-header);
    border: 1px solid var(--border-dim);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.skill-header.collapsible:hover {
    border-color: var(--border-color);
    background: var(--bg-panel);
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    max-height: 2000px;
    opacity: 1;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px 8px;
    background: var(--bg-panel);
    border-left: 2px solid var(--border-dim);
    transition: all 0.2s ease;
}

.skill-item:hover {
    border-left-color: var(--border-color);
    background: var(--bg-header);
}

.skill-name {
    color: var(--text-primary);
    font-size: 12px;
    flex: 1;
}

.skill-level {
    display: flex;
    gap: 12px;
    align-items: center;
    white-space: nowrap;
}

.skill-dots {
    color: var(--text-secondary);
    font-size: 14px;
    font-family: 'Courier New', monospace;
    letter-spacing: 4px;
    min-width: 80px;
    text-align: left;
}

.skill-label {
    color: var(--text-dim);
    font-size: 11px;
    font-family: 'Courier New', monospace;
    min-width: 90px;
    text-align: left;
}

/* Projects */
.project-category {
    margin-bottom: 24px;
}

.project-category-header {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 12px;
}

.project-category-header.collapsible {
    cursor: pointer;
    user-select: none;
    padding: 8px;
    background: var(--bg-header);
    border: 1px solid var(--border-dim);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.project-category-header.collapsible:hover {
    border-color: var(--border-color);
    background: var(--bg-panel);
}

.collapse-icon {
    display: inline-block;
    width: 16px;
    transition: transform 0.2s ease;
}

.project-list {
    margin-top: 12px;
    overflow: hidden;
    max-height: 5000px;
    opacity: 1;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out;
}

.project-item {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-panel);
    border-left: 2px solid var(--border-dim);
    transition: all 0.2s ease;
}

.project-item:hover {
    border-left-color: var(--border-color);
    background: var(--bg-header);
}

.work-project {
    border-left-color: var(--accent-cyan);
}

.private-project {
    border-left-color: var(--text-secondary);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.project-name {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: bold;
}

.project-status {
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 3px;
}

.status-completed {
    color: var(--text-primary);
    background: var(--bg-header);
    border: 1px solid var(--border-color);
}

.status-progress {
    color: var(--accent-yellow);
    background: var(--bg-header);
    border: 1px solid var(--accent-yellow);
}

.project-description {
    color: var(--text-dim);
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.project-highlights {
    margin: 8px 0;
    padding: 8px;
    background: var(--bg-primary);
    border-left: 2px solid var(--border-dim);
}

.highlight-item {
    color: var(--text-dim);
    font-size: 11px;
    line-height: 1.6;
    margin-bottom: 4px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
}

.tech-tag {
    background: var(--bg-header);
    border: 1px solid var(--border-dim);
    color: var(--accent-cyan);
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 3px;
}

.github-link {
    text-decoration: none;
    transition: transform 0.2s ease;
}

.github-link:hover {
    transform: translateY(-2px);
}

.github-tag {
    background: var(--bg-header);
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
}

/* Contact */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: grid;
    grid-template-columns: 30px 80px 1fr;
    gap: 12px;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px;
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    transition: all 0.2s ease;
}

.contact-item:hover {
    border-color: var(--border-color);
    background: var(--bg-header);
    transform: translateX(4px);
}

.contact-icon {
    color: var(--accent-cyan);
    font-size: 16px;
    text-align: center;
}

.contact-label {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: bold;
}

.contact-value {
    color: var(--text-primary);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-dim);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

/* Scrollbar for Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-dim) var(--bg-primary);
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .panel {
        overflow-y: visible;
        height: auto;
    }
    
    .panel-header {
        position: static;
    }
    
    .status-bar {
        padding: 6px 12px;
        font-size: 11px;
        position: sticky;
        z-index: 100;
    }
    
    .status-bar:first-child {
        top: 0;
    }
    
    .status-bar-bottom {
        position: sticky;
        bottom: 0;
    }
    
    .status-left,
    .status-right {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .status-right {
        display: none;
    }
    
    .theme-label {
        display: none;
    }
    
    .theme-dropdown {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .status-item-desktop {
        display: none;
    }
    
    .status-item-mobile {
        display: inline-block;
    }
    
    .scroll-top-btn {
        font-size: 10px;
        padding: 5px 10px;
    }
    
    .panel-body {
        padding: 12px;
    }
    
    .contact-item {
        grid-template-columns: 25px 1fr;
        gap: 8px;
    }
    
    .contact-label {
        display: none;
    }
    
    .info-label {
        font-size: 10px;
    }
    
    .info-value {
        font-size: 12px;
    }
}

/* Responsive Design - Very Small Screens */
@media (max-width: 480px) {
    .status-bar {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .panel-header {
        padding: 6px 8px;
    }
    
    .panel-title {
        font-size: 11px;
    }
    
    .panel-body {
        padding: 10px;
    }
    
    kbd {
        display: none;
    }
    
    .project-tech {
        gap: 4px;
    }
    
    .tech-tag {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* Responsive Design - Large Screens */
@media (min-width: 1400px) {
    .panel-body {
        padding: 20px;
    }
    
    .info-value,
    .project-description {
        font-size: 14px;
    }
    
    .skill-name,
    .contact-value {
        font-size: 13px;
    }
}

/* Animation for initial load */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel {
    animation: fadeIn 0.3s ease-out;
}

.panel-left {
    animation-delay: 0.1s;
}

.panel-right {
    animation-delay: 0.2s;
}
