/*---- NORMALIZAR Y RESETEAR ESTILOS CSS ----
---------------------------------------------- */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #1e1a20;
  color: #e0e0e0;
  font-family: "Roboto", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

img,
video {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ----- TIPOGRAFÍA Y ELEMENTOS GENERALES --------
   ----------------------------------------------- */
h1,
h2,
h3 {
  font-family: "Roboto Mono", monospace;
  color: #ffffff;
}

form,
input,
select,
textarea,
button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* --- ENCABEZADO (HEADER) ---
   ---------------------------------------- */
header {
  background-color: #000000;
  padding: 1.5rem 5% 0.5rem 5%;
  text-align: center;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  display: inline-block;
  background: linear-gradient(to right, rgb(11, 203, 254), rgb(89, 29, 200));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- NAVEGACIÓN (NAV) ---
   ---------------------------------------- */
nav {
  background-color: #000000;
  padding: 1rem 5%;
  border-bottom: 2px solid #333333;

  /* nav fijo al hacer scroll */
  position: sticky;
  top: 0;
  z-index: 100;
}

nav ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
}

nav a:hover {
  color: rgb(167, 139, 250);
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background-color: rgb(89, 29, 200);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* --- SECCIÓN 1: SOBRE MÍ ---
   ---------------------------------------- */

#sobre-mi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 3rem 5%;
}

/* contenedor imagen */
.sobre-mi-imagen {
  width: 100%;
  max-width: 280px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;

  /* borde con gradiente de color */
  border: 4px solid transparent;
  background:
    linear-gradient(#1e1a20, #1e1a20) padding-box,
    linear-gradient(to right, rgb(11, 203, 254), rgb(89, 29, 200)) border-box;
}

/* transición zoom para imagen */
.sobre-mi-imagen img {
  width: 100%;
  display: block;
  transition: transform 300ms ease-in-out;
}

/* texto de imagen (oculto por defecto) */
.avatar-texto {
  visibility: hidden;
  opacity: 0;
  width: 100%;
  padding: 1rem 0;
  position: absolute;
  bottom: 0;
  background-color: rgba(24, 20, 25, 0.85);
  transition: all 250ms ease-in-out;
}

.avatar-texto p {
  color: #ffffff;
  text-align: center;
  font-size: 1.1rem;
  text-shadow: 1px 1px 3px #000000;
}

/* efecto hover*/
.sobre-mi-imagen:hover img {
  transform: scale(1.05); /*se agranda foto*/
}

.sobre-mi-imagen:hover .avatar-texto {
  visibility: visible;
  opacity: 1; /*aparece el nombre */
}

/* texto */
.sobre-mi-texto {
  max-width: 600px;
  text-align: center;
}

.sobre-mi-texto h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: inline-block;
  background: linear-gradient(to right, rgb(11, 203, 254), rgb(89, 29, 200));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sobre-mi-texto p {
  font-size: 1.15rem;
  color: #e0e0e0;
}

/* --- media query (pantalla pc) --- */
@media (min-width: 768px) {
  #sobre-mi {
    flex-direction: row;
    justify-content: center;
    gap: 4rem;
    padding: 5rem 5%;
  }

  .sobre-mi-texto {
    text-align: left;
  }
  .sobre-mi-texto h2 {
    font-size: 2.5rem;
  }
}

/* --- TÍTULOS de cada sección ---
   ----------------------------------- */

.titulo-seccion {
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 4rem;
  position: relative;
  padding-bottom: 1.5rem;
  text-align: center;
  max-width: 100%;
  overflow-wrap: break-word;
}

.titulo-seccion::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 360px);
  height: 4px;
  background-color: rgb(89, 29, 200);
  border-radius: 2px;
}

@media (min-width: 768px) {
  .titulo-seccion {
    font-size: 2.5rem;
  }
}

/* --- SECCIÓN 2: PROYECTOS ---
   ---------------------------------------- */
#tarjetas {
  padding: 4rem 5%;
  background-color: #151217;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* grid (1 columna en pantallas angostas) */
.tarjetas-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  width: 100%;
  max-width: 1200px;
}

.tarjeta {
  background-color: #1e1a20;
  border: 1px solid #333333;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.tarjeta:hover {
  transform: translateY(-8px);
  box-shadow: 0px 10px 25px rgba(89, 29, 200, 0.25);
}

.tarjeta img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.2rem;
}

.tarjeta-tags {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.tag {
  background-color: rgba(89, 29, 200, 0.15);
  color: rgb(167, 139, 250);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgb(89, 29, 200);
}

.tarjeta h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: rgb(11, 203, 254);
}

.tarjeta p {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  color: #b3b3b3;
  font-size: 0.95rem;
}

.btn-proyecto {
  display: inline-block;
  width: fit-content;
  padding: 0.6rem 1.2rem;
  color: white;
  background-color: rgba(83, 50, 212, 0.8);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 300ms ease-in-out;
}

.btn-proyecto:hover {
  background-color: transparent;
  transform: scale(0.97);
  box-shadow: 1px 1px 10px rgba(89, 29, 200, 0.5);
  border-color: rgb(83, 50, 212);
}

/* --- media query --- */
@media (min-width: 768px) {
  #tarjetas {
    padding: 6rem 5%;
  }
  .tarjetas-container {
    grid-template-columns: repeat(3, 1fr); /* 3 columnas */
  }
}

/* --- SECCIÓN 3: HABILIDADES ---
   ---------------------------------------- */
#habilidades {
  padding: 4rem 5%;
  background-color: #1e1a20;
}

.contenedor-habilidades {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.grupo-habilidades {
  background-color: #151217;
  border: 1px solid #333333;
  border-radius: 12px;
  padding: 3rem 2rem;
  box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
}

.grupo-habilidades h3 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 3rem;
  color: rgb(11, 203, 254);
}

