/* Custom animations and component styles */

:root {
    --primary-purple: #622B86;
    --primary-orange: #ED872D;
    --accent-purple: #932191;
    --accent-cyan: #4facfe;
    --warning-yellow: #F39C12;
    --bg-dark: #1a0b2e;
    --bg-dark-2: #2d1b4e;
    --bg-light: #f5f3ff;
    --success-green: #2ECC71;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: white;
    background: var(--bg-dark);
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Custom border widths */
.border-3 {
    border-width: 3px;
}

.border-5 {
    border-width: 5px;
}

.border-6 {
    border-width: 6px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--accent-purple) 100%);
    z-index: 1000;
    border-bottom: 4px solid var(--primary-orange);
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    color: var(--primary-orange);
    text-decoration: none;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    background: rgba(255,255,255,0.1);
    box-shadow: inset 0 -3px 0 rgba(0,0,0,0.2);
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-orange);
    border-color: var(--warning-yellow);
    transform: translateY(2px);
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.2);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 0.5rem;
    background: var(--primary-orange);
    border: 3px solid var(--warning-yellow);
}

.hamburger span {
    width: 25px;
    height: 4px;
    background: white;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-2) 50%, var(--primary-purple) 100%);
    padding: 6rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(237, 135, 45, 0.03) 2px, rgba(237, 135, 45, 0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(237, 135, 45, 0.03) 2px, rgba(237, 135, 45, 0.03) 4px);
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.pixel-avatar {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    border: 8px solid var(--primary-orange);
    box-shadow: 
        0 0 0 4px white,
        0 0 0 12px var(--primary-purple),
        0 12px 0 12px var(--primary-purple),
        0 12px 40px rgba(0,0,0,0.6);
    border-radius: 20px;
    overflow: hidden;
    object-fit: cover;
    image-rendering: crisp-edges;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.stat-icon,
.stat-value,
.stat-label {
    display: block;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.5rem;
    color: var(--primary-orange);
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--bg-light);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.pixel-text {
    font-family: 'Press Start 2P', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 2.8rem;
    color: var(--primary-orange);
    margin-bottom: 1rem;
    text-shadow: 4px 4px 0 var(--primary-purple), 8px 8px 0 rgba(0,0,0,0.3);
    line-height: 1.4;
}

.hero-subtitle {
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.stat-box {
    background: rgba(98, 43, 134, 0.6);
    border: 4px solid var(--primary-orange);
    padding: 1rem;
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}

/* Buttons */
.btn-arcade {
    font-family: 'Press Start 2P', monospace;
    padding: 1rem 2rem;
    font-size: 0.9rem;
    text-decoration: none;
    border: 4px solid;
    box-shadow: 0 6px 0 rgba(0,0,0,0.3), inset 0 -4px 0 rgba(0,0,0,0.2);
    transition: all 0.1s ease;
    cursor: pointer;
    text-transform: uppercase;
    display: inline-block;
}

.btn-arcade:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.3), inset 0 -2px 0 rgba(0,0,0,0.2);
}

.btn-primary {
    background: var(--primary-orange);
    color: white;
    border-color: var(--warning-yellow);
}

.btn-primary:hover {
    background: var(--warning-yellow);
    box-shadow: 0 6px 0 rgba(0,0,0,0.3), inset 0 -4px 0 rgba(0,0,0,0.2), 0 0 20px var(--primary-orange);
}

.btn-secondary {
    background: var(--primary-purple);
    color: white;
    border-color: var(--accent-purple);
}

.btn-secondary:hover {
    background: var(--accent-purple);
    box-shadow: 0 6px 0 rgba(0,0,0,0.3), inset 0 -4px 0 rgba(0,0,0,0.2), 0 0 20px var(--accent-purple);
}

.btn-small {
    font-family: 'Press Start 2P', monospace;
    padding: 0.6rem 1rem;
    font-size: 0.7rem;
    flex: 1;
    text-align: center;
    text-decoration: none;
    border: 3px solid;
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
    transition: all 0.1s ease;
}

.btn-small:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

.btn-demo {
    background: var(--success-green);
    color: white;
    border-color: var(--accent-cyan);
}

.btn-code {
    background: var(--primary-purple);
    color: white;
    border-color: var(--accent-purple);
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-purple);
    border: 3px solid var(--primary-orange);
    font-size: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}

.social-link:hover {
    background: var(--primary-orange);
    transform: translateY(-5px);
    box-shadow: 0 8px 0 rgba(0,0,0,0.3);
}

/* Sections */
.section {
    padding: 5rem 2rem;
    position: relative;
}

.section:nth-child(even) {
    background: var(--bg-dark-2);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 2rem;
    color: var(--primary-orange);
    margin-bottom: 1rem;
    text-shadow: 3px 3px 0 var(--primary-purple);
}

.section-subtitle {
    color: var(--accent-cyan);
    font-size: 1rem;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.about-text {
    color: var(--bg-light);
}

.about-text h3 {
    font-size: 1.8rem;
    color: var(--primary-orange);
    margin-bottom: 1rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.achievements {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Profile Card */
.profile-card {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--accent-purple) 100%);
    border: 5px solid var(--primary-orange);
    padding: 2rem;
    box-shadow: 0 8px 0 rgba(0,0,0,0.3);
}

.profile-avatar {
    width: 100%;
    aspect-ratio: 1;
    border: 6px solid var(--primary-orange);
    margin-bottom: 1.5rem;
    box-shadow: 
        0 0 0 3px white,
        0 8px 0 rgba(0,0,0,0.4);
    object-fit: cover;
    border-radius: 15px;
    image-rendering: crisp-edges;
}

.xp-bar {
    margin-top: 1.5rem;
}

.xp-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.xp-progress {
    height: 25px;
    background: var(--bg-dark);
    border: 3px solid white;
    position: relative;
    overflow: hidden;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-green) 0%, var(--accent-cyan) 100%);
    width: 80%;
    position: relative;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,0.2);
}

