/* === PIXEL PORTFOLIO - RETRO GAMING THEME === */

/* CSS Variables */
:root {
    --primary-bg: #0a0a0a;
    --secondary-bg: #1a1a2e;
    --accent-purple: #9d4edd;
    --accent-purple-dark: #7209b7;
    --accent-pink: #e0aaff;
    --accent-cyan: #00f5ff;
    --text-primary: #ffffff;
    --text-secondary: #c8c8c8;
    --border-color: #9d4edd;
    --success-green: #00ff41;
    --warning-red: #ff006e;

    --pixel-border: 4px;
    --box-shadow: 0 0 20px rgba(157, 78, 221, 0.5);
    --glow: 0 0 10px var(--accent-purple);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Press Start 2P', monospace;
    background: var(--primary-bg);
    color: var(--text-primary);
    overflow: hidden; /* No traditional scroll */
    line-height: 1.6;
    height: 100vh;
    perspective: 1000px;
    perspective-origin: 50% 50%;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Depth Scroll Container */
#depth-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    transform-style: preserve-3d;
    /* Removed transition to prevent lag - smoothness handled by JS easing */
}

/* Sections have pointer events controlled dynamically by JavaScript */

::selection {
    background: var(--accent-purple);
    color: var(--text-primary);
}

/* Pixel Canvas Background */
#pixelCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
    pointer-events: none;
}

/* Depth Scroll Indicator */
.depth-indicator {
    display: none;
}

.depth-bar {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-purple));
    box-shadow: 0 0 10px var(--accent-purple);
    transition: height 0.3s ease;
}

/* Sections in 3D Space */
section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: flat;
    /* Force instant opacity/filter changes - no transitions */
    transition: none !important;
    will-change: opacity, filter;
    /* pointer-events controlled dynamically by JS based on visibility */
}

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

/* Pixel Text */
.pixel-text {
    font-family: 'Press Start 2P', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    image-rendering: pixelated;
}

/* Navigation */
/* Centered Logo */
.centered-logo {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 1001;
    font-size: 2rem;
    color: var(--accent-cyan);
    text-shadow:
        3px 3px 0 var(--accent-purple),
        0 0 20px var(--accent-cyan);
    animation: float 3s ease-in-out infinite;
    text-align: center;
    width: fit-content;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Vertical Navigation Sidebar */
.vertical-nav {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.nav-arrow {
    background: transparent;
    border: none;
    color: var(--accent-cyan);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px var(--accent-cyan);
}

.nav-arrow:hover {
    transform: scale(1.3);
    color: var(--accent-purple);
    text-shadow: 0 0 15px var(--accent-purple);
}

.nav-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
}

.nav-item {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 8px 12px;
    transition: all 0.3s ease;
    width: 100%;
}

.nav-item:hover {
    transform: scale(1.1);
}

.nav-dot {
    display: none;
}

.nav-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
}

.nav-item:hover .nav-dot {
    color: var(--accent-cyan);
    transform: scale(1.2);
    text-shadow: 0 0 10px var(--accent-cyan);
}

.nav-item:hover .nav-label {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
}

.nav-item.active {
    transform: scale(1.4);
}

.nav-item.active .nav-label {
    font-size: 0.65rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    position: relative;
}

.hero-content {
    text-align: center;
    z-index: 1;
    background: rgba(10, 10, 10, 0.7); /* Semi-transparent background for better readability */
    padding: 40px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    margin-top: 80px;
}

