/* Hero Section */
.hero {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100); /* Use custom property for mobile browsers */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    z-index: 1;
}

.hero-text {
    animation: slideInLeft 1s ease-out;
}

.hero-title {
    font-size: var(--fs-hero);
    font-family: var(--font-tech);
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
}

.glitch {
    position: relative;
    color: var(--text-primary);
    animation: glitch 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--accent-primary);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--accent-secondary);
    z-index: -2;
}

.hero-subtitle {
    font-size: var(--fs-h2);
    color: var(--accent-primary);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.typewriter {
    border-right: 2px solid var(--accent-primary);
    animation: typewriter 3s steps(20) infinite, blink 1s infinite;
}

.hero-description {
    font-size: var(--fs-body);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Hero Avatar */
.hero-avatar {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideInRight 1s ease-out;
}

.avatar-container {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.3;
    animation: rotate 10s linear infinite, pulse 2s ease-in-out infinite;
    filter: blur(20px);
}

.avatar-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-family: var(--font-tech);
    font-weight: 900;
    color: var(--bg-primary);
    border: 3px solid var(--accent-primary);
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
    background-image: var(--avatar-url);
    background-size: cover;
    background-position: center;
}

.avatar-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 3s ease-in-out infinite;
}

.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    animation: floatAround 8s ease-in-out infinite;
    animation-delay: var(--delay);
}

.floating-icon:nth-child(1) {
    top: 10%;
    right: 10%;
}

.floating-icon:nth-child(2) {
    top: 30%;
    left: 5%;
}

.floating-icon:nth-child(3) {
    bottom: 20%;
    right: 15%;
}

.floating-icon:nth-child(4) {
    bottom: 10%;
    left: 20%;
}

.floating-icon:nth-child(5) {
    top: 50%;
    left: -10%;
}

/* Responsive Hero */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-lg);
    }
    
    .hero-text {
        order: 2;
    }
    
    .hero-avatar {
        order: 1;
    }
    
    .avatar-container {
        width: 250px;
        height: 250px;
    }
    
    .avatar-image {
        width: 200px;
        height: 200px;
        font-size: 2.5rem;
    }
    
    .floating-icon {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
}
