/* ==========================================================================
   Samlaratech - Portafolio individual
   Sobre Bootstrap 5, Bootstrap Icons y AOS (MIT).
   ========================================================================== */

:root {
  --pf-fuente: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --pf-fuente-titulos: "Raleway", "Poppins", sans-serif;
  --pf-fuente-menu: "Poppins", sans-serif;

  --pf-texto: #272829;
  --pf-titulos: #173b6c;
  --pf-acento: #149ddd;
  --pf-acento-hover: #37b3ed;
  --pf-lateral: #040b14;
  --pf-lateral-texto: #a8a9b4;
  --pf-fondo-claro: #f5f8fd;
  --pf-sombra: 0 0 24px rgba(0, 0, 0, .08);
  --pf-ancho-lateral: 300px;

  scroll-behavior: smooth;
}

body.pf { font-family: var(--pf-fuente); color: var(--pf-texto); background: #fff; }
.pf a { color: var(--pf-acento); text-decoration: none; }
.pf a:hover { color: var(--pf-acento-hover); }
.pf h1, .pf h2, .pf h3, .pf h4, .pf h5 { font-family: var(--pf-fuente-titulos); }

.pf-aviso {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10000; text-align: center;
  background: #ffc107; color: #3d2c00; font-weight: 600; padding: 6px; font-size: 14px;
}

/* -------------------------- Barra lateral -------------------------- */
.pf-lateral {
  position: fixed; inset: 0 auto 0 0; width: var(--pf-ancho-lateral); z-index: 9997;
  background: var(--pf-lateral); padding: 0 15px; overflow-y: auto; transition: left .4s ease;
}
.pf-perfil { text-align: center; padding-top: 24px; }
.pf-perfil-foto {
  display: block; margin: 15px auto; width: 120px; height: 120px; border-radius: 50%;
  border: 8px solid #2c2f3f; object-fit: cover;
}
.pf-perfil-vacio { display: grid; place-items: center; background: #2c2f3f; color: #a8a9b4; font-size: 48px; }
.pf-perfil-nombre { font-size: 24px; margin: 0; font-weight: 600; }
.pf-perfil-nombre a, .pf-perfil-nombre a:hover { color: #fff; }
.pf-redes { display: flex; justify-content: center; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.pf-redes a {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: #212431; color: #fff; font-size: 17px; transition: .3s;
}
.pf-redes a:hover { background: var(--pf-acento); color: #fff; }

.pf-menu { padding: 30px 0; }
.pf-menu ul { list-style: none; margin: 0; padding: 0; }
.pf-menu a {
  display: flex; align-items: center; gap: 12px; padding: 12px 15px; margin-bottom: 8px;
  color: var(--pf-lateral-texto); font-family: var(--pf-fuente-menu); font-size: 15px; border-radius: 8px; transition: .3s;
}
.pf-menu a i { font-size: 22px; color: #6f7180; transition: .3s; }
.pf-menu a:hover, .pf-menu a.activo { color: #fff; }
.pf-menu a:hover i, .pf-menu a.activo i { color: var(--pf-acento); }
.pf-menu li:last-child a { margin-top: 18px; border-top: 1px solid #1c2230; border-radius: 0; padding-top: 20px; }

.pf-toggle {
  position: fixed; right: 15px; top: 15px; z-index: 9998; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--pf-acento); color: #fff; font-size: 26px; display: none; place-items: center; line-height: 0;
}

.pf-contenido { margin-left: var(--pf-ancho-lateral); }

@media (max-width: 1199.98px) {
  .pf-lateral { left: calc(-1 * var(--pf-ancho-lateral)); }
  .pf-toggle { display: grid; }
  .pf-contenido { margin-left: 0; }
  .pf-menu-abierto .pf-lateral { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.4); }
}

/* -------------------------- Portada -------------------------- */
.pf-portada {
  position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden;
  background: radial-gradient(circle at 20% 30%, #1e4f7a 0%, #0c1f35 55%, #040b14 100%);
}
.pf-portada-fondo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.pf-portada::before { content: ""; position: absolute; inset: 0; background: rgba(5, 13, 24, .45); z-index: 1; }
.pf-portada-texto { position: relative; z-index: 2; padding: 0 8%; }
.pf-portada h2 { color: #fff; font-size: 64px; font-weight: 700; margin: 0 0 10px; }
.pf-portada p { color: #fff; font-size: 26px; font-family: var(--pf-fuente-menu); margin: 0; }
.pf-escribe { border-bottom: 3px solid var(--pf-acento); padding-bottom: 2px; letter-spacing: 1px; }
.pf-escribe::after { content: "|"; margin-left: 2px; color: var(--pf-acento); animation: parpadeo .8s steps(1) infinite; }
@keyframes parpadeo { 50% { opacity: 0; } }
@media (max-width: 767.98px) {
  .pf-portada { text-align: center; }
  .pf-portada h2 { font-size: 36px; }
  .pf-portada p { font-size: 20px; line-height: 1.6; }
}

/* -------------------------- Secciones -------------------------- */
.pf-seccion { padding: 60px 0; overflow: clip; scroll-margin-top: 0; }
.pf-fondo-claro { background: var(--pf-fondo-claro); }
.pf-titulo { padding-bottom: 30px; }
.pf-titulo h2 {
  font-size: 32px; font-weight: 700; margin-bottom: 20px; padding-bottom: 20px; position: relative; color: var(--pf-titulos);
}
.pf-titulo h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 50px; height: 3px; background: var(--pf-acento);
}
.pf-titulo p { margin-bottom: 0; }
.pf-titulo p + p { margin-top: 12px; }

/* Acerca de mí */
.pf-acerca-foto { border-radius: 6px; box-shadow: var(--pf-sombra); width: 100%; object-fit: cover; aspect-ratio: 1; }
.pf-acerca h3 { font-weight: 700; font-size: 26px; color: var(--pf-titulos); }
.pf-acerca ul { list-style: none; padding: 0; }
.pf-acerca li { margin-bottom: 18px; display: flex; align-items: flex-start; gap: 6px; flex-wrap: wrap; }
.pf-acerca li strong { margin-right: 4px; }
.pf-acerca li i { font-size: 16px; color: var(--pf-acento); line-height: 1.4; }
.pf-formacion { margin: 0; color: #555; }
.pf-formacion i { color: var(--pf-acento); }

/* Habilidades */
.pf-habilidad { margin-bottom: 22px; }
.pf-habilidad-txt {
  display: flex; justify-content: space-between; font-family: var(--pf-fuente-menu);
  font-size: 13px; font-weight: 600; text-transform: uppercase; color: #050d18; margin-bottom: 6px;
}
.pf-habilidad-txt i { font-style: normal; }
.pf-habilidad-barra { height: 10px; background: #dce8f8; border-radius: 5px; overflow: hidden; }
.pf-habilidad-barra span { display: block; height: 100%; width: 0; background: var(--pf-acento); border-radius: 5px; transition: width 1.2s ease; }

/* Resumen */
.pf-resumen-titulo { font-size: 26px; font-weight: 700; margin: 20px 0; color: #050d18; }
.pf-item {
  padding: 0 0 20px 20px; margin-top: -2px; border-left: 2px solid #1f5297; position: relative;
}
.pf-item::before {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; left: -9px; top: 0;
  background: #fff; border: 2px solid #1f5297;
}
.pf-item h4 { line-height: 18px; font-size: 18px; font-weight: 600; text-transform: uppercase; color: #050d18; margin-bottom: 10px; }
.pf-item h5 {
  font-size: 15px; background: #e4edf9; padding: 5px 15px; display: inline-block; font-weight: 600; margin-bottom: 10px;
  font-family: var(--pf-fuente);
}
.pf-item ul { padding-left: 20px; }
.pf-item ul li { padding-bottom: 10px; }
.pf-item:last-child { padding-bottom: 0; }

/* Portafolio */
.pf-filtros { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 30px; }
.pf-filtros button {
  border: 0; background: #fff; padding: 8px 18px; border-radius: 50px; font-size: 14px; font-weight: 600;
  text-transform: uppercase; color: #444; font-family: var(--pf-fuente-menu); transition: .3s;
}
.pf-filtros button:hover, .pf-filtros button.activo { background: var(--pf-acento); color: #fff; }
.pf-proyecto.oculto { display: none; }
.pf-proyecto-tarjeta { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: var(--pf-sombra); height: 100%; }
.pf-proyecto-imagen { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(135deg, #173b6c, var(--pf-acento)); display: grid; place-items: center; }
.pf-proyecto-imagen img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pf-proyecto-imagen > i { color: rgba(255,255,255,.75); font-size: 48px; }
.pf-proyecto-acciones {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: rgba(4, 11, 20, .45); opacity: 0; transition: .3s;
}
.pf-proyecto-tarjeta:hover .pf-proyecto-acciones, .pf-proyecto-acciones:focus-within { opacity: 1; }
.pf-proyecto-tarjeta:hover img { transform: scale(1.06); }
.pf-proyecto-acciones button, .pf-proyecto-acciones a {
  width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: #fff; color: var(--pf-titulos); font-size: 20px; transition: .3s;
}
.pf-proyecto-acciones button:hover, .pf-proyecto-acciones a:hover { background: var(--pf-acento); color: #fff; }
.pf-proyecto-cuerpo { padding: 18px 20px; }
.pf-proyecto-cuerpo h4 { font-size: 17px; font-weight: 700; color: var(--pf-titulos); margin: 6px 0; }
.pf-proyecto-cuerpo p { font-size: 14px; margin: 0; color: #555; }
.pf-etiqueta {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--pf-acento); background: rgba(20, 157, 221, .1); padding: 3px 10px; border-radius: 50px;
}

/* Visor de imágenes */
.pf-visor {
  border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; overflow: visible;
}
.pf-visor::backdrop { background: rgba(4, 11, 20, .88); }
.pf-visor img { max-width: 100%; max-height: 82vh; display: block; margin: 0 auto; border-radius: 6px; }
.pf-visor p { color: #fff; text-align: center; margin: 12px 0 0; font-weight: 600; }
.pf-visor-cerrar {
  position: absolute; top: -18px; right: -18px; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: #fff; color: #111; font-size: 18px; display: grid; place-items: center;
}

/* Servicios */
.pf-servicio { display: flex; gap: 20px; }
.pf-servicio-icono {
  flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pf-acento); border: 1px solid var(--pf-acento); transition: .4s;
}
.pf-servicio-icono i { color: #fff; font-size: 26px; transition: .4s; }
.pf-servicio:hover .pf-servicio-icono { background: #fff; }
.pf-servicio:hover .pf-servicio-icono i { color: var(--pf-acento); }
.pf-servicio h4 { font-weight: 700; font-size: 18px; color: var(--pf-titulos); margin-bottom: 8px; }
.pf-servicio p { font-size: 14px; line-height: 1.6; margin: 0; }

/* Contacto */
.pf-caja { background: #fff; padding: 30px; height: 100%; box-shadow: 0 0 24px rgba(0,0,0,.1); border-top: 3px solid var(--pf-acento); border-bottom: 3px solid var(--pf-acento); }
.pf-dato { display: flex; gap: 14px; margin-bottom: 24px; }
.pf-dato > i {
  flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 20px;
  color: var(--pf-acento); background: #dff3fc; transition: .3s;
}
.pf-dato:hover > i { background: var(--pf-acento); color: #fff; }
.pf-dato h4 { font-size: 20px; font-weight: 600; margin-bottom: 4px; color: #050d18; }
.pf-dato p { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.pf-dato a { color: #173b6c; }
.pf-mapa { width: 100%; height: 290px; border: 0; }
.form-contacto .form-label { font-weight: 500; }
.form-contacto .form-control { border-radius: 4px; box-shadow: none; }
.form-contacto .form-control:focus { border-color: var(--pf-acento); }
.campo-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-cargando, .form-error, .form-exito { padding: 14px; border-radius: 4px; text-align: center; font-weight: 600; }
.form-cargando { background: var(--pf-fondo-claro); }
.form-error { background: #df1529; color: #fff; }
.form-exito { background: #059652; color: #fff; }
.pf-boton {
  background: var(--pf-acento); border: 0; padding: 10px 35px; color: #fff; border-radius: 4px; transition: .4s;
}
.pf-boton:hover { background: var(--pf-acento-hover); }
.pf-boton:disabled { opacity: .6; cursor: wait; }

/* Pie y botón subir */
.pf-pie { padding: 24px 15px; text-align: center; font-size: 14px; background: #f1f4f8; }
.pf-pie p { margin: 0; }
.pf-subir {
  position: fixed; right: 15px; bottom: 15px; z-index: 996; width: 40px; height: 40px; border-radius: 50%;
  background: var(--pf-acento); color: #fff; display: grid; place-items: center; visibility: hidden; opacity: 0; transition: .4s;
}
.pf .pf-subir:hover { color: #fff; background: var(--pf-acento-hover); }
.pf-subir i { font-size: 28px; line-height: 0; }
.pf-subir.visible { visibility: visible; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .pf-escribe::after { animation: none; }
  .pf-habilidad-barra span { transition: none; }
}
