@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&display=swap");

/* ============================================================
   STYLES - GERARDO AMAYA (EDICIÓN: DEEP TECH, NAV & ICON FIX)
   ============================================================ */

/* -------- VARIABLES (fáciles de ajustar) -------- */
:root {
  --bg-1: #0a0f1e; /* nuevo deep tech */
  --bg-2: #12243a;
  --bg-3: #1e344f;
  --glass: rgba(255, 255, 255, 0.04);
  --card: rgba(255, 255, 255, 0.05);
  --muted: #94a3b8;
  --text: #e2e8f0;
  --accent: #00d4ff; /* cian eléctrico */
  --accent-2: #38bdf8;
  --accent-3: #3b82f6; /* fallback azul */
  --shadow: rgba(0, 0, 0, 0.12);
}

/* -------- RESET & BASE -------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  width: 100%;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden !important;
  width: 100%;
}
body {
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3));
  font-family: "Roboto Condensed", sans-serif;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-attachment: fixed;
}

/* Ajustar contenedores principales para evitar espacios */
.container,
.hero-inner,
.about-inner,
.services-grid,
.skills-container,
.projects-container,
.contact-wrapper {
  margin: 0 auto; /* Centra sin márgenes laterales */
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
  max-width: 100%; /* Evita que excedan el ancho de la ventana */
}
/* Específico para hero, que podría tener elementos que empuje */
.hero-inner {
  padding: 10px; /* Reduce padding si es excesivo */
  margin: 0; /* Elimina márgenes */
}
/* Si hay elementos con position absolute que causan problemas */
.particle,
.skills-particle,
.project-particle,
.contact-particle {
  max-width: 100vw; /* Limita el ancho máximo */
  left: min(
    100vw - 10px,
    var(--left)
  ); /* Asegura que no exceda el viewport (ajusta si usas variables) */
}

/* ========== NAVEGACIÓN ========== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  padding: 10px 0;
  transition: background 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* Permite wrap en desktop si es necesario */
}

.logo img {
  max-width: 120px;
  height: auto;
  transition: transform 0.2s ease;
  flex-shrink: 0; /* Evita que se comprima */
}

.logo img:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease, transform 0.2s ease;
}

