/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Inter:wght@400;500;700&display=swap');

:root {
    --bg-dark: #0f0f14;
    --neon-green: #00ff88;
    --arcade-purple: #7a3cff;
    --pixel-white: #eaeaea;
    --font-pixel: 'Press Start 2P', cursive;
    --font-modern: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 50% 50%, rgba(122, 60, 255, 0.05) 0%, transparent 50%),
        linear-gradient(rgba(15, 15, 20, 0.95), rgba(15, 15, 20, 0.95)),
        repeating-linear-gradient(0deg, transparent, transparent 2px, #000 2px, #000 4px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 30px 30px, 30px 30px;
    color: var(--pixel-white);
    font-family: var(--font-modern);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: crosshair;
    /* Fallback css */
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--neon-green);
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 2px solid var(--neon-green);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.cursor-hover {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 255, 136, 0.1);
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-pixel);
    font-weight: normal;
}

.text-neon {
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.text-purple {
    color: var(--arcade-purple);
}

/* Scanline Effect */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1));
    background-size: 100% 4px;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.8;
}

/* Loading Screen */
#loader {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease-out;
}

#loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-text {
    font-family: var(--font-pixel);
    color: var(--neon-green);
    animation: blink 1s infinite;
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    box-sizing: border-box;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.terminal-box {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--pixel-white);
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    box-shadow: 5px 5px 0 var(--arcade-purple);
    text-align: left;
    margin-bottom: 3rem;
}

.terminal-text {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--neon-green);
    min-height: 60px;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Button Glitch Effect */
.btn-pixel {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-pixel);
    font-size: 0.8rem;
    color: var(--neon-green);
    background: transparent;
    border: 2px solid var(--neon-green);
    text-decoration: none;
    position: relative;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-pixel:hover {
    background: var(--neon-green);
    color: var(--bg-dark);
    box-shadow: 0 0 15px var(--neon-green);
    transform: translate(-3px, -3px);
}

/* Projects Section */
.projects-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 4rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3rem;
}

.card {
    background: #1a1a24;
    border: 2px solid #333;
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

.card-img-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    border-bottom: 2px solid #333;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    filter: grayscale(100%) contrast(120%);
}

.card:hover .card-img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--pixel-white);
}

.card-desc {
    font-size: 0.9rem;
    color: #a0a0a0;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.5;
}

.card-btn {
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    color: var(--pixel-white);
    text-decoration: none;
    border: 1px solid var(--pixel-white);
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
    display: block;
}

/* Snap pixel and border on hover */
.card:hover {
    border-color: var(--neon-green);
    box-shadow: 6px 6px 0 var(--arcade-purple), 0 0 20px rgba(0, 255, 136, 0.1);
    transform: translate(-6px, -6px);
}

.card:hover .card-btn {
    background: var(--neon-green);
    color: var(--bg-dark);
    border-color: var(--neon-green);
}

/* Glitch Title on hover */
.glitch {
    position: relative;
}

.card:hover .glitch::before,
.card:hover .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a24;
    color: var(--pixel-white);
}

.card:hover .glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.card:hover .glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(20% 0 80% 0);
    }

    20% {
        clip-path: inset(60% 0 10% 0);
    }

    40% {
        clip-path: inset(40% 0 50% 0);
    }

    60% {
        clip-path: inset(80% 0 5% 0);
    }

    80% {
        clip-path: inset(10% 0 70% 0);
    }

    100% {
        clip-path: inset(30% 0 50% 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(10% 0 60% 0);
    }

    20% {
        clip-path: inset(30% 0 20% 0);
    }

    40% {
        clip-path: inset(70% 0 10% 0);
    }

    60% {
        clip-path: inset(40% 0 50% 0);
    }

    80% {
        clip-path: inset(80% 0 5% 0);
    }

    100% {
        clip-path: inset(5% 0 80% 0);
    }
}

/* Scroll blocks reveal */
.reveal {
    opacity: 0;
    transform: scale(0.9);
    filter: blur(2px);
    transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

/* Easter Egg */
#dev-mode {
    position: fixed;
    inset: 0;
    background: rgba(122, 60, 255, 0.9);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--neon-green);
    font-family: var(--font-pixel);
    font-size: 4vw;
    text-align: center;
    display: none;
    text-shadow: 0 0 20px #000;
}

#dev-mode.active {
    display: flex;
    animation: flash 0.1s infinite alternate;
}

@keyframes flash {
    from {
        opacity: 0.8;
        filter: invert(0);
    }

    to {
        opacity: 1;
        filter: invert(1);
    }
}

footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid #333;
    margin-top: 5rem;
    font-size: 0.8rem;
    color: #666;
    font-family: var(--font-pixel);
}

footer a {
    color: var(--neon-green);
    text-decoration: none;
}

@media(max-width: 768px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .terminal-text {
        font-size: 0.9rem;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}