:root {
    /* Colors - Dark & Green Theme */
    --bg-color: #020402;
    --bg-secondary: #050a05;
    --text-primary: #e0fce0;
    --text-secondary: #8abf8a;
    --accent-cyan: #00ff41;
    /* Neon Green */
    --accent-purple: #008f11;
    /* Darker Matrix Green */
    --gradient-main: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));

    /* Effects */
    --glow-cyan: 0 0 20px rgba(0, 255, 65, 0.5);
    --glow-purple: 0 0 20px rgba(0, 143, 17, 0.5);
    --glass-bg: rgba(0, 20, 0, 0.4);
    --glass-border: rgba(0, 255, 65, 0.2);

    /* Spacing */
    --section-padding: 8rem 2rem;
    --container-width: 1200px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Canvas Container */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 2rem 0;
    transition: 0.3s;
    pointer-events: none;
    /* Allow clicks to pass through header area */
}

header.scrolled {
    background: rgba(5, 5, 8, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
    pointer-events: auto;
    /* Re-enable clicks when background is present */
}

nav {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    pointer-events: auto;
    /* Ensure links are clickable */
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
    /* Ensure hero stack is high */
}

.hero-content {
    max-width: 900px;
    z-index: 10;
    position: relative;
    /* REQUIRED for z-index to work */
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    border-radius: 50px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    background: rgba(0, 240, 255, 0.05);
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-cyan);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
    background: #fff;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
}

.btn-secondary {
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    background: transparent;
}

.btn-secondary:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    box-shadow: 0 0 20px rgba(189, 0, 255, 0.3);
}

/* Sections Common */
section {
    padding: var(--section-padding);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 4rem;
    text-align: center;
}

.section-title span {
    color: var(--text-secondary);
    font-size: 1rem;
    display: block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: 'Inter', sans-serif;
}

/* Services / Expertise */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 15px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-cyan);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card ul {
    list-style: none;
    margin-top: 1.5rem;
}

/* Slider Controls */
.slider-container {
    position: relative;
    max-width: 100%;
}

.slider-controls {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.slider-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--accent-cyan);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.slider-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-color);
}

.service-card li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-card li::before {
    content: '>';
    color: var(--accent-purple);
    font-weight: bold;
}

/* Featured Projects */
.projects-slider {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    cursor: grab;
    /* Show grab cursor */
}

.projects-slider::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.project-card {
    min-width: 350px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: 0.3s;
}

.project-card:hover {
    border-color: var(--accent-purple);
}

.project-content {
    padding: 2rem;
}

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

.tech-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-secondary);
}

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2rem;
    border-left: 2px solid var(--glass-border);
}

.timeline-item {
    margin-bottom: 4rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.6rem;
    top: 0.5rem;
    width: 20px;
    height: 20px;
    background: var(--bg-color);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.timeline-date {
    color: var(--accent-cyan);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-content {
    background: var(--glass-bg);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

/* Skills Badges */
.skills-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.skill-pill {
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.9rem;
    transition: 0.3s;
    cursor: default;
    color: var(--text-primary);
    z-index: 10;
    position: relative;
}

.skill-pill:hover {
    background: rgba(189, 0, 255, 0.1);
    border-color: var(--accent-purple);
    transform: scale(1.05);
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Mobile */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .timeline {
        padding-left: 1rem;
    }

    .timeline::before {
        display: none;
        /* Simplify for mobile */
    }

    .timeline-item::before {
        left: -1.6rem;
    }
}

/* --- New UI Elements (Hamburger & Game) --- */

/* Nav Actions Group */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Playground Button */
.btn-playground {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.3s;
}

.btn-playground:hover {
    background: var(--accent-cyan);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--accent-cyan);
}

.playground-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(5px);
    }
}

/* Hamburger Menu */
.hamburger {
    width: 30px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 2000;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--accent-cyan);
    transition: 0.3s;
}

/* Hamburger Animation State */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Fullscreen Menu Overlay */
.fullscreen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(2, 4, 2, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: 0.4s;
    transform: translateY(-20px);
}

.fullscreen-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.menu-links {
    list-style: none;
    text-align: center;
}

.menu-links li {
    margin: 2rem 0;
    transform: translateY(20px);
    opacity: 0;
    /* Animated in JS */
    transition: 0.5s;
}

.menu-links a {
    font-size: 2rem;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-primary);
    text-decoration: none;
    transition: 0.3s;
}

.menu-links a:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 20px var(--accent-cyan);
}

/* Game Modal */
.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.game-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.game-container {
    background: var(--bg-secondary);
    border: 1px solid var(--accent-cyan);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.2);
    max-width: 90%;
}

.close-game-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
}

.close-game-btn:hover {
    color: var(--accent-cyan);
}

canvas#game-canvas {
    border: 1px solid var(--glass-border);
    background: #000;
    display: block;
    margin: 1rem auto;
    max-width: 100%;
}

.score-board {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.hide-mobile {
    display: inline;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
}

/* Avatar Creator Styles */
.color-swatch {
    width: 25px;
    height: 25px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
}

.color-swatch.active {
    border-color: #fff;
    transform: scale(1.1);
}

.color-swatch:hover {
    transform: scale(1.1);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: 0.3s;
}

.btn-icon:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--accent-cyan);
}

/* Fullscreen Helper */
.game-container.fullscreen {
    max-width: 100% !important;
    width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
}

.game-container.fullscreen canvas#game-canvas {
    height: 60vh !important;
    max-height: none !important;
}