.nav-links li a:hover {
  color: var(--accent, #00d4ff);
  transform: translateY(-2px);
}

/* ========== MENÚ HAMBURGUESA ========== */
.menu-icon {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  transition: background 0.2s ease;
  flex-shrink: 0; /* Evita que se comprima */
}

.menu-icon:hover {
  background: rgba(255, 255, 255, 0.1);
}

.menu-icon-bar {
  width: 25px;
  height: 3px;
  background: var(--accent, #00d4ff);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.menu-icon.active .menu-icon-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-icon.active .menu-icon-bar:nth-child(2) {
  opacity: 0;
}

.menu-icon.active .menu-icon-bar:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ========== RESPONSIVE: MOBILE ========== */
@media (max-width: 768px) {
  .nav-container {
    flex-wrap: nowrap; /* Fuerza una sola línea para evitar que el menu-icon baje */
    align-items: center;
  }

  .logo img {
    max-width: 100px; /* Reduce ancho para liberar espacio */
  }

  .menu-icon {
    display: flex;
    margin-left: 180px;
    margin-top: 10px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%; /* Fuera de pantalla por defecto */
    width: 70%;
    max-width: 280px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    padding: 100px 20px 20px;
    gap: 20px;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    transition: right 0.4s ease;
    z-index: 10000; /* Muy alto para estar por encima de todo */
    opacity: 0;
    pointer-events: none;
  }

  .nav-links.open {
    right: 0;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li {
    opacity: 0;
    transform: translateX(20px);
    animation: slideInMobile 0.4s ease forwards;
  }

  .nav-links li:nth-child(1) {
    animation-delay: 0.1s;
  }
  .nav-links li:nth-child(2) {
    animation-delay: 0.2s;
  }
  .nav-links li:nth-child(3) {
    animation-delay: 0.3s;
  }
  .nav-links li:nth-child(4) {
    animation-delay: 0.4s;
  }
  .nav-links li:nth-child(5) {
    animation-delay: 0.5s;
  }

  @keyframes slideInMobile {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .nav-links li a {
    font-size: 1.2rem;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.3s ease, padding-left 0.3s ease;
  }

  .nav-links li a:hover {
    color: var(--accent, #00d4ff);
    padding-left: 10px;
  }
}

/* ========== BLOQUEAR SCROLL EN MOBILE ========== */
body.no-scroll {
  overflow: hidden;
}

/* -------- HERO -------- */
/* ======= HERO LAYOUT LIMPIO Y RESPONSIVE ======= */
.hero {
  width: 100vw;
  box-sizing: border-box;
  min-height: 100vh;
  padding: 80px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #071022 0%, #07111a 60%);
  color: #e6eef6;
}

/* Contenedor interno (dos columnas en desktop) */
.hero-inner {
  max-width: 1400px;
  width: 100%;
  display: flex;
  gap: 48px;
  align-items: center;
  justify-content: space-between;
  z-index: 2; /* sobre pseudo-fondos */
  box-sizing: border-box;
  padding: 10px;
}

/* TEXTO (LADO IZQUIERDO) */
.hero-text {
  flex: 1 1 480px;
  min-width: 260px;
  z-index: 2;
}

.hero-text h1 {
  font-size: 2.8rem;
  line-height: 1.02;
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.hero-text .accent {
  color: var(--accent, #00e5ff);
}

/* subtítulo y botón */
.sub {
  margin-top: 10px;
  font-size: 1.05rem;
  color: rgba(226, 232, 240, 0.9);
  max-width: 560px;
}

.btn {
  display: inline-block;
  margin-top: 22px;
  padding: 12px 26px;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    var(--accent-2, #00b8d4),
    var(--accent, #00e5ff)
  );
  color: #00121c;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  width: 250px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 230, 255, 0.14);
}

/* TERMINAL (LADO DERECHO) */
.terminal {
  flex: 0 0 520px; /* ancho fijo preferente */
  max-width: 52%;
  min-width: 300px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.72),
    rgba(6, 10, 16, 0.75)
  );
  border: 1px solid rgba(0, 230, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-right: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  z-index: 2;
  box-sizing: border-box;
}

/* header de la terminal (los puntitos) */
.terminal-header {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.dot.red {
  background: #ff6b62;
}
.dot.yellow {
  background: #ffd166;
}
.dot.green {
  background: #5fe27a;
}

/* body de la terminal: espacio fijo y scroll interno oculto */
.terminal-body {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.95rem;
  color: #a8fff6;
  line-height: 1.6;
  min-height: 180px;
  max-height: 220px;
  overflow: hidden; /* evitar que el hero crezca */
  position: relative;
  padding-right: 6px;
}

/* las líneas entran con fade */
.terminal-body .line {
  opacity: 0;
  transform: translateY(6px);
  animation: lineIn 0.28s ease forwards;
  margin: 4px 0;
}
@keyframes lineIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* clase que vibra al entrar línea nueva */
.terminal-body.shake {
  animation: tinyShake 0.14s;
}
@keyframes tinyShake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-2px);
  }
  50% {
    transform: translateX(1px);
  }
  75% {
    transform: translateX(-1px);
  }
  100% {
    transform: translateX(0);
  }
}

/* CURSOR parpadeante (cuando esté visible en la última línea) */
.cursor {
  display: inline-block;
  width: 10px;
  opacity: 1;
  animation: blink 600ms steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* fondo sutil de rejilla (z-index 0) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: translateZ(0);
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
  animation: slowGrid 30s linear infinite;
}
@keyframes slowGrid {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-120px, -120px);
  }
}

/* PARTICULAS (elementos .particle serán creados por JS) */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(0, 230, 255, 0.85);
  border-radius: 50%;
  opacity: 0.5;
  z-index: 1;
  pointer-events: none;
  animation: floatUp 9s linear infinite;
}
@keyframes floatUp {
  0% {
    transform: translateY(120vh) scale(0.4);
    opacity: 0;
  }
  70% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-30vh) scale(1);
    opacity: 0;
  }
}

/* ajuste para no encimar con pseudo-elementos */
.hero-inner > * {
  position: relative;
  z-index: 2;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .hero-inner {
    gap: 28px;
  }
  .terminal {
    flex: 0 0 44%;
    max-width: 44%;
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 60px 16px;
    min-height: auto;
  }

  /* pasar a columna: texto arriba, terminal abajo */
  .hero-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .terminal {
    width: 100%;
    max-width: 100%;
    min-width: auto;
  }
  .hero-text {
    text-align: center;
  }
  .hero-text h1 {
    font-size: 2.2rem;
  }
  .sub {
    margin: 8px auto 0;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.9rem;
  }
  .btn {
    padding: 10px 18px;
    font-size: 0.98rem;
  }
  .terminal-body {
    min-height: 140px;
    max-height: 180px;
    font-size: 0.9rem;
  }
  .hero-inner {
    flex-direction: column;
    margin-top: 100px;
    text-align: center;
  }
  .terminal {
    margin-top: -300px;
  }
}

