/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Fuente principal */
body {
  font-family: 'Montserrat', sans-serif;
  background: linear-gradient(135deg, #1e1e2f, #121217);
  color: #ddd;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  position: relative; /* para contener elementos absolutos si hiciera falta */
}

/* Contenedor general */
header,
footer {
  text-align: center;
  margin-bottom: 30px;
  user-select: none;
}

header h1 {
  font-weight: 600;
  font-size: 2.8rem;
  color: #bb86fc;
  text-shadow: 0 0 12px #bb86fcaa;
  margin-bottom: 8px;
}

header p {
  font-weight: 400;
  font-size: 1.1rem;
  color: #aaa;
}

footer p {
  font-size: 0.9rem;
  color: #666;
}

footer a {
  color: #bb86fc;
  text-decoration: none;
}

footer a:hover,
footer a:focus {
  text-decoration: underline;
}

/* Glass effect general para secciones */

/* Actualización importante: ahora .project tiene position: relative y z-index 2 para estar encima de fondo */
.glass {
  background: rgba(30, 20, 50, 0.25);
  border-radius: 20px;
  border: 1px solid rgba(187, 134, 252, 0.3);
  box-shadow: 0 8px 32px rgba(187, 134, 252, 0.15);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 25px 30px;
  margin-bottom: 72px;
  max-width: 100%;
  width: 1200px;
  color: #ddd;
}

/* Proyectos con posición relativa para estar sobre la imagen */
.project {
  position: relative;
  z-index: 2;
  border-radius: 20px;
}

/* Imagen de fondo para cada proyecto */
.background-image-portfolio {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw; /* ancho total pantalla */
  z-index: 1;
  background-size: cover;
  background-position: center;
  filter: brightness(0.3);
  pointer-events: none;
}

/* Sobre mí */
.about h2 {
  color: #bb86fc;
  font-weight: 600;
  font-size: 2rem;
  margin-bottom: 14px;
  text-shadow: 0 0 6px #bb86fcaa;
}

.about p {
  font-size: 1.15rem;
  line-height: 1.5;
  color: #ccc;
}

/* NAVIGATION CARDS */

.navigation .nav-cards {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.nav-card {
  background: rgba(40, 40, 50, 0.4);
  border: 1px solid rgba(187, 134, 252, 0.5);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 18px;
  width: 280px;
  padding: 30px 25px;
  text-align: center;
  color: #ddd;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(187, 134, 252, 0.25);
  transition: background 0.3s ease, transform 0.25s ease, box-shadow 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.nav-card h3 {
  font-weight: 600;
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: #bb86fc;
  text-shadow: 0 0 10px #bb86fcaa;
}

.nav-card p {
  font-size: 1rem;
  line-height: 1.3;
  color: #ccc;
}

.nav-card:hover,
.nav-card:focus {
  background: rgba(67, 33, 124, 0.65);
  box-shadow: 0 12px 32px rgba(187, 134, 252, 0.7);
  transform: translateY(-6px);
  outline: none;
}

/* Responsive nav cards */
@media (max-width: 650px) {
  .navigation .nav-cards {
    flex-direction: column;
    align-items: center;
  }

  .nav-card {
    width: 90%;
    max-width: 320px;
  }
}

/* Proyectos */

.project h2 {
  font-weight: 600;
  font-size: 1.9rem;
  color: #bb86fc;
  margin-bottom: 18px;
  text-shadow: 0 0 8px #bb86fcaa;
}

/* Contenedor horizontal para video + descripción */
.project-content {
  display: flex;
  gap: 28px;
  align-items: center; /* Centrado vertical */
  justify-content: space-between;
  flex-wrap: nowrap; /* No se rompe en pantallas grandes */
  min-height: 280px;
}

.video-container {
  flex: 0 1 560px; /* base 560px, puede encoger */
  max-width: 560px;
  min-width: 400px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(187, 134, 252, 0.3);
}

.video-container iframe {
  width: 100%;
  height: 320px; /* Más alto */
  border: none;
  display: block;
}

/* Descripción al lado derecho */
.project-description {
  flex: 1 1 420px; /* base 420px, puede crecer o encoger */
  max-width: 520px;
  min-width: 300px;
  font-size: 1.15rem;
  line-height: 1.5;
  color: #ddd;
  user-select: text;
}

/* Contacto en portfolio */
.contact h2 {
  font-weight: 600;
  font-size: 1.9rem;
  color: #bb86fc;
  margin-bottom: 18px;
  text-shadow: 0 0 8px #bb86fcaa;
}

.contact p {
  font-size: 1.15rem;
  margin-bottom: 20px;
  color: #ccc;
}

/* Botón contacto */
.btn-contact {
  display: inline-block;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 1.1rem;
  color: #fff;
  background: #bb86fc;
  border-radius: 32px;
  text-decoration: none;
  box-shadow: 0 8px 20px #bb86fcaa;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
}

.btn-contact:hover,
.btn-contact:focus {
  background: #a060f7;
  box-shadow: 0 12px 28px #a060f7cc;
  outline: none;
  cursor: pointer;
}

/* Responsive Projects */
@media (max-width: 900px) {
  .project-content {
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap; /* para que pueda ajustarse */
    min-height: auto;
  }

  .video-container,
  .project-description {
    max-width: 100%;
    flex-basis: auto;
    min-width: auto;
  }

  .video-container iframe {
    height: 260px;
  }
}

@media (max-width: 450px) {
  body {
    padding: 30px 12px;
  }

  header h1 {
    font-size: 2.2rem;
  }

  .about h2,
  .project h2,
  .contact h2 {
    font-size: 1.5rem;
  }

  .nav-card {
    width: 100%;
  }
}

/* Estilos específicos para la página trabajos.html */
body#trabajos {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px 20px;
}

body#trabajos .message-container {
  background: rgba(30, 20, 50, 0.25);
  border-radius: 20px;
  border: 1px solid rgba(187, 134, 252, 0.3);
  box-shadow: 0 8px 32px rgba(187, 134, 252, 0.15);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 40px 50px;
  max-width: 600px;
  text-align: center;
  user-select: text;
  color: #ddd;
}

body#trabajos .message-container h1 {
  font-weight: 700;
  font-size: 3rem;
  color: #bb86fc;
  margin-bottom: 18px;
  text-shadow: 0 0 10px #bb86fcaa;
}

body#trabajos .message-container p {
  font-size: 1.4rem;
  margin-bottom: 28px;
  text-shadow: 0 0 6px #bb86fcaa;
}

body#trabajos a.back-link {
  font-weight: 600;
  font-size: 1.1rem;
  color: #bbb;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: text;
}

body#trabajos a.back-link:hover,
body#trabajos a.back-link:focus {
  color: #fff;
  outline: none;
}

.tools {
  margin-top: 40px;
  background: rgba(100, 50, 180, 0.25); /* un poco más color */
  border: 1px solid rgba(187, 134, 252, 0.6);
  color: #eee;
  padding: 25px 30px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(187, 134, 252, 0.3);
}

.tools h2 {
  color: #d1aaff;
  font-weight: 600;
  font-size: 2rem;
  margin-bottom: 20px;
  text-shadow: 0 0 8px #bb86fcaa;
}

.tools ul {
  list-style: none;
  font-size: 1.2rem;
  line-height: 1.6;
  padding-left: 0;
}

.tools ul li {
  margin-bottom: 10px;
  padding-left: 1.5em;
  position: relative;
  color: #ccc;
}

.tools ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.4rem;
}
