@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700;900&family=JetBrains+Mono:wght@400;700&display=swap");

:root {
  --blue-bright: #00d4ff;
  --azul-claro: #00d4ff;
  --azul-oscuro: #0a1219;
  --naranja-hl: #ff9d00;
  --verde-claro: #00ff88;
  --verde-oscuro: #0a1912;
  --texto-main: #e2f0e8;
  --texto-dim: #8bc0a1;
  --borde: rgba(0, 255, 136, 0.2);
  --carta-bg: rgba(15, 35, 25, 0.9);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: var(--texto-main);
  line-height: 1.5;
}

html {
  background-color: var(--verde-oscuro);
}

body {
  background-color: transparent;
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
  overflow-y: scroll;
  padding-bottom: 80px;
}

/* ANIMACION PARTICULAS BACKGROUND*/
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle, rgba(0, 255, 136, 0.15) 1px, transparent 1px),
    radial-gradient(circle, rgba(0, 255, 136, 0.05) 1px, transparent 1px);
  background-size:
    1px 8px,
    200px 100px;
  z-index: -2;
  animation: particle-move 60s linear infinite;
}

@keyframes particle-move {
  0% {
    background-position:
      0 0,
      0 0;
  }
  100% {
    background-position:
      300px 300px,
      -150px -150px;
  }
}

.header {
  display: flex;
  z-index: 10000;
  position: fixed;
  width: 100%;
  background: var(--verde-oscuro);
  padding: 15px;
  font-weight: 700;
  box-shadow: inset 0px -2px 0px rgb(255, 255, 255);
  backdrop-filter: none;
  align-items: center;

  p {
    display: flex;
    font-size: 20px;
    align-items: center;
    justify-content: left;
    margin-left: 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  }

  p:before {
    content: "λ";
    color: var(--verde-claro);
    margin-right: 20px;
    font-size: 30px;
    text-shadow: 0 0 15px var(--verde-claro);
  }

  a {
    text-decoration: none;
    position: absolute;
    right: 30px;
    font-size: 20px;
  }

  a:before {
    content: "← VOLVER";
    color: #e2e8f08b;
    text-shadow: 0 0 10px var(--texto-dim);
  }

  a:hover:before {
    color: var(--texto-main);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  }
}

/* ESPACIO ENTRE HEADER Y EL TITULO */
.espacio {
  height: 125px;
}

/* TITULO */
.titulo {
  font-size: 40px;
  width: 100%;
  text-align: center;

  span {
    color: var(--verde-claro);
    -webkit-text-stroke: 1px var(--verde-claro);
  }
}
/* Estilo para el texto del proyecto */
.titulo h1 {
  font-size: 4.5rem;
  font-weight: 900;
  color: var(--verde-claro);
  text-shadow: 0 0 15px var(--verde-claro);
}

.titulo p {
  font-family: "JetBrains Mono";
  font-size: 1.5rem;
  color: var(--texto-dim);
  letter-spacing: 2px;
}

/* BRILLO AL TITULO */
.titulo h1 {
  text-shadow:
    0 0 5px rgba(255, 255, 255, 0.4),
    0 0 15px rgba(255, 255, 255, 0.4),
    0 0 100px rgba(255, 255, 255, 0.4);

  span {
    text-shadow:
      0 0 5px var(--naranja-hl, 1),
      0 0 10px var(--naranja-hl, 1),
      0 0 50px var(--naranja-hl, 1);
  }
}

.galeria {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.proyecto {
  position: relative;
  overflow: hidden;
  background-color: var(--carta-bg);
  border: 2px solid var(--borde);
  width: calc(33.333% - 20px);
  min-width: 300px;
  aspect-ratio: 16 / 9;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}
.proyecto:hover {
  transform: translateY(-5px);
  background-color: rgba(0, 255, 136, 0.05);
  border-color: var(--verde-claro);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 15px var(--verde-claro);
}

.proyecto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.3s,
    filter 0.3s;
}

.proyecto:hover img {
  transform: scale(1.1);
  filter: brightness(50%);
}

.proyecto .descripcion {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.proyecto:hover .descripcion {
  opacity: 1;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: var(--verde-oscuro);
  border-top: 1px solid var(--borde);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  color: var(--texto-dim);
  text-shadow: 0 0 5px var(--verde-claro);
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--texto-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.github-link svg {
  width: 16px;
  height: 16px;
}

.github-link:hover {
  color: var(--verde-claro);
}

/* ========================= */
/* 📱 MODO MOVIL (SIN HOVER) */
/* ========================= */

@media (max-width: 768px) {
  .header p {
    font-size: 16px;
    margin-left: 6px;
  }

  .header p:before {
    margin-right: 10px;
    font-size: 22px;
  }

  .header a {
    right: 16px;
  }

  .header a:before {
    content: "←";
    font-size: 25px;
  }

  .espacio {
    height: 96px;
  }

  .titulo h1 {
    font-size: 2.2rem;
    line-height: 1.15;
    padding: 0 10px;
  }

  .titulo p {
    font-size: 1rem;
  }

  .galeria {
    flex-direction: column;
    align-items: center;
  }

  .proyecto {
    min-width: 90%;
    height: auto;
  }

  .proyecto img {
    height: auto;
    max-height: none;
  }

  /* Quitamos efectos hover en móvil */
  .proyecto:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: var(--borde);
    background-color: var(--carta-bg);
  }

  .proyecto:hover img {
    transform: none;
    filter: none;
  }

  /* Descripción como bloque debajo */
  .proyecto .descripcion {
    position: static;
    transform: none;
    opacity: 1;
    background-color: rgba(0, 255, 136, 0.08);
    color: var(--texto-main);
    padding: 15px;
    font-size: 1rem;
    font-weight: 400;
    border-top: 1px solid var(--borde);
    text-align: center;
  }

  .github-link span {
    max-width: 70vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
