/* ==========================================================
   profewerner.com — hoja compartida de recursos.html y sobre-mi.html
   Misma paleta y tipografías que index.html
   ========================================================== */

:root{
  --fondo-1:   #04081c;
  --fondo-2:   #0a1435;
  --fondo-3:   #061029;
  --cian:      #5eead4;
  --azul:      #60a5fa;
  --violeta:   #a78bfa;
  --ambar:     #fbbf24;
  --rosa:      #f472b6;
  --texto:     #e8edf9;
  --texto-2:   #97a3c4;
  --linea:     rgba(148,178,255,.16);
  --panel:     rgba(10,20,53,.62);
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: var(--texto);
  background-color: var(--fondo-1);
  background-image:
    radial-gradient(1100px 620px at 12% -10%, rgba(94,234,212,.10), transparent 60%),
    radial-gradient(900px 560px at 88% 0%,   rgba(167,139,250,.12), transparent 62%),
    linear-gradient(160deg, var(--fondo-2), var(--fondo-1) 55%, var(--fondo-3));
  background-attachment: fixed;
  line-height: 1.6;
}

/* ---------- Barra superior ---------- */
.barra{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 24px 0;
}

.marca{
  font-family: 'Kalam', 'Segoe Script', cursive;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(100deg, #fff 10%, var(--cian) 55%, var(--azul) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.nav{ display: flex; gap: 20px; flex-wrap: wrap; }

.nav a{
  color: var(--texto-2);
  text-decoration: none;
  font-size: .95rem;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color .18s, border-color .18s;
}
.nav a:hover,
.nav a[aria-current="page"]{ color: var(--cian); border-bottom-color: var(--cian); }

/* ---------- Estructura ---------- */
main{ max-width: 1040px; margin: 0 auto; padding: 42px 24px 90px; }

.encabezado{ margin-bottom: 46px; }

.kicker{
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cian);
  margin-bottom: 12px;
}

h1{
  font-family: 'Kalam', 'Segoe Script', cursive;
  font-size: clamp(2.3rem, 6.5vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 14px;
  background: linear-gradient(100deg, #ffffff 10%, var(--cian) 45%, var(--azul) 75%, var(--violeta) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(94,234,212,.22));
}

.entrada{ color: #c3cee8; max-width: 62ch; margin: 0; font-size: 1.05rem; }

h2{
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--texto-2);
  margin: 54px 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--linea);
}

h3{ margin: 0 0 8px; font-size: 1.15rem; color: var(--texto); }

/* ---------- Tarjetas de herramientas ---------- */
.rejilla{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
}

.ficha{
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--linea);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(7px);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.ficha:hover{
  transform: translateY(-4px);
  border-color: rgba(94,234,212,.42);
  box-shadow: 0 16px 40px rgba(2,6,23,.55);
}

.ficha p{ color: var(--texto-2); margin: 0 0 20px; font-size: .95rem; flex: 1; }

.icono{
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 11px;
  margin-bottom: 15px;
  background: linear-gradient(135deg, rgba(94,234,212,.18), rgba(96,165,250,.18));
  border: 1px solid var(--linea);
  color: var(--cian);
}

.enlace{
  align-self: flex-start;
  color: var(--cian);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  border-bottom: 1px solid transparent;
  transition: border-color .18s;
}
.enlace:hover{ border-bottom-color: currentColor; }
.enlace::after{ content: " →"; }

/* ---------- Bloques de texto (sobre mí) ---------- */
.bloque{
  background: var(--panel);
  border: 1px solid var(--linea);
  border-radius: 16px;
  padding: 26px 28px;
  margin-bottom: 18px;
}
.bloque p:last-child{ margin-bottom: 0; }

.linea-tiempo{ list-style: none; margin: 0; padding: 0; }
.linea-tiempo li{
  padding: 14px 0 14px 20px;
  border-left: 2px solid var(--linea);
  position: relative;
}
.linea-tiempo li::before{
  content: "";
  position: absolute; left: -6px; top: 22px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--cian);
}
.linea-tiempo .fecha{
  display: block;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cian);
  margin-bottom: 3px;
}

/* ---------- Marcador de contenido pendiente ---------- */
.pendiente{
  border: 1px dashed rgba(251,191,36,.55);
  background: rgba(251,191,36,.07);
  border-radius: 12px;
  padding: 16px 18px;
  color: #f5d78e;
  font-size: .92rem;
}
.pendiente strong{ color: var(--ambar); }

