/* NON-CRITICAL CSS - Loaded after LCP */

/* Grain Effect */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='4.2' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    animation: grainShift 12s steps(8) infinite;
    transition: opacity 0.3s;
}

@keyframes grainShift {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-3%, -8%); }
    50% { transform: translate(-8%, 4%); }
    75% { transform: translate(4%, -6%); }
}

/* Deep vignette */
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(8, 8, 12, 0.4) 70%,
        rgba(8, 8, 12, 0.8) 100%
    );
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.5s;
}

/* Ambient glow orb */
.ambient-glow {
    position: fixed;
    width: 800px;
    height: 800px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(147, 112, 219, 0.08) 0%,
        transparent 60%
    );
    filter: blur(120px);
    pointer-events: none;
    z-index: 2;
    animation: ambientPulse 8s ease-in-out infinite;
    transition: opacity 1s;
}

@keyframes ambientPulse {
    0%, 100% { 
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Glow line below text */
.glow-line {
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--color-glow-primary) 20%,
        var(--color-glow-secondary) 50%,
        var(--color-glow-accent) 80%,
        transparent 100%
    );
    box-shadow: 
        0 0 20px var(--color-glow-primary),
        0 0 40px var(--color-glow-secondary),
        0 0 60px rgba(147, 112, 219, 0.3);
    animation: lineExpand 1.8s cubic-bezier(0.16, 1, 0.3, 1) 2s forwards;
}

@keyframes lineExpand {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

/* Email button hover effects */
.email-button a {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.email-button a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(147, 112, 219, 0.2),
        transparent
    );
    transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.email-button a:hover {
    border-color: var(--color-glow-primary);
    background: rgba(147, 112, 219, 0.1);
    box-shadow: 
        0 0 30px rgba(147, 112, 219, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.email-button a:hover::before {
    left: 100%;
}

.email-button a:active {
    transform: translateY(0);
}

.email-icon {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.email-button a:hover .email-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        gap: 50px;
    }

    .shot {
        font-size: clamp(70px, 22vw, 180px);
    }
    
    .ambient-glow {
        width: 500px;
        height: 500px;
    }

    .glow-line {
        bottom: -20px;
        height: 1.5px;
    }

    .email-button a {
        padding: 14px 30px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        gap: 40px;
    }

    .shot {
        font-size: clamp(60px, 24vw, 140px);
        letter-spacing: -0.02em;
    }

    .glow-line {
        bottom: -15px;
        height: 1px;
    }

    .email-button a {
        padding: 12px 24px;
        font-size: 13px;
        gap: 10px;
    }

    .email-icon {
        width: 18px;
        height: 18px;
    }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Apply Syne font when loaded */
body {
    font-family: 'Syne', system-ui, -apple-system, sans-serif;
}

.shot,
.email-button a {
    font-family: 'Syne', system-ui, -apple-system, sans-serif;
}