:root {
    --bg-color: #050a14;
    --text-color: #00e5ff;
    --text-dim: #008b99;
    --highlight: #00ffff;
    --accent: #ff0055;
    --font-main: 'Fira Code', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
    position: relative;
    text-shadow: 0 0 5px rgba(0, 229, 255, 0.5);
}

/* CRT Effects */
.scanlines {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    z-index: 100;
    pointer-events: none;
    opacity: 0.6;
}

.crt-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.6) 100%);
    z-index: 99;
    pointer-events: none;
}

/* Terminal Layout */
.terminal-container {
    max-width: 1000px;
    margin: 0 auto;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.terminal-header {
    border-bottom: 1px solid var(--text-dim);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.header-content h1 {
    font-size: 1.5rem;
    color: var(--highlight);
    text-shadow: 0 0 10px var(--highlight);
    margin-bottom: 0.5rem;
}

.sys-info {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.terminal-body {
    flex-grow: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.terminal-body::-webkit-scrollbar {
    width: 6px;
}
.terminal-body::-webkit-scrollbar-track {
    background: #000;
}
.terminal-body::-webkit-scrollbar-thumb {
    background: var(--text-dim);
}

.command-line {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--text-dim);
    flex-wrap: wrap;
}

.prompt {
    color: var(--accent);
    font-weight: bold;
    text-shadow: 0 0 5px var(--accent);
}

.nav-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cmd-btn {
    background: transparent;
    border: 1px solid var(--text-dim);
    color: var(--text-color);
    font-family: var(--font-main);
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 0 0 5px rgba(0, 229, 255, 0.3);
}

.cmd-btn:hover, .cmd-btn.active {
    background: var(--text-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--highlight);
    border-color: var(--highlight);
}

/* Content Blocks */
.output-block {
    animation: fadeIn 0.3s ease-out forwards;
}

.cmd-echo {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.section-title {
    color: var(--highlight);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.item-title {
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.2rem;
}

.item-meta {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.item-desc {
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 1px dashed var(--text-dim);
}

.item-desc ul {
    list-style-type: none;
}

.item-desc li::before {
    content: "> ";
    color: var(--highlight);
}

.skills-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
}

.skills-category {
    font-weight: bold;
    color: var(--highlight);
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typer styling */
.typer {
    display: inline-block;
}

/* Boot Sequence */
.boot-screen {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: var(--bg-color);
    z-index: 200;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    animation: hideBoot 0s ease-in 1.2s forwards;
    pointer-events: all;
}

@keyframes hideBoot {
    to { visibility: hidden; opacity: 0; pointer-events: none; }
}

.boot-text {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow: hidden;
    animation: typeReveal 1s steps(6, end) forwards;
}

@keyframes typeReveal {
    0% { max-height: 0; }
    100% { max-height: 12em; }
}

/* Header Art Animation */
.header-art {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 0, 85, 0.3);
    border-top: 2px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.5);
    position: relative;
}

.spinner::after {
    content: "";
    position: absolute;
    top: 2px; left: 2px; right: 2px; bottom: 2px;
    border: 2px solid rgba(0, 229, 255, 0.3);
    border-bottom: 2px solid var(--highlight);
    border-radius: 50%;
    animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsiveness */
@media (max-width: 650px) {
    .terminal-container {
        padding: 1rem;
    }
    .header-content {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    .header-content h1 {
        font-size: 1.2rem;
    }
    .sys-info {
        flex-direction: column;
        gap: 0.3rem;
    }
    .command-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .nav-links {
        gap: 0.5rem;
    }
    .cmd-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
}
