:root {
    --background: #0c0c0c;
    --foreground: #00ff41;
    --shadow: rgba(0, 255, 65, 0.7);
    --accent: #008f11;
    --highlight: #39ff14;
}

:root[dark-mode="false"] {
    --background: #f0f0f0;
    --foreground: #0c0c0c;
    --shadow: rgba(0, 0, 0, 0.3);
    --accent: #555;
    --highlight: #000;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    line-height: 1.5;
    text-shadow: 0 0 5px var(--shadow);
    margin: 0;
    padding: 20px;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        transparent,
        transparent 2px,
        rgba(0,0,0,0.3) 3px,
        rgba(0,0,0,0.3) 4px
    );
    pointer-events: none;
    z-index: 10;
}

#terminal {
    height: calc(100vh - 40px);
    width: 100%;
    overflow-y: auto;
    padding-right: 15px;
    display: flex;
    flex-direction: column;
}

#output {
    white-space: pre-wrap;
    flex-grow: 1;
}

.input-line {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background-color: var(--background);
    padding: 5px 0;
}

.prompt {
    white-space: nowrap;
}

#command-input {
    background: transparent;
    border: none;
    color: var(--foreground);
    font-family: inherit;
    font-size: inherit;
    text-shadow: inherit;
    width: 100%;
    caret-color: var(--foreground);
}

#command-input:focus {
    outline: none;
}

#command-input::placeholder {
    color: var(--accent);
}

.ascii-art {
    margin-bottom: 1rem;
    color: var(--foreground);
    text-align: center;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px var(--shadow);
    }
    to {
        text-shadow: 0 0 15px var(--shadow), 0 0 25px var(--shadow);
    }
}

.command-output {
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease-in-out;
}

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

.command-output a {
    color: var(--foreground);
    text-decoration: underline;
    cursor: pointer;
    transition: all 0.2s ease;
}

.command-output a:hover {
    text-decoration: none;
    background-color: var(--foreground);
    color: var(--background);
    text-shadow: none;
}

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

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--background);
    margin: auto;
    padding: 30px;
    border: 2px solid var(--foreground);
    width: 80%;
    max-width: 640px;
    box-shadow: 0 0 20px var(--shadow);
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
}

.close-button {
    color: var(--accent);
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-button:hover,
.close-button:focus {
    color: var(--foreground);
}

#modal-image {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    border: 1px solid var(--foreground);
    border-radius: 4px;
}

#modal-description {
    margin-bottom: 20px;
    line-height: 1.6;
}

#modal-tech-stack {
    margin-bottom: 20px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.1);
    border-left: 3px solid var(--foreground);
}

.modal-project-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--foreground);
    color: var(--background);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
    border-radius: 4px;
    margin-top: 10px;
}

.modal-project-link:hover {
    background-color: var(--background);
    color: var(--foreground);
    text-shadow: 0 0 5px var(--shadow);
    transform: translateY(-2px);
}

.project-card {
    display: inline-block;
    margin: 5px;
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--accent);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.project-card:hover {
    background-color: var(--accent);
    color: var(--background);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.timeline-container {
    margin: 20px 0;
    padding-left: 20px;
    border-left: 2px solid var(--foreground);
}

.timeline-item {
    margin-bottom: 20px;
    position: relative;
}

.timeline-item:before {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--foreground);
    left: -27px;
    top: 5px;
}

.timeline-date {
    color: var(--accent);
    font-weight: bold;
}

.skills-category {
    margin-bottom: 15px;
}

.skills-category h3 {
    border-bottom: 1px solid var(--accent);
    padding-bottom: 5px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--accent);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.visitor-counter {
    position: fixed;
    bottom: 10px;
    right: 40px;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    body {
        font-size: 1rem;
        padding: 10px;
        -webkit-text-size-adjust: 100%;
    }
    
    #terminal {
        height: calc(100vh - 20px);
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .input-line {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 10px;
        background-color: var(--background);
        z-index: 20;
    }
    
    #terminal {
        padding-bottom: 10vh;
    }
}