/* ===================================
   MAIN INDEX CSS - CLEAN & ORGANIZED
   =================================== */

/* ===== CSS VARIABLES ===== */
:root {
  /* Light Theme Colors */
  --bg-primary: linear-gradient(135deg, #f0f3f8 0%, #e8f0fe 50%, #f0f3f8 100%);
  --bg-overlay: rgba(240, 243, 248, 0.9);
  --bg-overlay-light: rgba(240, 243, 248, 0.6);

  /* Blob Colors */
  --blob-primary: rgba(0, 174, 239, 0.7);
  --blob-secondary: rgba(31, 31, 91, 0.4);
  --blob-tertiary: rgba(0, 174, 239, 0.5);
  --blob-quaternary: rgba(99, 102, 241, 0.3);

  /* Pattern Settings */
  --pattern-opacity: 0.25;
  --blur-amount: 60px;

  /* Layout Variables */
  --section-spacing: 80px;
  --section-padding: 60px 30px;
  --container-max-width: 1400px;
  --section-min-height: 600px;

  /* Animation Variables */
  --animation-duration: 0.3s;
  --animation-easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: linear-gradient(135deg, #0a0f1c 0%, #0f1629 25%, #1a1f35 50%, #0f1629 75%, #0a0f1c 100%);
  --bg-overlay: rgba(10, 15, 28, 0.95);
  --bg-overlay-light: rgba(10, 15, 28, 0.7);

  --blob-primary: rgba(59, 130, 246, 0.15);
  --blob-secondary: rgba(0, 174, 239, 0.12);
  --blob-tertiary: rgba(99, 102, 241, 0.1);
  --blob-quaternary: rgba(29, 78, 216, 0.08);

  --pattern-opacity: 0.08;
  --blur-amount: 120px;
}

/* ===== BASE STYLES ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg-primary);
  overflow-x: hidden;
  transition: background 0.5s ease;
  line-height: 1.6;
  color: #374151;
}

[data-theme="dark"] body {
  color: #f1f5f9;
}

/* ===== MAIN CONTAINER ===== */
.main-container {
  position: relative;
  min-height: 100vh;
  width: 100%;
}

/* ===== ENHANCED BACKGROUND ===== */
.enhanced-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}

/* ===== GRADIENT BLOBS ===== */
.gradient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(var(--blur-amount));
  opacity: 0.8;
  animation: float-blob 15s ease-in-out infinite;
  transition: all 0.5s ease;
  will-change: transform;
}

.blob-1 {
  top: 10%;
  right: 15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--blob-primary) 0%, transparent 70%);
  animation-delay: 0s;
}

.blob-2 {
  bottom: 20%;
  left: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--blob-secondary) 0%, transparent 70%);
  animation-delay: -5s;
}

.blob-3 {
  top: 40%;
  left: 50%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--blob-tertiary) 0%, transparent 70%);
  animation-delay: -10s;
  transform: translate(-50%, -50%);
}

.blob-4 {
  bottom: 10%;
  right: 20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--blob-quaternary) 0%, transparent 70%);
  animation-delay: -7s;
}

/* ===== WIREFRAME PATTERNS ===== */
.wireframe-pattern {
  position: absolute;
  background-image: url("https://hebbkx1anhila5yf.public.blob.vercel-storage.com/image-a4tiRwkZuzKBtaWiIqB9M6ON45E77E.png");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: var(--pattern-opacity);
  filter: blur(0.3px);
  border-radius: 50%;
  transition: all 0.5s ease;
  will-change: transform;
}

[data-theme="dark"] .wireframe-pattern {
  filter: blur(0.2px) brightness(1.2) contrast(1.1);
  opacity: 0.15;
}

.pattern-1 {
  top: 8%;
  right: 8%;
  width: 650px;
  height: 650px;
  animation: circular-float-1 25s linear infinite;
}

.pattern-2 {
  bottom: 12%;
  left: 8%;
  width: 580px;
  height: 580px;
  animation: circular-float-2 30s linear infinite reverse;
}

.pattern-3 {
  top: 35%;
  left: 15%;
  width: 520px;
  height: 520px;
  animation: circular-float-3 35s linear infinite;
  opacity: calc(var(--pattern-opacity) * 0.7);
}

