/* css/styles.css - Custom styles and animations for André Karrlein Portfolio v3 */

/* Existing custom styles extracted and enhanced */
body { 
    background-color: #000000; 
    color: #ffffff; 
    font-family: 'Inter', sans-serif; 
}

.material-symbols-outlined { 
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; 
}

.glass-card { 
    background: rgba(38, 38, 38, 0.4); 
    backdrop-filter: blur(20px); 
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), 
                box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                background 0.3s ease;
}

.hero-gradient { 
    background: radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 70%); 
}

/* === NEW COOL ANIMATIONS (subtle, meaningful, performant - keep original design) === */

/* Scroll reveal base - fade up */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.9s cubic-bezier(0.23, 1.0, 0.32, 1), 
                transform 0.9s cubic-bezier(0.23, 1.0, 0.32, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for natural flow */
.reveal-delay-1 { transition-delay: 120ms; }
.reveal-delay-2 { transition-delay: 240ms; }
.reveal-delay-3 { transition-delay: 360ms; }

/* Enhanced glassmorphism card hover: lift + gentle 3D tilt + purple glow */
.glass-card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 30px 60px -15px rgb(168 85 247 / 0.3), 
                0 0 0 1px rgba(168, 85, 247, 0.2);
    background: rgba(45, 45, 45, 0.55);
}

/* Hero portrait container with tilt support */
.hero-image-container {
    transition: transform 0.12s ease-out;
    will-change: transform;
}

.hero-image-container img {
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1), 
                filter 0.6s ease;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
}

.hero-image-container:hover img {
    transform: scale(1.025);
    filter: brightness(1.05) saturate(1.15);
}

/* Magnetic CTA button with light sweep */
.magnetic-btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), 
                box-shadow 0.3s ease;
    box-shadow: 0 10px 15px -3px rgb(168 85 247 / 0.3);
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 50%;
    height: 200%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,0.35),
        transparent
    );
    transition: left 0.6s ease;
    pointer-events: none;
}

.magnetic-btn:hover::before {
    left: 250%;
}

.magnetic-btn:hover {
    box-shadow: 0 15px 25px -8px rgb(168 85 247 / 0.5);
    transform: translateY(-2px);
}

/* Animated scroll progress bar (top of page) */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #A855F7, #E0B3FF);
    z-index: 9999;
    box-shadow: 0 0 10px #A855F7;
    transition: width 0.08s ease-out;
}

/* Elegant back-to-top floating button */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 52px;
    height: 52px;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #C084FC;
    font-size: 22px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.8);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 50;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.4);
    cursor: pointer;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

#back-to-top:hover {
    background: #A855F7;
    color: #ffffff;
    border-color: #A855F7;
    transform: translateY(-6px) scale(1.08);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
}

/* Respect reduced motion - critical for accessibility */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .glass-card,
    .magnetic-btn,
    #back-to-top,
    .hero-image-container,
    .hero-image-container img,
    #scroll-progress {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
    
    .reveal.visible {
        opacity: 1;
    }
    
    .glass-card:hover {
        transform: none;
        box-shadow: 0 25px 50px -12px rgb(168 85 247 / 0.25);
    }
}

/* Subtle animated accent line for sections (optional polish, non-intrusive) */
.section-accent {
    position: relative;
}

.section-accent::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #A855F7, transparent);
    transition: width 1.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.section-accent.visible::after {
    width: 120px;
}

/* SLOWER PING for Mission Status dot */
.slow-ping {
    animation: slow-ping 2.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes slow-ping {
    75%, 100% {
        transform: scale(2.2);
        opacity: 0;
    }
}