/* Base & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Glassmorphism Utilities */
.glass {
    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);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-nav {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(255, 255, 255, 0.1);
}

/* Service Tabs */
.service-tab {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
}

.service-tab:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.03);
}

.service-tab.active-tab {
    background: #fff;
    border-color: #fff;
    color: #000;
    box-shadow: 0 4px 20px -4px rgba(255, 255, 255, 0.3);
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Hide scrollbar for carousels */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(-20px) translateX(10px);
    }
    50% {
        transform: translateY(-10px) translateX(-10px);
    }
    75% {
        transform: translateY(-30px) translateX(5px);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    33% {
        transform: translateY(30px) translateX(-20px);
    }
    66% {
        transform: translateY(-20px) translateX(20px);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-float {
    animation: float 20s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 25s ease-in-out infinite;
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* Project Card */
.project-card {
    flex: 0 0 auto;
    width: 380px;
    scroll-snap-align: start;
}

@media (max-width: 640px) {
    .project-card {
        width: 320px;
    }
}

/* Gradient Radial */
.bg-gradient-radial {
    background: radial-gradient(circle, var(--tw-gradient-from), var(--tw-gradient-to));
}

/* Selection */
::selection {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Smooth transitions */
a, button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Nav link hover effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

/* Terminal text glow */
.terminal-glow {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Image treatments */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent text selection on UI elements */
button, .glass, .glass-strong {
    user-select: none;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ee4705;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (min-width: 768px) {
    body, a, button { cursor: none !important; }
}

/* White base with grey glow - clean glassmorphism look */
.cursor-dot {
    background: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9),
                0 0 20px 4px rgba(255, 255, 255, 0.5),
                0 0 40px 8px rgba(148, 163, 184, 0.3);
}

.cursor-ring {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.4),
                0 0 15px rgba(255, 255, 255, 0.3),
                inset 0 0 15px rgba(148, 163, 184, 0.1);
}

/* Hover - intensify white/slate glow */
.cursor-hover .cursor-dot {
    transform: scale(2);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 1),
                0 0 30px 6px rgba(255, 255, 255, 0.6),
                0 0 60px 12px rgba(148, 163, 184, 0.4);
}

.cursor-hover .cursor-ring {
    transform: scale(1.4);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.5),
                0 0 30px rgba(255, 255, 255, 0.5),
                inset 0 0 20px rgba(148, 163, 184, 0.15);
}


/* project models */

/* Custom scrollbar for modal */
#modalProjectsGrid::-webkit-scrollbar {
    width: 8px;
}

#modalProjectsGrid::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 4px;
}

#modalProjectsGrid::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.8);
    border-radius: 4px;
}

#modalProjectsGrid::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6);
}

/* Line clamp utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* Terminal scrollbar */
pre::-webkit-scrollbar {
    width: 4px;
}
pre::-webkit-scrollbar-thumb {
    background: #3e3e3e;
    border-radius: 2px;
}

 /* Cursor blink animation */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Prevent text selection */
pre {
    user-select: none;
}