/* ---------- ABOUT SECTION ---------- */
#about {
  position: relative;
  padding: 120px 20px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

/* ---- fondo mallado tipo 'mesh' ---- */
#about::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(0, 200, 255, 0.12),
      transparent 60%
    ),
    radial-gradient(circle at 80% 70%, rgba(255, 0, 180, 0.12), transparent 65%);
  z-index: 0;
  opacity: 0.45;
}

/* ---- partículas ---- */
#about-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ---- contenido ---- */
.about-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  gap: 60px;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* ---- foto ---- */
.about-photo {
  flex: 1;
  min-width: 280px;
  display: flex;
  justify-content: center;
}

.about-photo img {
  width: 270px;
  height: 270px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.45);
  border: 3px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  transition: transform 0.25s ease;
}

.about-photo img:hover {
  transform: translateY(-6px) scale(1.03);
}

/* ---- texto ---- */
.about-text {
  flex: 2;
  min-width: 300px;
}

.about-text h2 {
  font-size: 2.4rem;
  margin-bottom: 12px;
  color: var(--accent);
}

.about-text p {
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 300;
  margin-bottom: 14px;
  line-height: 1.55;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .about-inner {
    flex-direction: column;
    text-align: center;
  }

  .about-photo img {
    width: 220px;
    height: 220px;
  }
}

@media (max-width: 600px) {
  #about {
    padding: 80px 20px;
  }

  .about-text h2 {
    font-size: 2rem;
  }

  .about-text p {
    font-size: 1rem;
  }
}

/* ---------- SERVICES SECTION ---------- */
#services {
  position: relative;
  padding: 120px 20px;
  overflow: hidden;
}

/* Mesh background */
#services::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 10% 20%,
      rgba(0, 190, 255, 0.12),
      transparent 60%
    ),
    radial-gradient(circle at 90% 80%, rgba(255, 0, 160, 0.12), transparent 60%),
    radial-gradient(
      circle at 50% 50%,
      rgba(255, 255, 255, 0.03),
      transparent 70%
    );
  opacity: 0.5;
  z-index: 0;
}

/* CONTENIDO */
#services .container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

#services h2 {
  font-size: 2.6rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-description {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 800px;
  margin: 0 auto 60px auto;
  line-height: 1.6;
}

/* GRID */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 35px;
}

/* SERVICE CARD */
.service-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 28px 24px;
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
}

/* Glow interno */
.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 200, 255, 0.12),
    rgba(255, 0, 180, 0.1)
  );
  opacity: 0;
  transition: opacity 0.25s ease;
}

.service-card:hover::after {
  opacity: 0.65;
}

.service-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  border-color: rgba(0, 200, 255, 0.35);
}

/* CONTENT */
.service-content {
  display: flex;
  align-items: center;
  gap: 18px;
}

.service-icon {
  width: 60px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
  transform: rotate(-5deg) scale(1.1);
}

.service-text h3 {
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 6px;
}

.service-text p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ---------- PARTICULAS ---------- */
.services-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.services-particles::before,
.services-particles::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(0, 200, 255, 0.35), transparent 70%);
  border-radius: 50%;
  animation: floatParticle 14s infinite ease-in-out alternate;
  filter: blur(40px);
}

.services-particles::after {
  background: radial-gradient(circle, rgba(255, 0, 180, 0.35), transparent 70%);
  width: 140px;
  height: 140px;
  animation-duration: 18s;
}

@keyframes floatParticle {
  0% {
    transform: translate(-20%, -20%) scale(0.9);
  }
  50% {
    transform: translate(40%, 10%) scale(1.2);
  }
  100% {
    transform: translate(80%, -10%) scale(0.95);
  }
}

/* --------- RESPONSIVE --------- */
@media (max-width: 768px) {
  #services {
    padding: 80px 20px;
  }

  #services h2 {
    font-size: 2.2rem;
  }

  .section-description {
    font-size: 1rem;
    margin-bottom: 40px;
  }

  .service-content {
    flex-direction: column;
    text-align: center;
  }

  .service-icon {
    width: 70px;
  }

  .service-text h3 {
    font-size: 1.25rem;
  }
}

/* ============================
   SKILLS SECTION — GERA STYLE
=============================== */
#skills {
  position: relative;
  padding: 120px 20px;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, #111, #000 70%);
}

/* Fondo mallado */
#skills::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(#ffffff05 1px, transparent 1px),
    linear-gradient(90deg, #ffffff05 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 1;
  pointer-events: none;
}

