body {
    background-color: #030303;
    color: #ffffff;
    overflow-x: hidden;
    font-family: 'Outfit', sans-serif;
}

/* Grainy Gradient Background */
.grainy-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: 
        radial-gradient(circle at 10% 30%, rgba(139, 92, 246, 0.18), transparent 35%),
        radial-gradient(circle at 90% 70%, rgba(6, 182, 212, 0.18), transparent 35%);
    background-color: #030303;
}

.grainy-bg::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
}

html {
    scroll-behavior: smooth;
}

/* Glassmorphism Card (Bento Grid) */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease, border-color 0.5s ease;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 92, 246, 0.25);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Safe Fade-in Up */
.fade-in-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Three.js Canvas Container */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Micro-interactions: Button Glow */
.btn-glow {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-glow:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
    transform: scale(1.03);
}