/* Import Retro Font */
@import url('https://fonts.googleapis.com/css2?family=VT323&family=Share+Tech+Mono&display=swap');

/* CSS Variables for Easy Theme Customization */
:root {
    --primary-green: #00ff00;
    --dark-green: #00aa00;
    --bg-black: #0a0a0a;
    --terminal-bg: #0d0d0d;
    --text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
    --glow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'VT323', monospace;
    background-color: var(--bg-black);
    color: var(--primary-green);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CRT Screen Effect */
.crt {
    width: 100%;
    height: 100%;
    position: relative;
    background: radial-gradient(ellipse at center, #0d0d0d 0%, #000000 100%);
    animation: flicker 0.15s infinite;
}

.crt::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    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));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.crt::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

/* Scanline Effect */
.scanline {
    width: 100%;
    height: 100px;
    z-index: 8;
    background: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(255, 255, 255, 0.05) 10%,
        rgba(0, 0, 0, 0.1) 100%
    );
    opacity: 0.1;
    position: absolute;
    bottom: 100%;
    animation: scanline 10s linear infinite;
    pointer-events: none;
}

@keyframes scanline {
    0% {
        bottom: 100%;
    }
    100% {
        bottom: -100px;
    }
}

@keyframes flicker {
    0% {
        opacity: 0.97;
    }
    5% {
        opacity: 0.98;
    }
    10% {
        opacity: 0.96;
    }
    15% {
        opacity: 0.99;
    }
    20% {
        opacity: 0.97;
    }
    100% {
        opacity: 0.98;
    }
}

/* Terminal Container */
.terminal-container {
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    background-color: var(--terminal-bg);
    border: 2px solid var(--dark-green);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3),
                inset 0 0 100px rgba(0, 255, 0, 0.02);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 3;
    overflow: hidden;
}

/* Terminal Header */
.terminal-header {
    background: linear-gradient(to bottom, #1a1a1a, #0d0d0d);
    padding: 10px 15px;
    border-bottom: 1px solid var(--dark-green);
    display: flex;
    align-items: center;
    gap: 15px;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.btn-close {
    background-color: #ff5f56;
    box-shadow: 0 0 5px rgba(255, 95, 86, 0.5);
}

.btn-minimize {
    background-color: #ffbd2e;
    box-shadow: 0 0 5px rgba(255, 189, 46, 0.5);
}

.btn-maximize {
    background-color: #27c93f;
    box-shadow: 0 0 5px rgba(39, 201, 63, 0.5);
}

.terminal-title {
    font-size: 18px;
    color: var(--primary-green);
    text-shadow: var(--text-shadow);
    letter-spacing: 1px;
}

/* Terminal Body */
.terminal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    font-size: 18px;
    line-height: 1.6;
    text-shadow: var(--text-shadow);
}

.terminal-body::-webkit-scrollbar {
    width: 10px;
}

.terminal-body::-webkit-scrollbar-track {
    background: #0a0a0a;
}

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

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

/* Boot Sequence */
.boot-sequence p {
    margin: 8px 0;
    animation: typewriter 0.5s steps(40) forwards;
    opacity: 0;
}

.boot-sequence p:nth-child(1) {
    animation-delay: 0.2s;
}

.boot-sequence p:nth-child(2) {
    animation-delay: 0.8s;
}

.boot-sequence p:nth-child(3) {
    animation-delay: 1.4s;
}

.boot-sequence p:nth-child(4) {
    animation-delay: 2s;
}

.boot-sequence p:nth-child(5) {
    animation-delay: 2.6s;
}

@keyframes typewriter {
    to {
        opacity: 1;
    }
}

.blink-cursor::after {
    content: '█';
    animation: blink 1s step-end infinite;
    margin-left: 5px;
}

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

/* Prompt */
.prompt {
    color: var(--dark-green);
    margin: 15px 0 10px 0;
    font-weight: bold;
}

/* Navigation Menu */
.nav-menu {
    margin-bottom: 20px;
}

.command-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.cmd-btn {
    background-color: transparent;
    color: var(--primary-green);
    border: 1px solid var(--dark-green);
    padding: 10px 15px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    text-shadow: var(--text-shadow);
}

.cmd-btn:hover {
    background-color: var(--dark-green);
    color: #000;
    box-shadow: var(--glow);
    transform: translateX(5px);
    text-shadow: none;
}

.cmd-btn:active {
    transform: scale(0.98);
}

/* Content Display */
.content-display {
    margin-top: 20px;
}

.ascii-art {
    color: var(--primary-green);
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.2;
}

.intro-text {
    margin: 15px 0;
    line-height: 1.8;
}

/* Section Content Styles */
.section-content {
    animation: fadeIn 0.5s ease-in;
}

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

.section-title {
    font-size: 24px;
    color: var(--primary-green);
    margin: 20px 0 15px 0;
    border-bottom: 2px solid var(--dark-green);
    padding-bottom: 5px;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

.item-block {
    margin: 20px 0;
    padding: 15px;
    border-left: 3px solid var(--dark-green);
    background-color: rgba(0, 170, 0, 0.05);
}

.item-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.item-title {
    font-size: 20px;
    color: var(--primary-green);
    font-weight: bold;
}

.item-meta {
    color: #00cc00;
    font-style: italic;
}

.item-subtitle {
    color: #00dd00;
    margin-bottom: 8px;
}

.item-description {
    margin-left: 15px;
}

.item-description li {
    margin: 8px 0;
    list-style-type: none;
}

.item-description li::before {
    content: '> ';
    color: var(--dark-green);
    font-weight: bold;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tech-tag {
    background-color: rgba(0, 255, 0, 0.1);
    border: 1px solid var(--dark-green);
    padding: 3px 10px;
    font-size: 14px;
    border-radius: 3px;
}

.skill-category {
    margin: 15px 0;
}

.skill-category strong {
    color: var(--primary-green);
}

.contact-links {
    margin: 20px 0;
}

.contact-link {
    display: block;
    color: var(--primary-green);
    text-decoration: none;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid var(--dark-green);
    transition: all 0.3s ease;
}

.contact-link:hover {
    background-color: var(--dark-green);
    color: #000;
    text-shadow: none;
    transform: translateX(10px);
}

/* Command Input */
.command-input {
    padding: 15px 20px;
    border-top: 1px solid var(--dark-green);
    background-color: #0a0a0a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt-symbol {
    color: var(--dark-green);
    font-weight: bold;
    text-shadow: var(--text-shadow);
}

#cmdLine {
    flex: 1;
    background-color: transparent;
    border: none;
    color: var(--primary-green);
    font-family: 'VT323', monospace;
    font-size: 18px;
    outline: none;
    text-shadow: var(--text-shadow);
}

#cmdLine::placeholder {
    color: #006600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .terminal-container {
        width: 95%;
        height: 90vh;
    }

    .terminal-body {
        font-size: 16px;
        padding: 15px;
    }

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

    .command-list {
        grid-template-columns: 1fr;
    }

    .item-header {
        flex-direction: column;
    }
}

/* Loading Animation */
.loading::after {
    content: '';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}