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

body {
    font-family: 'Courier New', monospace;
    line-height: 1.8;
    color: #0ff;
    background: #000;
    image-rendering: pixelated;
    overflow-x: hidden;
}

/* Animated grid background */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(0deg, transparent 24%, rgba(0, 255, 255, 0.05) 25%, rgba(0, 255, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 255, 255, 0.05) 75%, rgba(0, 255, 255, 0.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(0, 255, 255, 0.05) 25%, rgba(0, 255, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 255, 255, 0.05) 75%, rgba(0, 255, 255, 0.05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

/* Scanline effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
    animation: scanline 8s linear infinite;
}

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

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
}

nav {
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid #0ff;
    padding: 1rem 0;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5), 0 4px 0 #0088aa;
    backdrop-filter: blur(10px);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

nav h1 {
    font-size: 1.2rem;
    text-shadow: 0 0 10px #0ff, 0 0 20px #0ff, 2px 2px 0 #0088aa;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-2px, 2px); }
    94% { transform: translate(2px, -2px); }
    96% { transform: translate(-2px, -2px); }
}

nav h1 a {
    color: #0ff;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav a {
    color: #0ff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid #0ff;
    background: rgba(0, 255, 255, 0.05);
    position: relative;
}

nav a:hover {
    color: #000;
    background: #0ff;
    box-shadow: 0 0 20px #0ff;
    text-shadow: none;
    transform: translateY(-2px);
}

main {
    background: rgba(0, 0, 0, 0.8);
    margin: 2rem auto;
    padding: 2rem;
    border: 2px solid #0ff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3), inset 0 0 30px rgba(0, 255, 255, 0.05);
    min-height: 60vh;
    backdrop-filter: blur(10px);
    position: relative;
}

main::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #0ff, #f0f, #0ff);
    z-index: -1;
    opacity: 0.3;
    filter: blur(10px);
}

.hero {
    text-align: center;
    padding: 2rem 0;
    position: relative;
}

#ascii-canvas {
    display: flex;
    justify-content: center;
    margin: 2rem auto;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
}

#ascii-canvas canvas {
    cursor: crosshair;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
    .ascii-art, .ascii-art-color {
        margin: 1rem auto;
        font-size: clamp(0.2rem, 0.45vw, 0.4rem);
    }
    
    .hero {
        padding: 1.5rem 0;
    }
    
    .hero h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .ascii-art, .ascii-art-color {
        margin: 0.5rem auto;
        font-size: clamp(0.18rem, 0.4vw, 0.35rem);
    }
    
    .hero {
        padding: 1rem 0;
    }
    
    .hero h2 {
        font-size: 1rem;
    }
    
    nav h1 {
        font-size: 1rem;
    }
    
    nav ul {
        gap: 0.75rem;
    }
    
    nav a {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 400px) {
    .ascii-art, .ascii-art-color {
        font-size: clamp(0.15rem, 0.35vw, 0.28rem);
    }
    
    .container {
        padding: 0 0.5rem;
    }
}

@keyframes asciiGlow {
    0%, 100% { 
        text-shadow: 0 0 5px #0ff;
        filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
    }
    50% { 
        text-shadow: 0 0 10px #0ff, 0 0 20px #0ff;
        filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.8));
    }
}

.hero h2 {
    font-size: 1.5rem;
    color: #0ff;
    text-shadow: 0 0 10px #0ff, 0 0 20px #0ff, 0 0 30px #0ff;
    animation: pulse 2s ease-in-out infinite;
    letter-spacing: 0.1em;
}

@keyframes pulse {
    0%, 100% { opacity: 1; text-shadow: 0 0 10px #0ff, 0 0 20px #0ff, 0 0 30px #0ff; }
    50% { opacity: 0.8; text-shadow: 0 0 5px #0ff, 0 0 10px #0ff, 0 0 15px #0ff; }
}

article h2 {
    margin-bottom: 1.5rem;
    color: #f0f;
    font-size: 1.5rem;
    text-shadow: 0 0 10px #f0f, 0 0 20px #f0f;
    border-bottom: 2px solid #f0f;
    padding-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

article p {
    margin-bottom: 1.5rem;
    color: #0ff;
    font-size: 0.95rem;
    line-height: 1.8;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

article a {
    color: #f0f;
    text-decoration: none;
    border-bottom: 1px solid #f0f;
    transition: all 0.3s;
    text-shadow: 0 0 5px #f0f;
}

article a:hover {
    background: #f0f;
    color: #000;
    padding: 2px 6px;
    box-shadow: 0 0 10px #f0f;
    text-shadow: none;
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: #0ff;
    font-size: 0.8rem;
    border-top: 2px solid #0ff;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: #0ff;
    font-size: 0.8rem;
    border-top: 2px solid #0ff;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: rgba(0, 20, 20, 0.6);
    border: 2px solid #0ff;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
}

.project-card::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #0ff, #f0f, #0ff);
    z-index: -1;
    opacity: 0;
    filter: blur(10px);
    transition: opacity 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.project-card:hover::before {
    opacity: 0.5;
}

.project-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
}

.project-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.5));
}

.project-card h3 {
    color: #f0f;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px #f0f;
}

.project-card p {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.project-tags span {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #0ff;
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    color: #0ff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

@media (max-width: 768px) {
    nav .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav a {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    article h2 {
        font-size: 1.2rem;
    }
    
    article p {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    nav h1 {
        font-size: 1rem;
    }
    
    nav a {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}
