/* V.5.1 */
@import url('https://fonts.googleapis.com/css2?family=Benguiat+Bold&display=swap');

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

body {
    background: #000;
    color: #fff;
    overflow-x: hidden;
    position: relative;
    font-family: 'Courier New', monospace;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(80, 0, 0, 0.2) 0%, rgba(0, 0, 0, 1) 60%);
    z-index: 1;
    pointer-events: none;
}

.lights-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.light-string {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 0, 0, 0.3) 20%,
        rgba(255, 50, 0, 0.4) 40%,
        rgba(255, 0, 0, 0.3) 60%,
        transparent 100%
    );
    opacity: 0.6;
    animation: lightsGlow 3s ease-in-out infinite;
    will-change: opacity, filter;
}

@keyframes lightsGlow {
    0%, 100% {
        opacity: 0.4;
        filter: blur(2px);
    }
    50% {
        opacity: 0.8;
        filter: blur(1px);
    }
}

.floating-particle {
    position: absolute;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 50, 50, 0.6) 40%, rgba(255, 0, 0, 0.3) 70%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    animation: float-up-chaotic linear infinite;
    opacity: 0.8;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    will-change: transform, opacity;
}

@keyframes float-up-chaotic {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
        transform: translate3d(var(--drift-1), -10vh, 0) rotate(45deg);
    }
    25% {
        transform: translate3d(var(--drift-2), -25vh, 0) rotate(90deg);
    }
    40% {
        transform: translate3d(var(--drift-3), -40vh, 0) rotate(180deg);
    }
    60% {
        transform: translate3d(var(--drift-4), -60vh, 0) rotate(270deg);
    }
    80% {
        transform: translate3d(var(--drift-5), -80vh, 0) rotate(315deg);
        opacity: 0.8;
    }
    100% {
        transform: translate3d(var(--drift-6), -100vh, 0) rotate(360deg);
        opacity: 0;
    }
}

.static {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    opacity: 0.08;
    will-change: background-image;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 8;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0.3) 1px,
        rgba(0, 0, 0, 0) 2px,
        rgba(0, 0, 0, 0) 3px
    );
    animation: scanline 10s linear infinite;
    will-change: transform;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9;
    box-shadow: inset 0 0 200px rgba(0, 0, 0, 0.95), inset 0 0 100px rgba(0, 0, 0, 0.8);
    border-radius: 2%;
}

.tv-flicker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 7;
    background: #000;
    animation: tvGlitch 2s infinite;
    will-change: opacity;
}

@keyframes tvGlitch {
    0% { opacity: 0; }
    2% { opacity: 0.05; }
    4% { opacity: 0; }
    100% { opacity: 0; }
}

.crt-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 6;
    animation: brightness-flicker 0.5s infinite;
    will-change: background;
}

@keyframes brightness-flicker {
    0% { background: rgba(255, 255, 255, 0.01); }
    50% { background: rgba(255, 255, 255, 0.02); }
    100% { background: rgba(255, 255, 255, 0.01); }
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: center;
    padding: 2rem;
}

.title {
    font-family: 'Courier New', monospace;
    font-size: 5rem;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.3rem;
    text-shadow: 
        0 0 10px #ff0000,
        0 0 20px #ff0000,
        0 0 30px #ff0000,
        0 0 40px #ff0000,
        0 0 70px #ff0000,
        0 0 80px #ff0000,
        0 0 100px #ff0000,
        0 0 150px #ff0000;
    animation: glow 2s ease-in-out infinite alternate;
    margin-bottom: 2rem;
    will-change: text-shadow;
}

@keyframes glow {
    from {
        text-shadow: 
            0 0 10px #ff0000,
            0 0 20px #ff0000,
            0 0 30px #ff0000,
            0 0 40px #ff0000,
            0 0 70px #ff0000,
            0 0 80px #ff0000,
            0 0 100px #ff0000,
            0 0 150px #ff0000;
    }
    to {
        text-shadow: 
            0 0 5px #ff0000,
            0 0 10px #ff0000,
            0 0 15px #ff0000,
            0 0 20px #ff0000,
            0 0 35px #ff0000,
            0 0 40px #ff0000,
            0 0 50px #ff0000,
            0 0 75px #ff0000;
    }
}

.subtitle {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: #ff0000;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    margin-bottom: 3rem;
    animation: flicker 3s infinite;
    will-change: opacity;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    41.99% { opacity: 1; }
    42% { opacity: 0.4; }
    43% { opacity: 1; }
    43.99% { opacity: 1; }
    44% { opacity: 0.6; }
    46% { opacity: 1; }
}

.scroll-indicator {
    margin-top: 4rem;
    cursor: pointer;
    animation: bounce 2s infinite;
    background: transparent;
    border: none;
    padding: 1rem;
    will-change: transform;
    color: inherit;
}

.scroll-indicator:hover,
.scroll-indicator:focus {
    background: transparent;
    outline: none;
}

.scroll-indicator span {
    color: #ff0000;
    font-size: 1.2rem;
    text-shadow: 0 0 10px #ff0000;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.projects {
    min-height: 100vh;
    padding: 100px 20px 80px;
    background: transparent;
    position: relative;
    z-index: 2;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    color: #ff0000;
    text-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000;
    margin-bottom: 60px;
    letter-spacing: 0.2em;
    animation: flicker 3s infinite;
    will-change: opacity;
}

.projects-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

.project-card {
    background: #0a0a0a;
    border: 2px solid #ff0000;
    border-radius: 5px;
    padding: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.8s ease forwards;
    will-change: transform, opacity;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.2), transparent);
    transition: left 0.5s;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 0 20px rgba(255, 0, 0, 0.5),
        0 0 40px rgba(255, 0, 0, 0.3),
        0 0 60px rgba(255, 0, 0, 0.2);
    border-color: #fff;
}

.card-inner h3 {
    color: #ff0000;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-shadow: 0 0 5px #ff0000;
}

.card-inner p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-tag {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 0.85rem;
    color: #ff0000;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.tech-tag:hover {
    background: rgba(255, 0, 0, 0.4);
    transform: scale(1.05);
}

.tech-tag:focus {
    outline: 2px solid #ff0000;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
        letter-spacing: 0.2rem;
        text-shadow: 
            0 0 5px #ff0000,
            0 0 10px #ff0000,
            0 0 20px #ff0000,
            0 0 30px #ff0000;
    }
    
    @keyframes glow {
        from {
            text-shadow: 
                0 0 5px #ff0000,
                0 0 10px #ff0000,
                0 0 20px #ff0000,
                0 0 30px #ff0000;
        }
        to {
            text-shadow: 
                0 0 3px #ff0000,
                0 0 7px #ff0000,
                0 0 15px #ff0000,
                0 0 20px #ff0000;
        }
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .static {
        opacity: 0.04;
    }
    
    .scanlines {
        opacity: 0.5;
    }
    
    .floating-particle {
        box-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.footer {
    background: transparent;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(255, 0, 0, 0.3);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.copyright {
    color: #ff0000;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-shadow: 0 0 5px #ff0000;
    margin-bottom: 10px;
}

.rights {
    color: #999;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}