/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Orbitron:wght@400;700;900&display=swap');

/* --- Projects Carousel (Mobile only) --- */
#projects-carousel {
    display: block;
    margin-top: 2.5rem;
}

/* Desktop: Hide pagination arrows */
.pagination-arrow {
    display: none;
}

/* Mobile: Show pagination arrows */
@media (max-width: 480px) {
    #projects-carousel {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
    }
    
    .pagination-arrow {
        display: flex;
        background: #1a233a;
        color: #fff;
        border: none;
        border-radius: 12px;
        width: 4rem;
        height: 5rem;
        font-size: 2.1rem;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.4s ease, color 0.4s ease, transform 0.4s ease;
        box-shadow: 0 2px 8px rgba(20,30,60,0.10);
        flex-shrink: 0;
    }
    
    .pagination-arrow:hover {
        background: #3a5ca0;
        color: #fff;
        transform: scale(1.08);
    }
}

/* Responsive adjustments for mobile carousel */
@media (max-width: 600px) {
    #projects-carousel {
        gap: 0.7rem;
        margin-top: 1.2rem;
    }
    .pagination-arrow {
        width: 3rem;
        height: 6rem;
        font-size: 1.5rem;
        border-radius: 8px;
        display: none;

    }
}

@media (max-width: 400px) {
    .project-card {
        min-width: 90vw;
        max-width: 95vw;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    .pagination-arrow {
        width: 2.5rem;
        height: 5rem;
        font-size: 1.2rem;
        display: none;
    }
}
/* --- Projects Pagination Styles --- */
#projects-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination-btn {
    background: #1a233a;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.4s var(--smooth-easing), color 0.4s var(--smooth-easing);
}
.pagination-btn:hover:not(:disabled),
.pagination-btn.active {
    background: #3a5ca0;
    color: #fff;
}
.pagination-btn:disabled {
    background: #444a5a;
    color: #aaa;
    cursor: not-allowed;
}

/* --- Project Card Grid --- */
#projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: #232b3e;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(20,30,60,0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s var(--smooth-easing), box-shadow 0.4s var(--smooth-easing);
}
.project-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 6px 24px rgba(20,30,60,0.18);
}
.project-image {
    position: relative;
    height: 140px;
    background: #1a233a;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-placeholder {
    font-size: 2.5rem;
    color: #3a5ca0;
}
.project-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(25,50,85,0.7);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s var(--smooth-easing);
    pointer-events: none;
}
.project-card:hover .project-overlay {
    opacity: 1;
    pointer-events: auto;
}
.project-links {
    display: flex;
    gap: 1rem;
}
.project-link {
    color: #fff;
    font-size: 1.3rem;
    background: rgba(58,92,160,0.8);
    border-radius: 50%;
    padding: 0.4rem;
    transition: background 0.4s var(--smooth-easing), color 0.4s var(--smooth-easing);
    display: flex;
    align-items: center;
    justify-content: center;
}
.project-link:hover {
    background: #fff;
    color: #3a5ca0;
}
.project-content {
    padding: 1.2rem 1rem 1rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.project-content h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #3a5ca0;
    font-weight: 600;
}
.project-content p {
    margin: 0;
    color: #cfd8e3;
    font-size: 0.98rem;
}
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}
.project-tech span {
    background: #2e3a5a;
    color: #a3b8e0;
    border-radius: 3px;
    padding: 0.2rem 0.6rem;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

@media (max-width: 600px) {
    #projects-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    .project-card {
        font-size: 0.97rem;
    }
    .project-content {
        padding: 1rem 0.7rem 0.8rem 0.7rem;
    }
}
/* Parallax night blue hue overlay for hero */
.parallax-night-hue {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 82, 161, 0.5);
    pointer-events: none;
    mix-blend-mode: multiply;
    z-index: 6;
}
/* Reset and Base Styles */
:root {
    --smooth-scroll-duration: 0.8s;
    --smooth-easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-smooth: all 0.4s var(--smooth-easing);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 60px;
    /* Fix mobile browser issues */
    overflow-x: hidden;
    width: 100%;
    height: 100%;
}

/* Enhanced smooth scrolling for all elements */
* {
    scroll-behavior: smooth;
}