.pixel-avatar {
    width: 300px;
    height: 300px;
    margin: 0 auto 80px;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.avatar-sprite {
    width: 100%;
    height: 100%;
    background-image: url('files/profile.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow:
        0 0 0 4px var(--primary-bg),
        0 0 0 8px var(--accent-purple),
        0 0 20px var(--accent-purple);
    position: relative;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.glitch {
    font-size: 3rem;
    color: var(--accent-purple);
    text-shadow:
        2px 2px 0 var(--accent-cyan),
        -2px -2px 0 var(--accent-pink);
    margin: 20px 0;
    position: relative;
    animation: glitch 5s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    92% {
        transform: translate(-2px, 2px);
    }
    94% {
        transform: translate(2px, -2px);
    }
    96% {
        transform: translate(-2px, -2px);
    }
    98% {
        transform: translate(2px, 2px);
    }
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.typewriter {
    min-height: 60px;
    margin: 20px 0;
}

.typed-text {
    font-size: 0.8rem;
    color: var(--success-green);
    border-right: 3px solid var(--success-green);
    padding-right: 5px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--success-green); }
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

/* Pixel Buttons */
.pixel-btn {
    padding: 15px 30px;
    font-size: 0.7rem;
    border: 3px solid var(--accent-purple);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-family: 'Press Start 2P', monospace;
    text-transform: uppercase;
    box-shadow: 5px 5px 0 var(--accent-purple-dark);
}

.pixel-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 var(--accent-purple-dark);
    background: var(--accent-purple);
}

.pixel-btn:active {
    transform: translate(5px, 5px);
    box-shadow: none;
}

.pixel-btn.primary {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
}

.pixel-btn.primary:hover {
    background: var(--accent-purple-dark);
    box-shadow: 0 0 20px var(--accent-purple);
}

.pixel-btn.secondary {
    border-color: var(--accent-cyan);
    box-shadow: 5px 5px 0 rgba(0, 245, 255, 0.5);
}

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

.scroll-indicator {
    margin-top: 20px;
}

.pixel-arrow {
    font-size: 2rem;
    color: var(--accent-purple);
    animation: bounce 2s infinite;
}

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

/* Sections - padding only, positioning handled by depth scroll */
section {
    padding: 60px 20px; /* Reduced from 100px to 60px */
    overflow-x: hidden;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 50px; /* Reduced from 80px to 50px */
    color: var(--accent-purple);
    position: relative;
    text-shadow:
        4px 4px 0 rgba(0, 0, 0, 0.5),
        0 0 20px var(--accent-purple);
    transform: perspective(500px) rotateX(10deg);
    transform-style: preserve-3d;
}

/* Pixel decorative corners for section titles */
.section-title::before,
.section-title::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
}

.section-title::before {
    left: calc(50% - 250px);
    background:
        linear-gradient(var(--accent-cyan), var(--accent-cyan)) 0 0 / 12px 12px,
        linear-gradient(var(--accent-cyan), var(--accent-cyan)) 12px 12px / 12px 12px,
        linear-gradient(var(--accent-cyan), var(--accent-cyan)) 24px 24px / 12px 12px;
    background-repeat: no-repeat;
    filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.section-title::after {
    right: calc(50% - 250px);
    background:
        linear-gradient(var(--accent-purple), var(--accent-purple)) 0 24px / 12px 12px,
        linear-gradient(var(--accent-purple), var(--accent-purple)) 12px 12px / 12px 12px,
        linear-gradient(var(--accent-purple), var(--accent-purple)) 24px 0 / 12px 12px;
    background-repeat: no-repeat;
    filter: drop-shadow(0 0 8px var(--accent-purple));
}

.title-bracket {
    color: var(--accent-cyan);
    font-size: 2.5rem;
    filter: drop-shadow(0 0 15px var(--accent-cyan));
}

/* Pixel Box - GAME STYLE */
.pixel-box {
    background: var(--secondary-bg);
    border: 4px solid var(--accent-purple);
    padding: 30px;
    position: relative;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    box-shadow: 8px 8px 0 rgba(157, 78, 221, 0.3);
}

.pixel-box:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0 rgba(157, 78, 221, 0.5);
    border-color: var(--accent-cyan);
}

.pixel-box::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(15px);
}

.pixel-box:hover::before {
    opacity: 0.3;
}

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

/* About Section - GAME CARD LAYOUT */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.about-box {
    text-align: center;
}

@keyframes cardFlipIn {
    from {
        opacity: 0;
        transform: rotateY(-90deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotateY(0) scale(1);
    }
}

.about-box::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) rotateX(90deg);
    width: 80%;
    height: 30px;
    background: rgba(157, 78, 221, 0.2);
    border: 2px solid rgba(157, 78, 221, 0.4);
    filter: blur(8px);
}

.pixel-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    animation: float3D 4s ease-in-out infinite;
    filter: drop-shadow(4px 4px 0 var(--accent-purple-dark));
}

@keyframes float3D {
    0%, 100% {
        transform: translateY(0) rotateZ(0deg);
    }
    25% {
        transform: translateY(-10px) rotateZ(5deg);
    }
    50% {
        transform: translateY(-20px) rotateZ(0deg);
    }
    75% {
        transform: translateY(-10px) rotateZ(-5deg);
    }
}

