body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Poppins", sans-serif;
    background-color: black;
}

.bg-video{
  position: fixed;    
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;      
  z-index: 0;             
  pointer-events: none;   
  filter: brightness(.9); 
  opacity: 80%;
}

/*header*/
header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height:10vh;    
    background: color-mix(in oklab, #000000 5%, transparent);
    backdrop-filter: blur(6px);           
}

header .logo {
    padding: 0 24px;  
    height: 44px;             
    width: auto;
    justify-self: start;
}

nav {
    display: flex;
    justify-content: center;
    flex: 1;   
    gap: 3rem;
    
}

nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: .6rem 1.2rem;     
    text-decoration: none;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 400;
    transition: all 0.3s ease;
}

nav a:hover {
    color:var(--fg,#f4349d);
    background: color-mix(in oklab, var(--fg,#f4349d) 12%, transparent); 
    border-radius: 50px;
}


#nav{
  position: relative;   
  z-index: 100000;        
  isolation: isolate;    
}

#nav.pin-spacer, 
#nav + .pin-spacer, 
#nav.parent-pin-spacer { z-index: 99999; }



/*about*/
.about{
    justify-content: center;
    align-items: center;
    display: flex;
    height: 60vh;
}

#hello {
    color: white;
    width: 150vh;
    font-size: 1.6rem;
    text-align: left;
    font-weight: 400;
}

#work {
    color: white;
    width: 150vh;
    font-size: 1.6rem;
    text-align: right;
    font-weight: 400;
}

/*video 3d*/
.videome{
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}

.videome2{
  display: block;
  width: 130vh;
  height: auto;
  aspect-ratio: 16 / 9;
  margin-top: -50px;
}

/*about me*/
.about1{
    justify-content: center;
    align-items: center;
    display: flex;
}

