:root {
    --bg-color: #111;
    --screen-bg: #0d0d0d;
    --text-color: #33ff00;
    --accent-color: #00ffff;
    --highlight-color: #ff00ff;
    --border-color: #33ff00;
    --font-header: 'Press Start 2P', cursive;
    --font-body: 'VT323', monospace;
    --crt-curvature: 30px;
    --bg-image: none;
    --bg-size: 100% 100%;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1.2rem;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    /* Prevent body scroll, handle in monitor */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The Physical Monitor Frame */
.monitor-casing {
    width: 100vw;
    height: 100vh;
    background: #000;
    padding: 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The Screen Itself */
.screen-container {
    width: 100%;
    height: 100%;
    max-width: 1024px;
    background-color: var(--screen-bg);
    background-image: var(--bg-image);
    background-size: var(--bg-size);
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    /* Slight curvature */
    box-shadow:
        0 0 0 10px #333,
        /* Bezel */
        inset 0 0 100px rgba(0, 0, 0, 0.9);
    /* Vignette */
    border: 2px solid #444;
}

/* Content Wrapper for Scrolling */
.content-wrapper {
    height: 100%;
    overflow-y: auto;
    padding: 2rem;
    scrollbar-width: none;
    /* Firefox */
    position: relative;
    z-index: 2;
    display: none;
    /* Hidden until boot finishes */
}

.content-wrapper::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* CRT Overlay Effects */
.crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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% 2px, 3px 100%;
    pointer-events: none;
    z-index: 10;
    border-radius: 2rem;
}

/* Scanline Animation */
.scanline {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0.4;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 11;
    pointer-events: none;
    animation: scanline 6s linear infinite;
}

@keyframes scanline {
    0% {
        top: -5%;
    }

    100% {
        top: 105%;
    }
}

/* Boot Screen */
.boot-screen {
    padding: 2rem;
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--text-color);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    overflow: hidden;
}

.boot-line {
    margin: 0.2rem 0;
    display: block;
}

/* Terminal Input */
.terminal-input-area {
    margin-top: 3rem;
    border-top: 1px dashed var(--text-color);
    padding-top: 1rem;
    font-family: var(--font-header);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.prompt {
    margin-right: 10px;
    color: var(--accent-color);
}

#cmd-input {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: var(--font-header);
    font-size: 0.8rem;
    flex-grow: 1;
    outline: none;
    text-transform: uppercase;
}

/* Projects */
.project-list {
    list-style: none;
    padding: 0;
}

.project-list li {
    margin-bottom: 1rem;
    border: 1px solid #1a4d1a;
    padding: 0;
    /* Padding moved to anchor */
    transition: transform 0.2s;
}

.project-list li:hover {
    transform: translateX(5px);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.project-list a {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-color);
    border: none;
    /* Remove default link border */
    display: flex;
    align-items: flex-start;
}

.project-list a:hover {
    background-color: rgba(0, 255, 255, 0.1);
    color: var(--text-color);
    box-shadow: none;
    /* Handled by li */
}

.project-list strong {
    color: var(--accent-color);
    font-family: var(--font-header);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

/* Animated Project Icon */
.project-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--highlight-color);
    margin-right: 15px;
    margin-top: 4px;
    position: relative;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: pulse-spin 3s infinite linear;
    flex-shrink: 0;
}

.project-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid var(--accent-color);
    animation: expand-ring 1.5s infinite ease-out;
}

@keyframes pulse-spin {
    0% {
        transform: rotate(0deg) scale(1);
        filter: hue-rotate(0deg);
    }

    50% {
        transform: rotate(180deg) scale(1.2);
        filter: hue-rotate(180deg);
    }

    100% {
        transform: rotate(360deg) scale(1);
        filter: hue-rotate(360deg);
    }
}

@keyframes expand-ring {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* General Typography & Layout (Preserved/Enhanced) */
a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-color);
}

a:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.retro-header {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 2px double var(--text-color);
    padding-bottom: 2rem;
}

h1 {
    font-family: var(--font-header);
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 0px var(--highlight-color);
}

.section-title {
    font-family: var(--font-header);
    font-size: 1.2rem;
    color: var(--highlight-color);
    margin-bottom: 1.5rem;
    background: rgba(255, 0, 255, 0.1);
    padding: 5px 10px;
    display: inline-block;
}

.about-text {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
    font-style: italic;
}

.job-entry,
.edu-entry {
    margin-bottom: 2rem;
    border-left: 2px solid var(--text-color);
    padding-left: 1rem;
}

.job-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

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

.role {
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-decoration: underline;
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--screen-bg);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(30px, 9999px, 10px, 0);
    }

    20% {
        clip: rect(20px, 9999px, 60px, 0);
    }

    40% {
        clip: rect(40px, 9999px, 10px, 0);
    }

    60% {
        clip: rect(10px, 9999px, 60px, 0);
    }

    80% {
        clip: rect(10px, 9999px, 90px, 0);
    }

    100% {
        clip: rect(20px, 9999px, 60px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    20% {
        clip: rect(20px, 9999px, 70px, 0);
    }

    40% {
        clip: rect(70px, 9999px, 40px, 0);
    }

    60% {
        clip: rect(90px, 9999px, 30px, 0);
    }

    80% {
        clip: rect(30px, 9999px, 60px, 0);
    }

    100% {
        clip: rect(10px, 9999px, 50px, 0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .monitor-casing {
        padding: 0;
        background: var(--screen-bg);
    }

    .screen-container {
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .content-wrapper {
        padding: 1rem;
    }
}