/* ============================================================
   REDESIGN LAYER — Modern dark UI (21st.dev patterns)
   Loaded LAST. Overrides tokens, fixes dangling variables,
   adds aurora / grid / animated-gradient / spotlight, and
   sizes the new inline SVG / brand icons.
   ============================================================ */

:root {
  /* ── Modern dark palette (cyan → blue → violet) ── */
  --bg-primary:    #050510;
  --bg-secondary:  #0a0b18;
  --bg-card:       #0e1222;
  --bg-glass:      rgba(255, 255, 255, 0.045);

  --text-primary:   #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted:     #94a3b8;

  /* Accents that the original components.css referenced but never defined */
  --accent-primary:   #e2e8f0;
  --accent-secondary: #94a3b8;
  --accent-detail:    #475569;
  --accent-tech:      #22d3ee;
  --accent-cyan:      #22d3ee;
  --accent-blue:      #3b82f6;
  --accent-purple:    #8b5cf6;
  --accent-green:     #34d399;

  --gradient-main:   linear-gradient(135deg, #22d3ee, #3b82f6);
  --gradient-hero:   linear-gradient(110deg, #22d3ee 0%, #3b82f6 45%, #8b5cf6 100%);
  --gradient-card:   linear-gradient(145deg, rgba(34,211,238,0.06), rgba(139,92,246,0.06));
  --gradient-border: linear-gradient(135deg, #22d3ee, #8b5cf6);

  /* z-index scale (were undefined → invalid) */
  --z-base:    1;
  --z-overlay: 2;
  --z-nav:     1000;
  --z-cursor:  99999;

  /* Refined shadows for dark */
  --shadow-purple: 0 8px 30px rgba(139, 92, 246, 0.25);
  --shadow-cyan:   0 8px 30px rgba(34, 211, 238, 0.25);
  --shadow-glow:   0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-card:   0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-hover:  0 20px 50px rgba(0, 0, 0, 0.5);

  --animate-aurora: aurora 22s ease-in-out infinite;
}

/* ── Base tweaks for dark ── */
html, body { background-color: var(--bg-primary); }
body { color: var(--text-primary); }

::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-cyan); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

::selection { background: rgba(34, 211, 238, 0.3); color: #fff; }

/* Visible focus ring for keyboard users */
a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

/* Borders/cards read better on dark */
.card, .service-card, .tech-item, .project-card, .blog-card,
.pricing-card, .testimonial-card, .contact-item, .contact-form {
  border-color: rgba(255, 255, 255, 0.08);
}

/* Noise overlay much subtler on dark */
body::before { opacity: 0.35; mix-blend-mode: overlay; }

/* ── Section-tag: pill on dark ── */
.section-tag {
  color: var(--accent-cyan);
  border-left: 2px solid var(--accent-cyan);
}

/* ── Animated gradient text everywhere (cohesive shimmer) ── */
.gradient-text,
.section-title .gradient-text,
.typewriter-text {
  background: var(--gradient-hero);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}

/* ════════════════════════════════════════════════════════
   HERO — aurora + grid background, animated name
   ════════════════════════════════════════════════════════ */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 45%, transparent 100%);
}

.aurora {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
  animation: var(--animate-aurora);
}
.aurora-1 { top: -12%; left: 8%;  width: 38rem; height: 38rem;
  background: radial-gradient(circle, rgba(34,211,238,0.45) 0%, transparent 70%); }
.aurora-2 { bottom: -18%; right: 4%; width: 36rem; height: 36rem;
  background: radial-gradient(circle, rgba(139,92,246,0.40) 0%, transparent 70%);
  animation-direction: reverse; animation-duration: 30s; }
.aurora-3 { top: 25%; right: 28%; width: 26rem; height: 26rem;
  background: radial-gradient(circle, rgba(59,130,246,0.38) 0%, transparent 70%); }

#hero .container { position: relative; z-index: var(--z-base); }
#particles-canvas { opacity: 0.5; }

.hero-name { color: var(--text-primary); }

/* Badge + dot themed */
.hero-badge {
  color: var(--accent-cyan);
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.06);
}
.hero-badge .dot { background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); }
.typewriter-cursor { background: var(--accent-cyan); }