.habilidades-lista {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 2.5rem;
  justify-items: center;
}

.habilidad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

.habilidad i {
  font-size: 4.5rem;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.habilidad span {
  font-size: 1rem;
  color: #b3b3b3;
  font-weight: 700;
  transition: color 0.3s ease;
}

/* --- Efecto hover --- */
/* tarjeta */
.habilidad:hover i {
  transform: translateY(-10px) scale(1.1);
  filter: drop-shadow(0px 10px 10px rgba(11, 203, 254, 0.4));
}

/* texto se ilumina */
.habilidad:hover span {
  color: rgb(11, 203, 254);
}

/* --- media query --- */
@media (min-width: 768px) {
  #habilidades {
    padding: 6rem 5%;
  }
}

/* --- SECCIÓN 4: PELÍCULAS --- 
--------------------------------------*/

/* contenedor general */
#peliculas {
  padding: 4rem 5%;
  background-color: #151217;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* tarjeta película */
.pelicula {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;

  background-color: #1e1a20;
  border: 1px solid #333333;
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.3s ease;
}

/* efecto hover */
.pelicula:hover {
  box-shadow: 0px 5px 15px rgba(89, 29, 200, 0.2);
}

/* efecto hover en imágen */
.imagen-hover {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  width: 160px;
}

.imagen-hover img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 300ms ease-in-out;
}

.imagen-hover:hover img {
  transform: scale(1.05);
}

/* texto sobre imagen */
.imagen-hover-texto {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 0.8rem;
  background-color: rgba(24, 20, 25, 0.85);
  text-align: center;
  transition: all 250ms ease-in-out;
}

.imagen-hover:hover .imagen-hover-texto {
  visibility: visible;
  opacity: 1;
}

/* contenido de la tarjeta */
.pelicula-contenido {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* contenedor de las tarjetas de películas */
.peliculas-lista {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 900px;
}

/* Puntuación y premios */
.dato-pelicula {
  font-size: 0.95rem;
  color: #b3b3b3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* íconos */
.dato-pelicula i {
  color: rgb(11, 203, 254);
  font-size: 0.95rem;
}

/* palabra destacada */
.dato-pelicula span {
  color: #ffffff;
  font-weight: 700;
}

/* --- media query --- */
@media (min-width: 768px) {
  #peliculas {
    padding: 6rem 5%;
  }
  .pelicula {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }

  .imagen-hover {
    width: 160px;
    flex-shrink: 0;
  }
}

/* --- SECCIÓN 5: CONTACTO ---
---------------------------------------- */

#contacto {
  padding: 4rem 5%;
  background-color: #1e1a20;
}

/* contenedor del formulario */
.formulario-contacto {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background-color: rgba(89, 29, 200, 0.08);
  border: 1px solid #333333;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.3);
}

/* grilla */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

/* inputs */
.form-grid input {
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid #333;
  background-color: #151217;
  color: #e0e0e0;
  outline: none;
  transition: all 0.25s ease;
}

/* textarea */
textarea {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #333;
  background-color: #151217;
  color: #e0e0e0;
  outline: none;
  resize: vertical;
}

/* placeholder */
::placeholder {
  color: #888;
  font-size: 0.9rem;
}

/* interacción focus */
.form-grid input:focus,
textarea:focus {
  border-color: rgb(89, 29, 200);
  box-shadow: 0 0 8px rgba(89, 29, 200, 0.4);
}

/* botón */
.btn-enviar {
  display: block;
  margin: 1.5rem auto 0;
  padding: 0.8rem 1.5rem;
  background-color: rgba(83, 50, 212, 0.8);
  color: white;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-enviar:hover {
  background-color: transparent;
  border: 1px solid rgb(83, 50, 212);
  box-shadow: 0px 0px 10px rgba(89, 29, 200, 0.5);
}

/* -- media query -- */
@media (min-width: 768px) {
  #contacto {
    padding: 6rem 5%;
  }
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- FOOTER ---
---------------------------------------- */

footer {
  background-color: #000000;
  border-top: 1px solid #333333;
  padding: 3rem 5% 2rem;
  position: relative;
}

/* contenedor principal */
.footer-contenido {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

/* redes */
.footer-redes {
  display: flex;
  gap: 1.2rem;
}

/* icono circular */
.footer-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;

  /* borde degradado */
  border: 2px solid transparent;
  background:
    linear-gradient(#000000, #000000) padding-box,
    linear-gradient(to right, rgb(11, 203, 254), rgb(89, 29, 200)) border-box;

  color: rgb(11, 203, 254);
  transition: all 0.3s ease;
}

/* hover redes */
.footer-link:hover {
  transform: scale(1.15);
  color: rgb(167, 139, 250);
  box-shadow: 0 0 12px rgba(11, 203, 254, 0.4);
}

/* texto para contactarse*/
.footer-cta {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgb(11, 203, 254);
  transition: color 0.3s ease;
}

.footer-cta:hover {
  color: rgb(167, 139, 250);
}

/* copyright */
.footer-copyright {
  font-size: 0.85rem;
  color: #777777;
}

/* botón para subir */
.footer-subir {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  z-index: 200;
}

.footer-subir a {
  font-size: 2.4rem;
  color: #666666;
  transition: all 0.3s ease;
  display: block;
}

/* hover sobre botón subir*/
.footer-subir a:hover {
  color: rgb(167, 139, 250);
  transform: translateY(-3px);
}

/* media query */
@media (min-width: 768px) {
  .footer-contenido {
    flex-direction: row;
    justify-content: center;
    gap: 2.5rem;
  }
}