/* Achievement Badge */
.achievement-badge {
    background: rgba(98, 43, 134, 0.6);
    border: 4px solid var(--primary-orange);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}

.achievement-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 0 rgba(0,0,0,0.3), 0 0 30px var(--primary-orange);
}

.achievement-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 0 rgba(0,0,0,0.3));
}

.achievement-title {
    font-size: 1rem;
    color: var(--primary-orange);
    margin-bottom: 0.5rem;
}

/* Skill Category */
.skill-category {
    background: rgba(98, 43, 134, 0.4);
    border: 4px solid var(--primary-orange);
    padding: 2rem;
    box-shadow: 0 6px 0 rgba(0,0,0,0.3);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.skill-category-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.1rem;
    color: var(--primary-orange);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.skill-level {
    color: var(--accent-cyan);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
}

.skill-bar {
    height: 20px;
    background: var(--bg-dark);
    border: 3px solid white;
    position: relative;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-orange) 0%, var(--warning-yellow) 50%, var(--primary-orange) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2);
    transition: width 1s ease;
}

/* Quest Card */
.quest-card {
    background: rgba(45, 27, 78, 0.8);
    border: 5px solid var(--primary-orange);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 6px 0 rgba(0,0,0,0.3);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.quest-actions {
    display: flex;
    gap: 1rem;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.quest-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 0 rgba(0,0,0,0.3), 0 0 40px var(--primary-orange);
}

.quest-header {
    padding: 1.5rem;
    border-bottom: 4px solid var(--primary-orange);
}

.quest-difficulty {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.quest-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    color: white;
    line-height: 1.6;
}

.quest-content {
    padding: 1.5rem;
}

.tech-badge {
    background: var(--primary-purple);
    color: white;
    padding: 0.4rem 0.8rem;
    border: 2px solid var(--primary-orange);
    font-size: 0.8rem;
    font-weight: 700;
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.contact-info h3 {
    font-size: 1.3rem;
    color: var(--primary-orange);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.contact-info .contact-item h4 {
    color: var(--primary-orange);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.contact-info .contact-item p {
    color: var(--bg-light);
    margin: 0;
}

.contact-item {
    background: rgba(98, 43, 134, 0.6);
    border: 4px solid var(--primary-orange);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 0 rgba(0,0,0,0.3), 0 0 20px var(--primary-orange);
}

.contact-icon {
    font-size: 2.5rem;
    min-width: 50px;
}

.contact-form {
    background: rgba(98, 43, 134, 0.6);
    border: 5px solid var(--primary-orange);
    padding: 2rem;
    box-shadow: 0 8px 0 rgba(0,0,0,0.3);
}

.form-input {
    width: 100%;
    padding: 0.8rem;
    border: 3px solid white;
    background: var(--bg-dark);
    color: white;
    font-family: inherit;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 20px rgba(237, 135, 45, 0.5);
}

.btn-submit {
    width: 100%;
    font-family: 'Press Start 2P', monospace;
    padding: 1rem;
    font-size: 0.9rem;
    background: var(--primary-orange);
    color: white;
    border: 4px solid var(--warning-yellow);
    cursor: pointer;
    box-shadow: 0 6px 0 rgba(0,0,0,0.3);
    transition: all 0.1s ease;
}

.btn-submit:hover {
    background: var(--warning-yellow);
    box-shadow: 0 6px 0 rgba(0,0,0,0.3), 0 0 30px var(--primary-orange);
}

.btn-submit:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--bg-dark) 100%);
    border-top: 5px solid var(--primary-orange);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-orange);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 2px solid rgba(255,255,255,0.2);
    color: var(--bg-light);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.footer-message {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.3rem;
    color: var(--primary-orange);
    margin-bottom: 1rem;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.3);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--primary-orange);
    color: white;
    border: 4px solid var(--warning-yellow);
    font-size: 2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 6px 0 rgba(0,0,0,0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--warning-yellow);
    transform: translateY(-5px);
    box-shadow: 0 10px 0 rgba(0,0,0,0.3), 0 0 30px var(--primary-orange);
}

.back-to-top:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}

/* Animations */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    25% { 
        transform: translateY(-20px) rotate(5deg); 
    }
    50% { 
        transform: translateY(-40px) rotate(-5deg); 
    }
    75% { 
        transform: translateY(-20px) rotate(5deg); 
    }
}

.floating-pixel {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes pixelBounce {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

.animate-bounce-slow {
    animation: pixelBounce 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { 
        background-position: 200% 0; 
    }
    100% { 
        background-position: -200% 0; 
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 70px);
        background: var(--primary-purple);
        flex-direction: column;
        padding: 2rem;
        border-left: 5px solid var(--primary-orange);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        width: 100%;
    }

    .hamburger {
        display: flex;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .btn-arcade {
        font-size: 0.7rem;
        padding: 0.8rem 1.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .achievements {
        grid-template-columns: 1fr;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 0.9rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-arcade {
        width: 100%;
    }
}
