@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --brand-dark: #0a0f1c;
    --brand-darker: #05080f;
    --brand-light: #38bdf8;
    --brand-accent: #818cf8;
    --brand-purple: #c084fc;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --neon-blue: 0 0 10px rgba(56, 189, 248, 0.5), 0 0 20px rgba(56, 189, 248, 0.3);
    --neon-purple: 0 0 10px rgba(192, 132, 252, 0.5), 0 0 20px rgba(192, 132, 252, 0.3);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--brand-darker);
    color: #e2e8f0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--brand-darker);
}

::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.6);
}

/* Selection */
::selection {
    background: rgba(56, 189, 248, 0.3);
    color: #fff;
}

/* Modern Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 10px 40px -10px rgba(56, 189, 248, 0.2);
}

/* Typography & Effects */
.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.text-glow {
    text-shadow: var(--neon-blue);
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--brand-light) 50%, var(--brand-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Typing Animation Cursor */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-start infinite;
    color: var(--brand-light);
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Navigation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--brand-light);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--brand-light);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Holographic Text Effect */
.holographic-text {
    background: linear-gradient(
        135deg, 
        #fff 0%, 
        var(--brand-light) 25%, 
        var(--brand-purple) 50%, 
        var(--brand-accent) 75%, 
        #fff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: holographic-shine 4s linear infinite;
}

@keyframes holographic-shine {
    to { background-position: 200% center; }
}

/* HUD Badge */
.hud-badge {
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1), inset 0 0 10px rgba(56, 189, 248, 0.05);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.hud-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: scan-line 3s ease-in-out infinite;
}

@keyframes scan-line {
    0%, 80% { left: -100%; }
    100% { left: 200%; }
}

/* Hero Text Glow */
.hero-glow {
    text-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

.card-shimmer {
    position: relative;
    overflow: hidden;
}

.card-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
}

.card-shimmer:hover::after {
    animation: shimmer-slide 1.5s infinite;
}

@keyframes shimmer-slide {
    100% { left: 200%; }
}

/* 3D Floating Animations */
@keyframes float-rocket {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.animate-rocket {
    animation: float-rocket 4s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.animate-float {
    animation: float-slow 6s ease-in-out infinite;
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite 1s;
}


@keyframes pulse-glow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.02); }
}

.animate-pulse-slow {
    animation: pulse-glow 8s ease-in-out infinite;
}

.perspective-1000 {
    perspective: 1000px;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(90deg, rgba(56,189,248,0.1), rgba(129,140,248,0.1));
    border: 1px solid rgba(56,189,248,0.3);
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(56,189,248,0.2), transparent);
    transition: 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    border-color: var(--brand-light);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
}

/* Mesh Gradient Background (Fallback) */
.bg-mesh {
    background: radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
                radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
                radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    opacity: 0.4;
}

/* Services Focus Mode (Removed Blur, Enhanced Glow) */
.services-hover-container .glass-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.services-hover-container .glass-card:hover {
    transform: scale(1.08) translateY(-15px) rotateX(5deg);
    z-index: 50;
    border-color: var(--brand-light);
    box-shadow: 
        0 20px 50px -10px rgba(56, 189, 248, 0.5),
        0 0 20px rgba(56, 189, 248, 0.3) inset; /* Inner Glow */
}

.services-hover-container:hover .glass-card:not(:hover) {
    transform: scale(0.95);
    opacity: 0.7; /* Subtle dim instead of blur */
}

/* 3D Parallax Layers - Enhanced Depth */
.transform-z-20 { transform: translateZ(30px); }
.transform-z-30 { transform: translateZ(50px); }
.transform-z-50 { transform: translateZ(80px); }

/* Meteor Animation */
.meteor {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 2px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    opacity: 0;
    transform: rotate(-45deg);
    animation: meteor-shower 3s ease-in-out infinite;
}

.meteor::before {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 1), transparent);
}

@keyframes meteor-shower {
    0% {
        opacity: 0;
        transform: rotate(-45deg) translateX(-200px);
    }
    10% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(-45deg) translateX(-1000px);
    }
}

