/* ============================================
   NARDL-Fourier Documentation Stylesheet
   Modern, vibrant design with gradients
   ============================================ */

:root {
  /* Primary Color Palette - Deep Blues & Purples */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-dark: #4c63d2;
  --primary-light: #8b9df0;
  
  /* Accent Colors */
  --accent-cyan: #00d4ff;
  --accent-pink: #ff6b9d;
  --accent-orange: #ffa62b;
  --accent-green: #00c897;
  
  /* Background Colors */
  --bg-dark: #0a0f1c;
  --bg-card: #111827;
  --bg-card-hover: #1a2332;
  --bg-code: #1e293b;
  
  /* Text Colors */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Borders & Shadows */
  --border-color: rgba(148, 163, 184, 0.1);
  --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* ============================================
   Background Effects
   ============================================ */
.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 70%);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  background: rgba(10, 15, 28, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo {
  width: 40px;
  height: 40px;
  background: var(--primary-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: white;
}

.nav-title {
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

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

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

.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a.active::after {
  width: 100%;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(102, 126, 234, 0.15);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--primary-light);
  margin-bottom: 2rem;
}

.hero-badge svg {
  width: 16px;
  height: 16px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  max-width: 900px;
}

.hero-title .gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin-bottom: 3rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--primary-light);
}

/* ============================================
   Feature Cards
   ============================================ */
.features {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(102, 126, 234, 0.3);
  box-shadow: var(--shadow-glow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

.feature-icon.blue {
  background: rgba(102, 126, 234, 0.15);
  color: #667eea;
}

.feature-icon.purple {
  background: rgba(118, 75, 162, 0.15);
  color: #764ba2;
}

.feature-icon.cyan {
  background: rgba(0, 212, 255, 0.15);
  color: #00d4ff;
}

.feature-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.feature-card .learn-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-light);
  text-decoration: none;
  margin-top: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: gap 0.3s ease;
}

.feature-card .learn-more:hover {
  gap: 0.75rem;
}

/* ============================================
   Code Blocks
   ============================================ */
.code-section {
  padding: 6rem 2rem;
  background: rgba(17, 24, 39, 0.5);
}

.code-container {
  max-width: 900px;
  margin: 0 auto;
}

pre {
  background: var(--bg-code);
  border-radius: 16px;
  padding: 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  position: relative;
}

pre code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px 16px 0 0;
  border-bottom: 1px solid var(--border-color);
  margin: -1.5rem -1.5rem 1rem;
}

.code-dots {
  display: flex;
  gap: 0.5rem;
}

.code-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-lang {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Syntax Highlighting */
.token.comment { color: #6b7280; font-style: italic; }
.token.keyword { color: #c084fc; }
.token.string { color: #86efac; }
.token.number { color: #fbbf24; }
.token.function { color: #67e8f9; }
.token.class-name { color: #f9a8d4; }
.token.operator { color: #94a3b8; }
.token.punctuation { color: #94a3b8; }
.token.parameter { color: #fb923c; }

/* ============================================
   Documentation Content
   ============================================ */
.doc-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 80px;
}

.sidebar {
  width: 280px;
  position: fixed;
  top: 80px;
  left: 0;
  bottom: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  padding: 2rem;
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 600;
}

.sidebar-links {
  list-style: none;
}

.sidebar-links li {
  margin-bottom: 0.5rem;
}

.sidebar-links a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.sidebar-links a:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--text-primary);
}

.sidebar-links a.active {
  background: rgba(102, 126, 234, 0.15);
  color: var(--primary-light);
  font-weight: 500;
}

.doc-content {
  flex: 1;
  margin-left: 280px;
  padding: 3rem 4rem;
  max-width: calc(100% - 280px);
}

.doc-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.doc-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.doc-content h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.doc-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.doc-content ul, .doc-content ol {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.doc-content li {
  margin-bottom: 0.5rem;
}

.doc-content code:not(pre code) {
  background: rgba(102, 126, 234, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--primary-light);
}

/* ============================================
   Callout Boxes
   ============================================ */
.callout {
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.callout-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.callout-info {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.callout-warning {
  background: rgba(255, 166, 43, 0.1);
  border: 1px solid rgba(255, 166, 43, 0.3);
}

.callout-success {
  background: rgba(0, 200, 151, 0.1);
  border: 1px solid rgba(0, 200, 151, 0.3);
}

.callout-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.callout p {
  margin: 0;
  font-size: 0.95rem;
}

/* ============================================
   Tables
   ============================================ */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--bg-card);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

td {
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(102, 126, 234, 0.05);
}

/* ============================================
   Math Formulas (MathJax)
   ============================================ */
.math-block {
  background: rgba(102, 126, 234, 0.05);
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
  overflow-x: auto;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 4rem 2rem 2rem;
  margin-top: 6rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
}

.footer-section h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  padding: 0.4rem 0;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--primary-light);
  text-decoration: none;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
  .sidebar {
    display: none;
  }
  
  .doc-content {
    margin-left: 0;
    max-width: 100%;
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .hero {
    padding: 6rem 1.5rem 3rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }
  
  .btn {
    justify-content: center;
  }
  
  .features {
    padding: 4rem 1.5rem;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

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

.animate-fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