.about-box h3 {
    font-size: 1rem;
    color: var(--accent-cyan);
    margin-bottom: 15px;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.about-box p {
    font-size: 0.6rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.highlight {
    color: var(--accent-purple);
}

.year {
    color: var(--accent-cyan);
    font-weight: bold;
}

.contact-info {
    margin-top: 15px;
}

.contact-info p {
    font-size: 0.55rem;
    margin: 8px 0;
}

/* Achievement Badge - ISOMETRIC */
.achievement {
    margin-top: 60px;
    border-color: var(--success-green);
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1), rgba(157, 78, 221, 0.1));
    transform: rotateX(10deg) rotateY(0deg);
    transform-style: preserve-3d;
    box-shadow:
        12px 12px 0 rgba(0, 255, 65, 0.2),
        0 15px 30px rgba(0, 255, 65, 0.3);
}

.achievement-header {
    text-align: center;
    margin-bottom: 20px;
    color: var(--success-green);
    font-size: 0.8rem;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 10px var(--success-green); }
    50% { text-shadow: 0 0 20px var(--success-green), 0 0 30px var(--success-green); }
}

.achievement-content h3 {
    color: var(--accent-cyan);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.achievement-content p {
    font-size: 0.6rem;
    color: var(--text-secondary);
    margin: 10px 0;
    line-height: 1.8;
}

.achievement-content strong {
    color: var(--accent-purple);
}

.date {
    color: var(--success-green);
    margin-top: 15px;
}

/* Skills Section - GAME STYLE */
.skills-grid {
    display: flex;
    gap: 25px;
    justify-content: center;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.skill-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
    flex: 1;
    max-width: 380px;
}

.skill-column-center {
    flex: 0.9;
    max-width: 420px;
}

.skill-category {
    width: 100%;
    min-height: 180px;
    padding: 20px 15px;
}

@keyframes powerUp {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    60% {
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.skill-category::before {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 40px;
    background: radial-gradient(ellipse, rgba(157, 78, 221, 0.4), transparent);
    filter: blur(15px);
    z-index: -1;
}

.skill-category h3 {
    font-size: 0.8rem;
    color: var(--accent-cyan);
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 0 10px var(--accent-cyan));
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.skill-tag {
    padding: 12px 20px;
    background: var(--primary-bg);
    border: 2px solid var(--accent-purple);
    font-size: 0.55rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 0;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    transition: width 0.8s ease;
}

.skill-tag[data-level="90"]::before { width: 90%; }
.skill-tag[data-level="85"]::before { width: 85%; }
.skill-tag[data-level="80"]::before { width: 80%; }
.skill-tag[data-level="75"]::before { width: 75%; }
.skill-tag[data-level="70"]::before { width: 70%; }
.skill-tag[data-level="65"]::before { width: 65%; }

.skill-tag:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 10px 25px rgba(157, 78, 221, 0.5);
    border-color: var(--accent-cyan);
    background: rgba(157, 78, 221, 0.2);
}

.skill-tag::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 245, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.skill-tag:hover::after {
    width: 300px;
    height: 300px;
}

/* Projects Section - GAME CARDS */
.projects-grid {
    display: flex;
    gap: 25px;
    justify-content: center;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.project-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
    flex: 1;
    max-width: 380px;
}

.project-column-center {
    flex: 0.9;
    max-width: 420px;
}

.project-card {
    width: 100%;
    min-height: 200px;
    padding: 20px 15px;
    background: var(--secondary-bg);
    transition: all 0.4s ease;
    position: relative;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px) rotateY(-30deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotateY(0);
    }
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(157, 78, 221, 0.6);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.project-icon {
    font-size: 2.5rem;
    animation: bounce3D 2s infinite;
    filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.5));
}

@keyframes bounce3D {
    0%, 100% {
        transform: translateY(0) rotateZ(0deg);
    }
    50% {
        transform: translateY(-15px) rotateZ(10deg);
    }
}