.pattern-4 {
  bottom: 30%;
  right: 12%;
  width: 480px;
  height: 480px;
  animation: circular-float-4 28s linear infinite reverse;
  opacity: calc(var(--pattern-opacity) * 0.8);
}

/* ===== SIDE GRADIENTS ===== */
.side-gradient {
  position: absolute;
  top: 0;
  height: 100%;
  width: 150px;
  pointer-events: none;
  z-index: 1;
  transition: background 0.5s ease;
}

.left-gradient {
  left: 0;
  background: linear-gradient(90deg, var(--bg-overlay) 0%, var(--bg-overlay-light) 50%, transparent 100%);
}

.right-gradient {
  right: 0;
  background: linear-gradient(270deg, var(--bg-overlay) 0%, var(--bg-overlay-light) 50%, transparent 100%);
}

[data-theme="dark"] .left-gradient {
  background: linear-gradient(
    90deg,
    rgba(10, 15, 28, 0.98) 0%,
    rgba(10, 15, 28, 0.8) 40%,
    rgba(26, 31, 53, 0.4) 70%,
    transparent 100%
  );
}

[data-theme="dark"] .right-gradient {
  background: linear-gradient(
    270deg,
    rgba(10, 15, 28, 0.98) 0%,
    rgba(10, 15, 28, 0.8) 40%,
    rgba(26, 31, 53, 0.4) 70%,
    transparent 100%
  );
}

/* ===== ANIMATIONS ===== */
@keyframes float-blob {
  0%,
  100% {
    transform: translateY(0) translateX(0) scale(1);
  }
  25% {
    transform: translateY(-30px) translateX(15px) scale(1.05);
  }
  50% {
    transform: translateY(0) translateX(-10px) scale(0.95);
  }
  75% {
    transform: translateY(20px) translateX(8px) scale(1.02);
  }
}

@keyframes circular-float-1 {
  0% {
    transform: rotate(0deg) translateX(40px) rotate(0deg);
  }
  25% {
    transform: rotate(90deg) translateX(40px) rotate(-90deg);
  }
  50% {
    transform: rotate(180deg) translateX(40px) rotate(-180deg);
  }
  75% {
    transform: rotate(270deg) translateX(40px) rotate(-270deg);
  }
  100% {
    transform: rotate(360deg) translateX(40px) rotate(-360deg);
  }
}

@keyframes circular-float-2 {
  0% {
    transform: rotate(0deg) translateX(50px) rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(90deg) translateX(50px) rotate(-90deg) scale(1.08);
  }
  50% {
    transform: rotate(180deg) translateX(50px) rotate(-180deg) scale(0.92);
  }
  75% {
    transform: rotate(270deg) translateX(50px) rotate(-270deg) scale(1.04);
  }
  100% {
    transform: rotate(360deg) translateX(50px) rotate(-360deg) scale(1);
  }
}

@keyframes circular-float-3 {
  0% {
    transform: rotate(0deg) translateX(35px) rotate(0deg);
  }
  33% {
    transform: rotate(120deg) translateX(35px) rotate(-120deg);
  }
  66% {
    transform: rotate(240deg) translateX(35px) rotate(-240deg);
  }
  100% {
    transform: rotate(360deg) translateX(35px) rotate(-360deg);
  }
}

