/* ======= RESET ======= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Caesar', sans-serif;
  background-color: #000;
  color: #fff;
  scroll-behavior: smooth;
}

/* ======= FUENTE PERSONAL ======= */
@font-face {
  font-family: 'Caesar';
  src: url('fonts/caesar.TTF') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ======= HEADER ======= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 3px;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 0 15px rgba(255,255,255,0.8);
  cursor: default;
}

.nav a {
  color: #bbb;
  text-decoration: none;
  margin-left: 2rem;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.9);
}

.nav a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: -5px;
  background: linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0.5));
  transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

/* ======= HERO ======= */
.hero.fullpage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle at center, #0a0a0a 0%, #000 80%);
  overflow: hidden;
  text-align: center;
  padding: 3rem;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  animation: fadeIn 1.5s ease forwards;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.highlight {
  color: #fff;
  text-shadow: 0 0 25px rgba(255,255,255,0.9);
}

.subtitle {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: #ddd;
}

.secondary {
  font-size: 1.1rem;
  color: #aaa;
  margin-bottom: 2rem;
}

/* ======= BOTÓN NEÓN ======= */
.btn-neon {
  display: inline-block;
  padding: 1rem 2.5rem;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 12px;
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  background: transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.btn-neon:hover {
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 30px rgba(255,255,255,0.6), inset 0 0 15px rgba(255,255,255,0.3);
  transform: scale(1.05);
}

/* ======= FOOTER ======= */
footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
  color: #aaa;
  background: #000;
}

/* ======= ANIMACIONES ======= */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ======= RESPONSIVE ======= */
@media (max-width: 768px) {
  .header {
    padding: 1rem 2rem;
    flex-direction: column;
    text-align: center;
  }

  .nav {
    margin-top: 0.8rem;
  }

  .nav a {
    margin: 0 1rem;
    font-size: 1rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }
}

/* ======= CURRÍCULUM ======= */

.cv-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 3rem;
  background: radial-gradient(circle at center, #0a0a0a 0%, #000 80%);
}

.cv-section h1 {
  font-size: 2.8rem;
  margin-bottom: 2rem;
  text-shadow: 0 0 20px rgba(255,255,255,0.7);
}

.cv-container {
  width: 80%;
  max-width: 1000px;
  height: 80vh;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(255,255,255,0.1);
  backdrop-filter: blur(5px);
  margin-bottom: 2rem;
}

.cv-frame {
  width: 100%;
  height: 100%;
  border: none;
  background-color: #111;
}

/* Botón debajo del PDF */
.cv-section .btn-neon {
  margin-top: 1rem;
}

/* Adaptación móvil */
@media (max-width: 768px) {
  .cv-container {
    width: 95%;
    height: 70vh;
  }
}

/* ======= SOBRE MÍ ======= */
.about-section {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: left;
  padding: 8rem 3rem 4rem;
  background: radial-gradient(circle at center, #0a0a0a 0%, #000 80%);
}

.about-content {
  max-width: 900px;
  line-height: 1.8;
}

.about-content h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  text-align: center;
  text-shadow: 0 0 15px rgba(255,255,255,0.7);
}

.about-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #ccc;
}

/* ======= DESARROLLO ======= */
.projects-section {
  min-height: 100vh;
  padding: 8rem 2rem 4rem;
  text-align: center;
  background: radial-gradient(circle at center, #0a0a0a 0%, #000 80%);
}

.projects-section h1 {
  font-size: 3rem;
  margin-bottom: 3rem;
  text-shadow: 0 0 15px rgba(255,255,255,0.7);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  justify-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 200px;
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 15px;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(255,255,255,0.05);
}

.project-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(255,255,255,0.4);
  border-color: rgba(255,255,255,0.3);
}

.project-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.project-card p {
  color: #bbb;
  font-size: 1rem;
}

/* ======= CERTIFICADOS / GALERÍAS ======= */
.cert-section {
  padding: 10rem 3rem 4rem;
  min-height: 100vh;
  background: radial-gradient(circle at center, #0a0a0a 0%, #000 80%);
}

.second-title {
  font-size: 2rem;
  margin: 2.5rem 0 1rem;
  text-align: center;
  text-shadow: 0 0 15px rgba(255,255,255,0.6);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  align-items: start;
}

.cert-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
  transition: transform 220ms ease, box-shadow 220ms ease;
  cursor: pointer;
  display: block;
}

.cert-img:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 45px rgba(0,0,0,0.65), 0 0 24px rgba(255,255,255,0.02);
}

/* Modal imágenes */
.img-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.88);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.img-modal .modal-content {
  max-width: 95%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(255,255,255,0.08);
  object-fit: contain;
}

.close-modal {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  padding: 0.2rem 0.6rem;
  background: rgba(0,0,0,0.45);
  border-radius: 6px;
}

.close-modal:focus {
  outline: 2px solid rgba(255,255,255,0.18);
}

.modal-back:focus {
  outline: 2px solid rgba(255,255,255,0.18);
}

.modal-back {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-size: 0.95rem;
  color: #fff;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
}

.modal-prev,
.modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: #fff;
  cursor: pointer;
  padding: 0.6rem 0.9rem;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  z-index: 2100;
}

.modal-prev { left: 1rem; }
.modal-next { right: 1rem; }

.modal-prev[disabled], .modal-next[disabled] {
  opacity: 0.35;
  cursor: default;
}

/* Tarjetas de texto en lugar de miniaturas */
.cert-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 1.2rem;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  cursor: pointer;
}

/* focus styles for accessibility */
.cert-card:focus-visible {
  outline: 3px solid rgba(255,255,255,0.12);
  outline-offset: 3px;
}

.card-label {
  font-size: 1rem;
  color: #ddd;
  line-height: 1.4;
  padding: 0 0.5rem;
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.0));
  font-weight: bold;
  transition: background 160ms ease, color 160ms ease;
  pointer-events: none;
}

.cert-card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,0.03);
}

.cert-card:hover .card-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.45));
  color: #fff;
  pointer-events: none;
}

/* ocultar el label principal cuando se hace hover para evitar solapamiento */
.cert-card:hover .card-label {
  visibility: hidden;
  opacity: 0;
}

@media (max-width: 768px) {
  .cert-card { height: 120px; padding: 0.8rem; }
  .card-label { font-size: 0.95rem; }
}

@media (max-width: 768px) {
  .cert-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.8rem; }
  .cert-img { height: 140px; }
  .second-title { font-size: 1.6rem; }
  .cert-section { padding: 6rem 1.5rem 3rem; }
}
