:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --accent-cyan: #00f0ff;
    --accent-pink: #ff00ff;
    --accent-yellow: #f0e800;
    --accent-green: #00ff88;
    --text-primary: #e0e0e0;
    --text-secondary: #888;
    --border-glow: rgba(0, 240, 255, 0.3);
    --font-mono: 'Space Mono', monospace;
    --font-retro: 'VT323', monospace;
}

/* Cyberpunk Theme */
body.theme-cyberpunk {
    --bg-primary: #0d0221;
    --bg-secondary: #1a0033;
    --bg-card: #2a0547;
    --accent-cyan: #00ff88;
    --accent-pink: #ff006e;
    --accent-yellow: #ffbe0b;
    --accent-green: #08ffc8;
    --text-primary: #00ff88;
    --text-secondary: #666;
    --border-glow: rgba(0, 255, 136, 0.5);
}

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

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-mono);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* CRT Effect */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.3;
}

.scanlines {
    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: 9998;
    opacity: 0.5;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.nav-brand {
    font-family: var(--font-retro);
    font-size: 1.8rem;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
}

.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: width 0.3s;
    box-shadow: 0 0 10px var(--accent-cyan);
}

.nav-link:hover::after {
    width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-retro);
    font-size: 0.85rem;
    transition: all 0.3s;
    text-shadow: 0 0 5px var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2) inset;
}

.theme-toggle:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 15px var(--accent-cyan), 0 0 10px rgba(0, 240, 255, 0.2) inset;
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Hero Section */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 2rem 2rem;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 240, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        var(--bg-primary);
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.glitch-wrapper {
    position: relative;
    display: inline-block;
}

.glitch {
    font-family: var(--font-retro);
    font-size: 4rem;
    color: var(--text-primary);
    position: relative;
    text-shadow: 
        0.05em 0 0 rgba(255, 0, 0, 0.75),
        -0.025em -0.05em 0 rgba(0, 255, 0, 0.75),
        0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    animation: glitch 2s infinite;
}

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

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent-pink);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-cyan);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim2 2.5s infinite linear alternate-reverse;
}

@keyframes glitch {
    0% { text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75), -0.05em -0.025em 0 rgba(0, 255, 0, 0.75), -0.025em 0.05em 0 rgba(0, 0, 255, 0.75); }
    14% { text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75), -0.05em -0.025em 0 rgba(0, 255, 0, 0.75), -0.025em 0.05em 0 rgba(0, 0, 255, 0.75); }
    15% { text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75), 0.025em 0.025em 0 rgba(0, 255, 0, 0.75), -0.05em -0.05em 0 rgba(0, 0, 255, 0.75); }
    49% { text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75), 0.025em 0.025em 0 rgba(0, 255, 0, 0.75), -0.05em -0.05em 0 rgba(0, 0, 255, 0.75); }
    50% { text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75), 0.05em 0 0 rgba(0, 255, 0, 0.75), 0 -0.05em 0 rgba(0, 0, 255, 0.75); }
    99% { text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75), 0.05em 0 0 rgba(0, 255, 0, 0.75), 0 -0.05em 0 rgba(0, 0, 255, 0.75); }
    100% { text-shadow: -0.025em 0 0 rgba(255, 0, 0, 0.75), -0.025em -0.025em 0 rgba(0, 255, 0, 0.75), -0.025em -0.05em 0 rgba(0, 0, 255, 0.75); }
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 85px, 0); }
    20% { clip: rect(63px, 9999px, 130px, 0); }
    40% { clip: rect(25px, 9999px, 15px, 0); }
    60% { clip: rect(88px, 9999px, 95px, 0); }
    80% { clip: rect(42px, 9999px, 70px, 0); }
    100% { clip: rect(15px, 9999px, 120px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    20% { clip: rect(20px, 9999px, 45px, 0); }
    40% { clip: rect(90px, 9999px, 110px, 0); }
    60% { clip: rect(35px, 9999px, 60px, 0); }
    80% { clip: rect(75px, 9999px, 95px, 0); }
    100% { clip: rect(10px, 9999px, 80px, 0); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    letter-spacing: 2px;
}

.stats-bar {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-retro);
    font-size: 1.2rem;
    color: var(--accent-green);
}

.separator {
    color: var(--accent-pink);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Main Content */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Section Header */
.section-header {
    margin-bottom: 3rem;
    border-bottom: 2px solid var(--border-glow);
    padding-bottom: 1rem;
}

.section-header h2 {
    font-family: var(--font-retro);
    font-size: 2rem;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px var(--accent-cyan);
}

.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-glow);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan);
}

