/* VARIABLES Y RESET */
:root {
  --bg-color: #0f172a;       /* Fondo principal */
  --bg-secondary: #1e293b;   /* Fondo tarjetas */
  --primary: #3b82f6;        /* Azul principal */
  --primary-dark: #2563eb;
  --accent: #8b5cf6;         /* Acento violeta */
  --text-main: #f1f5f9;      /* Texto blanco */
  --text-muted: #94a3b8;     /* Texto gris */
  --font-main: "Inter", sans-serif;
  --font-code: "Fira Code", monospace; /* Fuente para terminal */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 5%;
  position: fixed;
  width: 100%;
  top: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(15px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon {
    color: var(--primary);
    font-size: 1.2rem;
}
.logo span { color: var(--primary); }

/* Menú Desktop */
.menu { display: flex; gap: 2rem; align-items: center; }
.menu a {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
}
.menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary);
    bottom: -5px;
    left: 0;
    transition: 0.3s;
}
.menu a:hover::after { width: 100%; }

.btn-contacto {
  border: 1px solid var(--primary);
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  color: var(--primary) !important;
}
.btn-contacto:hover {
  background: var(--primary);
  color: white !important;
}
.btn-contacto:hover::after { width: 0 !important; }

/* HERO SECTION */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 5%;
  position: relative;
  /* Fondo moderno con degradado sutil */
  background: radial-gradient(circle at 80% 20%, #1e293b 0%, #0f172a 70%);
}

/* Efecto de fondo (Overlay) */
.hero-bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 30px 30px; /* Cuadrícula */
    z-index: -1;
}

.contenido-hero { max-width: 800px; }

.saludo {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 1px;
}
.hero h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin: 0.5rem 0 1rem 0;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h2 {
  font-size: 2rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 400;
}
.resaltado { color: var(--accent); font-weight: 700; }

/* Terminal Badge Mejorado */
.terminal-badge {
    display: inline-block;
    background: rgba(15, 23, 42, 0.8);
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #334155;
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.nick-terminal { color: #f87171; font-weight: bold; } /* Rojo suave */
.comando-txt { color: #3b82f6; }

.cursor {
  color: #f87171;
  animation: parpadeo 1s infinite;
}
@keyframes parpadeo {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.botones-hero { display: flex; gap: 1rem; margin-top: 2rem; }
.boton {
  padding: 0.8rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s ease;
}
.primario {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}
.primario:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}
.secundario {
  border: 1px solid #334155;
  color: var(--text-main);
  background: rgba(255,255,255,0.03);
}
.secundario:hover {
  border-color: var(--text-main);
  background: rgba(255,255,255,0.1);
  transform: translateY(-3px);
}

/* SECCIONES */
.seccion { padding: 6rem 5%; }
.oscura { background-color: #0b1120; }
.titulo-seccion {
  font-size: 2.2rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}
.titulo-seccion::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 4px;
  background: var(--primary);
  bottom: -10px;
  left: 0;
  border-radius: 2px;
}

/* HABILIDADES (Cards) */
.contenedor-habilidades {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.card-habilidad {
  background: var(--bg-secondary);
  padding: 2.5rem;
  border-radius: 12px;
  transition: 0.4s;
  border: 1px solid rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
}
.card-habilidad:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.card-habilidad::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: 0.4s;
}
.card-habilidad:hover::before { transform: scaleX(1); }

.icono-tech {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.tags span {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* PROYECTOS */
.galeria-proyectos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
}
.tarjeta-proyecto {
  background: var(--bg-secondary);
  border-radius: 16px;
  overflow: hidden;
  transition: 0.3s;
  border: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
}
.tarjeta-proyecto:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.imagen-proyecto {
  height: 220px;
  position: relative;
  overflow: hidden;
  background: #1e293b;
}
.imagen-proyecto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.tarjeta-proyecto:hover .imagen-proyecto img { transform: scale(1.05); }

/* Overlay cuando no hay imagen o decorativo */
.img-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #334155; font-size: 4rem;
}
.unity-bg { background: linear-gradient(135deg, #222c30, #000); color: #555; }

.info-proyecto { padding: 1.8rem; flex-grow: 1; display: flex; flex-direction: column; }
.header-proyecto { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.header-proyecto h3 { font-size: 1.3rem; font-weight: 700; color: #fff; }
.links-proyecto a { font-size: 1.4rem; color: var(--text-muted); }
.links-proyecto a:hover { color: var(--primary); }

.descripcion { font-size: 0.95rem; color: #cbd5e1; margin-bottom: 1.5rem; flex-grow: 1; }

/* Badges de tecnología en proyectos */
.tech-stack { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: auto; }
.tech-badge {
    font-size: 0.8rem;
    font-family: var(--font-code);
    color: var(--primary);
    display: flex; align-items: center; gap: 5px;
}

/* FOOTER */
footer { text-align: center; padding: 6rem 5%; background: #0f172a; border-top: 1px solid #1e293b; }
.contenido-footer h2 { font-size: 2.5rem; margin-bottom: 1rem; color: #fff; }
.contenido-footer p { color: var(--text-muted); margin-bottom: 2.5rem; }

.glow-effect { animation: glow 2s infinite alternate; }
@keyframes glow {
    from { box-shadow: 0 0 10px -5px var(--primary); }
    to { box-shadow: 0 0 20px 5px rgba(59, 130, 246, 0.4); }
}

.redes-sociales { display: flex; justify-content: center; gap: 2rem; margin: 3rem 0; font-size: 1.8rem; }
.redes-sociales a { color: var(--text-muted); transition: 0.3s; }
.redes-sociales a:hover { color: var(--primary); transform: translateY(-5px); }

.copyright { font-size: 0.9rem; opacity: 0.7; margin-top: 3rem; border-top: 1px solid #1e293b; padding-top: 2rem; }
.firma-nick { font-family: var(--font-code); color: #f87171; font-weight: bold; }

/* BOTÓN WHATSAPP */
.btn-wsp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: white;
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  font-size: 30px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: 0.3s;
}
.btn-wsp:hover { transform: scale(1.1); background-color: #20b85c; }

/* RESPONSIVE */
.menu-toggle { display: none; font-size: 1.8rem; cursor: pointer; color: white; }

@media (max-width: 768px) {
  .hero h1 { font-size: 2.8rem; }
  .menu-toggle { display: block; }

  .menu {
    position: absolute;
    top: 100%; left: 0; width: 100%;
    background: #0f172a;
    flex-direction: column;
    padding: 2rem; gap: 2rem;
    border-top: 1px solid #1e293b;
    /* Oculto por defecto */
    clip-path: circle(0% at 100% 0);
    transition: clip-path 0.5s ease-in-out;
  }
  .menu.active { clip-path: circle(150% at 100% 0); }
  
  .botones-hero { flex-direction: column; }
  .boton { justify-content: center; width: 100%; }
}

.logo {
    display: flex;
    align-items: center;
    gap: 5px; /* Espacio entre imagen y texto */
}

.logo-img {
    height: 40px; /* Ajusta esto según el tamaño de tu navbar */
    width: auto;
    border-radius: 50%; /* Si quieres que el logo sea redondo */
    transition: transform 0.3s;
}

.logo:hover .logo-img {
    transform: rotate(360deg); /* ¡Efecto giratorio al pasar el mouse! */
}