/* public/css/design-system.css */
/* ==========================================================================
   DEVPORTFOLIO — SISTEMA DE DISEÑO VANGUARDISTA (SYNE + PLUS JAKARTA + SPACE GROTESK)
   Estética de agencia de IA internacional, tipografía de alta costura digital y micro-interacciones
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&family=Syne:wght@600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* --- PALETA DE COLORES: OBSIDIANA AZUL, ÍNDIGO ELÉCTRICO & CYAN GLOW --- */
  --bg-main:          #060813; /* Obsidiana espacial profunda */
  --bg-surface:       rgba(13, 18, 36, 0.7); /* Panel Glass translúcido */
  --bg-surface-elev:  rgba(21, 29, 54, 0.65); /* Cards y elementos elevados */
  --bg-surface-hover: rgba(30, 41, 75, 0.85); /* Hover en superficies */

  --border-subtle:    rgba(255, 255, 255, 0.08); /* Borde sutil de cristal */
  --border-focus:     #6366f1; /* Anillo de foco índigo */
  --border-glow:      rgba(99, 102, 241, 0.4);

  --primary:          #6366f1; /* Índigo Eléctrico */
  --primary-hover:    #4f46e5;
  --primary-light:    rgba(99, 102, 241, 0.15);

  --secondary:        #06b6d4; /* Cian Neón / Aurora */
  --secondary-hover:  #0891b2;
  --secondary-light:  rgba(6, 182, 212, 0.15);

  --accent:           #38bdf8; /* Celeste luminoso */
  --accent-purple:    #a855f7; /* Púrpura sutil para degradados */

  --text-main:        #f8fafc; /* Blanco puro de alto contraste */
  --text-muted:       #94a3b8; /* Gris pizarra suave */
  --text-subtle:      #64748b; /* Gris apagado */

  /* Gradientes Cinematográficos */
  --gradient-brand:   linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-glow:    linear-gradient(135deg, #a855f7 0%, #6366f1 50%, #06b6d4 100%);
  --gradient-text:    linear-gradient(135deg, #ffffff 0%, #cbd5e1 45%, #6366f1 100%);
  --gradient-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);

  /* Estados */
  --success:          #10b981;
  --success-bg:       rgba(16, 185, 129, 0.15);
  --warning:          #f59e0b;
  --warning-bg:       rgba(245, 158, 11, 0.15);
  --danger:           #f43f5e;
  --danger-bg:        rgba(244, 63, 94, 0.15);
  --info:             #06b6d4;
  --info-bg:          rgba(6, 182, 212, 0.15);

  /* --- TIPOGRAFÍA DE VANGUARDIA --- */
  --font-heading: 'Syne', 'Space Grotesk', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* --- ESPACIADO Y BORDES --- */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
  --shadow-glow-cyan: 0 0 30px rgba(6, 182, 212, 0.3);

  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* RESET BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* ENCABEZADOS */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  line-height: 1.2;
  font-weight: 700;
  overflow-wrap: break-word;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--secondary);
}

/* FOCUS RINGS ACCESIBLES (REGLA MEMORIA.MD) */
:focus-visible {
  outline: 2px solid var(--border-focus) !important;
  outline-offset: 2px !important;
}

/* SCROLLBAR PERSONALIZADO */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* LAYOUT GENERAL */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

section[id] {
  scroll-margin-top: 90px;
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
}

/* ANIMACIÓN DE APARICIÓN FLUIDA & ELEGANTE AL SCROLLEAR (Estilo Linear/Apple) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* --- CLASES DE ESTILO VANGUARDISTA & GLASS --- */
.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.glass-panel-elev {
  background: var(--bg-surface-elev);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
}

/* --- ESTILO OFICIAL PARA LA SIGLA "IA" (POTENCIA SYSTEMS) --- */
.brand-ia {
  background: linear-gradient(135deg, #d8b4fe 0%, #a855f7 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  font-weight: 800;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.55));
}