.project-card h3 {
    font-size: 0.8rem;
    color: var(--accent-cyan);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag {
    padding: 8px 15px;
    background: var(--accent-purple);
    color: var(--text-primary);
    font-size: 0.5rem;
    border: 2px solid var(--accent-purple-dark);
    border-bottom: 3px solid var(--accent-purple-dark);
    border-right: 3px solid var(--accent-purple-dark);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
    transform: translateZ(10px);
}

.project-description {
    font-size: 0.6rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 15px;
    max-height: 4.8em; /* Show ~3 lines */
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-features {
    list-style: none;
    margin-bottom: 15px;
    display: none; /* Hidden by default to reduce card height */
}

.project-features li {
    font-size: 0.55rem;
    color: var(--success-green);
    margin: 8px 0;
    padding-left: 5px;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.project-btn {
    width: 100%;
    margin-top: 10px;
    transform: none !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative;
    z-index: 10;
    transform-style: flat !important;
}

/* Contact Section - ISOMETRIC */
.contact-content {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    padding: 20px;
}

.contact-box {
    max-width: 600px;
    width: 100%;
    transform-style: preserve-3d;
}

.contact-box {
    animation: zoomIn 0.6s ease-out 0.2s backwards;
}

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

.contact-box::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 40px;
    background: radial-gradient(ellipse, rgba(0, 245, 255, 0.4), transparent);
    filter: blur(15px);
    z-index: -1;
}

.contact-box h3 {
    font-size: 1rem;
    color: var(--accent-cyan);
    margin-bottom: 20px;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.contact-box p {
    font-size: 0.6rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: var(--primary-bg);
    border: 2px solid var(--accent-purple);
    border-bottom: 4px solid var(--accent-purple-dark);
    border-right: 4px solid var(--accent-purple-dark);
    transition: all 0.3s ease;
    box-shadow: 5px 5px 0 rgba(157, 78, 221, 0.3);
    transform: translateZ(15px);
}

.contact-method:hover {
    border-color: var(--accent-cyan);
    transform: translateZ(25px) translateY(-5px);
    box-shadow:
        8px 8px 0 rgba(0, 245, 255, 0.4),
        0 10px 30px rgba(0, 245, 255, 0.3);
}

.method-icon {
    font-size: 2rem;
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.5));
}

.method-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.method-label {
    font-size: 0.55rem;
    color: var(--accent-purple);
}

.method-info a,
.method-info span {
    font-size: 0.6rem;
    color: var(--text-primary);
    text-decoration: none;
}

.method-info a:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-size: 0.6rem;
    color: var(--accent-purple);
}

.pixel-input {
    padding: 15px;
    background: var(--primary-bg);
    border: 3px solid var(--accent-purple);
    color: var(--text-primary);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    transition: all 0.3s ease;
}

.pixel-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}

.pixel-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

textarea.pixel-input {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
.footer {
    background: var(--secondary-bg);
    border-top: 4px solid var(--accent-purple);
    padding: 40px 20px;
    text-align: center;
}

.footer p {
    font-size: 0.6rem;
    color: var(--text-secondary);
    margin: 10px 0;
}

.heart {
    color: var(--warning-red);
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.1); }
    20%, 40% { transform: scale(1); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
}

.modal.active {
    display: flex;
    pointer-events: auto;
}

