/* ==========================================================================
   Johnny Silva - Quantitative Trading Portfolio
   Aesthetic inspired by aijail.io + FinTech / Quantitative Trading Dark Mode
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Dark Theme (Default) */
  --bg-primary: #07090e;
  --bg-secondary: #0d121d;
  --bg-card: rgba(13, 18, 29, 0.75);
  --bg-card-hover: rgba(20, 27, 44, 0.9);
  --bg-input: #121826;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --border-line: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(16, 185, 129, 0.35);

  /* Accents */
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.22);
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.22);
  --accent-red: #ef4444;

  /* Gradients */
  --gradient-spectrum: linear-gradient(135deg, #10b981 0%, #06b6d4 50%, #f59e0b 100%);
  --glow-blur: 130px;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: #ffffff;
  --bg-input: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #94a3b8;
  --border-line: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(16, 185, 129, 0.5);
  --accent-emerald-glow: rgba(16, 185, 129, 0.15);
  --accent-cyan-glow: rgba(6, 182, 212, 0.15);
  --accent-gold-glow: rgba(245, 158, 11, 0.15);
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  transition: background-color 0.25s ease, color 0.25s ease;
}

body {
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Ambient Background Glows */
.ambient-glow-top {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-emerald-glow) 0%, rgba(6, 182, 212, 0.1) 40%, transparent 70%);
  filter: blur(var(--glow-blur));
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-bottom {
  position: absolute;
  bottom: 0;
  right: 10%;
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-gold-glow) 0%, rgba(16, 185, 129, 0.08) 50%, transparent 70%);
  filter: blur(var(--glow-blur));
  pointer-events: none;
  z-index: 0;
}

/* Glassmorphism Cards */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-line);
  border-radius: 1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.4);
}

/* Navigation Blur Header */
.header-glass {
  background: rgba(7, 9, 14, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-line);
  transition: all 0.25s ease;
}

[data-theme="light"] .header-glass {
  background: rgba(248, 250, 252, 0.85);
}

/* Terminal Component (aijail.io inspired) */
.terminal-window {
  border: 1px solid var(--border-line);
  background: #090d16;
  border-radius: 0.875rem;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .terminal-window {
  background: #0f172a;
  color: #f1f5f9;
}

.terminal-header {
  background: #0f1523;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-body {
  padding: 1.15rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* Spectrum Rule / Glowing Line */
.spectrum-line {
  height: 2px;
  background: var(--gradient-spectrum);
  width: 100%;
}

/* Pills & Tags */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.785rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--border-line);
  background: rgba(255, 255, 255, 0.03);
}

.badge-emerald {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}

.badge-gold {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
}

.badge-cyan {
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.25);
}

/* Product Card Styling */
.product-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.3s ease;
}

.product-card:hover::before {
  background: var(--gradient-spectrum);
}

.product-img-wrapper {
  position: relative;
  background: #090d16;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border-line);
}

.product-img {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-img {
  transform: scale(1.04);
}

/* Accordion FAQ */
.faq-item {
  border-bottom: 1px solid var(--border-line);
  transition: all 0.25s ease;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent-emerald);
}

/* Modal Window */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1rem;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-line);
  border-radius: 1.25rem;
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.modal-backdrop.active .modal-content {
  transform: scale(1);
}

/* Buttons */
.btn-primary-glow {
  background: #10b981;
  color: #041009;
  font-weight: 700;
  border-radius: 0.5rem;
  padding: 0.65rem 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}

.btn-primary-glow:hover {
  background: #059669;
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.55);
  transform: translateY(-1px);
}

.btn-ghost-dark {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-line);
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.65rem 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-ghost-dark:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Animations */
@keyframes pulse-slow {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.live-indicator {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-slow 2s infinite ease-in-out;
}
