/* =====================================================
BASE / VARIABLES
===================================================== */
:root {
  --bg1: #07122b;
  --bg2: #0a1230;

  --neon-blue: #3b82f6;
  --neon-magenta: #a21caf;
  --neon-fuchsia: #ff00aa;

  --glass: rgba(255,255,255,0.06);
  --accent: linear-gradient(135deg, var(--neon-blue), var(--neon-magenta), var(--neon-fuchsia));
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(-45deg, #020617, #081028, #13042a);
  color: #e6eef8;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .4s ease, color .3s ease;
}

/* =====================================================
LOADER
===================================================== */
.loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #00081466, #05021a88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.loader-inner { text-align: center; }

.neon-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: conic-gradient(from 120deg, var(--neon-blue), var(--neon-magenta), var(--neon-fuchsia), var(--neon-blue));
  filter: blur(6px);
  margin: 0 auto 12px;
  animation: spin 2.8s linear infinite;
  box-shadow: 0 0 30px var(--neon-blue),
              0 0 60px var(--neon-magenta);
}

.loader-text {
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 18px;
  margin: 0;
  text-shadow: 0 0 12px rgba(255,255,255,0.12);
}

.blink { animation: blink 1s infinite; }

@keyframes blink {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================
LAYOUT
===================================================== */
.app { min-height: 100vh; }

/* -------- SIDEBAR -------- */
.sidebar {
  width: 260px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-right: 1px solid rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  padding-bottom: 12px;
  position: relative;
  z-index: 20;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  transition: width .25s ease, transform .25s ease;
}

.sidebar.collapsed { width: 72px; }

.sidebar .perfil-small {
  width: 72px;
  height: 72px;
  border: 3px solid rgba(255,255,255,0.06);
  object-fit: cover;
}

.sidebar .nav-link {
  padding: 12px 14px;
  margin: 6px;
  border-radius: 8px;
  color: #cfe6ff;
  transition: all .18s;
}

.sidebar .nav-link:hover {
  background: rgba(255,255,255,0.02);
  transform: translateX(6px);
  color: white;
}

.sidebar .nav-link.active {
  background: rgba(59,130,246,0.12);
  box-shadow: 0 6px 18px rgba(59,130,246,0.07);
  border-left: 3px solid var(--neon-blue);
}

.sidebar-bottom {
  border-top: 1px solid rgba(255,255,255,0.03);
}

/* -------- TOPBAR -------- */
.topbar {
  background: linear-gradient(90deg, rgba(255,255,255,0.01), rgba(255,255,255,0.02));
  border-bottom: 1px solid rgba(255,255,255,0.03);
  align-items: center;
}

.titulo-site {
  margin: 0;
  font-size: 1.15rem;
  text-shadow: 0 0 8px rgba(163,55,255,0.06);
}

/* -------- MAIN -------- */
.main { min-height: 100vh; }
.content { padding-bottom: 120px; }

/* -------- CARDS -------- */
.neon-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.03);
  box-shadow: 0 8px 30px rgba(59,130,246,0.04);
}

/* -------- PROFILE -------- */
.perfil-large {
  border: 4px solid rgba(59,130,246,0.12);
  box-shadow: 0 8px 40px rgba(59,130,246,0.06);
}

/* -------- PROJECT CARD -------- */
.project-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.03);
  transition: transform .18s ease, box-shadow .18s ease;
}

.project-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 18px 50px rgba(162,28,175,0.08);
}

/* =====================================================
PROGRESS BARS
===================================================== */
.progress {
  height: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
}

.progress .progress-bar {
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-magenta));
  box-shadow: 0 6px 18px rgba(162,28,175,0.08);
}

/* =====================================================
MODAL GRID SEMANAS
===================================================== */
.grid-semanas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.grid-semanas button {
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: var(--neon-blue);
  color: white;
  transition: transform .12s;
}

.grid-semanas button:hover {
  transform: translateY(-4px);
  background: var(--neon-magenta);
}

