* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === Botón CV === */
.cv-link {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #C9021D;
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: 0.3s;
}

/* === Contenedor general === */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 40px auto;
  padding: 60px 50px;
  background-color: #e0e0e0;
  border-radius: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

/* === Sección Hero === */
.hero {
  position: relative;
  background: url('a.jpg') no-repeat center center/cover;
  color: white;
  text-align: center;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.hero-content {
  z-index: 2;
  padding: 20px;
}

.hero-content h1 {
  font-size: 2.8rem;
  color: white;
}

.hero-content p {
  font-size: 1.1rem;
  margin: 20px 0;
}

/* === Botón principal === */
.btn-primary {
  background-color: #C9021D;
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.btn-primary:hover {
  background-color: #a40118;
}

/* === Secciones === */
.section {
  background-color: #e0e0e0;
  border-radius: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  padding: 60px 40px;
  margin: 40px auto;
  width: 100%;
  max-width: 1100px;
}

.section.alt {
  background-color: #f6f6f6;
}

.section + .section {
  margin-top: 60px;
}

/* === Tipografías y encabezados === */
h1, h2, h3 {
  color: #c9021d;
}

h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

p {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 20px;
}

/* === Experiencia === */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.exp-card {
  background: #fff;
  padding: 20px;
  border-left: 5px solid #C9021D;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

/* === Portafolio === */
.portfolio-group {
  margin-bottom: 60px;
}

.portfolio-group h3 {
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: #333;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.gallery img {
  width: 100%;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease;
  object-fit: cover;
  aspect-ratio: 4/3;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gallery img:hover {
  transform: scale(1.03);
}

/* === Lightbox === */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

/* === Habilidades === */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.skills-grid span {
  background-color: #fff;
  padding: 10px 15px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: default;
}

.skills-grid span:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  background-color: #fef1f2;
  color: #C9021D;
}

/* === Redes sociales === */
.social-links a {
  display: inline-block;
  margin-right: 20px;
  color: #C9021D;
  font-weight: 600;
  text-decoration: none;
}

/* === Contacto === */
.contact a {
  color: #C9021D;
  text-decoration: none;
}

/* === Footer === */
footer {
  background-color: #1D1D1E;
  color: white;
  text-align: center;
  padding: 20px;
}

/* === Video === */
.video-wrapper {
  text-align: center;
  margin: 40px auto;
  width: 480px;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* === Extra === */
.langs,
.redes {
  padding: 30px;
}

@media (max-width: 768px) {
  .container,
  .section {
    padding: 30px 20px;
    margin: 20px auto;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .btn-primary,
  .cv-link {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .video-wrapper {
    width: 100%;
    margin: 20px auto;
  }

  h2 {
    font-size: 1.5rem;
  }

  p {
    font-size: 16px;
  }

  .portfolio-group h3 {
    font-size: 1.2rem;
  }

  .social-links a {
    display: block;
    margin: 10px 0;
  }

  .langs,
  .redes {
    padding: 20px;
  }
}