.about1 a{
    color:var(--fg,#f4349d);
    border: #f4349d solid;
    text-decoration: none;
    font-size: 1.4rem;
    text-align: center;
    border-radius: 100px;
    padding: 10px;
    transition: all 0.3s ease;
    margin-top: -80px;
}

.about1 a:hover {
    color: white;
    background: color-mix(in oklab, var(--fg,#f4349d) 50%, transparent); 
}

.about2{
    justify-content: center;
    align-items: center;
    display: flex;
    height: 30vh;
}


/*burbuja hey*/
.me-wrap{
    position: relative;
    display: inline-block;        
}

.hey-bubble{
    position: absolute;
    left: 100%;     
    top: 0%;        
    transform: translate(-60%, -25%);
    width: clamp(180px, 26vw, 360px);
    max-width: 42vw;
    filter: drop-shadow(0 10px 24px rgba(0,0,0,.35));
    pointer-events: none;
    z-index: 2;
}

.my-skills{
    height: 101vh;
    margin-top: -1px;
    justify-content: center;
    align-items: center;
    display: flex;

}

.my-skills h2 {
    color: white;
    margin-top: 0;
    font-size: 4rem;
    opacity: 0;
    transform: scale(.95);
    transition: opacity .8s ease-out, transform .8s cubic-bezier(.16,.84,.44,1); 
    will-change: opacity, transform;
}

.my-skills h2.is-visible{
  opacity: 1;
  transform: scale(1);
}

/*footer*/
footer{
    height: 40vh;
    margin-top: -2px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto; 
    align-items: center;             
    gap: clamp(12px, 3vw, 48px);
    padding: clamp(20px, 5vw, 72px);
    color: #fff;    
}

.footer-brand{
  margin:0;
  font-weight: 700;
  font-size: clamp(40px, 10vw, 128px);
  display:flex; align-items:center; gap:.25em;
}

.footer-contact{
  font-weight: 100; 
  text-align:left;
  display:grid; 
  gap:.25em;
  font-size: 1.5rem;
  line-height: 0px;
}

.footer-contact a{
  color: var(--txt); text-decoration:none; opacity:.95;
}

.redes{
    width: auto;
    height: 50px;
    transition: all 0.3s ease;
}
.redes:hover {
    transform: scale(1.1);  
}


/* ===== NAV HAMBURGUESA ===== */
.nav-toggle{
  display:none;
  appearance:none;
  background:transparent;
  border:0;
  width:42px; height:42px;
  place-items:center;
  padding:0; margin:0 16px 0 auto;
  cursor:pointer;
  position:relative;
  z-index:100001;
}
.nav-toggle span{
  position:absolute; left:9px; right:9px; height:2px; background:#fff; transition:.25s;
}
.nav-toggle span:nth-child(1){ top:13px; }
.nav-toggle span:nth-child(2){ top:20px; }
.nav-toggle span:nth-child(3){ top:27px; }

/* dropdown móvil oculto por defecto */
#site-menu{ position:relative; }
@media (max-width: 768px){
  header{
    grid-template-columns: 1fr auto; /* logo | botón */
    height: auto;
    padding-block: clamp(8px, 2vw, 12px);
  }
  header .logo{ height: 38px; padding: 0 16px; }

  .nav-toggle{ display:grid; }

  /* ocultar la fila de links centrada de tu nav */
  #site-menu{
    position: absolute;
    top: 100%;
    right: 16px;
    display: none;
    flex-direction: column;
    gap: .2rem;
    padding: .6rem;
    background: color-mix(in oklab, #000 35%, transparent);
    backdrop-filter: blur(8px);
    border: 1px solid rgb(255 255 255 / .12);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgb(0 0 0 / .35);
    z-index: 100000;
  }
  #site-menu a{
    padding: .8rem 1.2rem;
    font-size: 1.6rem;
    border-radius: 12px;
    white-space: nowrap;
  }
  #site-menu.is-open{ display:flex; }

  /* animación hamburguesa -> X */
  .nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity:0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

  /* hero más corto en móvil */
  main{ min-height: 56vh; justify-content: flex-end; }
}

/* ===== FOOTER RESPONSIVE ===== */
@media (max-width: 992px){
  footer{
    grid-template-columns: 1fr;
    height: auto;
    text-align: center;
    justify-items: center;
    gap: 1.2rem;
  }
  .footer-brand{ line-height: 1; }
  .footer-contact{
    text-align: center;
    line-height: 1.4;
    font-size: clamp(1.4rem, 1.8vw, 1.6rem);
    gap: .4rem;
  }
  .footer-contact > div{
    display:flex; gap: 12px; justify-content:center; align-items:center;
    margin-top: .2rem;
  }
  .redes{ height: 40px; }
}

/* Ajustes de stack en móvil (1 columna) */
@media (max-width: 768px){
  .stack{ height: 320vh; padding-inline: clamp(12px,4vw,24px); }
  .card{ grid-template-columns: 1fr; min-height: auto; }
  :root{ --gap: 55vh; --overlap: 45vh; }
  main h2{ font-size: clamp(2.4rem, 6vw, 4rem); padding-right: clamp(12px,6vw,10vh); }
}

.my-skills h2{
  font-size: clamp(2.2rem, 7vw, 3.6rem);  /* antes 4rem fijo */
}


/* === ABOUT: ajuste móvil de video + textos === */
@media (max-width: 768px){

  /* evita que el header tape el inicio y hace más corto el hero */
  .videome{
    min-height: 82vh;
    padding-top: 12vh; /* respeta header */
    place-items: center;
  }

  /* video + burbuja más chicos y mejor ubicados */
  .videome2{
    width: min(64vw, 360px);   /* antes 130vh */
    margin-top: -10px;         /* menos empuje hacia abajo */
    height: auto;
  }
  .hey-bubble{
    transform: translate(-15%, -10%);
    width: clamp(100px, 28vw, 180px); /* reduce */
    max-width: 40vw;
  }

  /* título intermedio más bajo y fluido */
  .my-skills{
    height: auto;
    padding: 28px 0 8px;
  }
  .my-skills h2{
    font-size: clamp(2.0rem, 7vw, 3.0rem);
  }

  /* párrafos “sobre mí”: más chicos y legibles */
  .about{
    height: auto;
    padding: 12px 18px;
  }
    .about1{
margin-top: 20%;
  }
  #hello, #work{
    width: auto;                /* quita 150vh */
    max-width: 58ch;            /* ancho de lectura */
    margin: 0 auto 18px;
    text-align: left;           /* ambos alineados igual */
    font-size: clamp(1.25rem, 3.6vw, 1.45rem); /* antes 1.6rem */
    line-height: 1.45;
  }
}

/* micro-móviles (≤390px) un pelín menos */
@media (max-width: 390px){
  .videome2{ width: 80vw; }
  #hello, #work{ font-size: 1.22rem; }
}

/* === FIX: header no tapa el texto + menu limpio en móvil === */
@media (max-width: 768px){
  :root{ --nav-h: 56px; }                /* alto aprox del header móvil */

  header{
    position: sticky; top: 0;            /* se queda arriba sin invadir contenido */
    grid-template-columns: 1fr auto;     /* logo | botón */

    height: var(--nav-h);
    padding-block: 8px;
    z-index: 100000;                      /* sobre el fondo, no sobre el texto */
  }
  header .logo{ height: 38px; padding: 0 16px; }
  .nav-toggle{ display:grid; margin-right: 16px; }

  /* el primer bloque bajo el header respira */
  .videome{ padding-top: calc(var(--nav-h) + 12px); }
}

/* === FIX: burbuja cortada -> ocultar en móvil y agrandar video === */
@media (max-width: 768px){
  .hey-bubble{ display: none; }           /* ocultamos imagen derecha */
  .videome2{
    width: min(78vw, 420px);              /* video más grande y centrado */
    margin-top: -6px;
    height: auto;
  }
}
@media (max-width: 390px){
  .videome2{ width: 82vw; }               /* un poco más grande en micros */
}

/* === Tipos un toque más chicos para que no empujen al menú === */
@media (max-width: 768px){
  #hello, #work{
    font-size: clamp(1.22rem, 3.5vw, 1.42rem);
    max-width: 60ch;
    margin: 0 auto 18px;
  }
}

/* Ocultar el bloque del personaje en celulares */
@media screen and (max-width: 768px) {
  .videome {
    display: none !important;
  }
}


