*{
  margin:0;
  box-sizing: border-box;
}

a{
  text-decoration: none;
}

html{
  overflow-x: hidden;
}

body{
  min-height: 100vh;
  display: grid;
  background-color: rgb(26, 25, 25);
  grid-template-columns: 12%  88%;
  overflow-y: hidden;
}

.main-content{
  display: grid;
  width: 100%;
  height: auto;
  grid-column: 2;
  grid-template-rows: repeat(auto, 5);
}

.translate{
  margin: 10px;
  justify-self: end;
  display: flex;
  
}

.translate p{
  color: white;
  font-size: 1em;
  padding: 5px 5px 0 5px;
  font-family: 'kg_perfect';
}

.lbl-lang{
  display: inline-block;
  width: 55px;
  height: 30px;
  background-color: black;
  border-radius: 15px;
  position: relative;
  cursor: pointer;
}

#lang-switch:checked~ .lbl-lang{
  background: #333;
}

.lbl-lang::after{
  position: absolute;
  content: '';
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 15px;
  top: 4px;
  left: 5px;
  transition: 0.3s;
}

#lang-switch:checked~ .lbl-lang::after{
  left: 28px;
}

#lang-switch{
  display: none;
}

/*----------Fonts----------*/

@font-face {
  font-family: 'Mooncake';
  src: url(Fonts/moodcake/Moodcake.ttf);
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'kg_perfect';
  src: url(Fonts/kg_perfect/KGPerfectPenmanship.ttf);
  font-weight: normal;
  font-style: normal;
}

/*----------Sidebar----------*/
nav{
  position: fixed;
  top: 0;
  left: 0;
  width: 10%;        /* ancho fijo de la barra */
  height: 100vh;       /* altura de toda la pantalla */
  display: flex;
  align-items: center; 
  z-index: 1000;
}

nav:hover{
  width: 21%;
}

.sidebar{
  background-color: #ffffff;
  width: max-content;
  border-radius: 10px;
  padding: 2rem 1rem;
}

.sidebar:hover .sidebar_element{
  grid-template-columns: 1fr 1fr;
}

.sidebar_list{
  list-style: none;
  padding: 0;

  min-height: 600px;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.sidebar_element{
  font-family: 'kg_perfect';
  font-size: 1em;
  padding: 1.9rem 1.3rem;
  border-radius: 20px;
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 0fr;
  color: black;

  transition: grid-template-columns .4s;
}

.sidebar_element:hover{
  background-color: black;
  color: white;
}

.sidebar_content--logo{
  position: relative;
  margin: 0 auto  0;
  margin-bottom: 1rem;
}

.sidebar_icon--logo{
  display: flex;
  height: auto;
  width: 5rem;
  justify-content: center;
  align-items: center;
  position: relative;
}

.sidebar_icon--logo .reveal{
  opacity: 1;
  z-index: 1;
  max-width: 100%
}

.sidebar_content--logo .hide {
  opacity: 0;
  z-index: 2;
  max-width: 100%
}

.sidebar_icon--logo.hide{
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
}

.sidebar:hover .sidebar_icon--logo.reveal {
  opacity: 0;
}

.sidebar:hover .sidebar_icon--logo.hide {
  opacity: 1;
}

.sidebar_logo{
  font-size: 3.125rem;
  margin: auto;
}

.sidebar_hide{
  overflow: hidden;
}

/*----------Card----------*/

#id_presentation{
  grid-row: 2;
  justify-content: center;
}

.card{
  justify-self: center;
  width: 31.25rem;
  height: 17.813rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 20px 50px rgba(255, 255, 255, 0.3);
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
  border: 1px solid #333;
  display: grid;
  grid-template-columns: 2fr 150px 150px;
  grid-template-rows: 80px 1fr 1fr 95px 1fr;
}

#toggle:checked ~ body{
  background-color: #017aff;
}

.card:hover {
  transform: rotateY(20deg) rotateX(20deg);
  
}



.photo {
  grid-row: 1;
  grid-column: 1;
  text-align: center;
  padding: 20px;
}

.photo img {
  width: 150px;
  height: 150px;
  border-radius: 15px;
  object-fit: cover;
}

.info-name {
  font-family: 'Mooncake';
  grid-row: 1;
  grid-column: 2/3;
  width: auto;
  font-size: 1.2em;
  text-align: center;
  margin: auto;
  white-space: nowrap;
}

.info{
  font-size: 1em;
  
  
}

.info-age{
  grid-row: 2;
  grid-column: 2;
}

.info-hobby{
  grid-row: 2;
  grid-column: 3;
}

.info-title{
  grid-row: 3;
  grid-column: 2;
}

.title-name{
  text-align: center;
}

.info-title-sticker{
  position: relative;
  width: 100px; /* ajusta según tamaño de la cinta */
  height: 40px;
  grid-column: 2; /* columna de la derecha */
  grid-row: 2;     /* misma fila del título */
  justify-self: end; /* alinea al inicio */
  padding-left: 0.5rem;
  padding-top: 0.7rem;
}

