@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --cursor-x: 50%;
    --cursor-y: 50%;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #030014;
    overflow-x: hidden;
    color: #e2e8f0;
}

/* --- UTILITIES --- */
.font-mono { font-family: 'JetBrains Mono', monospace; }

input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* --- NAVIGATION TRANSITIONS --- */
.nav-hidden {
    transform: translateY(-200%);
    opacity: 0;
    pointer-events: none;
}

.nav-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* --- CINEMATIC REVEAL ANIMATION --- */
.reveal-on-scroll {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(40px) scale(0.96);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, filter;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
}

/* --- BACKGROUNDS & PARALLAX --- */
.bg-grid {
    background-size: 60px 60px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    mask-image: linear-gradient(to bottom, black 20%, transparent 90%);
    transform: perspective(1000px) rotateX(60deg) translateY(-100px) scale(3);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
    transition: transform 0.2s cubic-bezier(0, 0, 0.2, 1);
}

.orb-1 { width: 600px; height: 600px; background: #4f46e5; top: -20%; left: 10%; }
.orb-2 { width: 500px; height: 500px; background: #a855f7; top: 40%; right: -10%; }
.orb-3 { width: 400px; height: 400px; background: #06b6d4; bottom: -10%; left: 20%; }

/* --- COMPONENT STYLES --- */
.spotlight-card {
    background: rgba(13, 14, 34, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.spotlight-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.08), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1;
}

.spotlight-card:hover::before { opacity: 1; }
.spotlight-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.6);
}

/* Progress Bar */
.progress-bar {
    position: relative;
    overflow: hidden;
}
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

.tab-content-wrapper { transition: opacity 0.3s ease, transform 0.3s ease; }
.tab-content-wrapper.switching { opacity: 0; transform: scale(0.98); filter: blur(4px); }

.text-gradient-primary {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-glow {
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    background-size: 200% 100%;
    transition: all 0.4s ease;
}
.btn-glow:hover { background-position: 100% 0; box-shadow: 0 0 20px rgba(79, 70, 229, 0.4); }

/* --- TERMINAL STYLES --- */
.terminal-cursor::after {
    content: '▋';
    animation: blink 1s step-end infinite;
    margin-left: 4px;
    color: #4ade80;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.terminal-line {
    display: block;
    opacity: 0;
    animation: fadeIn 0.1s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* --- SLIDER STYLING --- */
input[type=range] {
    -webkit-appearance: none;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    margin-top: -6px; /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    border: 2px solid #1e293b;
    transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #1e293b;
    border-radius: 2px;
}

input[type=range]:focus {
    outline: none;
}

/* --- CUSTOM SCROLLBAR --- */
.fancy-scrollbar::-webkit-scrollbar {
    width: 8px; /* Slightly wider for better usability */
}

.fancy-scrollbar::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6); /* Dark Slate track */
    border-radius: 4px;
    margin: 4px 0; /* Breathing room */
}

.fancy-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #4f46e5, #818cf8); /* Indigo Gradient */
    border-radius: 4px;
    border: 2px solid rgba(15, 23, 42, 0.6); /* Creates a 'padding' effect */
    background-clip: padding-box;
}

.fancy-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #4338ca, #6366f1);
    border: 2px solid rgba(15, 23, 42, 0.6);
}

/* Firefox fallback */
.fancy-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #6366f1 rgba(15, 23, 42, 0.6);
}