@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Gaegu&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Happy+Monkey&display=swap');

/* =========================
   fuente anterior

   font-family: "Courier New", monospace; la que tenía antes
   
   copiar y pegar en .sidebar y .navbox
   ========================= */


*{
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


html{
  overflow-y: scroll;
} 


/* Fondo */

body{
  min-height: 100vh;
  font-family: "Gaegu", sans-serif;
  color: #ffffff;

  background-image: url("../assets/background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* splash page */

body.splash{
  display: flex;
  justify-content: center;
  align-items: center;
}

.center-container{
  text-align: center;
}

.enter-text{
  font-size: 5rem;
  color: white;
  text-decoration: none;
  letter-spacing: 4px;
  transition: 0.4s ease;
}

.enter-text:hover{
  opacity: 0.6;
  letter-spacing: 6px;
}

/* galeria */

body.gallery-page{
  color: #fff;
}

/* HEADER (título) */
.top{
  padding: 28px 28px 0 28px;
  display: flex;
  justify-content: center;   /* centra horizontalmente */
  margin-left: 230px;
  margin-bottom: 20px;
}

.top img{
  width: min(1000px, 100%);
  height: auto;
}

.brand{
  font-size: 110px;
  font-weight: 700;
  line-height: 1;
}

/* centrado general */
.layout{
  align-items: start;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 30px;

  align-items: top;

  padding: 20px 28px 40px 28px;

  max-width: 1280px;
  margin: 0 auto;
}

/* .layout{
  align-items: start;
  display: grid;
  grid-template-columns: 200px 1fr 180px;
  gap: 30px;

  padding: 20px 28px 40px 28px;

  max-width: 1280px;
  margin: 0 auto;
} */

/* sidebar */
.side{
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 50px;
  padding-top: 120px;
  font-family: "Gaegu", sans-serif;
}

/* Botones de carita */
.tag-btn{
  display: inline-block;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
}

.tag-btn img{
  display: block;
  width: 100px;        /* ajusta según tamaño deseado */
  height: auto;
  transition: transform 150ms ease, opacity 150ms ease;
  margin-left: 60px;
}

.tag-btn:hover img{
  transform: scale(1.05);
  opacity: 0.9;
}


.tag-btn .face{
  font-size: 60px;
  line-height: 1;
}

.tag-btn .label{
  font-size: 40px;
  line-height: 1;
}

.tag-art{ color: #3b4bff; }
.tag-fibre{ color: #00c853; }
.tag-sculpt{ color: #ff7a00; }

.tag-btn:hover{
  opacity: 0.75;
}


.gallery-frame{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* NAV  */
.navbox{
  /* width: min(1000px, 100%);
  margin: 10px 0 14px 0; /* pegado: poquito margen */
  border: 3px solid; 
  background: #32313b;
  padding: 10px 20px;
  margin-bottom: 20px;

  display: flex;
  justify-content:center;
  gap: 40px;

  border-radius: 16px;

  font-family: "Gaegu", sans-serif;
  font-size: 46px;
  line-height: 1;
}

.navlink{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.navlink img{
  display: block;
  height: 44px;
  width: auto;
  transition: transform 150ms ease, opacity 150ms ease;
}

.navlink:hover img{
  transform: scale(1.04);
  opacity: 0.9;
}

/* nav color de borde para cada uno */

body.gallery-page .navbox{
  border-color: #f06fd0;
}


body.thoughts-page .navbox{
  border-color: #826ff0;
}

body.about-page .navbox{
  border-color: #84e1b2;
}

.navlink{
  color: #fff;
  text-decoration: none;
}

.navlink:hover{
  opacity: 0.7;
}

.navlink.active{
  text-decoration: underline;
}

/* Galeria:
   usé columns para que cada imagen tenga su alto natural */
.gallery-grid{
  width: min(1000px, 100%);
  background: #32313b;
  padding: 36px;

  border-color: #f06fd0;
  border-style: solid;

  border-radius: 16px;

  column-width: 260px;   
  column-gap: 20px;      /* espacios entre las fotos */


}

/* Cada item es como un bloque dentro de las comulnas */
.gallery-grid .item{
  display: inline-block;
  width: 100%;
  margin: 0 0 10px 0; 
  text-decoration: none;
}

/* cada imagen */
.gallery-grid img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* transición suave */
.gallery-grid img{
  transition: transform 200ms ease, opacity 200ms ease;
}

/* efecto al pasar el mouse */
.gallery-grid .item:hover img{
  transform: scale(1.04);
  opacity: 0.95;
}

body.thoughts-page{
  color: #ffffff;
}

.tag-journal{ color: #ffd000; } 
.tag-essays{ color: #00d0ff; }  

/* thoughts  */
.thoughts-frame{
  display: flex;
  flex-direction: column;
  align-items: center;
}

.thoughts-box{
  width: min(1000px, 100%);
  padding: 0;              
  background: transparent; 
}

.entry{
  background: #32313b;        
  border: 2px solid #8672f8;     
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 22px;       
}


.lightbox{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;

  z-index: 9999;
}

.lightbox:target{
  opacity: 1;
  pointer-events: auto;
}

/* clic fuera para cerrar */
.lightbox__close{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  cursor: pointer;
}

/* caja animada */
.lightbox__figure{
  position: relative;
  margin: 0;
  max-width: min(92vw, 1100px);
  max-height: 88vh;

  transform: translateY(10px) scale(0.98);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.lightbox:target .lightbox__figure{
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* imagen grande */
.lightbox__figure img{
  display: block;
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 14px;
}

/* pie de obra: aparece al hover */
.lightbox__caption{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  padding: 14px 16px;
  background: rgba(26,26,26,0.92);
  border-top: 2px solid rgba(255,255,255,0.12);
  border-radius: 0 0 14px 14px;

  font-size: 16px;
  line-height: 1.4;

  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.lightbox__figure:hover .lightbox__caption{
  opacity: 1;
  transform: translateY(0);
}

/* about */

.about-frame{
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-box{
  width: min(1000px, 100%);
  background: #32313b;     
  padding: 0;
  border: 2px solid #84e1b2; 
  border-radius: 16px;
}

.about-content{
  margin: 0 auto;
  padding: 28px;
}

.about-content h2{
  font-size: 36px;
  margin-bottom: 20px;
}

.about-content p{
  /* font-size: 16px; */
  line-height: 1.7;
  margin-bottom: 16px;
  text-align: justify;
}

/* imagenes del about y proyect */
.about-img {
  margin: 10px;
}

.img-right {
  float: right;
  margin-left: 20px;
}

.img-left {
  float: left;
  margin-right: 20px;
}

.img-center{
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.img-small {
  width: 120px;
}

.img-medium {
  width: 200px;
}

.img-large {
  width: 300px;
}

.img-xlarge {
  width: 500px;
}

.img-xxlarge {
  width: 700px;
}

.book {
  perspective: 1500px;
}

.page {
  transform-origin: left;
  transition: transform 0.8s ease;
}

#page1:checked + .page {
  transform: rotateY(-180deg);
}

/* pagina de proyecto */

.proyect-box{
  width: min(1000px, 100%);
  background: #32313b;     
  padding: 0;
  border: 2px solid #f06fd0; 
  border-radius: 16px;
}

body.project-page .side{
  display: none;
}

body.project-page .layout{
  grid-template-columns: 1fr;
}

body.project-page .top{
  margin-left: 0;
}

/*gatito*/


/* para ocultar el checkbox */
body.gallery-page .corner-toggle{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* el cuadro donde haces clic */
/* tamaño adaptable */
body.gallery-page .corner-card{
  display: block;
  width: clamp(90px, 16vw, 320px);
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,0);
  cursor: pointer;
}

/* posición normal */
body.gallery-page .corner-sticky{
  position: fixed;
  left: 28px;
  bottom: 28px;
  z-index: 5000;
}

/* cuando la pantalla es más angosta */
@media (max-width: 1650px){
  body.gallery-page .corner-card{
    width: 140px;
  }
}

@media (max-width: 900px){
  body.gallery-page .corner-sticky{
    display: none;
  }
}


/* las imgenes ocupan el mismo espacio */
body.gallery-page .corner-img{
  width: 100%;
  height: 100%;
  object-fit: contain;   
  display: block;
}

/* mostrar A por defalt */
body.gallery-page .corner-b{ display: none; }

/* ahacer el toggle */
body.gallery-page .corner-toggle:checked + .corner-card .corner-a{ display: none; }
body.gallery-page .corner-toggle:checked + .corner-card .corner-b{ display: block; }

.book {
    position: relative;
    width: 300px;
    height: 400px;
    perspective: 1500px;
  }

  .page {
    position: absolute;
    inset: 0;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
    cursor: pointer;
  }

  /* cada página encima de la anterior */
  .page:nth-child(1) { z-index: 4; }
  .page:nth-child(2) { z-index: 3; }
  .page:nth-child(3) { z-index: 2; }

  /* al girar, la página va detrás de las demás */
  .page.flipped { z-index: 1; }

  .front, .back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 2px 8px 8px 2px;
    box-shadow: 2px 2px 12px rgba(0,0,0,0.4);
    overflow: hidden;
  }

  .back { transform: rotateY(180deg); border-radius: 8px 2px 2px 8px; }

  .front img, .back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* al hacer click, la página gira */
  .page.flipped { transform: rotateY(-180deg); }

  /* botones */
  .controls { margin-top: 1.5rem; display: flex; gap: 1rem; }
  button {
    padding: 0.5rem 1.2rem;
    background: #fff2;
    color: white;
    border: 1px solid #fff4;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
  }
  button:hover { background: #fff3; }

  @media (max-width: 900px){

  .layout{
    grid-template-columns: 1fr;
  }

  .side{
    position: static;
    flex-direction: row;
    justify-content: center;
    gap: 30px;
    padding-top: 20px;
  }

  .tag-btn img{
    margin-left: 0;
    width: 70px;
  }

  .corner-sticky{
    position: static;
    margin-top: 30px;
    display: flex;
    justify-content: center;
  }

  .top{
    margin-left: 0;
  }

}
