/* ============================================
   AVA RIVERA PORTFOLIO - CUSTOM STYLES
   Modular & Easy to Customize
   ============================================ */

/* CSS Custom Properties (Theme Variables) 
   👉 Change these to update the entire color scheme easily */
:root {
  /* Primary Brand Colors */
  --primary: #7C3AED;        /* Violet - main accent */
  --primary-dark: #5B21B6;   /* Darker violet for hovers */
  --accent: #EC4899;         /* Hot pink accent */
  --accent-light: #F9A8D4;   /* Light pink */

  /* Backgrounds & Surfaces */
  --bg: #0F172A;             /* Deep slate background */
  --surface: #1E293B;        /* Card / elevated surfaces */
  --surface-light: #334155;  /* Lighter surface */

  /* Text Colors */
  --text-primary: #F8FAFC;   /* Main text */
  --text-secondary: #94A3B8; /* Muted text */
  --text-muted: #64748B;     /* Very muted */

  /* Borders & Dividers */
  --border: #334155;
  --border-light: #475569;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
  --gradient-surface: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 0 1px rgb(124 58 237 / 0.1), 0 10px 15px -3px rgb(124 58 237 / 0.2);

  /* Spacing & Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0.0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Base Reset & Typography */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--surface);
}

body {
  font-family: 'Inter', system_ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Elegant heading font */
h1, h2, .display-font {
  font-family: 'Inter', system_ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  transition: all var(--transition-base);
  backdrop-filter: blur(20px);
}

.nav.scrolled {
  background-color: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid var(--border);
}

.nav-link {
  position: relative;
  transition: color var(--transition-fast);
}

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

.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* Mobile Menu */
.mobile-menu {
  animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.hero-title {
  font-size: clamp(2.75rem, 7vw, 4.25rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-title .accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 200% 50%; }
}

/* Floating elements in hero visual */
.floating-element {
  animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(2) {
  animation-delay: 1.5s;
}

.floating-element:nth-child(3) {
  animation-delay: 3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-25px); }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  scroll-margin-top: 80px;
}

.section-header {
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* ============================================
   CARDS & INTERACTIVE ELEMENTS
   ============================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-glow);
  border-color: var(--primary);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.card:hover::before {
  transform: scaleX(1);
}

/* Service Cards */
.service-card {
  padding: 2rem;
  height: 100%;
}

.service-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.1);
  color: var(--primary);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  transition: all var(--transition-base);
}

.service-card:hover .service-icon {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

/* Project Cards */
.project-card {
  cursor: pointer;
  overflow: hidden;
}

.project-card img {
  transition: transform 700ms cubic-bezier(0.23, 1.0, 0.32, 1);
}

.project-card:hover img {
  transform: scale(1.08);
}

.project-overlay {
  background: linear-gradient(to top, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.6) 40%, transparent 70%);
}

/* ============================================
   DUAL MARQUEE CAROUSELS (Tools Section)
   ============================================ */
.marquee-container {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.marquee {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  width: max-content;
  will-change: transform;
}

.marquee-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  white-space: nowrap;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.tool-pill:hover {
  background: var(--surface-light);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tool-pill .icon {
  font-size: 1.35rem;
  line-height: 1;
}

/* Marquee Animations - Alternating Directions */
.animate-marquee {
  animation: marquee-slide 32s linear infinite;
}

.animate-marquee-reverse {
  animation: marquee-slide-reverse 38s linear infinite;
}

.marquee-container:hover .animate-marquee,
.marquee-container:hover .animate-marquee-reverse {
  animation-play-state: paused;
}

@keyframes marquee-slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes marquee-slide-reverse {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-base);
}

.testimonial-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.testimonial-quote {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-primary);
  position: relative;
}

.testimonial-quote::before {
  content: '“';
  font-size: 5rem;
  line-height: 1;
  color: var(--primary);
  opacity: 0.15;
  position: absolute;
  top: -1.5rem;
  left: -0.75rem;
  font-family: Georgia, serif;
}

/* ============================================
   MODAL (Project Details)
   ============================================ */
.modal {
  animation: modalEnter 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-backdrop {
  animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgb(124 58 237 / 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -5px rgb(124 58 237 / 0.4);
}

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

.btn-secondary:hover {
  background: var(--surface-light);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  color: var(--primary);
  background: rgba(124, 58, 237, 0.08);
}

/* ============================================
   FORM STYLING
   ============================================ */
.form-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* ============================================
   STATS COUNTER
   ============================================ */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* ============================================
   RESPONSIVE TWEAKS
   ============================================ */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.85rem;
  }
  
  .marquee-container {
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      black 5%,
      black 95%,
      transparent 100%
    );
  }
  
  .tool-pill {
    padding: 0.6rem 1.1rem;
    font-size: 0.9rem;
  }
}

/* ============================================
   THEME CUSTOMIZER (Demo)
   ============================================ */
.customizer-panel {
  transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.color-swatch {
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  border: 3px solid var(--surface);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.color-swatch:hover {
  transform: scale(1.15);
  box-shadow: var(--shadow-md);
}

.color-swatch.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3);
}

/* ============================================
   UTILITIES
   ============================================ */
.glass {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
}

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

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

/* Footer */
.footer-link {
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--primary);
}