/* =========================
   FUENTES + RESET
========================= */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400&family=Poppins:wght@300;400;600;700&display=swap');

html { box-sizing: border-box; }
*, *::before, *::after {
  box-sizing: inherit;
  margin: 0; padding: 0;
  font-family: Poppins, Arial, Helvetica, sans-serif;
  color: #fafafa;
}
code, pre, kbd, samp { font-family: "Fira Code", monospace; }

:root{
  --bg: #0d0d0d;
  --panel: rgba(255,255,255,0.08);
  --panel-strong: rgba(255,255,255,0.1);
  --text: #fafafa;
  --muted: rgba(214,214,214,0.75);
  --brand: #52dee5;
  --shadow: rgba(0,0,0,0.12);
}

body{
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.4;
}

/* Scrollbar (opcional) */
body::-webkit-scrollbar { width: 12px; }
body::-webkit-scrollbar-track { background: #1a1919; }
body::-webkit-scrollbar-thumb {
  background-image: linear-gradient(to top,#8e6de7,#5dbeff);
  background-color: #3B4264;
  border-radius: 20px; border: 3px solid #1a1919;
}

a { text-decoration: none; }
ul { list-style: none; }

/* Enfoque accesible */
a, button { outline: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}

/* =========================
   CONTENEDORES
========================= */
.container{ width: 100%; padding: 10vh 4vw; }
.container2{ width: 100%; display: flex; gap: 2vw; }

/* =========================
   TARJETA LATERAL (presentation)
========================= */
.presentation{ width: 21vw; }
.presentation2{
  position: sticky; top: 0;
  width: 100%;
  border-radius: 25px;
  background: var(--panel);
  border: 1px solid var(--panel-strong);
}
.presentation2 > div:first-child{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap: 4vh; padding: 9vh 3vw 5vh;
}
.presentation2 img{
  width: 10vw; height: 10vw; border-radius: 12%; object-fit: cover;
}
.presentation2 h1, .presentation2 p{ text-align:center; }
.presentation2 h1{ font-size: 26px; font-weight: 600; }
.presentation2 p{
  margin-top: 12px; font-size: 12px; font-weight: 300;
  background: rgba(255,255,255,0.08); padding: 5px 8px; border-radius: 8px;
}

.presentation2 > div:last-child{ padding: 0 2vw; }
.presentation2 > div:last-child ul{
  padding: 5vh 0 0; border-top: 1px solid var(--panel-strong);
}
.presentation2 > div:last-child li{
  display:flex; gap: 6%; align-items:center; margin-bottom: 10%;
}
.presentation2 > div:last-child li ion-icon{
  color: var(--brand); font-size: 18px; padding: 12px; border-radius: 11px;
  background: rgba(255,255,255,0.05);
  border-left: 1px solid var(--panel-strong); border-top: 1px solid var(--panel-strong);
}
.presentation2 > div:last-child li div{ display:flex; flex-direction:column; font-size: 14px; }
.presentation2 > div:last-child li div span{ color: var(--muted); }

.presentation2 > div:last-child > div{
  display:flex; justify-content:space-between; width:66%;
  margin: 5vh 17%; 
}
.presentation2 > div:last-child > div ion-icon{ color:#d6d6d6; }

/* Botón caret para móvil */
.toggle-card{
  display:none; position:absolute; right:0; top:0;
  background: rgba(255,255,255,0.05); border: none; cursor: pointer;
  padding: 9px; border-radius: 0 20px 0 20px; color: var(--brand);
}

/* =========================
   MAIN / SECCIONES
========================= */
.boxes{ width: auto; position: relative; }
.boxes > section{
  width: 69vw; border-radius: 25px;
  background: var(--panel);
  border: 1px solid var(--panel-strong);
  padding: 5vh 2.4vw;
  display: none; /* el JS enciende la activa */
}
.boxes > section#about{ display: block; }

.section h1{ font-size: 32px; font-weight: 700; line-height: 28px; }
.section .div{
  width:45px; height:5px; border-radius:2px; background: var(--brand);
  margin: 3.5vh 0 4.5vh;
}

/* Menú superior de tabs */
.boxes .menu{
  position: absolute; top:0; right:0; left:auto;
  width: 35vw; margin:auto; z-index: 5;
  display:flex; justify-content:space-evenly;
  border-radius: 0 25px 0 25px;
  background: rgba(255,255,255,0.05);
  border-left: 1px solid var(--panel-strong);
  border-bottom: 1px solid var(--panel-strong);
}
.boxes .menu .btn{
  padding: 19px 0; font-size: 15px; font-weight: 700; color: rgba(214,214,214,0.8);
}
.boxes .menu .btn:hover, .boxes .menu .btn.active{ color: var(--brand); }

/* =========================
   ABOUT: texto
========================= */
.aboutme .h11{ font-size:32px; font-weight:600; line-height:28px; }
.aboutme > div{ width:45px; height:5px; border-radius:2px; background: var(--brand); margin:3vh 0; }
.aboutme .h12{ color:#d6d6d6; font-size:18px; font-weight:700; line-height:28px; }
.aboutme p{ margin: 2vh 0; color:#d6d6d6; }

/* =========================
   SKILL CARDS (.card para VanillaTilt)
========================= */
.skill{ width:100%; }
.skill > h1{ margin:6vh 0 3vh; font-size:24px; font-weight:700; }
.skill > div{
  width:100%; display:flex; flex-wrap:wrap; justify-content:space-between; gap:3%;
}
.card{
  width: 48.5%; display:flex; align-items:center; gap:5%;
  padding: 3.5vh 3% 4vh;
  background: radial-gradient(circle at 0% 100%, #303033 20%, #38393a 40%, #3b3c41 100%);
  border-top: 1px solid var(--panel-strong);
  border-left: 1px solid var(--panel-strong);
  border-radius:15px; box-shadow: 0 5px 10px 5px var(--shadow);
}
.card img{ width:50px; height:50px; filter: drop-shadow(-2px 2px 15px rgba(0,0,0,0.7)); }
.card p{ display:flex; flex-direction:column; color:#d6d6d6; }
.card p span{ font-size:18px; font-weight:700; line-height:38px; }
.card > div{ position:absolute; top:0; left:0; padding:3% 4%; display:flex; gap:6px; }
.card > div span{ width:10px; height:10px; border-radius:50%; border:1px solid rgba(255,255,255,0.4); }

/* =========================
   TECHNOLOGIES (slider horizontal)
========================= */
.technologies{ width:100%; margin-bottom:3vh; }
.technologies h1{ font-size:24px; font-weight:700; margin:4vh 0 9vh; }
.technologies > div{
  width:96%; margin:0 2%; display:flex; flex-wrap:nowrap; gap:4.6vw;
  overflow-x:auto; -webkit-overflow-scrolling: touch;
}
.technologies > div::-webkit-scrollbar{ height:6px; }
.technologies > div::-webkit-scrollbar-track{ background: rgba(255,255,255,0.1); border-radius:6px; margin: 0 8vw; }
.technologies > div::-webkit-scrollbar-thumb{ background:#55cde8; border-radius:6px; }
.technologies div div{ display:flex; flex-direction:column; align-items:center; gap:2.5vh; }
.technologies img{ width:130px; height:auto; }
.technologies span{ font-size:18px; font-weight:600; margin-bottom:8vh; }

/* =========================
   LOADER (sin imagen para evitar 404)
========================= */
.loader{
  position: fixed; inset: 0; z-index: 9999;
  background: rgb(0,0,0); background-position: 50% 50%; background-repeat: no-repeat;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1000px){
  .container{ padding: 2vh 3vw; padding-bottom: calc(2vh + 55px); }
  .container2{ flex-direction: column; }

  .presentation{ width:100%; position:relative; }
  .toggle-card{ display:block; }
  .presentation2{ border-radius:20px; }
  .presentation2 > div:first-child{
    flex-direction: row; align-items: center; gap: 4vw; padding: 1.5vh 4vw;
  }
  .presentation2 img{ width:20%; height:20%; border-radius: 20%; }
  .presentation2 p{ font-size:11px; padding: 3px 6px; margin-top: 4px; }

  /* Contenido compacto del panel: por defecto colapsado (se expande con .active en change.css) */
  .presentation2 > div:last-child{
    padding: 0 4vw; height: 0; overflow: hidden;
  }
  .presentation2 > div:last-child ul{ padding-top: 2.5vh; }
  .presentation2 > div:last-child ul li{ margin-bottom: 5%; gap: 5%; }
  .presentation2 > div:last-child ul li div{ font-size: 11px; }

  .boxes > section{
    width:100%; margin-top:1vh; border-radius:20px; padding: 5vh 3.3vw;
  }
  .boxes .menu{
    position: fixed; left:0; right:0; bottom:0; top:auto; width:100%;
    backdrop-filter: blur(8px); border-radius: 12px 12px 0 0;
    background: rgba(255,255,255,0.05);
    gap: 3vw; justify-content:center;
  }
  .boxes .menu .btn{ font-size:11px; padding: 19px 0; }

  .skill > h1{ margin:3vh 0; font-size:18px; }
  .card{
    width: 48%; flex-direction: column; text-align:center;
    box-shadow: 0 5px 10px 5px rgba(0,0,0,0.2);
  }
  .card img{ width:44px; height:44px; }
  .card p span{ font-size:16px; line-height: 30px; }
}

@media (max-width: 480px){
  .card{ width: 100%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
