/* =========================================================
   VARIABLES (tema)
========================================================= */
:root{
  --primary-color: #67a5ed;              /* Azul principal */
  --secondary-color: #f0f8ff;            /* Azul claro casi blanco */
  --shadow-color: 0 0 15px 5px rgba(84,153,210,.5); /* Sombra azul suave */
  --header-color: #0c203a;               /* Azul oscuro para el header */
  --text-color: #f0f8ff;                 /* Azul muy claro para texto */
  --tech-icons-color: rgba(100,149,237,.3);
  --tech-cards-color: #1a2a4a;           /* Azul noche para tarjetas */
  --scroll-color: #4a90e2;
  --scroll-background-color: #1e3a8a;
}

/* =========================================================
   GLOBAL + SCROLL + FONDO ANIMADO
========================================================= */
html{ scroll-behavior:smooth; }

body{
  font-family: Arial, sans-serif;
  margin:0;
  padding:0;
  background: linear-gradient(135deg, #0a1625, #14213d);
  color: var(--secondary-color);
}

/* Partículas de fondo */
#tech-particles-global{
  position:fixed; inset:0;
  width:100vw; height:100vh;
  pointer-events:none; z-index:-1; overflow:hidden;
}
.particle{
  position:absolute; width:6px; height:6px; border-radius:50%;
  background: rgba(100,200,255,.6);
  box-shadow:0 0 10px 3px rgba(100,200,255,.3);
  animation: float 15s infinite ease-in-out;
}
@keyframes float{ 0%,100%{transform:translate(0,0)} 50%{transform:translate(50px,-30px)} }
@keyframes scan{ 0%{top:0} 100%{top:100%} }
@keyframes pulse{ 0%,100%{transform:translate(-50%,-50%) scale(.8); opacity:.3} 50%{transform:translate(-50%,-50%) scale(1.2); opacity:.6} }

/* Scrollbar */
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background:var(--secondary-color); border-radius:5px; }
::-webkit-scrollbar-thumb{ background:var(--scroll-color); border-radius:5px; }
::-webkit-scrollbar-thumb:hover{ background:var(--scroll-background-color); }

/* Secciones */
section{ padding:50px; }

/* =========================================================
   HEADER + NAV
========================================================= */
header{
  background:var(--header-color);
  position:fixed; inset:0 auto auto 0; width:100%;
  padding:1rem; display:flex; align-items:center; justify-content:space-between;
  z-index:100;
}
header a{ text-decoration:none; }
h3{
  font-family:'Orbitron', sans-serif; font-weight:500; letter-spacing:1px;
  color:var(--primary-color); margin:0; padding-left:1rem;
}

/* Hamburguesa (oculta en desktop) */
.hamburger{ display:none; background:none; border:none; cursor:pointer; padding:10px; z-index:101; }
.hamburger span{ display:block; width:25px; height:3px; background:var(--primary-color); margin:5px 0; transition:all .3s ease; }

/* Nav */
nav{ padding-right:2rem; }
nav ul{ list-style:none; padding:0; display:flex; }
nav ul li{ font-family:'Rajdhani', sans-serif; font-weight:500; font-size:18px; margin:0 15px; }
nav a{ color:var(--secondary-color); text-decoration:none; transition:all .3s ease; }
nav a:hover{ color:var(--primary-color); transform:scale(1.05); }

/* =========================================================
   BOTONES GENERALES
========================================================= */
#buttons{
  font-family:'Rajdhani', sans-serif; display:flex; gap:40px; justify-content:center; margin-top:40px;
}
.button{
  display:inline-block; padding:12px 24px; background:var(--primary-color);
  color:var(--secondary-color); font-size:18px; font-weight:bold; border-radius:8px;
  border:2px solid transparent; text-decoration:none; transition:background .3s, transform .2s, box-shadow .3s;
}
.button:hover{ transform:scale(1.05); box-shadow:var(--shadow-color); }

/* =========================================================
   SECCIÓN ABOUT
========================================================= */
#about{ padding-top:100px; text-align:center; margin-bottom:100px; }
#about #nombre{
  font-family:'Rajdhani', sans-serif; font-weight:500; letter-spacing:1px;
  font-size:64px; color:var(--secondary-color);
}
#about #puesto{ font-size:32px; }
#about #nombre-color{ color:var(--primary-color); }

#description{
  font-family:'Rajdhani', sans-serif; color:var(--text-color);
  margin:0 20%; font-size:20px; line-height:1.5; word-spacing:2px;
}

/* Títulos de sección */
strong p{
  font-family:'Orbitron', sans-serif; font-weight:500; letter-spacing:1px;
  margin:50px 0 0; font-size:48px; text-align:center;
}

/* Animación reveal de párrafos */
#description p{ opacity:0; transform:translateY(16px); }
#description p.reveal-in{ opacity:1; transform:none; transition:opacity 600ms ease, transform 600ms ease; }
#description p:nth-child(1).reveal-in{ transition-delay:0ms; }
#description p:nth-child(2).reveal-in{ transition-delay:300ms; }
#description p:nth-child(3).reveal-in{ transition-delay:450ms; }
@media (prefers-reduced-motion: reduce){
  #description p, #description p.reveal-in{ opacity:1 !important; transform:none !important; transition:none !important; }
}

