:root {
    --glow-violet: #8b5cf6;
    --glow-blue: #3b82f6;
    --bg-deep: #020202;
    --grid-line: rgba(255, 255, 255, 0.04);
    --ease-fluid: cubic-bezier(0.19, 1, 0.22, 1);
}

body {
    background-color: var(--bg-deep);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

.custom-cursor-active {
    cursor: none;
    /* Custom cursor active only when tagged */
}

/* --- 1. THE STAGE (Structural Lighting) --- */
/* This replaces the "White Blur" with a controlled horizon */
.stage-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 160vh;
    /* Extended well into the work section */
    overflow: hidden;
    z-index: 0;
    background: radial-gradient(circle at 50% -20%, #1a1a2e 0%, var(--bg-deep) 60%);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    pointer-events: none;
}

/* The Grid Floor: Tilted in 3D space */
.grid-floor {
    position: absolute;
    bottom: -10%;
    left: -50%;
    width: 200%;
    height: 120%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(600px) rotateX(70deg);
    mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
    pointer-events: none;
}

/* --- 5. ABOUT SECTION (Marquee) --- */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: inline-flex;
    gap: 1.5rem;
    animation: marquee 40s linear infinite;
    /* Slower for better viewing */
}

/* Pause animation on hover */
.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

.marquee-item {
    width: 250px;
    height: 350px;
    /* 3:4 Aspect Ratio approx */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.marquee-item:hover {
    transform: scale(1.02);
}

.marquee-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.5s ease;
}

.marquee-item:hover img {
    opacity: 1;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* The "Vector Structure" Glow (The U-Shape) */
/* We simulate the vector curve using a masked radial gradient */
.horizon-glow {
    position: absolute;
    top: 60vh;
    /* Moved up significantly to reach the headline */
    left: 50%;
    transform: translateX(-50%);
    width: 140vw;
    height: 100vh;
    background:
        /* The intense core at the bottom center */
        radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.55) 0%, transparent 40%),
        /* The structural fan (Purple) */
        radial-gradient(ellipse at 50% 100%, rgba(139, 92, 246, 0.9) 20%, transparent 70%),
        /* The wide ambient wings (Blue) */
        radial-gradient(circle at 50% 100%, rgba(59, 130, 246, 0.6) 40%, transparent 80%);
    mix-blend-mode: plus-lighter;
    /* Crucial for the "Neon" look */
    filter: blur(60px);
    /* Soften the edges just enough */
    pointer-events: none;
}



/* --- 2. CHROMATIC CURSOR --- */
#chromatic-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    mix-blend-mode: screen;
    /* Now works because BG is dark */
}

/* --- 3. UI COMPONENTS --- */
.glass-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.5s var(--ease-fluid);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.hero-text-gradient {
    background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    background: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: 0.05;
}

/* --- 4. NEW HEADER & SECTIONS --- */
.nav-pill {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 1rem 3rem;
    background: rgba(10, 10, 10, 0.6);
    /* Darker semi-transparent bg */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Subtle border */
    border-radius: 9999px;
    /* Pill shape */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-link {
    color: #a1a1aa;
    /* Gray-400 equivalent */
    font-size: 0.75rem;
    /* ~12px */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-brand {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.05em;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

/* --- NEW WORK GRID ANIMATIONS --- */
/* EXPANSION ANIMATION */
.expand-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.group:hover .expand-content {
    grid-template-rows: 1fr;
}

/* IMAGE ZOOM */
.zoom-image {
    transition: transform 700ms ease-out, opacity 700ms ease-out;
}

.group:hover .zoom-image {
    transform: scale(1.05);
    opacity: 1;
}

/* SPINNING BORDER BEAM */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.border-beam {
    position: absolute;
    inset: -2px;
    border-radius: 34px;
    background: conic-gradient(from 0deg, transparent 0deg, transparent 80deg, #8b5cf6 120deg, #ec4899 180deg, transparent 240deg, transparent 360deg);
    animation: spin 4s linear infinite;
    z-index: 0;
    opacity: 0.6;
}

/* FLOATING SPARKLE */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.sparkle-icon {
    animation: float 3s ease-in-out infinite;
}

/* INNER MASK FOR BEAM CARD */
.card-inner {
    position: absolute;
    inset: 1px;
    background: #0A0A0A;
    border-radius: 32px;
    z-index: 1;
}

/* --- 3D TILT EFFECT & BADGES --- */
.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.1s ease-out;
    /* Smooth movement */
}

.ai-badge {
    padding: 4px 10px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(139, 92, 246, 0.15);
    /* Default Violet tint */
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #ddd6fe;
    border-radius: 4px;
}

/* --- LIGHTNING & THUNDER STYLES --- */

#lightning-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
    /* Above background, below text */
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.8));
    /* Violet Glow */
}

#flash-overlay {
    position: fixed;
    inset: 0;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
    transition: opacity 0.1s ease-out;
}

/* The Letter Styling */
#hero-title span {
    display: inline-block;
    /* Required for transform to work */
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* "Snug" elastic bounce back */
    transform-origin: center bottom;
    white-space: pre;
    /* Preserves spaces */
}

/* The "Knocked Out" State */
.struck-letter {
    transform: translateY(40px) rotate(15deg) scale(0.9) !important;
    color: #fff !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 1), 0 0 40px #8b5cf6;
}

/* ─── NEW BADGE STYLE ─────────────────────────────────────────── */
.hero-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    border-radius: 50px;
    background: rgba(50, 72, 200, 0.1);
    backdrop-filter: blur(10px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: 0 0 16px rgba(70, 100, 255, 0.25), 0 12px 16px rgba(20, 40, 180, 0.25);
    margin-bottom: 2rem;
    pointer-events: auto;
    transition: transform 0.3s ease;
}

.hero-badge:hover {
    transform: scale(1.04);
}

/* Border overlay via ::after */
.hero-badge::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(160, 185, 255, 0.28);
    pointer-events: none;
    z-index: 3;
}

/* Top highlight shine */
.badge-highlight-top {
    position: absolute;
    top: 0;
    left: 20px;
    width: 61px;
    height: 1px;
    background: linear-gradient(270deg, #badbff00 0%, #ffffff 49.69%, #0080ff00 100%);
    opacity: 0.69;
    z-index: 2;
    pointer-events: none;
}

/* Bottom highlight shine */
.badge-highlight-bottom {
    position: absolute;
    bottom: 0;
    left: auto;
    right: 20px;
    width: 81px;
    height: 1px;
    background: linear-gradient(270deg, #badbff00 0%, #ffffff 49.69%, #0080ff00 100%);
    opacity: 0.52;
    z-index: 2;
    pointer-events: none;
}

/* Content row */
.badge-content {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 13px;
    padding: 12px 26px 12px 16px;
}

/* Icon */
.badge-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.badge-icon svg {
    width: 26px;
    height: 26px;
    animation: spin 14s linear infinite;
}

/* Label */
.badge-label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.15em;
    color: rgba(210, 225, 255, 0.88);
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 0 18px rgba(140, 170, 255, 0.5);
}

/* --- SECTION FADE (Work Section) --- */
#work::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    /* Gradient starts transparent and becomes solid black at 300px for smoother fade */
    background: linear-gradient(to bottom, transparent, #020202 300px, #020202 100%);
    z-index: -1;
    pointer-events: none;
}