/* Custom styles */
html {
    scroll-behavior: smooth;
}

/* Custom cursor */
body {
    cursor: none;
}

.custom-cursor {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.7;
    mix-blend-mode: difference;
    transition: opacity 0.2s ease, width 0.2s ease, height 0.2s ease;
    transform: translate(0, 0) translate(-50%, -50%);
    will-change: transform;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5),
                0 0 20px rgba(255, 255, 255, 0.3),
                0 0 30px rgba(255, 255, 255, 0.1);
}

.custom-cursor-trail {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: opacity 0.2s ease, border-color 0.2s ease, width 0.2s ease, height 0.2s ease;
    transform: translate(0, 0) translate(-50%, -50%);
    will-change: transform;
}

/* Interactive elements cursor effects */
a, button, [role="button"] {
    cursor: none;
}

a:hover ~ .custom-cursor,
button:hover ~ .custom-cursor,
[role="button"]:hover ~ .custom-cursor {
    width: 12px;
    height: 12px;
    background: white;
    opacity: 1;
}

a:hover ~ .custom-cursor-trail,
button:hover ~ .custom-cursor-trail,
[role="button"]:hover ~ .custom-cursor-trail {
    width: 32px;
    height: 32px;
    border-color: rgba(255, 255, 255, 0.5);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444444;
}

/* Grid background pattern */
.bg-grid-white\[0\.02\] {
    background-size: 50px 50px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

/* Glitch effect */
.glitch-text {
    position: relative;
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.3),
                -0.025em -0.05em 0 rgba(0, 255, 0, 0.3),
                0.025em 0.05em 0 rgba(0, 0, 255, 0.3);
    animation: glitch 4000ms infinite;
}

@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 rgba(255, 255, 255, 0.3),
                    -0.05em -0.025em 0 rgba(255, 255, 255, 0.3),
                    -0.025em 0.05em 0 rgba(255, 255, 255, 0.3);
    }
    14% {
        text-shadow: 0.05em 0 0 rgba(255, 255, 255, 0.3),
                    -0.05em -0.025em 0 rgba(255, 255, 255, 0.3),
                    -0.025em 0.05em 0 rgba(255, 255, 255, 0.3);
    }
    15% {
        text-shadow: -0.05em -0.025em 0 rgba(255, 255, 255, 0.3),
                    0.025em 0.025em 0 rgba(255, 255, 255, 0.3),
                    -0.05em -0.05em 0 rgba(255, 255, 255, 0.3);
    }
    49% {
        text-shadow: -0.05em -0.025em 0 rgba(255, 255, 255, 0.3),
                    0.025em 0.025em 0 rgba(255, 255, 255, 0.3),
                    -0.05em -0.05em 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        text-shadow: 0.025em 0.05em 0 rgba(255, 255, 255, 0.3),
                    0.05em 0 0 rgba(255, 255, 255, 0.3),
                    0 -0.05em 0 rgba(255, 255, 255, 0.3);
    }
    99% {
        text-shadow: 0.025em 0.05em 0 rgba(255, 255, 255, 0.3),
                    0.05em 0 0 rgba(255, 255, 255, 0.3),
                    0 -0.05em 0 rgba(255, 255, 255, 0.3);
    }
    100% {
        text-shadow: -0.025em 0 0 rgba(255, 255, 255, 0.3),
                    -0.025em -0.025em 0 rgba(255, 255, 255, 0.3),
                    -0.025em -0.05em 0 rgba(255, 255, 255, 0.3);
    }
}

/* Typing animation */
.typing-text {
    border-right: 2px solid rgba(255, 255, 255, 0.75);
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3s steps(40, end),
               blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: rgba(255, 255, 255, 0.75) }
}

/* Smooth fade-in animation for sections */
section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Hover effects */
.hover\:transform:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* Team grid styles */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* For single items, center them */
.team-grid:only-child {
    place-items: center;
}

/* Ensure grid items are centered when less than full width */
.team-grid > * {
    margin: 0 auto;
}

/* Responsive adjustments for team grids */
@media (min-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* When there's only one item in the grid */
.team-grid:has(> :only-child) {
    justify-content: center;
    grid-template-columns: minmax(auto, 300px);
}

/* Slow pulse animation */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