@keyframes circular-float-4 {
  0% {
    transform: rotate(0deg) translateX(60px) rotate(0deg) scale(1);
  }
  20% {
    transform: rotate(72deg) translateX(60px) rotate(-72deg) scale(1.06);
  }
  40% {
    transform: rotate(144deg) translateX(60px) rotate(-144deg) scale(0.94);
  }
  60% {
    transform: rotate(216deg) translateX(60px) rotate(-216deg) scale(1.03);
  }
  80% {
    transform: rotate(288deg) translateX(60px) rotate(-288deg) scale(0.97);
  }
  100% {
    transform: rotate(360deg) translateX(60px) rotate(-360deg) scale(1);
  }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop */
@media (min-width: 1400px) {
  :root {
    --section-padding: 80px 40px;
    --section-spacing: 100px;
  }
}

/* Desktop */
@media (max-width: 1200px) {
  :root {
    --section-padding: 60px 30px;
    --section-spacing: 80px;
    --blur-amount: 50px;
  }

  [data-theme="dark"] {
    --blur-amount: 100px;
  }

  .gradient-blob {
    opacity: 0.7;
  }

  .blob-1,
  .blob-2 {
    width: 500px;
    height: 500px;
  }

  .blob-3,
  .blob-4 {
    width: 400px;
    height: 400px;
  }

  .pattern-1,
  .pattern-2 {
    width: 550px;
    height: 550px;
  }

  .pattern-3,
  .pattern-4 {
    width: 450px;
    height: 450px;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --section-padding: 50px 25px;
    --section-spacing: 60px;
    --blur-amount: 40px;
    --section-min-height: 500px;
  }

  [data-theme="dark"] {
    --blur-amount: 80px;
  }

  .gradient-blob {
    opacity: 0.6;
  }

  .blob-1,
  .blob-2,
  .blob-3,
  .blob-4 {
    width: 350px;
    height: 350px;
  }

  .pattern-1,
  .pattern-2 {
    width: 400px;
    height: 400px;
  }

  .pattern-3,
  .pattern-4 {
    width: 350px;
    height: 350px;
  }

  .side-gradient {
    width: 100px;
  }
}

/* Mobile Large */
@media (max-width: 768px) {
  :root {
    --section-padding: 40px 20px;
    --section-spacing: 50px;
    --blur-amount: 30px;
    --section-min-height: 450px;
  }

  [data-theme="dark"] {
    --blur-amount: 60px;
  }

  .gradient-blob {
    opacity: 0.4;
  }

  .blob-1,
  .blob-2,
  .blob-3,
  .blob-4 {
    width: 280px;
    height: 280px;
  }

  .pattern-1,
  .pattern-2 {
    width: 320px;
    height: 320px;
  }

  .pattern-3,
  .pattern-4 {
    width: 280px;
    height: 280px;
  }

  .side-gradient {
    width: 80px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  :root {
    --section-padding: 30px 15px;
    --section-spacing: 40px;
    --blur-amount: 25px;
    --section-min-height: 400px;
  }

  [data-theme="dark"] {
    --blur-amount: 50px;
  }

  .gradient-blob {
    opacity: 0.3;
  }

  .blob-1,
  .blob-2,
  .blob-3,
  .blob-4 {
    width: 200px;
    height: 200px;
  }

  .pattern-1,
  .pattern-2 {
    width: 220px;
    height: 220px;
  }

  .pattern-3,
  .pattern-4 {
    width: 200px;
    height: 200px;
  }

  .side-gradient {
    width: 50px;
  }
}

/* Mobile Small */
@media (max-width: 360px) {
  :root {
    --section-padding: 25px 10px;
    --section-spacing: 30px;
    --section-min-height: 350px;
  }

  .blob-1,
  .blob-2,
  .blob-3,
  .blob-4 {
    width: 150px;
    height: 150px;
  }

  .pattern-1,
  .pattern-2 {
    width: 180px;
    height: 180px;
  }

  .pattern-3,
  .pattern-4 {
    width: 160px;
    height: 160px;
  }

  .side-gradient {
    width: 30px;
  }
}

/* ===== ACCESSIBILITY ===== */

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .gradient-blob,
  .wireframe-pattern {
    animation: none !important;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --blob-primary: rgba(0, 174, 239, 0.9);
    --blob-secondary: rgba(31, 31, 91, 0.8);
    --blob-tertiary: rgba(0, 174, 239, 0.8);
    --blob-quaternary: rgba(99, 102, 241, 0.7);
    --pattern-opacity: 0.4;
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

/* GPU acceleration for animations */
.gradient-blob,
.wireframe-pattern {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Optimize images */
img {
  max-width: 100%;
  height: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Optimize fonts */
@font-face {
  font-family: "Inter";
  font-display: swap;
}

/* ===== UTILITY CLASSES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section-spacing {
  margin-bottom: var(--section-spacing);
}

/* ===== PRINT STYLES ===== */
@media print {
  .enhanced-background,
  .gradient-blob,
  .wireframe-pattern,
  .side-gradient {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  * {
    animation: none !important;
    transition: none !important;
  }
}