.modal-content {
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 2001;
}

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

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: var(--accent-purple);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: var(--warning-red);
    transform: rotate(90deg);
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* Force proper sizing */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
        width: 100vw;
    }

    /* Scale down everything proportionally */
    #depth-container {
        width: 100vw;
        max-width: 100vw;
    }

    section {
        width: 100vw;
        max-width: 100vw;
        padding-left: 60px;
        padding-right: 5vw;
        box-sizing: border-box;
    }

    /* Reduce sidebar size on mobile */
    .vertical-nav {
        left: 5px;
        transform: translateY(-50%) scale(0.7);
        transform-origin: left center;
    }

    .nav-label {
        font-size: 0.35rem;
    }

    .nav-item {
        padding: 5px 8px;
    }

    .nav-item.active .nav-label {
        font-size: 0.45rem;
    }

    .nav-arrow {
        font-size: 0.7rem;
        padding: 5px;
    }

    .centered-logo {
        left: 0;
        right: 0;
        margin: 0 auto;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        background: var(--secondary-bg);
        flex-direction: column;
        padding: 40px 20px;
        transition: left 0.3s ease;
        border-right: 4px solid var(--accent-purple);
    }

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

    .hamburger {
        display: flex;
    }

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

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

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

    .glitch {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .section-title {
        font-size: 1rem;
        transform: perspective(300px) rotateX(5deg);
    }

    /* Scale down hero section */
    .hero-content {
        padding: 20px;
        transform: scale(0.65);
        transform-origin: center;
    }

    .pixel-avatar {
        width: 150px;
        height: 150px;
    }

    .glitch {
        font-size: 1.3rem;
    }

    .subtitle {
        font-size: 0.6rem;
    }

    /* Scale down contact section */
    .contact-content {
        transform: scale(0.7);
        transform-origin: top center;
    }

    /* Fix About Section - Stack cards vertically */
    .about-content {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }

    /* Fix Skills Section - Stack columns vertically */
    .skills-grid {
        flex-direction: column !important;
        gap: 20px;
        max-width: 100%;
        width: 100%;
    }

    .skill-column,
    .skill-column-center {
        max-width: 100%;
        width: 100%;
        flex: none;
    }

    .skill-category {
        min-height: auto;
    }

    /* Reduce isometric effects on mobile */
    .about-box:nth-child(1),
    .about-box:nth-child(2),
    .about-box:nth-child(3) {
        transform: rotateX(10deg) rotateY(0deg) translateY(0);
    }

    .about-box::after {
        display: none;
    }

    .skill-category:nth-child(1),
    .skill-category:nth-child(2),
    .skill-category:nth-child(3),
    .skill-category:nth-child(4),
    .skill-category:nth-child(5) {
        transform: rotateX(10deg) rotateY(0deg) translateZ(10px);
    }

    .skill-category::before {
        bottom: -20px;
        height: 20px;
    }

    .project-card:nth-child(1),
    .project-card:nth-child(2),
    .project-card:nth-child(3),
    .project-card:nth-child(4),
    .project-card:nth-child(5) {
        transform: none !important;
    }

    .project-card:hover {
        transform: none !important;
    }

    .contact-box {
        transform: rotateX(10deg) rotateY(0deg) translateZ(15px);
    }

    .pixel-box {
        padding: 15px;
        box-sizing: border-box;
        box-shadow: 4px 4px 0 rgba(157, 78, 221, 0.3);
    }

    .pixel-box:hover {
        box-shadow: 6px 6px 0 rgba(157, 78, 221, 0.5);
    }

    .project-card h3,
    .about-box h3,
    .skill-category h3 {
        font-size: 0.7rem;
    }

    .skill-category,
    .about-box {
        max-width: 100%;
        width: 100%;
    }

    /* Container width control */
    .container {
        max-width: 100%;
        width: 100%;
        padding: 0 5vw;
        box-sizing: border-box;
    }

    /* Scale down content sections to fit mobile */
    .about-content {
        transform: scale(0.7) !important;
        transform-origin: top center;
        margin-bottom: 0 !important;
    }

    .skills-grid {
        transform: scale(0.7) !important;
        transform-origin: top center;
        margin-top: 10% !important;
        margin-bottom: -10% !important;
    }

    /* Reduce achievement spacing */
    .achievement {
        margin-top: 20px !important;
    }

    .projects-grid {
        transform: scale(1) !important;
        transform-origin: top center;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        gap: 10px !important;
    }

    /* Hide columns, show cards directly */
    .project-column,
    .project-column-center {
        display: contents !important;
    }

    .project-card {
        width: 45vw !important;
        height: 45vw !important;
        max-width: 45vw !important;
        max-height: 45vw !important;
        min-height: unset !important;
        flex: 0 0 45vw !important;
        margin-bottom: 15px;
        box-sizing: border-box;
        padding: 10px !important;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow: hidden;
    }

    /* Reduce project card text sizes */
    .project-card h3 {
        font-size: 0.5rem !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .project-icon {
        font-size: 1.5rem !important;
    }

    .project-btn {
        font-size: 0.45rem !important;
        padding: 8px 12px !important;
    }

    /* Hide tags, description, and features on mobile */
    .project-tags,
    .project-description,
    .project-features {
        display: none !important;
    }

    /* Prevent horizontal overflow */
    section {
        padding: 50px 10px;
        overflow-x: hidden;
    }

    body {
        overflow-x: hidden;
    }
}

@media (max-width: 480px) {
    /* Ensure body and html handle overflow */
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Force all major containers to respect viewport - EXCLUDE project-card and projects-grid */
    .container,
    .about-content,
    .skills-grid,
    .about-box,
    .skill-category,
    .skill-column,
    .skill-column-center,
    .project-column,
    .project-column-center,
    .pixel-box {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Even more aggressive scaling for small phones */
    .about-content {
        transform: scale(0.6) !important;
        margin-bottom: 0 !important;
    }

    .skills-grid {
        transform: scale(0.6) !important;
        margin-top: 15% !important;
        margin-bottom: -15% !important;
    }

    .projects-grid {
        transform: scale(1) !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }

    /* Hide columns, show cards directly */
    .project-column,
    .project-column-center {
        display: contents !important;
    }

    .project-card {
        width: 42vw !important;
        height: 42vw !important;
        max-width: 42vw !important;
        max-height: 42vw !important;
        min-height: unset !important;
        flex: 0 0 42vw !important;
        margin-bottom: 10px;
        box-sizing: border-box;
        padding: 8px !important;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow: hidden;
    }

    /* Reduce project card text sizes for small phones */
    .project-card h3 {
        font-size: 0.45rem !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.3;
    }

    .project-icon {
        font-size: 1.3rem !important;
    }

    .project-btn {
        font-size: 0.4rem !important;
        padding: 6px 10px !important;
    }

    /* Hide tags, description, and features on small phones */
    .project-tags,
    .project-description,
    .project-features {
        display: none !important;
    }

    .hero-content {
        transform: scale(0.55) !important;
    }

    .contact-content {
        transform: scale(0.6) !important;
    }

    /* Reduce achievement spacing */
    .achievement {
        margin-top: 10px !important;
    }

    /* Hero section adjustments */
    .glitch {
        font-size: 1.5rem;
    }

    .pixel-avatar {
        width: 200px;
        height: 200px;
        margin-bottom: 40px;
    }

    .hero-content {
        padding: 20px;
    }

    .logo {
        font-size: 0.9rem;
    }

    .centered-logo {
        font-size: 1.5rem;
        top: 30px;
    }

    /* Navigation adjustments */
    .vertical-nav {
        left: 3px;
        gap: 3px;
        transform: translateY(-50%) scale(0.6);
    }

    .nav-label {
        font-size: 0.3rem;
    }

    .nav-item {
        padding: 4px 6px;
    }

    .nav-item.active .nav-label {
        font-size: 0.4rem;
    }

    .nav-arrow {
        font-size: 0.6rem;
        padding: 4px;
    }

    /* Adjust content padding for smaller sidebar */
    section {
        padding-left: 50px !important;
    }

    .centered-logo {
        left: 0;
        right: 0;
        margin: 0 auto;
        font-size: 1.2rem;
    }

    /* Button adjustments */
    .pixel-btn {
        padding: 12px 20px;
        font-size: 0.6rem;
    }

    /* Section title adjustments */
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 30px;
    }

    .title-bracket {
        font-size: 1.5rem;
    }

    /* Remove decorative elements on small screens */
    .section-title::before,
    .section-title::after {
        display: none;
    }

    /* Container adjustments */
    .container {
        padding: 0 15px;
        max-width: 100%;
        width: 100%;
    }

    /* Ensure sections don't overflow */
    section {
        padding: 40px 10px;
        overflow-x: hidden;
    }

    /* About section */
    .about-content {
        gap: 15px;
        width: 100%;
    }

    .about-box {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .pixel-icon {
        font-size: 2rem;
    }

    .about-box p {
        font-size: 0.55rem;
    }

    /* Skills section */
    .skill-category {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .skill-tags {
        gap: 8px;
    }

    .skill-tag {
        padding: 10px 15px;
        font-size: 0.5rem;
    }

    /* Projects section - Cards should be square, 2 per row */

    .project-icon {
        font-size: 2rem;
    }

    .project-card h3 {
        font-size: 0.65rem;
    }

    .project-description {
        font-size: 0.55rem;
    }

    .tag {
        padding: 6px 12px;
        font-size: 0.45rem;
    }

    /* Contact section */
    .contact-methods {
        gap: 15px;
    }

    .method-icon {
        font-size: 1.5rem;
    }

    .method-label {
        font-size: 0.5rem;
    }

    .method-info a,
    .method-info span {
        font-size: 0.55rem;
    }
}

/* Custom Scrollbar - Hidden */
::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

::-webkit-scrollbar-track {
    display: none;
}

::-webkit-scrollbar-thumb {
    display: none;
}

::-webkit-scrollbar-thumb:hover {
    display: none;
}

/* Loading Animation */
@keyframes pixelate {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* Removed pixelate animation from sections to prevent conflicts with depth scroll visibility */
