/* Carga las fuentes TTF locales */
@font-face {
  font-family: 'Exo2';
  src: url('fonts/Exo2-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Orbitron';
  src: url('fonts/Orbitron-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'PixelifySans';
  src: url('fonts/PixelifySans-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Variables para colores y fuentes */
:root {
  --color-principal: #00ff88; /* verde */
  --color-secundario: #ff00aa; /* rosa */
  --fondo: #000000; /* fondo negro */
  --fuente-texto: 'Exo2', sans-serif;
  --fuente-titulo: 'Orbitron', sans-serif;
  --fuente-nombre: 'PixelifySans', sans-serif;
}

/* Reset y configuración base */
* {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
}

/* Estilos base */
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  background-color: var(--fondo);
  color: white;
  font-family: var(--fuente-texto);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Header con barra superior */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background-color: #111111;
  width: 100%;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Imagen de perfil en header */
.perfil-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-principal);
  flex-shrink: 0;
}

/* Navegación */
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav ul li a {
  color: var(--color-principal);
  text-decoration: none;
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s, color 0.3s;
  white-space: nowrap;
}

nav ul li a:hover {
  transform: scale(1.1);
  color: var(--color-secundario);
}

/* Sección principal */
main {
  padding: 2rem;
  width: 100%;
  max-width: 100vw;
}

/* Títulos en general */
h1, h2, h3, h4, h5 {
  font-family: var(--fuente-titulo);
  color: var(--color-principal);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  word-wrap: break-word;
}

/* Para nombres, títulos pequeños o destacados */
.nombre {
  font-family: var(--fuente-nombre);
  color: var(--color-secundario);
  font-size: 2rem;
  word-wrap: break-word;
}

/* Redes sociales */
.redes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.redes a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-secundario);
  font-family: var(--fuente-nombre);
  font-size: 1.2rem;
  transition: color 0.3s;
  word-wrap: break-word;
}

.redes a:hover {
  color: var(--color-principal);
}

.github {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.github a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-secundario);
  font-family: var(--fuente-nombre); /* PixelifySans */
  font-size: 1.2rem;
  transition: color 0.3s;
  word-wrap: break-word;
}

.github a:hover {
  color: var(--color-principal);
}

/* Mini logo en redes */
.mini-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

/* Galería de proyectos */
.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* celdas un poco más estrechas */
  gap: 1rem;
  margin-top: 1rem;
  width: 100%;
}

.galeria img {
  width: 90%;              /* imágenes un poco más pequeñas */
  height: auto;
  border: 2px solid var(--color-principal); /* borde un poco más delgado */
  border-radius: 8px;
  transition: transform 0.3s, border-color 0.3s;
  cursor: pointer;
  display: block;
  margin: 0 auto;          /* centra la imagen dentro de la celda */
}

.galeria img:hover {
  transform: scale(1.05);
  border-color: var(--color-secundario);
}

/* Contacto */
#contacto ul {
  list-style: none;
  padding: 0;
  word-wrap: break-word;
}

#contacto a {
  color: var(--color-principal);
  text-decoration: underline;
  transition: color 0.3s;
  word-wrap: break-word;
}

#contacto a:hover {
  color: var(--color-secundario);
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  color: white;
  background-color: #111111;
  font-family: var(--fuente-titulo);
  font-size: 14px;
  border-top: 1px solid var(--color-principal);
  user-select: none;
  width: 100%;
  margin-top: auto;
}

footer p:hover {
  color: var(--color-secundario);
  transition: color 0.3s ease;
}

.descripcion-proyectos textarea {
  background-color: #111;
  border: 2px solid var(--color-principal);
  color: white;
  resize: vertical;
  border-radius: 5px;
  transition: border-color 0.3s;
  width: 100%;
  max-width: 100%;
}

.descripcion-proyectos textarea:focus {
  outline: none;
  border-color: var(--color-secundario);
}

.guns-link span {
  font-family: 'PixelifySans', sans-serif;
  font-weight: bold;
  color: #ff00aa;
  word-wrap: break-word;
}

/* Media queries para responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }
  
  nav ul {
    gap: 1rem;
    justify-content: center;
  }
  
  nav ul li a {
    font-size: 1rem;
  }
  
  main {
    padding: 1rem;
  }
  
  .nombre {
    font-size: 1.5rem;
  }
  
  .galeria {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  header {
    padding: 0.5rem;
  }
  
  nav ul {
    gap: 0.5rem;
    flex-direction: column;
  }
  
  .perfil-img {
    width: 60px;
    height: 60px;
  }
  
  .nombre {
    font-size: 1.2rem;
  }
  
  main {
    padding: 0.5rem;
  }
}

/* GitHub Stats responsive - añadir al final de tu styles.css */

/* Hacer que las imágenes de GitHub Stats sean responsive */
img[src*="github-readme-stats"],
img[src*="vercel.app"],
img[src*="komarev.com"] {
  max-width: 100%;
  height: auto;
  width: auto;
  display: inline-block;
}

/* Contenedor de GitHub Stats */
.info div[style*="text-align:center"] {
  width: 100%;
  overflow: hidden;
}

/* Asegurar que las imágenes dentro de enlaces también sean responsive */
.info a img {
  max-width: 100%;
  height: auto;
  width: auto;
}

/* Media queries específicas para GitHub Stats */
@media (max-width: 768px) {
  img[src*="github-readme-stats"],
  img[src*="vercel.app"],
  img[src*="komarev.com"] {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
  
  /* Reducir un poco el margen en móvil */
  .info div[style*="text-align:center"] {
    padding: 0 0.5rem;
  }
}

@media (max-width: 480px) {
  img[src*="github-readme-stats"],
  img[src*="vercel.app"],
  img[src*="komarev.com"] {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0.25rem 0;
  }
  
  /* Asegurar que no haya overflow horizontal */
  .info div[style*="text-align:center"] {
    padding: 0 0.25rem;
    box-sizing: border-box;
  }
  
  /* Sección del formulario */
#mailme {
  max-width: 500px;
  margin: 50px auto;
  padding: 20px;
  background: #111;
  border: 1px solid #00ff88;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
  color: #fff;
  font-family: "Orbitron", sans-serif;
}

/* Título */
#mailme h3 {
  text-align: center;
  font-size: 1.5em;
  color: #00ff88;
  margin-bottom: 20px;
}

/* Etiquetas */
#mailme label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #ff00aa;
}

/* Inputs y textarea */
#mailme input[type="text"],
#mailme textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #00ff88;
  border-radius: 8px;
  background: #1a1a1a;
  color: #fff;
  font-size: 1em;
  outline: none;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

#mailme input[type="text"]:focus,
#mailme textarea:focus {
  border-color: #ff00aa;
  box-shadow: 0 0 10px #ff00aa;
}

/* Botón enviar */
#mailme input[type="submit"] {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #00ff88, #ff00aa);
  color: #fff;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

#mailme input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(255, 0, 170, 0.7);
}

}