/* Smooth scrollbars for entire page */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 26, 26, 0.8);
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 102, 102, 0.6);
    border-radius: 6px;
    transition: background 0.3s var(--smooth-easing);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 102, 102, 0.8);
}

/* Firefox scrollbar styling */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 102, 102, 0.6) rgba(26, 26, 26, 0.8);
}

/* Optimize rendering performance for smoother animations */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
    will-change: scroll-position;
}

body {
    font-family: 'Press Start 2P', monospace;
    line-height: 1.6;
    color: #827f7f;
    background-color: #0a0a0a;
    overflow-x: hidden;
    overflow-y: auto;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
    will-change: scroll-position;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Fix Android browser scrolling issues */
    position: relative;
    min-height: 100vh;
    width: 100%;
}

/* Full-page parallax background container */
.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    pointer-events: none;
}

/* Night mode overlay - blue hue blend */
.parallax-night-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(25, 50, 85, 0.7) 0%, 
        rgba(15, 35, 65, 0.8) 50%, 
        rgba(10, 20, 40, 0.9) 100%);
    z-index: -1;
    mix-blend-mode: multiply;
}

.parallax-mountains {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/bg-mountains.png') repeat-x center center;
    background-size: 2048px auto;
    z-index: -4;
    animation: scrollMountains 30s linear infinite;
    will-change: background-position;
}

.parallax-trees {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/bg-trees.png') repeat-x center center;
    background-size: 2048px auto;
    z-index: -3;
    animation: scrollTrees 20s linear infinite;
    will-change: background-position;
}

.parallax-ground {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/bg-ground.png') repeat-x center center;
    background-size: 2048px auto;
    z-index: -2;
    animation: scrollGround 15s linear infinite;
    will-change: background-position;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(40, 39, 39, 0.85); /* dark semi-transparent for glass effect */
    backdrop-filter: blur(12px);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

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

.nav-logo h2 {
    color: #cccccc;
    font-weight: 700;
    font-size: 1.2rem;
    font-family: 'Press Start 2P', monospace;
    text-shadow: 1px 1px 0 #666666;
}

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

.nav-link {
    color: #cccccc;
    text-decoration: none;
    font-weight: 400;
    position: relative;
    transition: color 0.3s ease;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.nav-link:hover {
    color: #ffffff;
    text-shadow: 1px 1px 0 #666666;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 4px;
    bottom: -5px;
    left: 0;
    background-color: #666666;
    transition: width 0.3s ease;
    box-shadow: 0 2px 0 #444444;
}

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

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

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(40, 39, 39, 0.85); /* dark glassmorphism */
    backdrop-filter: blur(12px);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #2a1810 0%, #1a0f0a 100%), url('images/bg-sky.png') repeat-x center center;
    background-size: auto, 2048px auto;
    color: white;
    position: relative;
    overflow: hidden;
    padding-top: 100px; /* Prevent overlap with navbar */
}

/* Parallax Background Layers */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/bg-sky.png') repeat-x center center;
    background-size: 2048px auto;
    z-index: 1;
    animation: scrollSky 40s linear infinite;
    will-change: background-position;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/bg-mountains.png') repeat-x center center;
    background-size: 2048px auto;
    z-index: 2;
    animation: scrollMountains 30s linear infinite;
    will-change: background-position;
}

.parallax-layer-1 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/bg-trees.png') repeat-x center center;
    background-size: 2048px auto;
    z-index: 3;
    animation: scrollTrees 20s linear infinite;
    will-change: background-position;
}

.parallax-layer-2 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/bg-ground.png') repeat-x center center;
    background-size: 2048px auto;
    z-index: 4;
    animation: scrollGround 15s linear infinite;
    will-change: background-position;
}

.parallax-layer-3 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/bg-foreground.png') repeat-x center center;
    background-size: 2048px auto;
    z-index: 5;
    animation: scrollForeground 12s linear infinite;
    will-change: background-position;

}

/* Parallax Animation Keyframes - Seamless Loop */
@keyframes scrollSky {
    0% { background-position-x: 0px; }
    100% { background-position-x: -2048px; }
}

@keyframes scrollMountains {
    0% { background-position-x: 0px; }
    100% { background-position-x: -2048px; }
}

