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

html, body {
  height: 100%;
  font-family: "Instrument Sans", sans-serif;
  background-color: #f9f9f9;
}

/* =======================
   HEADER REDISEÑADO
======================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;

    /* Fondo blanco 70% + blur 30% */
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
}

.header-left {
    font-size: 12px;
    font-weight: 300;
    color: #000000;
    text-decoration: none;
    white-space: nowrap;
}

.header-center {
    display: flex;
    gap: 8px;
}

.header-right {
    display: flex;
}

.nav-link {
    font-size: 12px;
    font-weight: 300;
    text-decoration: none;
    color: #000000;
    transition: color 0.3s, font-weight 0.3s;
}

.nav-link:hover {
    color: #0024fc; /* azul hover */
    font-weight: 400;
}

/* =======================
   HAMBURGUESA
======================= */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 16px;
    height: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #000000;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger:hover span {
    background: #0024fc;
}
/* =======================
   CONTACT OVERLAY
======================= */
.contact-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.contact-overlay.active {
    display: flex;
}

/* TARJETA */
.contact-card {
    width: 495px;
    height: 286px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 0 8px rgba(0,0,0,0.25);
    position: relative;
    transform: rotate(-5deg);
    padding: 24px;
}

/* CLOSE */
.contact-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    color: #000000;
    cursor: pointer;
}

.contact-close:hover {
    color: #0024ce;
}

/* CONTENIDO */
.contact-content {
    position: absolute;
    bottom: 24px;
    left: 24px;
}

/* TEXTOS */
.contact-intro,
.contact-follow {
    font-size: 17.5px;
    font-weight: 500;
    font-style: italic;
    color: #000000;
    margin-bottom: 8px;
}

.highlight {
    color: #0024ce;
}

/* LINKS */
.contact-link,
.contact-socials a {
    font-size: 15.3px;
    font-weight: 500;
    color: #000000;
    text-decoration: none;
}

.contact-link:hover,
.contact-socials a:hover {
    color: #0024ce;
}
/* =======================
   MOBILE MENU (oculto por defecto)
======================= */
.mobile-menu {
    display: none; /* oculto en desktop */
    flex-direction: column;
    position: fixed;
    top: 48px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 0;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1001;
    text-align: center;
}

.mobile-menu .nav-link {
    font-size: 12px;
    font-weight: 300;
    color: #000000;
}

.mobile-menu .nav-link:hover {
    color: #0024fc;
    font-weight: 400;
}

/* =======================
   HOME
======================= */
.home {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  padding-top: 40px;
  overflow: hidden;
}

/* TEXTO */
.home-text {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  z-index: 1;
  pointer-events: none;
  text-align: center;
}

/* 🔑 CONTENEDOR REFERENCIA */
.home-title {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

/* NOMBRE */
.home-name {
  font-size: 172px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

/* ROLES – alineados al nombre */
.home-roles {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 500;

  padding: 0 0.6em; /* 👈 AJUSTE CLAVE */
}

.home-roles span {
  white-space: nowrap;
}

/* =======================
   GRID HOVER
======================= */
.hover-grid {
  position: absolute;
  inset: 0;
  max-height: calc(100% - 120px);
}

.hover-row {
  position: absolute;
  left: 0;
  width: 100%;
  pointer-events: none;
}

.row-1 {
  top: 0;
  height: 304px;
  z-index: 2;
}

.row-2 {
  top: 312px;
  height: 304px;
  z-index: 3;
}

.hover-row .hover-item {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 226.53px;
  height: 304.31px;
  cursor: pointer;
  pointer-events: auto;
}

.hover-row .hover-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 300ms ease-in;
}

.hover-row .hover-item:hover img {
  opacity: 1;
}

/* =======================
   TABLET
======================= */
@media (max-width: 1024px) {
  .home-name {
    font-size: 120px;
  }

  .home-roles {
    font-size: 14px;
  }

  .hover-row .hover-item {
    width: 160px;
    height: 210px;
    left: calc(var(--x) / 1.4);
    top: calc(var(--y) / 1.4);
  }
}

/* =======================
   MOBILE
======================= */
@media (max-width: 768px) {

  html, body {
    overflow: hidden;
  }

.header {
        height: 40px;
        padding: 0 16px;
    }

    /* Ocultamos menú original */
    .header-center,
    .header-right {
        display: none;
    }

    /* Mostramos hamburguesa */
    .hamburger {
        display: flex;
    }

    /* Mostramos menú móvil cuando está activo */
    .mobile-menu.active {
        display: flex;
    }

  .home {
    min-height: 100svh;
    padding-top: 40px;
  }

.home-title {
    display: inline-grid;
    grid-template-columns: auto auto; /* dos columnas para roles */
    justify-content: center;           /* centrar respecto al nombre */
    position: relative;
    text-align: center;
  }

  .home-name {
    grid-column: 1 / -1; /* nombre ocupa ambas columnas */
    font-size: 91px;
    white-space: normal;
    text-align: center;
    margin: 0 5px;
  }

  .home-roles {
    grid-column: 1 / -1;       /* roles ocupan ambas columnas */
    display: grid;
    grid-template-columns: auto auto; /* izquierda y derecha */
    gap: clamp(20px, 6vw, 130px);     /* separación fluida entre roles */
    margin-bottom: 10px;              /* separación vertical sobre el nombre */
  }

  .role-left {
    justify-self: start; /* izquierda de la columna */
  }

  .role-right {
    justify-self: end;   /* derecha de la columna */
  }

  .hover-grid {
    max-height: calc(100svh - 140px);
    overflow: hidden;
  }
 /* CONTACT */
  .contact-card {
    width: 90%;
    max-width: 360px;
    height: auto;
    padding: 20px;
    transform: rotate(-3deg);
  }

  .contact-content {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: 40px;
  }
}