/* =========================================================
   SECCIÓN SKILLS (tarjetas)
========================================================= */
#skills{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:30px; margin:50px auto; max-width:1200px;
}
#sistemas, #bases, #languages, #competencias{
  background:var(--tech-cards-color);
  padding:25px 20px; border-radius:15px; display:flex; flex-direction:column;
  min-height:400px; list-style:none;
  transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease, border .3s ease;
  border:2px solid transparent;
}
#sistemas:hover, #bases:hover, #languages:hover, #competencias:hover{
  border:2px solid var(--primary-color);
  background:rgba(100,149,237,.15);
  box-shadow:0 0 25px rgba(100,149,237,.6);
  transform:scale(1.04) translateY(-6px);
}

/* Encabezado */
#skills span{
  font-family:'Orbitron', sans-serif; font-size:20px; font-weight:800; letter-spacing:1px;
  color:var(--secondary-color); display:flex; flex-direction:column; align-items:center; text-align:center; margin-bottom:25px;
}
#skills span i{
  font-size:32px; color:var(--primary-color); background:var(--tech-icons-color);
  width:75px; height:75px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  margin-bottom:12px; transition: transform .3s ease, background-color .3s ease, color .3s ease;
}
#sistemas:hover span i, #bases:hover span i, #languages:hover span i, #competencias:hover span i{
  transform:scale(1.1); background:var(--primary-color); color:#fff;
}

/* Lista */
#skills li{
  font-family:'Rajdhani', sans-serif; font-size:18px; color:var(--secondary-color);
  position:relative; padding-left:20px; margin-bottom:15px; font-weight:600; list-style:none;
}
#skills li::before{
  content:''; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:8px; height:8px; border-radius:50%; background:var(--secondary-color);
}

/* Responsive skills */
@media (max-width:1200px){ #skills{ grid-template-columns:repeat(2, minmax(260px,1fr)); } }
@media (max-width:640px){
  #skills{ grid-template-columns:1fr; }
  #sistemas, #bases, #languages, #competencias{ min-height:unset; }
}

/* =========================================================
   SECCIÓN PROYECTOS
========================================================= */
/* Iconos sociales */
#icons{
  display:flex; justify-content:center; align-items:center; gap:20px;
  font-size:36px; margin:0 auto 18px;
}
#icons a{ padding:10px; color:var(--secondary-color); transition:transform .25s ease, color .25s ease; }
a[href*="linkedin"]:hover i{ color:#004182; transform:scale(1.05); }
a[href*="github"]:hover i{ color:purple; transform:scale(1.05); }

/* Contenedor */
#tarjetas{ margin:5% 10% 0; }

/* === Tarjeta proyecto (grid con áreas) === */
#project-card{
  background:var(--tech-cards-color);
  border-radius:18px;
  padding:24px;

  display:grid;
  grid-template-columns: minmax(420px, 48%) 1fr; /* imagen | texto */
  grid-template-rows: auto auto auto auto;      /* title, desc, extra, tech */
  grid-template-areas:
    "media title"
    "media desc"
    "media extra"
    "media tech";
  column-gap:36px;
  row-gap:18px;
  align-items:start;

  transition: box-shadow .3s ease, transform .3s ease, background .3s ease, border .3s ease;
  border:2px solid transparent;
}
#project-card:hover{
  background:rgba(40,60,100,.95);
  border:2px solid rgba(100,149,237,.8);
  box-shadow:0 0 24px rgba(100,149,237,.35);
  transform:translateY(-5px) scale(1.02);
}

/* Media (carrusel) */
.carousel-container{
  grid-area: media;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  width: 100%;
  height: clamp(280px, 32vw, 420px);
  align-self: center;          
  background: transparent;
}
.carousel-container img{
  width:100%; height:100%;
  object-fit:cover; object-position:center;
  display:block; transition:transform .5s ease; position:relative; z-index:1;
}
#project-card:hover .carousel-container img{ transform:scale(1.03); }

/* Botones del carrusel */
.carousel-btn{
  position:absolute; top:50%; transform:translateY(-50%);
  border:none; width:42px; height:42px; border-radius:999px;
  background:rgba(0,0,0,.35); color:#fff; font-size:20px; cursor:pointer;
  display:grid; place-items:center; backdrop-filter:blur(2px);
  transition: background .2s ease, transform .2s ease; z-index:2;
}
.carousel-btn:hover{ background:rgba(0,0,0,.55); transform:translateY(-50%) scale(1.05); }
#prev{ left:10px; } #next{ right:10px; }