/* Languages Grid */
.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.lang-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    display: block;
}

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

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

.lang-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 240, 255, 0.2);
}

.card-glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-cyan);
    opacity: 0;
    mix-blend-mode: overlay;
    transition: opacity 0.3s;
    pointer-events: none;
}

.lang-card:hover .card-glitch {
    opacity: 0.1;
    animation: glitch-flicker 0.3s infinite;
}

@keyframes glitch-flicker {
    0% { opacity: 0.1; }
    50% { opacity: 0.05; }
    100% { opacity: 0.1; }
}

.lang-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

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

.lang-info h3 {
    font-family: var(--font-retro);
    font-size: 1.5rem;
    color: var(--accent-cyan);
    margin-bottom: 0.25rem;
}

.lang-year {
    display: inline-block;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}

.lang-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.lang-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255, 0, 255, 0.1);
    color: var(--accent-pink);
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    border-radius: 3px;
    border: 1px solid rgba(255, 0, 255, 0.3);
    font-family: var(--font-mono);
}

/* About Section */
.about-section {
    margin: 4rem 0;
}

.terminal-window {
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-glow);
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    background: var(--bg-card);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.terminal-btn.close { background: #ff5f56; }
.terminal-btn.minimize { background: #ffbd2e; }
.terminal-btn.maximize { background: #27c93f; }

.terminal-title {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.8;
}

.prompt {
    color: var(--accent-green);
    margin-right: 0.5rem;
}

.output {
    color: var(--text-primary);
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: var(--accent-cyan);
    animation: cursor-blink 1s infinite;
    vertical-align: text-bottom;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-glow);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
    background: var(--bg-secondary);
}

.footer-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-glitch {
    margin-top: 0.5rem;
    font-family: var(--font-retro);
    color: var(--accent-pink);
    animation: glitch-text 3s infinite;
}

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

/* Language Specific Colors */
.python-blue { fill: #3776ab; }
.python-yellow { fill: #ffd43b; }
.js-svg rect { filter: drop-shadow(0 0 5px #f7df1e); }
.rust-svg circle, .rust-svg path { filter: drop-shadow(0 0 5px #ce422b); }
.go-svg rect { filter: drop-shadow(0 0 5px #00add8); }
.cpp-svg path { filter: drop-shadow(0 0 5px #00599c); }
.c-svg rect { filter: drop-shadow(0 0 5px #a8b9cc); }
.java-svg path { filter: drop-shadow(0 0 5px #e76f00); }
.ts-svg rect { filter: drop-shadow(0 0 5px #3178c6); }
.ruby-svg polygon { filter: drop-shadow(0 0 5px #cc342d); }
.swift-svg path { filter: drop-shadow(0 0 5px #f05138); }
.kotlin-svg path { filter: drop-shadow(0 0 5px #7f52ff); }
.php-svg ellipse { filter: drop-shadow(0 0 5px #777bb4); }
.csharp-svg path { filter: drop-shadow(0 0 5px #9b4f96); }
.zig-svg path { filter: drop-shadow(0 0 5px #f7a41d); }
.nim-svg path { filter: drop-shadow(0 0 5px #ffe953); }
.crystal-svg polygon { filter: drop-shadow(0 0 5px #c9c9c9); }
.odin-svg circle, .odin-svg path { filter: drop-shadow(0 0 5px #3880ff); }
.julia-svg circle { filter: drop-shadow(0 0 5px currentColor); }
.dart-svg path { filter: drop-shadow(0 0 5px #00c4b3); }
.lua-svg circle { filter: drop-shadow(0 0 5px #000080); }

/* Responsive */
@media (max-width: 768px) {
    .glitch {
        font-size: 2.5rem;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.8rem;
    }
    
    .languages-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-cyan);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-pink);
}
.code-body pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 500px;
    overflow-y: auto;
}