@keyframes scrollTrees {
    0% { background-position-x: 0px; }
    100% { background-position-x: -2048px; }
}

@keyframes scrollGround {
    0% { background-position-x: 0px; }
    100% { background-position-x: -2048px; }
}

@keyframes scrollForeground {
    0% { background-position-x: 0px; }
    100% { background-position-x: -2048px; }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hero-content {
    display: flex;
    flex-direction: column;

    max-width: 100%;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: white;
    text-shadow: 4px 4px 0 #000, 
                 8px 8px 0 rgba(0,0,0,0.5);
    font-family: 'Press Start 2P', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.highlight {
    color: #ffffff;
    position: relative;
    text-shadow: 2px 2px 0 #666666,     
                 4px 4px 0 rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: #ffffff;
    text-shadow: 1px 1px 0 #333333,
                 2px 2px 0 rgba(0,0,0,0.5);
    font-family: 'Press Start 2P', monospace;
    text-transform: uppercase;
}

.typewriter {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 1px 1px 0 #555555, 
                 2px 2px 0 rgba(0,0,0,0.5);
}

.hero-description {
    font-size: 0.9rem;
    margin-bottom: 2rem;
    color: #cccccc;
    line-height: 1.8;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.8);
    font-family: 'Press Start 2P', monospace;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Remove old image-placeholder styles since we're using pixel character now */

/* Floating 2D Pixel Cubes */
.floating-cubes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 6;
}

.cube {
    position: absolute;
    width: 32px;
    height: 32px;
    background: #666666;
    image-rendering: pixelated;
    animation: float-2d 8s infinite ease-in-out;
    box-shadow: 
        inset -4px -4px 0 rgba(0,0,0,0.3),
        inset 4px 4px 0 rgba(255,255,255,0.3),
        0 0 10px rgba(102, 102, 102, 0.2);
}

/* 2D Pixel cube with depth effect */
.cube::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 8px;
    width: 32px;
    height: 8px;
    background: linear-gradient(45deg, transparent 50%, rgba(0,0,0,0.2) 50%);
    transform: skewX(-45deg);
}

.cube::after {
    content: '';
    position: absolute;
    top: 8px;
    right: -8px;
    width: 8px;
    height: 32px;
    background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.3) 50%);
    transform: skewY(-45deg);
}

/* Individual cube positioning and animations */
.cube-1 {
    top: 20%;
    left: 10%;
    animation: float-2d-1 12s infinite ease-in-out;
    background: #777777;
}

.cube-2 {
    top: 60%;
    left: 85%;
    animation: float-2d-2 15s infinite ease-in-out;
    background: #888888;
}

.cube-3 {
    top: 30%;
    left: 80%;
    animation: float-2d-3 18s infinite ease-in-out;
    background: #666666;
}

.cube-4 {
    top: 70%;
    left: 15%;
    animation: float-2d-4 10s infinite ease-in-out;
    background: #999999;
}

.cube-5 {
    top: 10%;
    left: 60%;
    animation: float-2d-5 14s infinite ease-in-out;
    background: #555555;
}

/* 2D Floating animations */
@keyframes float-2d-1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(90deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
    75% { transform: translateY(-25px) rotate(270deg); }
}

@keyframes float-2d-2 {
    0%, 100% { transform: translateY(0px) rotate(45deg); }
    33% { transform: translateY(-30px) rotate(135deg); }
    66% { transform: translateY(-15px) rotate(225deg); }
}

@keyframes float-2d-3 {
    0%, 100% { transform: translateY(-5px) rotate(0deg); }
    40% { transform: translateY(-35px) rotate(144deg); }
    80% { transform: translateY(-10px) rotate(288deg); }
}

@keyframes float-2d-4 {
    0%, 100% { transform: translateY(0px) rotate(30deg); }
    30% { transform: translateY(-25px) rotate(120deg); }
    60% { transform: translateY(-5px) rotate(210deg); }
}

@keyframes float-2d-5 {
    0%, 100% { transform: translateY(-10px) rotate(15deg); }
    50% { transform: translateY(-40px) rotate(195deg); }
}