/* Hero portrait blob: keep gradient ring, image fully visible */
.hero-image-blob img { mix-blend-mode: normal; opacity: 1; }
.hero-image-blob::after {
  background: linear-gradient(135deg, rgba(34,211,238,0.25), rgba(139,92,246,0.2));
  mix-blend-mode: overlay;
}

/* ════════════════════════════════════════════════════════
   BUTTONS — primary becomes the brand gradient on dark
   ════════════════════════════════════════════════════════ */
.btn-primary {
  background: var(--gradient-main);
  color: #04111a;
  border: 1px solid transparent;
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.25);
}
.btn-primary:hover {
  background: var(--gradient-main);
  color: #04111a;
  filter: brightness(1.08);
  transform: translateY(-2px);
}
.btn-outline { color: var(--text-primary); border-color: rgba(255,255,255,0.25); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }

.nav-cta { box-shadow: 0 0 20px rgba(34,211,238,0.3); }
.nav-cta:hover { box-shadow: 0 0 36px rgba(34,211,238,0.5); }

/* ════════════════════════════════════════════════════════
   ICONS — size inline SVGs + brand logos (no more emojis)
   ════════════════════════════════════════════════════════ */
.icon-svg { display: inline-block; vertical-align: middle; }

.service-icon { background: var(--gradient-main); }
.service-icon svg { width: 30px; height: 30px; color: #04111a; }

.contact-item-icon svg { width: 22px; height: 22px; color: #04111a; }

.badge-icon svg { width: 18px; height: 18px; color: var(--accent-cyan); }

.btn-icon {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-secondary);
}
.btn-icon svg { width: 20px; height: 20px; color: currentColor; }
.btn-icon:hover { background: var(--gradient-main); color: #04111a; box-shadow: var(--shadow-cyan); }

/* Tech grid → real brand logos (Simple Icons CDN) */
.tech-logo {
  width: 42px; height: 42px; object-fit: contain;
  opacity: 0.85;
  transition: transform var(--transition-spring), opacity var(--transition-base);
}
.tech-item:hover .tech-logo { transform: scale(1.18); opacity: 1; }
.tech-item:hover { background: rgba(34,211,238,0.08); border-color: rgba(34,211,238,0.4); }

/* Project thumb icons (inline SVG instead of emoji) */
.project-thumb-img svg { width: 64px; height: 64px; color: rgba(255,255,255,0.92); }

/* Feature check marks */
.feature-check { background: rgba(52, 211, 153, 0.15); color: var(--accent-green); }
.feature-x { background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* Section-tag accent already cyan; tags read better on dark */
.service-tag { background: rgba(34,211,238,0.1); color: var(--accent-cyan); border-color: rgba(34,211,238,0.25); }
.project-tag, .blog-category { background: rgba(139,92,246,0.15); color: #c4b5fd; }
.about-tag { color: #c4b5fd; background: rgba(139,92,246,0.08); border-color: rgba(139,92,246,0.3); }
.skill-percent, .pricing-tier, .blog-read-more { color: var(--accent-cyan); }

/* ════════════════════════════════════════════════════════
   FEATURED PROJECT (Orakon Trip) — spans 2 cols, accent ring
   ════════════════════════════════════════════════════════ */
.project-card.is-featured {
  grid-column: span 2;
  border-color: rgba(34, 211, 238, 0.35);
}
.project-badge {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--gradient-main);
  color: #04111a;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (max-width: 768px) {
  .project-card.is-featured { grid-column: span 1; }
}

/* ════════════════════════════════════════════════════════
   PRICING — "Su preventivo" replaces the numeric price
   ════════════════════════════════════════════════════════ */
.price-quote {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  background: var(--gradient-hero);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
  line-height: 1.1;
}
.pricing-card.featured {
  background: linear-gradient(145deg, rgba(34,211,238,0.12), rgba(139,92,246,0.1));
  border-color: rgba(34,211,238,0.4);
}

/* Contact form controls: clearer on dark */
.form-control {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
  color: var(--text-primary);
}
.form-control:focus {
  border-color: var(--accent-cyan);
  background: rgba(34,211,238,0.06);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.15);
}

/* Navbar glass on scroll, dark */
#navbar.scrolled {
  background: rgba(5, 5, 16, 0.8);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ════════════════════════════════════════════════════════
   Reduced motion
   ════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