.info-title-sticker img{
  width: 60px;
  rotate: -120deg;
}

.info-title-sticker span{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-65%, 100%);
  font-weight: bold;
  color: #333;
  font-size: 0.9em;
  font-family: 'Comic Sans MS', cursive;
  z-index: 2;
  white-space: nowrap;
}

.info-place{
  grid-column: 3;
  grid-row: 3;
}

.qr-firm {
  
  margin-top: auto;
}

.qr img {
  height: 50px;
}

.qr{  
  text-align: center;
  align-self: center;
  grid-column: 1;
  grid-row: 4;
}

.info-firm img{
  height: 80px;
  padding-left: 3rem;
}

.info-firm{
  grid-column: 2/3;
  grid-row: 4;
}

.info-border{
  background-color: black;
  grid-row: 5;
  grid-column: 1/4;
  border-radius: 0 0 25px 35px;
  height: 20px;
}

.welcome h2{
  text-align: center;
  color: white;
  font-family: 'kg_perfect';
  font-size: 3rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.description {
  width: 90%;
  text-align: center;
  color: white;
  font-family: 'kg_perfect';
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  justify-self: center;
}

/*----------Projects----------*/

#experience{
  grid-row: 3;
  margin-top: 10%;
  margin-bottom: 50px;
}

.container_projects{
  justify-self: center;
  width: 80%;
  height: auto;
  background-color: #333;
  margin-top: 2rem;
  display: flex;
  flex-direction:column;
  align-items: center;
  border-radius: 15px;
}

.project_title{
  color: white;
  margin: 5px 0 5px 30px;
  font-family: 'kg_perfect';
  font-size: 2em;
}

.card_container{
  width: 80%;
  height: auto;
  text-align: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.card_projects{
  position: relative;
  padding-top: 1rem;
  font-family: 'kg_perfect';
  color: white;
  justify-self: center;
  background-color: rgb(95, 95, 95);
  width: auto;
  height: auto;
  border-radius: 10px;
  
}

.card_projects:hover{
  background-color: rgb(143, 143, 143);
}

.card_projects h3{
  padding-bottom: 1rem;
}

.card_projects img{
  width: 80%;
  height: auto;
  border-radius: 10px;
}

.card_projects p{
  padding-bottom: 1rem;
  width: 80%;
  justify-self: center;
}

.card-PastelApp-sticker{
  position: absolute;        /* ✅ Saca el sticker del flujo normal y lo posiciona dentro */
  top: -3%;                 /* ✅ Se ubica desde la parte superior de la tarjeta */
  right: 10%;               /* ✅ Se ubica desde la parte derecha */
  width: 20%;               /* ✅ Tamaño fijo controlado (mejor que %) */
  height: auto;              /* ✅ Se adapta automáticamente */
  z-index: 5;                /* ✅ Asegura que se superponga correctamente */
}

.card-PastelApp-sticker img{
  width: 100%;
  rotate: -90deg;
}

.card-PastelApp-sticker span{
  position: absolute;        /* ✅ Para ubicar el texto encima de la cinta */
  top: 35%;                  /* ✅ Centrado verticalmente */
  left: 50%;                 /* ✅ Centrado horizontalmente */
  transform: translate(-40%, 100%); /* ✅ Ajusta posición fina sobre la cinta */
  rotate: 27deg;             /* ✅ Conserva el efecto visual inclinado */
  font-weight: bold;
  color: #333;
  font-size: clamp(0.7rem, 3vw, 2rem); /* ✅ Hace la fuente responsiva */
  font-family: 'Comic Sans MS', cursive;
  white-space: nowrap;
  z-index: 1;
}

/*----------Skills----------*/

#skills{
  grid: 4;
  margin-bottom: 50px;
}

.skills_container{
  border-radius: 15px;
  justify-self: center;
  background-color: #333;
  width: auto;
  height: auto;
  display: flex;
  flex-direction: column;
}

.skill_title{
  margin-top: 2rem;
  color: white;
  font-family: 'kg_perfect';
  font-size: 2em;
  text-align: center;
}

.skills_card_container{
  gap: 0.8rem;
  padding-bottom: 1rem;
  align-items: center;
  margin: 10px 15px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
}

.skill_card{
  border-radius: 100px;
  width: 100px;
  height: 100px;
  text-align: center;
  align-content: center;
}

.skill_card img{
  width: 50%;
}

.js{
  background-color: yellow;
}

.html{
  background-color: #e34d25;
}

.css{
  background-color: #369ad6;
}

.java{
  background-color: white;
}

.bootstrap{
  background-color: #ddc6ff;
}

.C{
  background-color: #017aff;
}

/*----------ContactMe----------*/