/* ---------- Video ---------- */
.video{
  position: relative;
  padding-top: 56.25%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--linea);
  background: #000;
}
.video iframe{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ---------- Botón ---------- */
.boton{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  color: #04122b;
  background: linear-gradient(135deg, var(--cian), var(--azul) 65%, var(--violeta));
  box-shadow: 0 12px 30px rgba(94,234,212,.22);
  transition: transform .18s, box-shadow .18s;
}
.boton:hover{ transform: translateY(-2px); box-shadow: 0 16px 38px rgba(94,234,212,.3); }

/* ---------- Pie ---------- */
.pie{
  border-top: 1px solid var(--linea);
  margin-top: 70px;
  padding: 26px 24px 40px;
  text-align: center;
  color: var(--texto-2);
  font-size: .9rem;
}
.pie a{ color: var(--cian); text-decoration: none; }
.pie a:hover{ text-decoration: underline; }

@media (max-width: 560px){
  main{ padding: 30px 18px 70px; }
  .barra{ padding: 18px 18px 0; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .ficha, .boton{ transition: none; }
  .ficha:hover, .boton:hover{ transform: none; }
}

/* ==========================================================
   Tarjetas desplegables (sobre-mi.html)
   ========================================================== */

.tarjetero{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.abridor{
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: var(--panel);
  border: 1px solid var(--linea);
  border-radius: 16px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  backdrop-filter: blur(7px);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.abridor:hover,
.abridor:focus-visible{
  transform: translateY(-4px);
  border-color: rgba(94,234,212,.45);
  box-shadow: 0 16px 40px rgba(2,6,23,.55);
  outline: none;
}
.abridor:focus-visible{ outline: 2px solid var(--cian); outline-offset: 3px; }

.abridor .titulo{ font-size: 1.18rem; font-weight: 600; }
.abridor .resumen{ color: var(--texto-2); font-size: .93rem; flex: 1; }
.abridor .mas{ color: var(--cian); font-size: .9rem; font-weight: 600; }
.abridor .mas::after{ content: " →"; }

/* --- Diapositiva por encima --- */
dialog.lamina{
  width: min(760px, 92vw);
  max-height: 86vh;
  padding: 0;
  border: 1px solid var(--linea);
  border-radius: 20px;
  background: #0a1435;
  color: var(--texto);
  box-shadow: 0 30px 90px rgba(0,0,0,.65);
  overflow: hidden;
}
dialog.lamina::backdrop{
  background: rgba(2,6,23,.78);
  backdrop-filter: blur(4px);
}

.lamina-cabeza{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--linea);
  background: linear-gradient(120deg, rgba(94,234,212,.10), rgba(167,139,250,.10));
}
.lamina-cabeza h3{
  margin: 0;
  font-size: 1.3rem;
  font-family: 'Kalam', 'Segoe Script', cursive;
}

.cerrar{
  background: transparent;
  border: 1px solid var(--linea);
  color: var(--texto-2);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  flex: none;
  transition: color .18s, border-color .18s;
}
.cerrar:hover{ color: var(--cian); border-color: var(--cian); }

.lamina-cuerpo{
  padding: 24px 26px 30px;
  overflow-y: auto;
  max-height: calc(86vh - 76px);
}
.lamina-cuerpo p:first-child{ margin-top: 0; }
.lamina-cuerpo p:last-child{ margin-bottom: 0; }

@media (prefers-reduced-motion: reduce){
  .abridor{ transition: none; }
  .abridor:hover, .abridor:focus-visible{ transform: none; }
}

/* ---------- Tarjetas solo icono + titulo ---------- */
.abridor.simple{
  align-items: flex-start;
  gap: 16px;
  padding: 30px 24px;
}
.abridor.simple .icono{
  margin: 0;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.abridor.simple .titulo{
  transition: color .2s;
}
.abridor.simple:hover .icono,
.abridor.simple:focus-visible .icono{
  background: linear-gradient(135deg, rgba(94,234,212,.32), rgba(96,165,250,.32));
  border-color: rgba(94,234,212,.6);
  color: #d8fff6;
  transform: scale(1.06);
}
.abridor.simple:hover .titulo,
.abridor.simple:focus-visible .titulo{ color: var(--cian); }

/* ---------- Detalle desplegable dentro de una lamina ---------- */
.ojo{
  margin-top: 10px;
  border: 1px solid var(--linea);
  border-radius: 12px;
  background: rgba(4,8,28,.45);
  overflow: hidden;
}
.ojo > summary{
  cursor: pointer;
  list-style: none;
  padding: 11px 15px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--cian);
  font-size: .9rem;
  font-weight: 600;
  transition: background .18s;
}
.ojo > summary::-webkit-details-marker{ display: none; }
.ojo > summary:hover{ background: rgba(94,234,212,.08); }
.ojo[open] > summary{ border-bottom: 1px solid var(--linea); }
.ojo .contenido{ padding: 15px; color: var(--texto-2); font-size: .94rem; }
.ojo .contenido p:first-child{ margin-top: 0; }
.ojo .contenido p:last-child{ margin-bottom: 0; }

/* ---------- Tarjetero compacto: todas en una linea ---------- */
.tarjetero.compacto{
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.tarjetero.compacto .abridor{
  aspect-ratio: 1 / 1;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 12px;
  gap: 12px;
}
.tarjetero.compacto .abridor .titulo{
  font-size: .98rem;
  line-height: 1.25;
}
@media (max-width: 900px){
  .tarjetero.compacto{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px){
  .tarjetero.compacto{ grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Lista simple de instituciones ---------- */
.instituciones{
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.instituciones li{
  padding: 9px 14px;
  border-radius: 10px;
  background: rgba(4,8,28,.4);
  border: 1px solid var(--linea);
  font-size: .95rem;
}
.instituciones .anio{ color: var(--cian); font-size: .82rem; margin-left: 6px; }

/* ---------- Destacado (reconocimientos) ---------- */
.premio{
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(251,191,36,.4);
  background: rgba(251,191,36,.08);
  color: #f3e0ae;
  font-size: .94rem;
}
.premio strong{ color: var(--ambar); }

/* ---------- Enlace de contacto destacado en el menu ---------- */
.nav a.destacado{
  color: var(--cian);
  border: 1px solid rgba(94,234,212,.45);
  border-radius: 999px;
  padding: 5px 15px;
  border-bottom-width: 1px;
}
.nav a.destacado:hover{
  background: rgba(94,234,212,.12);
  border-color: var(--cian);
}

/* ---------- Menu desplegable de Herramientas ---------- */
.desplegable{ position: relative; }

.desplegable > button{
  font: inherit;
  color: var(--texto-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 0 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .18s, border-color .18s;
}
.desplegable > button:hover,
.desplegable > button[aria-expanded="true"],
.desplegable.activa > button{ color: var(--cian); border-bottom-color: var(--cian); }

.desplegable > button svg{ transition: transform .2s; }
.desplegable > button[aria-expanded="true"] svg{ transform: rotate(180deg); }

.desplegable .panel{
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 190px;
  padding: 8px;
  border-radius: 14px;
  background: #0a1435;
  border: 1px solid var(--linea);
  box-shadow: 0 18px 44px rgba(2,6,23,.6);
  display: none;
  z-index: 40;
}
.desplegable .panel[data-abierto="si"]{ display: block; }

.desplegable .panel a{
  display: block;
  padding: 9px 13px;
  border-radius: 9px;
  border: none;
  color: var(--texto-2);
  font-size: .93rem;
  transition: background .16s, color .16s;
}
.desplegable .panel a:hover{ background: rgba(94,234,212,.1); color: var(--cian); }

@media (max-width: 620px){
  .desplegable .panel{ position: static; transform: none; box-shadow: none; margin-top: 8px; }
}

/* ---------- Tarjetas verticales de servicio ---------- */
.servicios{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 30px;
}
.servicios .abridor{
  aspect-ratio: auto;
  align-items: flex-start;
  text-align: left;
  padding: 30px 26px;
  gap: 14px;
  min-height: 330px;
}
.servicios .abridor .titulo{ font-size: 1.25rem; }
.servicios .abridor .resumen{
  color: var(--texto-2);
  font-size: .95rem;
  flex: 1;
}
.servicios .abridor .precio{
  color: var(--cian);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .04em;
}
