* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: white;
  background: black;
}

h2 {
  font-weight: 300;
  letter-spacing: 4px;
  margin-bottom: 40px;
}

.section {
  padding: 100px 10%;
  text-align: center;
  background: white;
  color: black;
}

.section.dark {
  background: black;
  color: white;
}

/* NAV */

.header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
}

.headerblack {
  background: black;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 8%;
}

.logo {
  font-weight: 600;
  letter-spacing: 3px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-size: 13px;
  letter-spacing: 2px;
  transition: opacity 0.3s;
}

.nav-links a:hover {
  opacity: 0.6;
}

.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

/* HERO */

.hero {
  height: 100vh;
  background: url('hero.jpg') center/cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  text-align: center;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.hero-content {
  position: relative;
}

.hero h1 {
  font-size: 60px;
  letter-spacing: 8px;
}

.hero p {
  margin-top: 20px;
  letter-spacing: 4px;
  font-weight: 200;
}

#reel {
  padding: 80px 0;
  text-align: center;
}

#reel h2 {
  font-weight: 300;
  letter-spacing: 4px;
  padding-top: 0px;
  padding-bottom: 20px;
}

#reel li {
  text-align: left;
}

#reel .content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* arriba */
}

/* Contenedor del video */

.video-container {
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 9; /* reemplaza padding-bottom */
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block; /* evita espacios debajo */
}

/* GRID */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.card img {
  width: 100%;
  display: block;
}

/* FORM */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 500px;
  margin: auto;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid #ccc;
}

.contact-form button {
  padding: 12px;
  background: black;
  color: white;
  border: none;
  cursor: pointer;
}

/* FOOTER */

footer {
  padding: 20px;
  text-align: center;
  background: black;
  font-size: 12px;
}

.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* VIDEO FULLSCREEN COVER */

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

/* Overlay oscuro */

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1;
}

/* Texto encima */

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
}

.hero h1 {
  font-size: 64px;
  letter-spacing: 8px;
}

.hero p {
  margin-top: 20px;
  letter-spacing: 4px;
  font-weight: 200;
}

.page-section {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  width: 100%;
  transition: opacity 0.4s ease;
}

.page-section.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

/* Contenedor principal */
.about-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 50px;
  padding: 60px 10%;
}

/* Foto personal */
.about-photo img {
  width: 300px;
  max-width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

/* Contenido */
.about-content {
  max-width: 600px;
  text-align: left;
  color: white; /* sobre fondo negro */
}

.about-content h2 {
  font-weight: 300;
  letter-spacing: 4px;
  margin-bottom: 20px;
}

.about-content p {
  font-weight: 200;
  line-height: 1.6;
  margin-bottom: 30px;
}

/* Redes sociales */
.social-icons {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.social-icons a img {
  width: 30px;
  height: 30px;
  transition: opacity 0.3s;
}

.social-icons a:hover img {
  opacity: 0.6;
}

/* Botón CV */
.btn-cv {
  display: inline-block;
  padding: 12px 25px;
  background: white;
  color: black;
  text-decoration: none;
  font-weight: 500;
  border-radius: 4px;
  transition: opacity 0.3s;
}

.btn-cv:hover {
  opacity: 0.7;
}

.contact-me a {
  text-decoration: none;
  color: white;
  transition: opacity 0.3s;
}

.contact-me a:hover {
  opacity: 0.6;
}

#projects {
  padding: 80px 8%;
  text-align: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

/* Cada proyecto */
.project-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

/* Imagen */
.project-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* Overlay oscuro */
.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-overlay span {
  color: white;
  letter-spacing: 2px;
  font-size: 14px;
}

/* Hover efecto */
.project-item:hover img {
  transform: scale(1.05);
}

.project-item:hover .project-overlay {
  opacity: 1;
}

/* Companies section */

.companies-section {
  margin-top: 100px;
}

.companies-section h3 {
  margin-bottom: 40px;
  font-weight: 300;
  letter-spacing: 3px;
  text-align: center;
}

/* Grid automático */

.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 40px;
  align-items: center;
  justify-items: center;
}

/* Cada logo */

.company-item {
  width: 120px;
  aspect-ratio: 1 / 1; /* cuadrado perfecto */
  display: flex;
  align-items: center;
  justify-content: center;
}

.company-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(0%);
  opacity: 0.8;
  transition: all 0.3s ease;
}

/* Efecto sutil */

.company-item:hover img {
  filter: grayscale(20%);
  opacity: 1;
}

/* RESPONSIVE */
@media(max-width: 768px) {
  .about-container {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .about-content {
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  .menu-toggle {
    display: block;
    user-select: none;
    color: white;
  }

  .nav-links {
    display: none;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 8%;
    background: black;
    padding: 20px;
    gap: 20px;
  }

  .about-container {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .about-content {
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }
}