:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --accent-1: #00ff88;
    --accent-2: #0099ff;
    --accent-3: #ff0066;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --border-color: #222222;
}

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

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

/* Animated gradient background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 153, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 0, 102, 0.08) 0%, transparent 50%);
    z-index: 0;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    padding: 4rem 0 2rem;
    animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 0.9;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 8s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Navigation */
nav {
    margin: 3rem 0;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    animation: fadeIn 1s ease 0.2s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-1);
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--text-primary);
}

nav a:hover::after {
    width: 100%;
}

/* Section Headers */
.section-header {
    margin: 5rem 0 3rem;
    animation: fadeInUp 0.8s ease both;
}

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

h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

h2::before {
    content: '';
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    animation: expandWidth 0.8s ease both;
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 50px; }
}

.section-description {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
    margin-bottom: 3rem;
}

/* Grid Layouts */
.projects-grid,
.games-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 5rem;
}

.projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.games-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Project Cards */
.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease both;
}

.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; }

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-1);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.2);
}

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

.project-card > * {
    position: relative;
    z-index: 1;
}

.project-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--accent-1);
    border-radius: 20px;
    color: var(--accent-1);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.project-card h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent-1);
    color: var(--bg-primary);
    border: 1px solid var(--accent-1);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent-1);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

/* Game Cards */
.game-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.8s ease both;
    position: relative;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }
.game-card:nth-child(4) { animation-delay: 0.4s; }

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-2);
    box-shadow: 0 20px 40px rgba(0, 153, 255, 0.2);
}

.game-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 153, 255, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.game-preview::after {
    content: 'PREVIEW';
    font-size: 3rem;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.1);
    letter-spacing: 0.2em;
}

.play-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 3px solid var(--accent-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(0, 153, 255, 0.1);
    backdrop-filter: blur(10px);
}

.play-icon::after {
    content: '▶';
    color: var(--accent-2);
    font-size: 1.2rem;
    margin-left: 4px;
}

.game-card:hover .play-icon {
    transform: scale(1.2);
    background: var(--accent-2);
}

.game-card:hover .play-icon::after {
    color: var(--bg-primary);
}

.game-info {
    padding: 1.5rem;
}

.game-info h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.game-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.game-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.game-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Footer */
footer {
    margin-top: 8rem;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.social-links a:hover {
    color: var(--accent-1);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2rem;
    }

    .projects-grid,
    .games-grid {
        grid-template-columns: 1fr;
    }

    nav ul {
        gap: 1rem;
    }
}