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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
    background: linear-gradient(to bottom, #f8fafc 0%, #e0e7ff 50%, #f8fafc 100%);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Canvas Background */
#waveCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
    background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
}

/* Custom Cursor */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    transition: transform 0.1s ease;
    z-index: 9999;
    mix-blend-mode: difference;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    position: sticky;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo a {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    transition: var(--transition);
}

.logo a:hover {
    transform: scale(1.05);
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

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

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropbtn {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.5rem 0;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    min-width: 220px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    z-index: 1;
    top: 100%;
    margin-top: 1rem;
    border: 1px solid rgba(229, 231, 235, 0.5);
    overflow: hidden;
}

.dropdown-content a {
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    display: block;
    transition: var(--transition);
    font-size: 0.95rem;
}

.dropdown-content a:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1), rgba(30, 64, 175, 0.1));
    color: var(--primary-color);
    padding-left: 1.75rem;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Social Icons in Header */
.social-icons-header {
    display: flex;
    gap: 1.25rem;
}

.social-icons-header a {
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-icons-header a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Main Content */
main {
    padding-top: 2rem;
}

/* Hero Section */
.hero {
    min-height: calc(100vh - 80px); /* Adjust for header height */
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at top left, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at bottom right, rgba(30, 64, 175, 0.1) 0%, transparent 50%);
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    animation: pulse 10s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.hero-container {
    text-align: center;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-game-info {
    flex-shrink: 0;
}

.hero-game-info img {
    max-width: 450px;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-game-info img:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.hero-game-info p {
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1.1rem;
}

.hero-content {
    text-align: left;
}

.avatar-container {
    width: 160px;
    height: 160px;
    margin-bottom: 2rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    border: 4px solid rgba(255, 255, 255, 0.8);
}

.avatar-container:hover {
    transform: scale(1.05) rotate(5deg);
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
}

.hero-subtitle {
    font-size: 1.75rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* CTA Button */
.cta-button {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
    font-size: 1.1rem;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
}

/* Section Styles */
section {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

#experience, #projects, #about, #contact {
    background: rgba(249, 250, 251, 0.5);
    border-radius: 30px;
    margin: 4rem auto;
    padding: 60px 5%;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

/* Experience Timeline */
.timeline {
    position: relative;
    padding-left: 50px;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

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

.timeline-dot {
    position: absolute;
    left: -30px; /* (14px width / 2) + 20px padding - 3px line width = ~-30px */
    top: 5px;
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.1);
    transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.2);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border: 1px solid rgba(229, 231, 235, 0.5);
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.timeline-role {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.project-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 231, 235, 0.5);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.project-card-steam {
    grid-column: 1 / -1; /* Span full width */
    padding: 0;
    overflow: hidden;
    position: relative;
}

.project-card-steam img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.project-card-steam:hover img {
    transform: scale(1.02);
}

.steam-caption {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.project-card h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
}

.project-card p {
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tags span {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.launch-button,
.download-button {
    display: inline-block;
    text-align: center;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
}

.launch-button:hover,
.download-button:hover {
    background-color: var(--primary-color);
    color: white;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-text {
    flex: 2;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    max-width: 300px;
    width: 100%;
    border-radius: 50%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Contact Section */
#contact {
    text-align: center;
}

.contact-text {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 2rem 5%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    margin-top: 4rem;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        text-align: center;
    }

    .avatar-container {
        margin: 0 auto 2rem;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-image {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none; /* Simple hiding for this example. A burger menu would be better. */
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card-steam {
        grid-column: 1; /* Reset span */
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline-dot {
        left: -8px;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        width: 100%;
        max-width: 300px;
    }
}