/* CSS Variables & Theme Configuration */
:root {
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Color Palette - Premium Light Theme */
  --bg-color: #ffffff;
  --text-primary: #1f1f1f;
  --text-secondary: #5f6368;
  --text-tertiary: #80868b;
  
  --color-blue: #2c64ed;
  --color-blue-hover: #1a4fc2;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-nav-bg: rgba(255, 255, 255, 0.8);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Particles Canvas */
#particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: auto; /* Allow canvas to capture mouse movements */
}

#particles-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Header & Navigation */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: var(--color-nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition-smooth);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  transition: var(--transition-smooth);
}

.logo-icon {
  width: 24px;
  height: 24px;
  color: var(--color-blue);
  animation: pulseLogo 4s infinite ease-in-out;
}

.logo-text {
  font-family: var(--font-sans);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-item {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-smooth);
  position: relative;
  padding: 4px 0;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.nav-item:hover {
  color: var(--text-primary);
}

.nav-item:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Button Component Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 500;
  border-radius: 9999px;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--text-primary);
  color: var(--bg-color);
}

.btn-primary:hover {
  background-color: #333333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border-color: rgba(0, 0, 0, 0.15);
}

.btn-secondary:hover {
  background-color: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.btn-sm {
  font-size: 0.875rem;
  padding: 8px 16px;
  height: 36px;
}

.btn-lg {
  font-size: 1rem;
  padding: 14px 28px;
  height: 48px;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  z-index: 2; /* Sits above canvas background */
  pointer-events: none; /* Let pointer events pass through to canvas behind it */
}

.hero-container {
  max-width: 800px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  pointer-events: auto; /* Reactivate pointer events for elements inside hero */
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Badge Alert style */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(44, 100, 237, 0.06);
  border: 1px solid rgba(44, 100, 237, 0.15);
  padding: 6px 14px;
  border-radius: 9999px;
  color: var(--color-blue);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-blue);
  border-radius: 50%;
  animation: blinkDot 1.5s infinite alternate ease-in-out;
}

/* Hero Typography */
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 620px;
  font-weight: 400;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

/* GUI Toggle Button */
.gui-toggle-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 101;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.gui-toggle-btn:hover {
  color: var(--text-primary);
  background-color: #ffffff;
  transform: rotate(45deg);
  box-shadow: var(--shadow-md);
}

/* lil-gui custom styling to match premium light theme */
.lil-gui {
  --background-color: rgba(255, 255, 255, 0.9) !important;
  --text-color: #1f1f1f !important;
  --title-background-color: #f1f3f4 !important;
  --widget-color: #ffffff !important;
  --hover-color: #e8f0fe !important;
  --focus-color: #2c64ed !important;
  --number-color: #1a73e8 !important;
  --string-color: #137333 !important;
  font-family: var(--font-sans) !important;
  font-size: 11px !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid var(--color-border) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  overflow: hidden;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseLogo {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.85;
  }
}

@keyframes blinkDot {
  0% {
    transform: scale(0.8);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .main-nav {
    display: none; /* Hide center links on mobile */
  }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .btn-lg {
    width: 100%;
  }
}