#contact_me{
  grid-row: 5;
  margin-bottom: 50px;
}

.contact_container{
  border-radius: 15px;
  justify-self: center;
  align-items: center;
  background-color: #333;
  width: auto;
  height: auto;
  display: flex;
  flex-direction: column;
}

.contact_title{
  color: white;
  font-family: 'kg_perfect';
  text-align: center;
  font-size: 2em;
  margin-top: 2rem;
}

.contact_links a{
  color: white;
  font-size: 5rem;
}

/*----------Mediaquery----------*/

@media (max-width: 490px){
 
}

@media (max-width: 768px) {
  nav{
    display: none;
  }

  body{
    display: block;
  }

  /*----------Card----------*/

  .card {
    width: 90%;
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, auto);
    padding: 1rem;
  }

  .photo {
    grid-column: 1;
    grid-row: 1;
    text-align: center;
    padding: 10px;
  }

  .photo img {
    width: 120px;
    height: 120px;
  }

  .info-name {
    grid-column: 1;
    grid-row: 2;
    font-size: 1.4em;
    text-align: center;
    margin: 0.5rem 0;
  }
  

  .info-title-sticker {
    position: relative;
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    padding-left: 4rem;
    padding-top: 1.8rem;
    width: auto;
    
  }

  .info-title-sticker img {
    width: 50px;
    left: 70%;
  }

  .info-title-sticker span{
    position: absolute;        
    top: 130%;                  /* ✅ Centrado verticalmente */
    left: 70%;                 /* ✅ Centrado horizontalmente */
    transform: translate(-40%, 0%); /* ✅ Ajusta posición fina sobre la cinta */ 
    color: #333;
    font-size: clamp(0.7rem, 1vw, 1rem); /* ✅ Hace la fuente responsiva */
    font-family: "Knewave", system-ui;
    font-weight: 200;
    white-space: nowrap;
    z-index: 1;
  }

  .info{
    grid-row: 3;
    grid-column: 1;
    font-size: 1rem;
    display: grid;
    grid-template-columns: repeat(2,1fr);
    grid-template-rows: repeat(2,1fr);
    width: auto;
    height: auto;
  }

  .info-age p{
    grid-row: 1;
    grid-column: 1;
  }

  .titulo_coso{
    grid-row: 2;
    grid-column: 1;
  }

  .info-title p{
    grid-row: 2;
    grid-column: 1;
  }
  
  .info-title span{
    margin-top: 18px;
    grid-row: 2;
    grid-column: 1;
  }

  .info-hobby p{
    grid-row: 1;
    grid-column: 2;
  }

  .info-hobby span{
    margin-top: 18px;
    grid-row: 1;
    grid-column: 2;
  }

  .info-place p{
    grid-row: 2;
    grid-column: 2;
  }

  .qr{
    grid-row: 4;
    align-content: center;
  }

  .qr img{
    width: 50%;
    height: auto;
    text-align: center;
  }

  .info-firm {
    grid-column: 1;
    grid-row: 5;
  }
  
  .info-firm img{
    width: 60%;
    height: auto;
    text-align: center;
  }

  .info-border{
    
    grid-row: 7;
    height: 10px;
  }

  /*----------Skills----------*/

  .skills_container{
  border-radius: 15px;
  justify-self: center;
  background-color: #333;
  width: 70%;
  height: auto;
  display: flex;
  flex-direction: column;
  }

  /*----------Contact----------*/

  .contact_container{
    border-radius: 15px;
    justify-self: center;
    align-items: center;
    background-color: #333;
    width: 80%;
    height: auto;
    display: flex;
    flex-direction: column;
  }
 
  .contact_links a{
    color: white;
    font-size: 4rem;
  }

  .card-PastelApp-sticker{
    position: absolute;        /* ✅ Saca el sticker del flujo normal y lo posiciona dentro */
    top: 15%;                 /* ✅ Se ubica desde la parte superior de la tarjeta */
    right: 10%;               /* ✅ Se ubica desde la parte derecha */
    width: 20%;               /* ✅ Tamaño fijo controlado (mejor que %) */
    height: auto;              /* ✅ Se adapta automáticamente */
    z-index: 5;                /* ✅ Asegura que se superponga correctamente */
  }

  .card-PastelApp-sticker span{
    position: absolute;        /* ✅ Para ubicar el texto encima de la cinta */
    top: 25%;                  /* ✅ Centrado verticalmente */
    left: 50%;                 /* ✅ Centrado horizontalmente */
    transform: translate(-40%, 100%); /* ✅ Ajusta posición fina sobre la cinta */
    rotate: 27deg;             /* ✅ Conserva el efecto visual inclinado */
    font-weight: bold;
    color: #333;
    font-size: clamp(0.7rem, 3vw, 2rem); /* ✅ Hace la fuente responsiva */
    font-family: "Knewave", system-ui;
    white-space: nowrap;
    z-index: 1;
  }
}