/* ====== PORTAFOLIO ====== */
.panel--portfolio{
  min-width: 100vw;
   min-height: 100vh;
  background: var(--bg, #f7f5f2);
  color: var(--fg, #0a0a0a);
  scroll-snap-align: start;
  display: block;
  align-items: center;
  justify-content: center;
   overflow-y: auto; /* ← permite que se vea el contenido debajo */
  overflow-x: hidden;
  
}

/* GRID 2x2 */
.pf-gridlayout{
  display: grid;
   grid-template-columns: minmax(520px, 56%) 1fr; /* izquierda / derecha */
  column-gap: clamp(24px, 4vw, 56px);
  grid-template-rows: 55% 45%; /* proporción visual */
  width: 90%;
  height: 100vh;
  gap: 1vw;
   margin: 0 auto;
  position: relative;
  
}


/* ---- Lado Izquierdo ---- */
.pf-left{
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  width: 850px;
}
.pf-left.pf-top{
  align-items: flex-start;
}

.pf-img{
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0.9;
   position: relative;
  z-index: 1;
  mix-blend-mode: normal;
}



/*.pf-img.light-hover::after {
  content:"";
  position: absolute;
  inset:0;
  background: radial-gradient(
    circle at var(--lx, 70%) var(--ly, 70%),
    rgba(239, 65, 21, 0.934),
    rgba(228, 196, 13, 0.946) 60%
  );
  pointer-events: none;
  mix-blend-mode: color-burn;
  z-index: 3;
}*/

.alive {
  transition: transform 0.6s cubic-bezier(.25,.25,.25,1),
              filter 0.6s ease;
}

.alive:hover {
  transform: scale(1.03);
  filter: brightness(1.1);
}

.pf-glow {
  position: relative;
}

/*.pf-glow::after {
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(
    circle at var(--lx, 30%) var(--ly, 40%),
    rgba(8, 246, 198, 0.9),
    rgba(13, 228, 31, 0) 60%
  );
  pointer-events:none;
  mix-blend-mode: color-burn;
  opacity: 0.2;
  transition: opacity .25s ease;
  z-index: -2;
}*/

.pf-glow.is-hover::after {
  opacity: 1;
}

/* ---- Lado Derecho ---- */

/* Columna derecha superior: control fino de posición */
.pf-right.pf-top{
  position: relative;
  display: flex;
  justify-content: flex-end; /* mueve hacia el borde derecho */
  align-items: flex-start;
  padding: 0;
}


.pf-right{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 2vw 3vw;
  width: 450px;
}

/* Título */
.pf-title{
   font-family: "archivo narrow", sans-serif;
  line-height: 1.5;
  font-size: .9rem;
  font-weight: 100;
  letter-spacing: 0.5em;
  /*font-size: clamp(16px, 1.5vw, 22px);*/
  text-transform: uppercase;
  margin: 0 0 1em 0;
  color: var(--fg, #0a0a0a);
}



/* Contenedor del título y cuadrado */
.pf-header{
  position: absolute;
  top: 60%;   /* ajusta este valor hasta que quede justo donde está el cursor */
  right: 48%;  /* controla la distancia del borde derecho */
  display: flex;
  align-items: flex-start; 
  right: clamp(46%, 48%, 50%);

  transform: translateY(-50%); /* centra ópticamente respecto a su propia altura */
}



/* Cuadro decorativo (el “cubo”) */
.pf-square{
  width: clamp(18px, 1.8vw, 26px);
  height: clamp(18px, 1.8vw, 26px);
   background-color: #3f3f3f;            /* cámbialo por tu color exacto si quieres */
  opacity: .95;
  flex-shrink: 0;
  /* centrado visual absoluto con el texto */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Lista de proyectos */
.pf-projects{
  font-family: "DM Mono", monospace;
  font-size: clamp(12px, 1vw, 16px);
  line-height: 1.8;
  letter-spacing: 0.08em;
  text-align: left;
  
}
.pf-projects p{
  margin: 0.4em 0;
}

/* Imagen del planeta: alineada al dragón, lado derecho */
.pf-planeta{
  position: absolute;
  bottom: 4%;        /* sube/baja hasta que quede justo en el borde del dragón */
  right: -14%;         /* distancia desde el borde derecho */
  width: clamp(250px, 20vw, 300px);
  height: auto;
  object-fit: contain;
  opacity: 0.9;
  z-index: 2;        /* asegúrate de que esté por encima del fondo pero debajo de texto */
}

/* ==========================================================
   BLOQUE DE PROYECTOS — versión editorial responsiva
   ========================================================== */

/* ====== RETÍCULA DE PROYECTOS (2 thumbs + texto) ====== */
.pf-grid-projects {
  width: 86%;
  margin: 8vh auto 12vh; 
  display: flex;
  flex-direction: column;
  gap: clamp(60px, 8vh, 100px); /* espacio entre filas de proyectos */
 position: relative;
  z-index: 2;
}

/* Fila de proyecto: 2 imágenes + nombre */
.pf-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* dos cuadrados + texto */
  grid-auto-rows: auto;
  align-items: center; /* centra verticalmente el texto */
  gap: clamp(14px, 2vw, 28px);
}

/* Thumbs */
.pf-thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  
  /*background: #f6f4ef;*/
  transition: transform .3s ease, opacity .3s ease;
  align-items: center;
  display: flex;
  justify-content: center;

}
.pf-thumb img {
  width: 80%;
  height: auto;
  object-fit: contain;
  opacity:0.9;
  display:block
  
}


.pf-thumb:first-child {
  transform: translateY(0.9em); /* sube o baja ópticamente respecto al caption */
}

.pf-thumb:hover {
  transform: scale(1.02);
  opacity: .95;
}

/* Texto */
.pf-caption {
  font-family: "DM Mono", monospace;
  font-size: clamp(13px, 1vw, 16px);
  letter-spacing: 0.08em;
  line-height: 1.5;
  opacity: 0.85;
  text-align: left;
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4em;
  
      background-color: #f6f4ef;
    box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  
}

 .pf-sub {
  
  font-family: "Archivo Narrow", sans-serif;
  font-size: clamp(1px, 0.85vw, 14px);
  letter-spacing: 0.04em;
  line-height: 1.5;
  opacity: 0.7;
  margin-top: 0.8em;
    background-color: #f6f4ef;
    box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
   display: inline-block;
}

.panel--portfolio-projects {
  min-width: 100vw;
  min-height: 200vh;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #f7f5f2);
  color: var(--fg, #0a0a0a);
  scroll-snap-align: start;
  padding-top: 12vh;
  z-index: 1;
}

/* ===== MODALES ===== */
.pf-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.pf-modal.active {
  display: flex;
}
.pf-modal-frame {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pf-modal-gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  max-width: 90vw;
  max-height: 80vh;
}
.pf-modal-gallery img {
  scroll-snap-align: center;
  flex: 0 0 100%;
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  margin: 0 auto;
}
.pf-close,
.pf-prev,
.pf-next {
  position: absolute;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
}
.pf-close { top: 20px; right: 80px; }
.pf-prev  { left: 10px; top: 50%; transform: translateY(-50%); }
.pf-next  { right: 10px; top: 50%; transform: translateY(-50%); }

.pf-modal-gallery video {
  scroll-snap-align: center;
  flex: 0 0 100%;
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  background: black;
  margin: 0 auto;
}


/* ====== Responsivo ====== */
@media (max-width: 900px){
  .pf-gridlayout{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    height: auto;
  }
  .pf-right, .pf-left{
    padding: 6vw 4vw;
  }
}

@media (hover:hover){
  .pf-planeta:hover { transform: scale(1.05) rotate(2deg); }
}


/* ---- Responsivo ---- */
@media (max-width: 900px) {
  .pf-row {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.8rem;
  }
  .pf-caption {
    text-align: center;
  }
  .pf-thumb img {
    object-fit: contain;
  }
}

