/* =============================================
   TERMINAL STYLE - Clean Version
   ============================================= */

:root {
    --bg-dark: #0a0a0f;
    --bg-terminal: #0d1117;
    --bg-header: #161b22;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-muted: #484f58;
    
    /* Clean Terminal Colors */
    --accent-green: #3fb950;
    --accent-cyan: #39c5cf;
    --accent-blue: #58a6ff;
    --accent-purple: #a371f7;
    --accent-yellow: #d29922;
    --accent-orange: #db6d28;
    --accent-red: #f85149;
    
    --border-color: #30363d;
    
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-mono);
    background: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
}

/* Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}

/* Radial glow */
body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ===================== */
/* SCANLINES OVERLAY     */
/* ===================== */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.03),
        rgba(0, 0, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}

/* ===================== */
/* MATRIX CANVAS         */
/* ===================== */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.15;
}

/* ===================== */
/* BOOT SCREEN           */
/* ===================== */
.boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.boot-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.boot-content {
    text-align: left;
    font-family: var(--font-mono);
    max-width: 600px;
    padding: 20px;
}

.boot-logo {
    color: var(--accent-green);
    font-size: 0.45rem;
    line-height: 1.2;
    margin-bottom: 30px;
    white-space: pre;
}

.boot-lines {
    margin-bottom: 20px;
}

.boot-line {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.8;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.boot-line.visible {
    opacity: 1;
    transform: translateX(0);
}

.boot-ok {
    color: var(--accent-green);
    font-weight: 600;
}

.boot-progress {
    width: 100%;
    height: 3px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.boot-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-green);
    border-radius: 2px;
    transition: width 0.1s ease;
}

/* ===================== */
/* TERMINAL CONTAINER    */
/* ===================== */
.terminal-container {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 950px;
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.terminal-container.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* ===================== */
/* TERMINAL WINDOW       */
/* ===================== */
.terminal-window {
    background: var(--bg-terminal);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.3),
        0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}

/* ===================== */
/* TERMINAL HEADER       */
/* ===================== */
.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    height: 44px;
}

.terminal-tabs {
    display: flex;
    gap: 0;
}

.tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 2px solid transparent;
}

.tab:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
}

.tab.active {
    color: var(--accent-green);
    border-bottom-color: var(--accent-green);
}

.tab.active .tab-icon {
    color: var(--accent-green);
}

.tab-icon {
    font-weight: bold;
    transition: transform 0.3s ease;
}

.tab:hover .tab-icon {
    transform: translateX(2px);
}

.terminal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===================== */
/* TERMINAL BODY         */
/* ===================== */
.terminal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #3a3a3a #1a1a1a;
}

.terminal-body::-webkit-scrollbar {
    width: 12px;
    background: #1a1a1a;
}

.terminal-body::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-left: 1px solid #2a2a2a;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4a4a4a 0%, #3a3a3a 50%, #4a4a4a 100%);
    border: 1px solid #555;
    border-radius: 0;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5a5a5a 0%, #4a4a4a 50%, #5a5a5a 100%);
}

.terminal-body::-webkit-scrollbar-button:vertical:start:decrement,
.terminal-body::-webkit-scrollbar-button:vertical:end:increment {
    display: block;
    height: 12px;
    background: #2a2a2a;
    border: 1px solid #444;
}

.terminal-body::-webkit-scrollbar-button:vertical:start:decrement {
    background: #2a2a2a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23888' d='M4 2L1 5h6z'/%3E%3C/svg%3E") center center no-repeat;
}

.terminal-body::-webkit-scrollbar-button:vertical:end:increment {
    background: #2a2a2a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23888' d='M4 6L1 3h6z'/%3E%3C/svg%3E") center center no-repeat;
}