/* Different colored cube shadows */
.cube-1 {
    box-shadow: 
        inset -4px -4px 0 rgba(0,0,0,0.3),
        inset 4px 4px 0 rgba(255,255,255,0.3),
        0 0 20px rgba(99, 102, 241, 0.4);
}

.cube-2 {
    box-shadow: 
        inset -4px -4px 0 rgba(0,0,0,0.3),
        inset 4px 4px 0 rgba(255,255,255,0.3),
        0 0 20px rgba(139, 92, 246, 0.4);
}

.cube-3 {
    box-shadow: 
        inset -4px -4px 0 rgba(0,0,0,0.3),
        inset 4px 4px 0 rgba(255,255,255,0.3),
        0 0 20px rgba(16, 185, 129, 0.4);
}

.cube-4 {
    box-shadow: 
        inset -4px -4px 0 rgba(0,0,0,0.3),
        inset 4px 4px 0 rgba(255,255,255,0.3),
        0 0 20px rgba(245, 158, 11, 0.4);
}

.cube-5 {
    box-shadow: 
        inset -4px -4px 0 rgba(0,0,0,0.3),
        inset 4px 4px 0 rgba(255,255,255,0.3),
        0 0 20px rgba(239, 68, 68, 0.4);
}

/* Cubes for Skills Section */
.skills-cubes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.cube-skill-1 {
    top: 15%;
    left: 5%;
    background: #10b981;
    animation: float-2d-skill-1 16s infinite ease-in-out;
}

.cube-skill-2 {
    top: 60%;
    left: 90%;
    background: #3b82f6;
    animation: float-2d-skill-2 20s infinite ease-in-out;
}

.cube-skill-3 {
    top: 40%;
    left: 8%;
    background: #8b5cf6;
    animation: float-2d-skill-3 14s infinite ease-in-out;
}

/* Cubes for Projects Section */
.projects-cubes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.cube-project-1 {
    top: 20%;
    left: 8%;
    background: #f59e0b;
    animation: float-2d-project-1 18s infinite ease-in-out;
}

.cube-project-2 {
    top: 70%;
    left: 85%;
    background: #ef4444;
    animation: float-2d-project-2 22s infinite ease-in-out;
}

.cube-project-3 {
    top: 10%;
    left: 75%;
    background: #6366f1;
    animation: float-2d-project-3 15s infinite ease-in-out;
}

.cube-project-4 {
    top: 50%;
    left: 5%;
    background: #10b981;
    animation: float-2d-project-4 19s infinite ease-in-out;
}

/* Animations for skills cubes */
@keyframes float-2d-skill-1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-25px) rotate(120deg); }
    66% { transform: translateY(-10px) rotate(240deg); }
}

@keyframes float-2d-skill-2 {
    0%, 100% { transform: translateY(-5px) rotate(45deg); }
    50% { transform: translateY(-30px) rotate(225deg); }
}

@keyframes float-2d-skill-3 {
    0%, 100% { transform: translateY(0px) rotate(15deg); }
    40% { transform: translateY(-20px) rotate(159deg); }
    80% { transform: translateY(-35px) rotate(303deg); }
}

/* Animations for project cubes */
@keyframes float-2d-project-1 {
    0%, 100% { transform: translateY(-8px) rotate(0deg); }
    25% { transform: translateY(-28px) rotate(90deg); }
    50% { transform: translateY(-5px) rotate(180deg); }
    75% { transform: translateY(-35px) rotate(270deg); }
}

@keyframes float-2d-project-2 {
    0%, 100% { transform: translateY(0px) rotate(30deg); }
    40% { transform: translateY(-25px) rotate(174deg); }
    80% { transform: translateY(-15px) rotate(318deg); }
}

@keyframes float-2d-project-3 {
    0%, 100% { transform: translateY(-10px) rotate(60deg); }
    50% { transform: translateY(-40px) rotate(240deg); }
}

@keyframes float-2d-project-4 {
    0%, 100% { transform: translateY(-3px) rotate(0deg); }
    30% { transform: translateY(-23px) rotate(108deg); }
    60% { transform: translateY(-18px) rotate(216deg); }
    90% { transform: translateY(-33px) rotate(324deg); }
}

