:root {
  --font-inter: 'Inter', sans-serif;
  --primary: #eab308;
  --primary-hover: #facc15;
  --bg-dark: #09090b;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

body {
  font-family: var(--font-inter);
  background-color: var(--bg-dark);
  overflow-x: hidden;
}

/* Compatibility helper */
.font-space {
  font-family: var(--font-inter);
}

/* Background Technical Grid */
.bg-grid {
  position: fixed;
  inset: 0;
  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);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
  pointer-events: none;
  z-index: 1;
}

/* Noise Texture Overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 9999;
}

/* Exaggerated Typography */
.hero-title {
  font-size: clamp(3rem, 8vw, 4.5rem);
  /* Scaled down from Phase 2 */
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.premium-title {
  background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.gold-title {
  background: linear-gradient(135deg, #eab308 0%, #fef08a 50%, #eab308 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 5s linear infinite;
  filter: drop-shadow(0 5px 15px rgba(234, 179, 8, 0.2));
}

@keyframes shine {
  to { background-position: 200% center; }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
    /* Adjusted from 3rem to prevent cutting off */
    line-height: 1.2;
  }
}

@media (min-width: 769px) {
  .hero-title {
    font-size: 4.5rem;
    /* text-7xl equivalent */
  }
}

.technical-mono {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 300px;
  gap: 1.5rem;
}

.bento-item {
  position: relative;
  background: #0f1115;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-item:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.bento-1 {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-2 {
  grid-column: span 2;
  grid-row: span 1;
}

.bento-3 {
  grid-column: span 1;
  grid-row: span 1;
}

.bento-4 {
  grid-column: span 1;
  grid-row: span 1;
}

@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 250px;
  }

  .bento-1 {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .bento-1,
  .bento-2 {
    grid-column: span 1;
    grid-row: span 1;
  }

  .bento-item {
    min-height: 300px;
  }
}

/* Status Display Stats */
.status-card {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 1.5rem;
  position: relative;
}

.status-pulse {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  position: relative;
  display: inline-block;
  margin-right: 0.5rem;
}

.status-pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid var(--primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Animations & Transitions */
.parallax-move {
  transition: transform 0.1s ease-out;
}

/* Previous animations maintained with cubic-bezier */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in-modal {
  animation: fadeInModal 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Project Card Enhancements */
.group:hover h3 {
  color: var(--primary);
  transition: all 0.3s ease;
}

.group h3 {
  z-index: 2;
  position: relative;
}

/* Restore Marquee Logic */
@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.logo-marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

@media (max-width: 768px) {
  .logo-marquee-container {
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  }
}

.logo-marquee-wrapper {
  display: inline-flex;
  animation: scroll 40s linear infinite;
  padding: 3rem 0;
}

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

.logo-marquee-item {
  width: 280px;
  /* Reduced width for tighter spacing */
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
  /* Reduced padding from 60px to 30px */
}

.logo-marquee-item img {
  height: 120px;
  /* Reduced for mobile */
  width: auto;
  max-width: 250px;
  /* Reduced for mobile */
  object-fit: contain;
  filter: grayscale(100%) opacity(0.6);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 768px) {
  .logo-marquee-item {
    width: 45vw;
    /* Shows exactly 2 logos comfortably with the 5% mask */
    padding: 0 10px;
  }

  .logo-marquee-item img {
    height: 60px;
    max-width: 120px;
  }
}

@media (min-width: 769px) {
  .logo-marquee-item img {
    height: 110px;
    max-width: 240px;
  }
}

.logo-marquee-item:hover img {
  filter: grayscale(0%) opacity(0.9);
  transform: scale(1.1);
}

/* Glossy Navbar & Buttons maintained */
header {
  background: rgba(9, 9, 11, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 200;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--primary);
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover::after {
  transform: translate(-50%, -50%) scale(1);
}

.btn-primary:active {
  transform: scale(0.96);
}

/* Mobile Menu Transition */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
}

#mobile-menu.open {
  max-height: 500px;
  opacity: 1;
}

/* Trust Badges Grid Control */
@media (max-width: 767px) {
  .trust-badges-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
}