:root {
    --bg: #0b0b0f;
    --fg: #e8e8f0;
    --muted: #9a9ab0;
    --accent: #a855f7;
    --accent-soft: rgba(168, 85, 247, 0.25);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(168, 85, 247, 0.15), transparent 40%),
        var(--bg);
    color: var(--fg);
    font-family: "JetBrains Mono", monospace;
    display: grid;
    place-items: center;
}

.container {
    text-align: center;
    padding: 2.5rem;
    max-width: 520px;
}

.flame-3d {
    width: 200px;
    animation:
        spin 18s linear infinite,
        pulseGlow 2.5s ease-in-out infinite;
    will-change: transform, filter;
    transform: translateZ(0);

    filter:
        drop-shadow(0 10px 25px rgba(0, 0, 0, 0.8))
        drop-shadow(0 0 30px rgba(168, 85, 247, 0.5))
        drop-shadow(0 0 70px rgba(168, 85, 247, 0.3));
}

/* Reduce animations on mobile for better performance */
@media (max-width: 768px) {
    .flame-3d {
        animation: spin 18s linear infinite;
        filter:
            drop-shadow(0 10px 20px rgba(0, 0, 0, 0.8))
            drop-shadow(0 0 25px rgba(168, 85, 247, 0.5));
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .flame-3d {
        animation: none;
        transform: perspective(900px) rotateY(0deg) rotateX(0deg);
    }
}

@keyframes pulseGlow {
    0%,
    100% {
        filter:
            brightness(1) saturate(1.1)
            drop-shadow(0 10px 25px rgba(0, 0, 0, 0.8))
            drop-shadow(0 0 30px rgba(168, 85, 247, 0.5))
            drop-shadow(0 0 70px rgba(168, 85, 247, 0.3));
    }

    50% {
        filter:
            brightness(1.2) saturate(2.0)
            drop-shadow(0 10px 25px rgba(0, 0, 0, 0.8))
            drop-shadow(0 0 50px rgba(168, 85, 247, 0.8))
            drop-shadow(0 0 100px rgba(168, 85, 247, 0.5))
            drop-shadow(0 0 140px rgba(168, 85, 247, 0.3));
    }
}

@keyframes spin {
    0%,
    100% {
        transform: perspective(900px) rotateY(-40deg) rotateX(-5deg);
    }

    50% {
        transform: perspective(900px) rotateY(45deg) rotateX(10deg);
    }
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    margin: 0.2em 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}

h1 span {
    color: var(--accent);
}

p {
    margin: 0.6rem 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.email,
.github {
    font-weight: 600;
    color: var(--fg);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.email:hover,
.github:hover {
    color: var(--accent);
}

.email svg,
.github svg {
    width: 1.1em;
    height: 1.1em;
    fill: currentColor;
    flex-shrink: 0;
}

.email::after,
.github::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.7;
}

.links {
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

footer {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #666;
}