.btn {
    padding: 16px 32px;
    border-radius: 0;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-block;
    border: 4px solid;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: 'Press Start 2P', monospace;
    text-transform: uppercase;
    position: relative;
    letter-spacing: 1px;
}

.btn-primary {
    background: #666666;
    color: #fff;
    border-color: #333333;
    box-shadow: 2px 2px 0 #333333;
}

.btn-primary:hover {
    background: #777777;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #333333;
}

.btn-secondary {
    background: transparent;
    color: #999999;
    border-color: #666666;
    box-shadow: 2px 2px 0 #444444;
}

.btn-secondary:hover {
    background: #666666;
    color: #fff;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #444444;
}

/* Side Projects Button */
.side-projects-link {
    text-align: center;
    margin-top: 3rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Remove old image-placeholder styles since we're using pixel character now */

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Section Styles */
section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4rem;
    color: #cccccc;
    position: relative;
    font-family: 'Press Start 2P', monospace;
    text-transform: uppercase;
    text-shadow: 2px 2px 0 #666666;
    letter-spacing: 2px;
    /* Fix mobile overflow */
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 8px;
    background: linear-gradient(90deg, #666666, #888888);
    border-radius: 0;
    box-shadow: 0 2px 0 #444444;
}

/* About Section */
.about {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(85, 85, 85, 0.4);
    border-bottom: 1px solid rgba(85, 85, 85, 0.4);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    color: #cccccc;
    line-height: 1.8;
    font-family: 'Press Start 2P', monospace;
    font-weight: 400;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(42, 42, 42, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(102, 102, 102, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border-radius: 4px;
}

.stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    background: rgba(42, 42, 42, 0.9);
}

.stat h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #cccccc;
    margin-bottom: 0.5rem;
    font-family: 'Press Start 2P', monospace;
    text-shadow: 1px 1px 0 #666666;
}

.stat p {
    color: #cccccc;
    font-weight: 400;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.about-image {
    color: white;
    width: 100%;
    height: auto;
    max-width: 500px;
    display: block;
    margin: 0 auto;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
    filter: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Skills Section */
.skills {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(85, 85, 85, 0.4);
    border-bottom: 1px solid rgba(85, 85, 85, 0.4);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.skill-category {
    background: rgba(42, 42, 42, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 2rem;
    border: 1px solid rgba(102, 102, 102, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border-radius: 4px;
}

.skill-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    background: rgba(42, 42, 42, 0.9);
}

.skill-category h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #cccccc;
    margin-bottom: 2rem;
    text-align: center;
    font-family: 'Press Start 2P', monospace;
    text-transform: uppercase;
    text-shadow: 1px 1px 0 #666666;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.skill-item {
    background: #666666;
    color: #fff;
    padding: 0.8rem 1.2rem;
    border: 2px solid #444444;
    font-size: 0.7rem;
    font-weight: 700;
    transition: transform 0.3s ease;
    font-family: 'Press Start 2P', monospace;
    text-transform: uppercase;
    box-shadow: 1px 1px 0 #444444;
}

.skill-item:hover {
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 #444444;
}

/* Projects Section */
.projects {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(85, 85, 85, 0.4);
    border-bottom: 1px solid rgba(85, 85, 85, 0.4);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    padding: 1rem 0;
}

/* Mobile: Single project carousel */
@media (max-width: 480px) {
    .projects-grid {
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }
}

.project-card {
    background: rgba(42, 42, 42, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(102, 102, 102, 0.4);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border-radius: 4px;
    width: 100%;
}

/* Mobile: Fixed width for carousel */
@media (max-width: 480px) {
    .project-card {
        min-width: 520px;
        max-width: 700px;
        width: 100%;
        margin: 0 auto;
    }
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    background: rgba(42, 42, 42, 0.9);
}

.project-image {
    position: relative;
    height: 200px;
    background: #333333;
    border-bottom: 2px solid #666666;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-image .image-placeholder {
    width: 100%;
    height: 100%;
    background: #333333;
    border: 2px solid #666666;
    color: #999999;
}

.project-image .image-placeholder i {
    font-size: 4rem;
    text-shadow: 1px 1px 0 #555555;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border: 2px solid #666666;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

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

.project-link {
    width: 50px;
    height: 50px;
    background: #666666;
    color: #ffffff;
    border: 2px solid #444444;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    box-shadow: 1px 1px 0 #444444;
}

.project-link:hover {
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 #444444;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 0 #666666;
}

.project-content p {
    color: #cccccc;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    background: #e5e7eb;
    color: #374151;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Contact Section */
.contact {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(85, 85, 85, 0.4);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.5rem;
    color: #cccccc;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 0 #666666;
}

.contact-info p {
    color: #cccccc;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-details {
    margin-bottom: 2rem;
}

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

.contact-item i {
    width: 20px;
    color: #999999;
    text-shadow: 1px 1px 0 #555555;
}

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

.social-link {
    width: 45px;
    height: 45px;
    background: #666666;
    color: white;
    border: 2px solid #444444;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    box-shadow: 1px 1px 0 #444444;
}

.social-link:hover {
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 #444444;
}

/* Contact Form */
.contact-form {
    background: rgba(42, 42, 42, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 2rem;
    border: 1px solid rgba(102, 102, 102, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(102, 102, 102, 0.4);
    background: rgba(51, 51, 51, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 1rem;
    font-family: 'Press Start 2P', monospace;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(153, 153, 153, 0.6);
    background: rgba(51, 51, 51, 0.9);
    box-shadow: 0 0 12px rgba(153, 153, 153, 0.2);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: #111111;
    color: #cccccc;
    text-align: center;
    padding: 2rem 0;
    border-top: 2px solid #555555;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive Design */
@media (max-width: 900px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .about-image {
        order: 2;
        max-width: 450px;
        margin: 1rem auto 0;
    }

    .about-text {
        order: 1;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
        word-break: break-word;
        white-space: normal;
        overflow-wrap: break-word;
    }
    .highlight {
        font-size: 1.2rem;
        word-break: break-word;
        white-space: normal;
        overflow-wrap: break-word;
    }
    .hero {
        padding-top: 90px;
    }
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(40, 39, 39, 0.95); /* match navbar glassmorphism */
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

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

    .character-sprite {
        width: 80px;
        height: 80px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 1.2rem;
        box-sizing: border-box;
    }

    .about-image {
        max-width: 350px;
        width: 100%;
        height: auto;
        margin: 1.5rem auto 0;
        display: block;
        order: 2;
    }

    /* Simplify parallax on mobile for performance */
    .hero::before {
        animation: scrollSky 60s linear infinite;
    }
    
    .hero::after {
        animation: scrollMountains 45s linear infinite;
    }
    
    .parallax-layer-1 {
        animation: scrollTrees 30s linear infinite;
    }
    
    .parallax-layer-2 {
        animation: scrollGround 25s linear infinite;
    }
    
    .parallax-layer-3 {
        animation: scrollForeground 20s linear infinite;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .about-image {
        order: 2;
        max-width: 400px;
        margin: 2rem auto 0;
    }

    .about-text {
        order: 1;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

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

    .section-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
        margin-bottom: 3rem;
        padding: 0 0.5rem;
        line-height: 1.3;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
        .section-title::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .section-title::after {
        display: none;
    }
    .container {
        padding: 0 15px;
    }

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

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

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .project-card {
        margin: 0 10px;
    }

    .section-title {
        font-size: 1.5rem;
        letter-spacing: 0.5px;
        margin-bottom: 2rem;
        padding: 0 0.5rem;
        line-height: 1.4;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: calc(100vw - 1rem);
    }
    
    /* Hide carousel arrows on mobile - using auto-advance instead */
    .pagination-arrow {
        display: none;
    }
    
    #projects-carousel {
        gap: 0;
        justify-content: center;
        align-items: center;
        width: 100%;
    }
    
    #projects-grid {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin: 0;
    }
    
    .project-card {
        margin: 0 auto;
        width: 100%;
        max-width: calc(100vw - 2rem);
        min-width: 0;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4f46e5;
}

/* Mobile Browser Fixes - Android specific */
@media screen and (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative !important;
    }
    
    body {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }
    
    /* Prevent horizontal scroll on all containers */
    * {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Fix container widths */
    .container, .hero-container, .nav-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
}