.terminal-body::-webkit-scrollbar-button:hover {
    background-color: #3a3a3a;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Fixed height for terminal body */
.terminal-body {
    min-height: 500px;
    height: 70vh;
}

/* ===================== */
/* TERMINAL LINES        */
/* ===================== */
.terminal-line {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 8px;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateX(0);
    transition: opacity 0.3s ease;
}

.terminal-line.terminal-visible {
    opacity: 1;
}

/* Neofetch container appears immediately */
.neofetch-container {
    opacity: 0;
    animation: fadeInOutput 0.6s ease forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes fadeInLine {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.prompt {
    color: var(--accent-green);
}

.separator {
    color: var(--text-muted);
}

.path {
    color: var(--accent-blue);
}

.symbol {
    color: var(--text-muted);
    margin: 0 8px;
}

.command {
    color: var(--text-primary);
}

/* Typing animation cursor */
.typing-cursor {
    color: var(--accent-green);
    animation: cursorBlink 0.6s step-end infinite;
    margin-left: 1px;
}

.command.typing-active {
    display: inline;
}

/* ===================== */
/* TERMINAL OUTPUT       */
/* ===================== */
.terminal-output {
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.terminal-output.terminal-visible,
.section-content.terminal-visible .terminal-output {
    opacity: 1;
    transform: translateY(0);
}

/* Section content hidden by default */
.section-content {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.5s ease;
}

.section-content.terminal-visible {
    opacity: 1;
    max-height: 500px;
}

.section-content .terminal-output {
    opacity: 1;
    transform: translateY(0);
}

/* Cursor blink */
.cursor-blink {
    color: var(--accent-green);
    animation: cursorBlink 0.6s step-end infinite;
}

/* Input line - hidden until animation finishes */
.input-line {
    margin-top: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.input-line.terminal-visible {
    opacity: 1;
}

/* Keep neofetch animations */
.neofetch-container {
    opacity: 0;
    animation: fadeInOutput 0.6s ease forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes fadeInOutput {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================== */
/* NEON ASCII ART        */
/* ===================== */
.ascii-container {
    overflow-x: auto;
    padding: 10px 0;
}

/* ===================== */
/* NEOFETCH STYLE        */
/* ===================== */
.neofetch-container {
    display: flex;
    gap: 30px;
    align-items: center;
    padding: 10px 0;
    overflow-x: auto;
}

.neofetch-container .ascii-art {
    flex-shrink: 0;
}

.neofetch-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    position: relative;
}

.neofetch-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.neofetch-label {
    color: var(--accent-cyan);
    min-width: 70px;
}

.neofetch-sep {
    color: var(--text-muted);
}

.neofetch-value {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
    display: inline-block;
}

.neofetch-value:hover {
    color: var(--accent-green);
}

.neofetch-value.active {
    color: var(--accent-green);
}

/* Blinking cursor element */
.link-cursor {
    display: inline-block;
    color: var(--accent-green);
    font-family: var(--font-mono);
    position: absolute;
    pointer-events: none;
    transition: top 0.15s ease, left 0.15s ease;
    animation: cursorBlink 0.8s step-end infinite;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@media (max-width: 700px) {
    .neofetch-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .neofetch-info {
        padding-top: 0;
    }
}

.ascii-art.neon-text {
    color: var(--accent-green);
    font-size: 0.5rem;
    line-height: 1.1;
    white-space: pre;
}

/* Glitch effect */
.glitch {
    position: relative;
}

.glitch.glitching {
    animation: glitchText 0.2s ease;
}

@keyframes glitchText {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* ===================== */
/* INFO BLOCKS           */
/* ===================== */
.info-block {
    background: rgba(56, 139, 253, 0.05);
    border-left: 3px solid var(--accent-blue);
    padding: 16px;
    border-radius: 0 8px 8px 0;
    margin: 12px 0;
}

.info-line {
    margin: 8px 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.highlight-neon {
    color: var(--accent-cyan);
    font-weight: 500;
}

.highlight-cyan {
    color: var(--accent-green);
}

.label {
    color: var(--accent-purple);
}

/* Status block */
.status-block {
    border-left-color: var(--accent-green);
}

.status-line {
    margin-bottom: 12px;
}

.status-active {
    color: var(--accent-green);
    animation: pulse 1.5s ease-in-out infinite;
}

.history-num {
    color: var(--accent-yellow);
    margin-right: 12px;
    font-size: 0.8rem;
}

/* ===================== */
/* SECTION LIST          */
/* ===================== */
.section-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0;
    padding-left: 20px;
}

.section-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-cyan);
    font-size: 0.9rem;
    opacity: 0;
    animation: fadeInLine 0.3s ease forwards;
    animation-delay: calc(var(--delay, 0s));
}

.section-item:nth-child(1) { animation-delay: 0s; }
.section-item:nth-child(2) { animation-delay: 0.1s; }
.section-item:nth-child(3) { animation-delay: 0.2s; }
.section-item:nth-child(4) { animation-delay: 0.3s; }
.section-item:nth-child(5) { animation-delay: 0.4s; }

.section-icon {
    font-size: 0.9rem;
}

/* ===================== */
/* SKILLS LIST           */
/* ===================== */
.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-10px);
}

.section-content.terminal-visible .skill-item {
    animation: skillAppear 0.3s ease forwards;
}

.section-content.terminal-visible .skill-item:nth-child(1) { animation-delay: 0.05s; }
.section-content.terminal-visible .skill-item:nth-child(2) { animation-delay: 0.1s; }
.section-content.terminal-visible .skill-item:nth-child(3) { animation-delay: 0.15s; }
.section-content.terminal-visible .skill-item:nth-child(4) { animation-delay: 0.2s; }
.section-content.terminal-visible .skill-item:nth-child(5) { animation-delay: 0.25s; }
.section-content.terminal-visible .skill-item:nth-child(6) { animation-delay: 0.3s; }

@keyframes skillAppear {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.skill-item:hover {
    border-color: var(--accent-cyan);
    background: rgba(110, 118, 129, 0.15);
    transform: translateX(5px);
}

.file-perm {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.file-icon {
    font-size: 1rem;
}

/* ===================== */
/* LINKS BLOCK           */
/* ===================== */
.links-block {
    margin: 12px 0;
}

.json-output {
    font-size: 0.9rem;
    line-height: 1.8;
    background: rgba(0, 0, 0, 0.3);
    padding: 16px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.json-key {
    color: var(--accent-purple);
}

.json-value {
    color: var(--accent-green);
    text-decoration: none;
    position: relative;
    display: inline-block;
}

.json-value::after {
    content: '';
    opacity: 0;
}

.json-value.link-hover:hover {
    padding-right: 14px;
}

.json-value.link-hover:hover::after {
    content: '█';
    position: absolute;
    right: 0;
    color: var(--accent-green);
    opacity: 1;
    animation: terminalCursor 0.7s step-end infinite;
}

@keyframes terminalCursor {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ===================== */
/* DOWNLOAD BUTTON       */
/* ===================== */
.download-btn.cyber-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-green) 0%, #27ae60 100%);
    border: none;
    color: #000;
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.download-btn.cyber-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(63, 185, 80, 0.4);
}

.download-icon {
    font-size: 1.2rem;
}

/* ===================== */
/* PROJECTS TAB          */
/* ===================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.project-card.cyber-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card.cyber-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card.cyber-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-3px);
}

.project-card.cyber-card:hover::before {
    opacity: 1;
}

.project-card.locked {
    opacity: 0.5;
}

.project-card.locked:hover {
    border-color: var(--accent-orange);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.project-icon {
    color: var(--accent-cyan);
    font-size: 1.2rem;
}

.project-name {
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.project-status {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-status.soon {
    background: rgba(57, 197, 207, 0.1);
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
}

.project-status.team {
    background: rgba(63, 185, 80, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(63, 185, 80, 0.5);
}

.projects-single {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.projects-single .project-card {
    max-width: 350px;
    width: 100%;
}

.project-card-link {
    display: block;
    width: 100%;
    max-width: 350px;
    text-decoration: none;
}

.project-card-link:hover .project-card,
.project-card-link:focus-visible .project-card {
    transform: translateY(-2px);
    border-color: rgba(63, 185, 80, 0.5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.project-card-link:focus-visible {
    outline: none;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
    font-style: italic;
}

.project-tech {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tech-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(57, 197, 207, 0.1);
    border: 1px solid rgba(57, 197, 207, 0.3);
    border-radius: 3px;
    color: var(--accent-cyan);
}

/* System message */
.system-message {
    margin: 20px 0;
}

.message-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(210, 153, 34, 0.05);
    border: 1px solid rgba(210, 153, 34, 0.3);
    border-radius: 4px;
}

.message-icon {
    color: var(--accent-yellow);
    font-size: 1.2rem;
}

.message-text {
    color: var(--accent-yellow);
    font-size: 0.9rem;
}

/* ===================== */
/* ACCORDION SECTIONS    */
/* ===================== */
.section-accordion {
    margin-bottom: 4px;
}

.section-header {
    cursor: default;
    position: relative;
}

.accordion-arrow {
    display: none;
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.section-content {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

/* ===================== */
/* RESPONSIVE            */
/* ===================== */
@media (max-width: 768px) {
    html, body {
        height: auto;
        overflow: auto;
    }
    
    body {
        align-items: flex-start;
        padding-top: 10px;
        min-height: 100vh;
    }
    
    .terminal-container {
        width: 95%;
        margin-bottom: 20px;
    }
    
    .terminal-body {
        padding: 16px;
        max-height: none;
        height: auto;
        overflow-y: visible;
    }
    
    .ascii-art.neon-text {
        font-size: 0.35rem;
    }
    
    .skills-list {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .terminal-line {
        flex-wrap: wrap;
        font-size: 0.8rem;
    }
    
    .terminal-tabs {
        gap: 0;
    }
    
    .tab {
        padding: 10px 12px;
        font-size: 0.75rem;
    }
    
    .loading-glitch {
        font-size: 1rem;
    }
    
    /* Mobile Accordion */
    .section-header {
        cursor: pointer;
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .section-header:hover {
        background: rgba(63, 185, 80, 0.05);
    }
    
    .section-header:active {
        background: rgba(63, 185, 80, 0.1);
    }
    
    .accordion-arrow {
        display: inline-block;
        padding-right: 8px;
    }
    
    .section-accordion.collapsed .accordion-arrow {
        transform: rotate(-90deg);
    }
    
    .section-accordion.collapsed .section-content {
        max-height: 0 !important;
        opacity: 0;
        padding: 0;
        overflow: hidden;
    }
    
    .section-content {
        max-height: none;
        opacity: 1;
        padding-top: 8px;
        overflow: visible;
    }
}
