@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,100..900;1,100..900&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');

@font-face {
  font-family: 'Neue Machina';
  src: url(assets/fonts/NeueMachina-Light.otf) format('opentype'),
       url(assets/fonts/NeueMachina-Regular.otf) format('opentype'),
       url(assets/fonts/NeueMachina-Medium.otf) format('opentype'),
       url(assets/fonts/NeueMachina-Bold.otf) format('opentype');
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto Mono', monospace;
  background: #000;
  padding-top: 140px; 
  color: #f3f3f3;
  position: relative;
  min-height: 100vh;
  padding-bottom: 130px;
  animation: rwdcur15023 0.8s linear infinite forwards;
  cursor: url('assets/icon/paintcursor1.cur'), auto;
}

a, button, .btn-filtro, .nav-categorias button, .nav-categorias-cv button {
  cursor: url('assets/icon/paintcursor3.cur'), pointer;
}

/* PRIMERA BARRA: TOP BAR (Nombre y Contacto) */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background: #000;
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 2rem;
  border-bottom: 0.25px solid #f3f3f3;
  z-index: 1000;
}

.top-bar-left {
  display: flex;
  align-items: flex-start;
  height: 100%;
  box-sizing: border-box;
}

.top-bar-left img.logo-top-bar {
  height: 60px;
  width: auto;
  object-fit: contain;
  margin-top: 15px;
  margin-bottom: 15px;
}

.top-bar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.5rem 2rem;
}

.top-bar-right-nombre {
  font-size: 0.8rem;
  font-family: 'Neue Machina', sans-serif;
  font-stretch: ultra-condensed;
  letter-spacing: -1px;
  transform: scaleY(1.3);
}

.top-bar-right-resto {
  font-size: 0.7rem;
  font-family: 'Roboto Mono', monospace;
  text-align: right;
  font-stretch: ultra-condensed;
  letter-spacing: -1px;
}