/* Coloca cada pieza de texto en su área */
#project-card > strong{ grid-area:title; margin:0; display:block; }
#project-title{
  font-family:'Orbitron', sans-serif; font-weight:800; font-size:32px;
  letter-spacing:1px; margin:4px 0 12px;
}
#project-desc{ grid-area:desc;  font-size:18px; line-height:1.5; margin:8px 0; max-width:60ch; }
#project-extra{ grid-area:extra; font-size:18px; line-height:1.5; margin:8px 0; max-width:60ch; }
#project-tech{
  grid-area:tech; list-style:none; margin:14px 0 0; padding:0;
  display:flex; flex-wrap:wrap; gap:12px 16px;
}
#project-tech li{
  font-family:'Rajdhani', sans-serif; font-weight:600; font-size:16px;
  padding:10px 18px; background:var(--tech-icons-color); border-radius:10px;
  color:var(--secondary-color); white-space:nowrap;
}

/* === Responsive proyectos === */
@media (max-width:980px){
  #tarjetas{ margin-left:4%; margin-right:4%; }
  #project-card{
    grid-template-columns:1fr;
    grid-template-rows:auto auto auto auto auto;
    grid-template-areas:
      "media"
      "title"
      "desc"
      "extra"
      "tech";
    column-gap:0; row-gap:18px;
  }
  .carousel-container{ height: clamp(220px, 48vw, 320px); }
  #project-title{ font-size:28px; }
  #project-desc, #project-extra{ font-size:17px; }
}
@media (max-width:560px){
  #tarjetas{ margin-left:2%; margin-right:2%; }
  #project-card{ padding:16px; border-radius:12px; }
  .carousel-container{ height: clamp(200px, 56vw, 260px); }
  #project-title{ font-size:24px; }
  #project-desc, #project-extra{ font-size:16px; }
  .carousel-btn{ width:36px; height:36px; font-size:18px; }
}
/* =========================================================
   CONTACTO (tarjetas con hover)
========================================================= */
#datosContacto{ display:flex; flex-direction:row; gap:30px; }

#email, #localizacion, #telefono, #cv{
  background:var(--tech-cards-color); margin-top:50px;
  height:100px; width:350px; text-align:center;
  display:flex; flex-direction:column; border-radius:10px;
  transition: box-shadow .3s ease, transform .3s ease, border .3s ease, background .3s ease;
  border:2px solid transparent;
}
#email:hover, #localizacion:hover, #telefono:hover, #cv:hover{
  background:rgba(40,60,100,.95);
  border:2px solid rgba(100,149,237,.8);
  box-shadow:0 0 24px rgba(100,149,237,.35);
  transform:translateY(-5px) scale(1.03);
}
#email #tituloCorreo, #localizacion #Titubicacion, #telefono #Tittelefono, #cv #TitCV{
  font-family:'Orbitron', sans-serif; font-weight:bold; padding-top:20px; font-size:22px;
}
#email #gmail, #localizacion #ubicacion, #telefono #numeroTelefono, #cv #descargarCv{
  font-family:'Rajdhani', sans-serif; font-size:18px; margin-top:10px;
}
#cv a, #email a{ color:var(--secondary-color); }
#cv a:hover, #email a:hover{ color:var(--primary-color); }
#email i, #localizacion i, #telefono i, #cv i{
  color:var(--primary-color); padding-right:15px; padding-left:1px; font-weight:20px;
}
/*reponsive monitor y pantallas grandes */
@media (min-width:1200px){
  #datosContacto{
    justify-content:center;  /* centra horizontalmente */
  }
}

/* Responsive contacto + mobile nav + about */
@media (max-width:768px){
  .hamburger{ display:block; }
  nav{
    position:fixed; top:0; right:-100%; width:30%; height:100vh;
    background:var(--header-color); padding:2rem; transition:right .3s ease;
  }
  nav.active{ right:0; }
  nav ul{ flex-direction:column; margin-top:4rem; }
  nav ul li{ margin:1rem 0; }

  #description{ margin:0 5%; font-size:16px; }

  /* skills en columna */
  #skills{ display:flex; flex-direction:column; text-align:center; margin-bottom:100px; margin-left:10%; margin-right:10%; }
  #sistemas, #bases, #competencias, #languages{ min-height:auto; width:auto; }

  /* proyectos wrapper en móvil */
  #tarjetas{ margin:5% 5% 0; background:rgb(35,34,35); box-shadow:var(--shadow-color); }

  /* contacto en columna */
  #datosContacto{ flex-direction:column; gap:20px; align-items:center; padding:0 5%; }
  #email, #localizacion, #telefono, #cv{
    width:100%; max-width:350px; height:auto; padding:20px 15px; margin:0 0 15px;
  }
  #email #tituloCorreo, #localizacion #Titubicacion, #telefono #Tittelefono, #cv #TitCV{
    font-size:18px; padding-top:10px;
  }
  #email #gmail, #localizacion #ubicacion, #telefono #numeroTelefono, #cv #descargarCv{
    margin-top:8px; font-size:14px;
  }
  #email i, #localizacion i, #telefono i, #cv i{
    padding-right:10px; font-size:18px;
  }
}




