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

:root {
  color-scheme: dark;
  --bg-main: #030712;
  --card-bg: rgba(255, 255, 255, 0.02);
  --card-border: rgba(255, 255, 255, 0.05);
  --glow-color: rgba(56, 189, 248, 0.5);
}

body {
  background-color: #000000;
  color: #f8fafc;
  font-family: 'Instrument Sans', sans-serif;
  overflow-x: hidden;
  /* Super subtle deep space background */
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(10, 10, 16, 0.9), transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(8, 12, 18, 0.9), transparent 50%);
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: 'Sora', sans-serif;
}

/* Grid Noise Texture overlay */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* 3D Container & Elements */
.perspective-1000 {
  perspective: 1200px;
}

.preserve-3d {
  transform-style: preserve-3d;
}

.card-3d {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
  position: relative;
  overflow: hidden;
}

/* Animated glowing border effect on hover */
.card-3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(45deg, transparent, var(--glow-color), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.card-3d:hover::before {
  opacity: 1;
}

.card-3d:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(56, 189, 248, 0.15);
}

.card-3d-inner {
  transform: translateZ(40px); /* Enhanced 3D lift */
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

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

.animate-float-slow {
  animation: float 12s ease-in-out infinite reverse;
}

@keyframes textShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.text-gradient-animated {
  background: linear-gradient(to right, #4da2ff, #a855f7, #f6b94d, #4da2ff);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: textShine 4s linear infinite;
}

/* Infinite Marquee for AI Models */
.marquee-container {
  display: flex;
  width: 200%;
  animation: marquee 25s linear infinite;
}

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

.marquee-container:hover {
  animation-play-state: paused;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

/* Base Utility Classes */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Navbar Animated Underline */
.nav-link {
  position: relative;
  display: inline-block;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #4da2ff;
  transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(77, 162, 255, 0.8);
}

.nav-link:hover {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

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

/* Navbar smooth scroll styling */
.navbar-scrolled {
  background-color: rgba(3, 7, 18, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(77, 162, 255, 0.1) !important;
  padding-top: 0.8rem !important;
  padding-bottom: 0.8rem !important;
}