/* =====================================================
PANTALLA COMPLETA
===================================================== */
.pantallaCompleta {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 20000;
}

.pantallaCompleta iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.btn-close-iframe {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 10;
}

/* =====================================================
RESPONSIVE
===================================================== */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -320px;
    top: 0;
    height: 100vh;
  }
  .sidebar.show { left: 0; }
  .sidebar.collapsed {
    width: 260px;
    left: 0;
  }
  .app.d-flex { flex-direction: column; }
}

/* =====================================================
DARK / LIGHT MODE
===================================================== */
body.light {
  color: #0b1220;
  background: linear-gradient(135deg, #e6f0ff, #fae7ff);
}

body.light .neon-card {
  background: linear-gradient(180deg, rgba(0,0,0,0.03), rgba(0,0,0,0.01));
}

body.light .progress .progress-bar { box-shadow: none; }

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.03);
  color: inherit;
}

/* =====================================================
PROGRESS LOADER
===================================================== */
#progressBar {
  background: linear-gradient(90deg, #3b82f6, #a21caf, #ff00aa);
  box-shadow: 0 0 10px #a21caf, 0 0 20px #3b82f6;
  transition: width .1s linear;
}

/* =====================================================
🔥 TEXTO CON DEGRADADO ANIMADO (NEÓN)
===================================================== */
.gradient-text {
  background: linear-gradient(90deg, #3b82f6, #a21caf, #ff00aa, #3b82f6);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: neonFlow 5s ease infinite;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(255,0,170,0.15);
}

.gradient-text-soft {
  background: linear-gradient(90deg, #7dd3fc, #f0abfc, #f9a8d4);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: neonFlow 10s ease infinite;
  opacity: .9;
}

@keyframes neonFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* =====================================================
🌞 MODO CLARO — GRADIENTES ESPECIALES
===================================================== */
body.light .gradient-text {
  background: linear-gradient(90deg, #4f46e5, #db2777, #ec4899, #4f46e5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

body.light .gradient-text-soft {
  background: linear-gradient(90deg, #3b82f6, #a855f7, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

/* =====================================================
🔥 DEGRADADO ANIMADO PARA project-card
===================================================== */
@keyframes neonMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body:not(.light) .project-card * {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-magenta), var(--neon-fuchsia));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  animation: neonMove 6s ease infinite;
}

body:not(.light) .project-card i {
  color: #ffffff !important;
  background: none !important;
  animation: none !important;
}

body.light .project-card * {
  background: none !important;
  color: inherit !important;
  animation: none !important;
}

/* =====================================================
🔥 DEGRADADO PARA TEXTOS (LOS QUE PEDISTE)
===================================================== */

.text-tech, .text-email, .text-github {
  background: linear-gradient(90deg, #3b82f6, #a21caf, #ff00aa, #3b82f6);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  animation: neonFlow 5s ease infinite;
  font-weight: 900;
}

body.light .text-tech,
body.light .text-email,
body.light .text-github {
  background: linear-gradient(90deg, #4f46e5, #db2777, #ec4899, #4f46e5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
/* =====================================================
🎨 MODO CLARO — COLORES DEL MENÚ ACTUALIZADOS
===================================================== */

body.light .sidebar .nav-link {
  background: none;
  color: #1e3a8a !important; /* azul fuerte */
  font-weight: 700;
}

body.light .sidebar .nav-link:hover {
  background: rgba(30, 58, 138, 0.12);
  color: #1e40af !important; /* azul más brillante */
  transform: translateX(6px);
}

body.light .sidebar .nav-link.active {
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  color: white !important;
  border-left: 4px solid #2563eb;
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.25);
}

/* Nombre exacto de los textos del menú */
.menu-colored {
  background: linear-gradient(90deg, #2563eb, #7c3aed, #ec4899);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: neonFlow 6s ease infinite;
  font-weight: 900;
}