/* BARRA PRINCIPAL DE CATEGORÍAS */
.nav-categorias {
  position: fixed;
  top: 90px;
  left: 0;
  width: 100%;
  background: #000;
  padding: 0.6rem 2rem;
  border-bottom: 0.5px solid #f3f3f3;
  z-index: 1001;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-categorias button {
  background: none;
  border: none;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  color: #f3f3f3;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.nav-categorias button:hover,
.nav-categorias button.active {
  opacity: 1;
  font-weight: bold;
  text-decoration: underline;
}

/* SEGUNDA BARRA EXCLUSIVA PARA EL CV */
.nav-categorias-cv {
  position: fixed;
  top: 135px;
  left: 0;
  width: 100%;
  background: #000;
  padding: 0.6rem 2rem;
  border-bottom: 0.5px solid #f3f3f3;
  z-index: 1000;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-categorias-cv button {
  background: none;
  border: none;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  color: #f3f3f3;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.nav-categorias-cv button:hover,
.nav-categorias-cv button.active {
  opacity: 1;
  font-weight: bold;
  text-decoration: underline;
}

/* ESTRUCTURA DE SECCIONES EN DOS COLUMNAS (ORIGINAL DE PC) */
.seccion-proyecto {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px;
  min-height: auto;
  margin-bottom: 10px;
  padding: 0 2rem;
}

.seccion-proyecto header {
  width: 420px;
  flex-shrink: 0;
}

.subhead {
  font-size: 1rem;
  font-weight: bold;
  margin: 0 0 1rem 0;
  font-family: 'Neue Machina', sans-serif;
  font-stretch: ultra-condensed;
  letter-spacing: -1px;
  transform: scaleY(1.3);
}

.description {
  font-size: 0.7rem;
  line-height: 1.4;
  margin-bottom: 0.8rem;
  margin-left: 0;
}

.description a {
  color: #f3f3f3;
}

.galeria-contenedor {
  position: relative;
  flex-grow: 1;
  min-height: 0px; 
  pointer-events: auto;
}

/* ALTURAS EN PC */
#segunda-seccion .galeria-contenedor { min-height: 520px; } /*BIO*/
#tercera-seccion .galeria-contenedor { min-height: 0px; } /*reboot*/
#cuarta-seccion .galeria-contenedor { min-height: 50px; } /* veo veo*/
#quinta-seccion .galeria-contenedor { min-height: 0px; } /* PLUTO */
#sexta-seccion .galeria-contenedor { min-height: 0px; } /* tu ptimer millon */
#septima-seccion .galeria-contenedor { min-height: 500px; } /* digital entities */
#octava-seccion .galeria-contenedor { min-height: 780px; } /*xenogenesis*/
#novena-seccion .galeria-contenedor { min-height: 200px; } /*DOSIS*/
#decima-seccion .galeria-contenedor { min-height: 380px; } /*   plant*/
#undecima-seccion .galeria-contenedor { min-height: 380px; } /*   visuals*/

.draggable-image {
  position: absolute;
  max-width: 100%;
  height: auto;
  z-index: 100;
  user-select: none;
}

.cajas-flotantes-header {
  position: absolute;
  border: 1px solid #f3f3f3;
  background-color: #000;
  font-family: 'Helvetica', monospace;
  padding: 0.2rem;
  color: #f3f3f3;
  font-size: 0.7rem;
  border-radius: 0px;
  text-align: justify;
  box-sizing: border-box;
  outline: none;
  z-index: 9999; 
  display: inline-block; 
}

.cajas-flotantes-header.caja-clicable-bio {
  cursor: url('assets/icon/paintcursor3.cur'), pointer;
  transition: background-color 0.2s ease;
}

.cajas-flotantes-header.caja-clicable-bio:hover {
  background-color: #f3f3f3;
  color: #000;
}

.text-box {
  position: absolute;
  border: 1px solid #f3f3f3;
  background-color: #000;
  font-family: 'Helvetica', monospace;
  padding: 0.2rem;
  color: #f3f3f3;
  font-size: 0.7rem;
  border-radius: 0px;
  text-align: justify;
  box-sizing: border-box;
  outline: none;
  z-index: 900;
  display: inline-block; 
}

.text-elipse {
  position: absolute;
  border: 1px solid #f3f3f3;
  background-color: #000;
  font-family: 'Helvetica', monospace;
  padding: 0.5rem;
  color: #f3f3f3;
  font-size: 0.7rem;
  text-align: center;
  box-sizing: border-box;
  outline: none;
  z-index: 900;
  display: inline-block;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border-style: dotted;
  overflow: hidden;
}

.separador {
  width: 100%;
  height: 0.5px;
  background-color: #f3f3f3;
  margin: 50px 0;
  flex-basis: 100%;
}

/* ==========================================================================
   REGLAS EXCLUSIVAS PARA MÓVILES Y TABLETS (NO AFECTA A PC)
   ========================================================================== */

@media (max-width: 900px) {
  body {
    padding-top: 170px;
    padding-bottom: 50px;
  }

  /* Ajustes de la barra superior */
  .top-bar {
    height: auto;
    min-height: 70px;
    padding: 0.5rem 1rem;
  }

  .top-bar-left img.logo-top-bar {
    height: 40px;
    margin-top: 5px;
    margin-bottom: 5px;
  }

  .top-bar-right {
    padding: 0.2rem 0;
  }

  /* Navegación deslizable en horizontal */
  .nav-categorias, 
  .nav-categorias-cv {
    top: 70px;
    padding: 0.6rem 1rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .nav-categorias::-webkit-scrollbar,
  .nav-categorias-cv::-webkit-scrollbar {
    display: none;
  }

  .nav-categorias-cv {
    top: 110px;
  }

  /* APILAMIENTO DE CAJAS FLOTANTES DEL HEADER */
  .cajas-flotantes-header {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: calc(100% - 2rem) !important;
    margin: 10px 1rem !important;
    display: block !important;
  }

  /* APILAMIENTO EN UNA SOLA COLUMNA DE LAS SECCIONES */
  .seccion-proyecto {
    flex-direction: column;
    padding: 0 1rem;
    gap: 20px;
  }

  .seccion-proyecto header {
    width: 100%;
  }

  .galeria-contenedor {
    width: 100%;
    min-height: auto !important;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Crea espacio uniforme entre fotos y elementos apilados */
  }

  /* CUALQUIER ELEMENTO FLOTANTE SE APILA ORDENADAMENTE UNO DEBAJO DEL OTRO */
  .draggable-image,
  .text-box, 
  .text-elipse {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
  }

  .text-elipse {
    border-radius: 0px; /* En móviles se vuelve un bloque para que el texto encaje perfectamente */
  }
}