/* Floating Tech Orb */
.tech-orb {
    position: relative;
    transform-style: preserve-3d;
    animation: orb-float 6s ease-in-out infinite;
}

.tech-orb::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, var(--brand-light), transparent);
    animation: spin-slow 4s linear infinite;
    opacity: 0.5;
}

@keyframes orb-float {
    0%, 100% { transform: translateZ(40px) translateY(0); }
    50% { transform: translateZ(40px) translateY(-10px); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Loading Spinner - 3D Cube */
.loader-container {
    position: fixed;
    inset: 0;
    background: var(--brand-darker);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-container.hidden {
    opacity: 0;
    visibility: hidden;
}

.cube-wrapper {
    width: 80px;
    height: 80px;
    perspective: 1000px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: spin-cube 6s infinite linear;
}

.face {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px solid var(--brand-light);
    background: rgba(56, 189, 248, 0.05);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1) inset, 0 0 30px rgba(56, 189, 248, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: visible;
}

.face::after {
    content: '';
    width: 40%;
    height: 40%;
    background: var(--brand-light);
    opacity: 0.2;
    filter: blur(5px);
    border-radius: 50%;
}

.front  { transform: rotateY(0deg) translateZ(40px); }
.back   { transform: rotateY(180deg) translateZ(40px); }
.right  { transform: rotateY(90deg) translateZ(40px); }
.left   { transform: rotateY(-90deg) translateZ(40px); }
.top    { transform: rotateX(90deg) translateZ(40px); }
.bottom { transform: rotateX(-90deg) translateZ(40px); }

@keyframes spin-cube {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

.loading-progress {
    width: 0%;
    animation: load-progress 2s ease-in-out forwards;
}

@keyframes load-progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Glitch Animations */
@keyframes glitch-1 {
    0% { clip-path: inset(20% 0 80% 0); transform: translate(-2px, 1px); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
    40% { clip-path: inset(40% 0 50% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -2px); }
    80% { clip-path: inset(10% 0 70% 0); transform: translate(-2px, 1px); }
    100% { clip-path: inset(30% 0 50% 0); transform: translate(2px, -1px); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(10% 0 60% 0); transform: translate(2px, -1px); }
    20% { clip-path: inset(30% 0 20% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(70% 0 10% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(20% 0 50% 0); transform: translate(-2px, 1px); }
    80% { clip-path: inset(50% 0 30% 0); transform: translate(2px, -1px); }
    100% { clip-path: inset(0% 0 80% 0); transform: translate(-2px, 2px); }
}

.animate-glitch-1 {
    animation: glitch-1 0.4s infinite linear alternate-reverse;
}

.animate-glitch-2 {
    animation: glitch-2 0.4s infinite linear alternate-reverse;
}

/* Gradient Text Animation */
@keyframes gradient-x {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradient-x 3s ease infinite;
}

/* Project Image Glitch Scan */
.project-image-container {
    position: relative;
    overflow: hidden;
}

/* Scanline Effect Removed */

/* Neon Pulse for Active Filter */
.filter-btn.active {
    box-shadow: 0 0 15px var(--brand-light), inset 0 0 10px rgba(56, 189, 248, 0.2);
    animation: neon-pulse 2s infinite alternate;
}

.neon-pulse {
    animation: neon-pulse 2s infinite alternate;
}

@keyframes neon-pulse {
    from { box-shadow: 0 0 10px var(--brand-light), inset 0 0 5px rgba(56, 189, 248, 0.2); }
    to { box-shadow: 0 0 25px var(--brand-light), inset 0 0 15px rgba(56, 189, 248, 0.4); }
}

.fade-pulse {
    animation: fade-pulse 2s infinite alternate;
}

@keyframes fade-pulse {
    from { opacity: 0.3; box-shadow: 0 0 10px var(--brand-light); }
    to { opacity: 0.8; box-shadow: 0 0 20px var(--brand-light); }
}

