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

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --bg-dark: #0f172a;
    --bg-light: #1e293b;
    --text-light: #e2e8f0;
    --text-dim: #94a3b8;
    --accent: #22d3ee;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    position: relative;
    overflow: hidden;
}

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

.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-links a {
    color: var(--text-dim);
    font-size: 1.5rem;
    transition: color 0.3s;
}

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

/* Floating Animation */
.hero-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-shape {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -60%) scale(1.1); }
}

/* Sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

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

.section-subtitle {
   font-size: 1.5rem;
   text-align: center;
   margin-bottom: 3rem;
   background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
}


/* About Section */
.about {
    background: var(--bg-light);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.skill-tag {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
}

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

.project-card {
    background: var(--bg-light);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.project-content {
    padding: 1.5rem;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.project-tech span {
    font-size: 0.8rem;
    color: var(--text-dim);
}

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

.project-link {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Trips */
.trips {
    background: var(--bg-light);
}

.trips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.trip-card {
    background: var(--bg-dark);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s;
}

.trip-card:hover {
    transform: scale(1.05);
}

.trip-image {
    height: 150px;
    background: linear-gradient(135deg, var(--accent), var(--secondary-color));
}

.trip-content {
    padding: 1rem;
}

.trip-date {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Blog */
.blog-grid {
    display: grid;
    gap: 2rem;
}

.blog-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 1rem;
    transition: transform 0.3s;
}

.blog-card:hover {
    transform: translateX(5px);
}

.blog-date {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Playground */
.playground {
    background: var(--bg-light);
}

.game-container {
    text-align: center;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 100px);
    gap: 10px;
    margin: 2rem auto;
    width: fit-content;
}

.game-card {
    width: 100px;
    height: 100px;
    background: var(--bg-dark);
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: transform 0.3s;
}

.game-card:hover {
    transform: scale(1.05);
}

.game-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    font-size: 1.2rem;
}

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

/* Footer */
.footer {
    background: var(--bg-light);
    text-align: center;
    padding: 2rem 0;
    color: var(--text-dim);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .project-grid,
    .trips-grid {
        grid-template-columns: 1fr;
    }
    
    .game-board {
        grid-template-columns: repeat(3, 80px);
    }
    
    .game-card {
        width: 80px;
        height: 80px;
    }
}

/* Projects Banner */
.projects-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 4rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.banner-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.banner-title {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
}

.banner-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Code Window Animation */
.banner-animation {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.1;
}

.code-window {
    background: var(--bg-dark);
    border-radius: 0.5rem;
    padding: 1rem;
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.window-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-content {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.code-comment { color: #6a737d; }
.code-keyword { color: #f97583; }
.code-variable { color: #79b8ff; }
.code-property { color: #b392f0; }
.code-string { color: #9ecbff; }

/* Project Cards Enhancement */
.project-card.featured {
    grid-column: span 2;
}

.project-overlay {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

/* Photo Gallery Styles */
.gallery-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-gallery {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-gallery:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.gallery-layout-select {
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: var(--bg-light);
    color: var(--text-light);
    border: 1px solid var(--primary-color);
}

/* Masonry Layout */
.photo-gallery.masonry-layout {
    column-count: 4;
    column-gap: 1rem;
}

.photo-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.photo-item:hover {
    transform: scale(1.05);
}

.photo-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Grid Layout */
.photo-gallery.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.photo-gallery.grid-layout .photo-item img {
    height: 250px;
    object-fit: cover;
}

/* Carousel Layout */
.photo-gallery.carousel-layout {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
}

.photo-gallery.carousel-layout .photo-item {
    flex: 0 0 auto;
    width: 400px;
    scroll-snap-align: center;
}

.photo-gallery.carousel-layout .photo-item img {
    height: 300px;
    object-fit: cover;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    padding: 2rem;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 3rem;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.lightbox-prev { left: 2rem; }
.lightbox-next { right: 2rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Enhanced Game Styles */
.games-container {
    max-width: 800px;
    margin: 0 auto;
}

.game-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.game-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-dark);
    color: var(--text-light);
    border: 2px solid transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.game-btn.active,
.game-btn:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.game-container {
    display: none;
}

.game-container.active {
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .photo-gallery.masonry-layout {
        column-count: 3;
    }
    
    .projects-banner {
        padding: 3rem 1rem;
    }
    
    .banner-animation {
        display: none;
    }
}

@media (max-width: 768px) {
    .photo-gallery.masonry-layout {
        column-count: 2;
    }
    
    .photo-gallery.carousel-layout .photo-item {
        width: 300px;
    }
    
    .project-card.featured {
        grid-column: span 1;
    }
    
    .banner-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .photo-gallery.masonry-layout {
        column-count: 1;
    }
    
    .gallery-controls {
        flex-direction: column;
    }
}