/* Glow suave */
#skills::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, #ff008050, transparent 70%);
  opacity: 0.5;
  z-index: 1;
  pointer-events: none;
}

.skills-container {
  max-width: 1100px;
  margin: auto;
  position: relative;
  z-index: 5;
}

#skills h2 {
  font-size: 2.6rem;
  margin-bottom: 20px;
  color: var(--accent);
}

.skills-intro {
  color: #ccc;
  max-width: 700px;
  margin-bottom: 50px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 28px;
}

.skill-card {
  background: #0d0d0d;
  border: 1px solid #ffffff12;
  border-radius: 12px;
  padding: 25px 15px;
  text-align: center;
  backdrop-filter: blur(6px);
  transition: 0.25s ease;
  position: relative;
  z-index: 5;
}

.skill-card img {
  width: 55px;
  margin-bottom: 12px;
}

.skill-card span {
  display: block;
  color: #eee;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

/* Hover animado */
.skill-card:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: #ff0080;
  box-shadow: 0 0 18px #ff008030;
}

/* Partículas SKILLS */
.skills-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #ffffff20;
  border-radius: 50%;
  animation: floatSkill 6s linear infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes floatSkill {
  from {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  20% {
    opacity: 0.8;
  }
  to {
    transform: translateY(-120px) translateX(40px);
    opacity: 0;
  }
}

/* ============================
   RESPONSIVE — SKILLS
=============================== */

/* Tablets */
@media (max-width: 768px) {
  #skills {
    padding: 90px 20px;
  }

  #skills h2 {
    font-size: 2.2rem;
    color: var(--accent);
  }

  .skills-intro {
    font-size: 0.95rem;
    margin-bottom: 40px;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 22px;
  }

  .skill-card {
    padding: 20px 10px;
  }

  .skill-card img {
    width: 45px;
  }

  .skill-card span {
    font-size: 0.9rem;
  }
}

/* Celulares */
@media (max-width: 480px) {
  #skills {
    padding: 70px 15px;
    background: radial-gradient(circle at 30% 10%, #111, #000 80%);
  }

  #skills h2 {
    font-size: 1.9rem;
  }

  .skills-intro {
    font-size: 0.9rem;
    margin-bottom: 35px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .skill-card {
    padding: 18px 10px;
    border-radius: 10px;
  }

  .skill-card img {
    width: 40px;
  }

  .skill-card span {
    font-size: 0.85rem;
  }

  /* Partículas menos molestas en mobile */
  .skills-particle {
    width: 4px !important;
    height: 4px !important;
    opacity: 0.25 !important;
    animation-duration: 6s !important;
  }
}

/* Celulares chicos (ej: Moto E, iPhone SE) */
@media (max-width: 360px) {
  #skills h2 {
    font-size: 1.7rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .skill-card {
    padding: 15px 8px;
  }

  .skill-card img {
    width: 36px;
  }

  .skill-card span {
    font-size: 0.78rem;
    letter-spacing: 0.3px;
  }
}

/* ============================
   PROYECTOS — Estilo Pro
=============================== */

#projects {
  position: relative;
  padding: 120px 40px;
  background: radial-gradient(circle at 20% 10%, #0d0d0d, #000 80%);
  overflow: hidden;
}

/* Fondo mallado (mesh) */
#projects::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("img/backgrounds/mesh-gradient.webp"); /* Cambialo por tu archivo */
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Partículas */
.project-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.35;
  animation: floatProject 10s linear infinite;
  filter: blur(1px);
}

@keyframes floatProject {
  0% {
    transform: translateY(0);
    opacity: 0.15;
  }
  50% {
    opacity: 0.45;
  }
  100% {
    transform: translateY(-140px);
    opacity: 0.1;
  }
}

#projects h2 {
  font-size: 2.8rem;
  color: var(--accent);
  margin-bottom: 60px;
  position: relative;
  z-index: 2;
}

.projects-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 45px;
}

/* Tarjetas */
.project-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  padding: 22px;
  border-radius: 18px;
  transition: transform 0.35s ease, box-shadow 0.35s ease,
    border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 0 22px rgba(255, 0, 90, 0.25);
}

.project-card img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 16px;
}

.project-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: #fff;
}

.project-card p {
  font-size: 0.95rem;
  color: #ddd;
  line-height: 1.5;
  margin-bottom: 20px;
}

.tech-stack {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tech-stack img {
  width: 30px;
  filter: brightness(0.9);
}

/* Botón */

.project-link-mas {
  display: inline-block;
  padding: 10px 20px;
  margin-bottom: 10px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.project-link-mas:hover {
  background: #30ee0f;
}

.project-link {
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.project-link:hover {
  background: #ff2f7a;
}

/* ============================
   RESPONSIVE — PROYECTOS
=============================== */

@media (max-width: 768px) {
  #projects {
    padding: 90px 25px;
  }

  #projects h2 {
    font-size: 2.2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .project-card {
    padding: 20px;
  }

  .project-particle {
    width: 4px;
    height: 4px;
    opacity: 0.25;
  }
}

@media (max-width: 480px) {
  #projects {
    padding: 70px 20px;
    background: radial-gradient(circle at 30% 20%, #111, #000);
  }

  #projects h2 {
    font-size: 1.9rem;
  }

  .project-card h3 {
    font-size: 1.3rem;
  }

  .project-card p {
    font-size: 0.9rem;
  }
}

@media (max-width: 360px) {
  .project-card {
    padding: 16px;
  }

  .project-card p {
    font-size: 0.85rem;
  }
}

/* ============================
   CONTACTO — Estilo PRO
=============================== */

#contact {
  position: relative;
  padding: 120px 40px;
  background: radial-gradient(circle at 80% 20%, #0f0f0f, #000 80%);
  overflow: hidden;
}

/* Fondo mallado (mesh) */
#contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("img/backgrounds/mesh-contact.webp"); /* Cambialo por tu archivo */
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Partículas permanentes */
.contact-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(1px);
  animation: floatContact 14s infinite linear;
}

@keyframes floatContact {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0.2;
  }
  50% {
    opacity: 0.45;
  }
  100% {
    transform: translateY(-120px) translateX(40px);
    opacity: 0.2;
  }
}

/* Título */
#contact h2 {
  font-size: 2.8rem;
  color: var(--accent);
  margin-bottom: 50px;
  position: relative;
  z-index: 3;
}

/* Layout */
.contact-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  position: relative;
  z-index: 3;
}

/* Texto */
.contact-left {
  flex: 1;
  color: #fff;
}

.contact-small-title {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 10px;
}

.contact-big-title {
  font-size: 2.4rem;
  margin-bottom: 20px;
}

.contact-desc {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #ddd;
  max-width: 500px;
}

/* ICONOS / Burbujas glow */
.contact-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.contact-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  justify-content: center;
}

.icon-bubble {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease,
    border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.icon-bubble img {
  width: 34px;
  filter: brightness(1) drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

.icon-bubble:hover {
  transform: translateY(-8px) scale(1.08);
  border-color: var(--accent);
  box-shadow: 0 0 22px rgba(255, 0, 110, 0.35);
}

/* ============================
   RESPONSIVE
=============================== */

@media (max-width: 900px) {
  .contact-wrapper {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .contact-right {
    justify-content: center;
  }

  .contact-big-title {
    font-size: 2.1rem;
  }
}

@media (max-width: 600px) {
  #contact {
    padding: 90px 25px;
    background: radial-gradient(circle at 60% 20%, #111, #000);
  }

  .icon-bubble {
    width: 60px;
    height: 60px;
    border-radius: 16px;
  }

  .icon-bubble img {
    width: 30px;
  }
}

@media (max-width: 420px) {
  #contact h2 {
    font-size: 2.1rem;
  }

  .contact-big-title {
    font-size: 1.8rem;
  }

  .contact-desc {
    font-size: 0.95rem;
  }
}

footer {
  position: relative;
  background: #0b0b0b;
  padding: 40px 0;
  text-align: center;
  overflow: hidden;
}

/* Mallado suave */
footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(255, 255, 255, 0.05),
      transparent 60%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(255, 255, 255, 0.05),
      transparent 60%
    ),
    linear-gradient(120deg, rgba(255, 255, 255, 0.03) 0%, transparent 60%),
    linear-gradient(300deg, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
  z-index: 1;
}

/* Partículas */
footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='4' height='4' viewBox='0 0 4 4' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='2' r='1' fill='rgba(255,255,255,0.15)'/%3E%3C/svg%3E");
  opacity: 0.25;
  animation: particlesMove 15s linear infinite;
  z-index: 2;
}

/* Animación sutil */
@keyframes particlesMove {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 200px 200px;
  }
}

.footer-container {
  position: relative;
  z-index: 3;
}

footer p {
  color: #e1e1e1;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

/* MOBILE */
@media (max-width: 768px) {
  footer {
    padding: 30px 0;
  }
  footer p {
    font-size: 0.85rem;
  }
}
