/* ===========================================================================
   CV — José Miguel Argumánez Almenara
   Warm-cream / near-black palette · gold accent (#8A6D3F)
   Fonts: Cormorant Garamond (serif) + Instrument Sans (sans)
   =========================================================================== */

/* --- HERO EJECUTIVO (imagen a sangre + banda de cifras) -------------------
   Adaptado del diseño subido a la identidad del sitio: serif Bodoni, dorado
   #8A6D3F y negro-tinta #1C1A17 (en lugar del azul marino del mock) para
   mantener la coherencia con el resto de la página. */
.hero-exec {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(288px, 36vh, 408px);
  padding-top: 56px;
  overflow: hidden;
  background: #FAF7F2;
}
.hero-exec__media {
  position: absolute; z-index: -2; top: 0; right: 0; bottom: 0; left: auto;
  height: 100%; width: auto; aspect-ratio: 1567 / 854;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 34%);
}
.hero-exec__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero-exec::after {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: linear-gradient(90deg,
    rgb(250 247 242 / 98%) 0%, rgb(250 247 242 / 92%) 31%,
    rgb(250 247 242 / 64%) 47%, rgb(250 247 242 / 8%) 64%, transparent 76%);
}
.hero-exec__content {
  width: min(58%, 820px);
  padding: clamp(10px, 1.6vw, 22px) clamp(14px, 3vw, 28px);
  max-width: calc(1120px * 0.64);
  margin-left: max(0px, calc((100vw - 1120px) / 2));
  animation: heroIn .8s cubic-bezier(.22,.61,.21,1) both;
}
.hero-exec__eyebrow {
  max-width: 580px; margin: 0 0 12px;
  font-size: clamp(13px, 1.08vw, 17px); font-weight: 800; line-height: 1.35;
  letter-spacing: .16em; text-transform: uppercase;
}
.hero-exec__eyebrow::after {
  content: ""; display: block; width: 46px; height: 2px; margin-top: 12px; background: #8A6D3F;
}
.hero-exec__title {
  max-width: 22ch; margin: 0; color: #1C1A17;
  font-family: 'Bodoni Moda', 'Cormorant Garamond', Georgia, serif;
  font-weight: 600; font-size: clamp(31px, 3.6vw, 55px);
  line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance;
}
.hero-exec__desc {
  max-width: 44ch; margin: 14px 0 0; color: #6F675C;
  font-size: clamp(16px, 1.2vw, 19px); line-height: 1.5;
}
.hero-exec__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.hero-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px; border: 1px solid #1C1A17; color: #1C1A17;
  font-size: 14px; font-weight: 700; letter-spacing: .02em; text-decoration: none; border-radius: 3px;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}
.hero-btn:hover { transform: translateY(-2px); }
.hero-btn--primary { min-width: 250px; justify-content: space-between; color: #FAF7F2; background: #1C1A17; }
.hero-btn--primary:hover { background: #3A362F; }
.hero-btn__arrow { margin-left: 34px; color: #8A6D3F; font-size: 22px; }
.hero-btn--secondary { min-width: 200px; background: rgb(250 247 242 / 55%); backdrop-filter: blur(6px); }
.hero-btn--secondary:hover { color: #FAF7F2; background: #1C1A17; }

.hero-stats { background: #1C1A17; color: #F3EDE2; }
.hero-stats__grid {
  max-width: 1120px; margin: 0 auto;
  padding: clamp(28px, 4vw, 44px) clamp(20px, 5vw, 48px);
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.hero-stat { text-align: center; padding: 6px clamp(10px, 2vw, 24px); position: relative; }
.hero-stat + .hero-stat::before {
  content: ""; position: absolute; left: 0; top: 12%; height: 76%; width: 1px; background: rgb(243 237 226 / 14%);
}
.hero-stat__fig {
  font-family: 'Bodoni Moda', 'Cormorant Garamond', Georgia, serif;
  font-weight: 600; font-size: clamp(34px, 3.8vw, 50px); line-height: 1; color: #C4B399;
  font-variant-numeric: tabular-nums;
}
.hero-stat__fig .unit { color: inherit; }
.hero-stat__cap {
  margin-top: 12px; font-size: 12px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: rgb(243 237 226 / 62%);
}
@media (max-width: 1050px) {
  .hero-exec__content { width: 62%; padding-inline: 34px; }
  .hero-exec__title { font-size: clamp(29px, 4.3vw, 48px); }
}
@media screen and (max-width: 719px) {
  /* móvil: foto de fondo con la persona a la derecha + texto pequeño
     superpuesto a la izquierda (sin taparla). */
  /* móvil: franja superior (~25%) con foto de fondo, persona a la derecha y
     texto reducido a la izquierda sin taparla. */
  .hero-exec { display: flex; align-items: flex-start; position: relative; min-height: min(30svh, 240px); padding-top: 16px; overflow: hidden; }
  .hero-exec__media { position: absolute; z-index: -2; top: 8px; bottom: auto; left: auto; right: 8px; transform: none; width: 64%; height: auto; aspect-ratio: 1567 / 1004;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 24%), linear-gradient(180deg, #000 84%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 24%), linear-gradient(180deg, #000 84%, transparent 100%);
    -webkit-mask-composite: source-in; mask-composite: intersect; }
  .hero-exec__img { object-position: center; }
  .hero-exec::after {
    display: block;
    background: linear-gradient(90deg,
      rgb(250 247 242 / 90%) 0%, rgb(250 247 242 / 80%) 48%,
      rgb(250 247 242 / 45%) 64%, transparent 82%);
  }
  .hero-exec__content { position: relative; z-index: 1; width: 66%; max-width: none; margin-left: 0; padding: 0 10px 0 14px; box-sizing: border-box; animation: none; transform: none; }
  .hero-exec__eyebrow { margin: 0 0 8px; font-size: 9.5px; letter-spacing: .1em; }
  .hero-exec__eyebrow::after { width: 28px; height: 2px; margin-top: 8px; }
  .hero-exec__title { max-width: none; font-size: clamp(20px, 5.4vw, 30px); line-height: 1.08; overflow-wrap: break-word; }
  .hero-exec__desc { display: block; max-width: 34ch; margin-top: 9px; font-size: 12px; line-height: 1.35; }
  .hero-exec__actions { flex-direction: column; align-items: stretch; margin-top: 12px; gap: 8px; }
  .hero-btn { width: 100%; min-width: 0; min-height: 38px; font-size: 12px; padding: 0 12px; }
  /* cifras: 4 cuadros en una sola fila (cifras reducidas para que quepan) */
  .stats-row { gap: 6px !important; margin-top: -8px !important; }
  .stat-box + .stat-box::before { left: -3.5px; top: 16%; bottom: 16%; }
  .stats-row .stat-box { flex: 1 1 0 !important; max-width: none !important; min-width: 0 !important; padding: 14px 3px 12px !important; }
  .stats-row .stat-box [data-count] { font-size: clamp(16px, 4.9vw, 21px) !important; letter-spacing: -0.01em; }
  .stats-row .stat-box .unit { font-size: .5em !important; }
  .stats-row .stat-cap { font-size: 8px !important; margin-top: 7px !important; line-height: 1.25; letter-spacing: 0; }
  .stats-row .stat-pub { gap: 5px !important; }
  .stats-row .pub-row { gap: 3px !important; }
  .stats-row .pub-num { font-size: clamp(10px, 2.7vw, 12.5px) !important; }
  .stats-row .pub-lbl { font-size: 7.5px !important; line-height: 1.15; }
  .hero-stats__grid { grid-template-columns: 1fr; gap: 22px; }
  .hero-stat + .hero-stat::before { display: none; }
  .hero-stat + .hero-stat { border-top: 1px solid rgb(243 237 226 / 14%); padding-top: 22px; }
}
@media print {
  .hero-exec { min-height: 0; display: block; }
  .hero-exec::after { background: #fff; }
  .hero-exec__media, .hero-exec__img { display: none !important; }
  .hero-exec__content { width: 100%; max-width: none; margin-left: 0; padding: 0 0 12px; }
  .hero-stats { background: #fff !important; color: #1C1A17 !important; }
  .hero-stat__cap { color: #6F675C !important; }
  .hero-btn { display: none !important; }
}

/* --- cifras destacadas: cuadro dorado por cifra ------------------------- */
.stat-box { flex: 1 1 180px; max-width: 240px; }
.stat-box [data-count] { font-size: clamp(26px, 2.7vw, 40px) !important; }
.stat-box {
  text-align: center; box-sizing: border-box; position: relative;
  border: none; border-radius: 0; background: none; box-shadow: none;
  padding: clamp(12px, 1.8vw, 20px) 12px;
}
/* separador premium: hairline dorada vertical degradada entre cifras */
.stat-box + .stat-box::before {
  content: ""; position: absolute; top: 12%; bottom: 12%; width: 1px;
  left: calc(-0.5 * clamp(14px, 1.8vw, 22px));
  background: linear-gradient(180deg, transparent, rgba(138, 109, 63, .55), transparent);
  pointer-events: none;
}
.stat-cap { font-size: 13.5px; color: #6F675C; margin-top: 12px; letter-spacing: .01em; }
/* cuadro combinado de publicaciones (2 filas) */
.stat-pub { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.pub-row { display: flex; align-items: baseline; justify-content: center; gap: 9px; }
.pub-num { font-family: 'Bodoni Moda', 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-size: clamp(24px, 2.1vw, 34px); line-height: 1; color: #1C1A17; }
.pub-lbl { font-size: 13px; color: #6F675C; text-align: left; }
@media print {
  .stat-box { border-color: rgba(28,26,23,.3) !important; box-shadow: none !important; background: none !important; }
}

/* --- ÁREAS DE ACTUACIÓN --------------------------------------------------- */
.ar-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ar-item {
  padding: clamp(22px, 3vw, 36px) clamp(16px, 2vw, 28px);
  border-left: 1px solid rgba(28, 26, 23, .12); min-width: 0;
  border-radius: 4px;
  transition: background .4s ease, transform .4s cubic-bezier(.22,.61,.21,1), box-shadow .4s ease;
}
.ar-item:hover {
  background: radial-gradient(130% 100% at 28% 0%, rgba(138, 109, 63, .08), transparent 62%);
  transform: translateY(-4px);
  box-shadow: 0 22px 40px -30px rgba(138, 109, 63, .55);
}
.ar-item:first-child { border-left: none; padding-left: 0; }
.ar-num {
  display: inline-block; vertical-align: baseline;
  font-family: 'Bodoni Moda', 'Cormorant Garamond', Georgia, serif;
  font-weight: 600; font-size: 1.12em; line-height: 1; color: #8A6D3F;
  letter-spacing: .04em; font-variant-numeric: tabular-nums;
  margin-right: 12px; padding-right: 12px;
  border-right: 1px solid rgba(138, 109, 63, .4);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.ar-item:hover .ar-num { transform: scale(1.08); transform-origin: left bottom; }
.ar-item h4 {
  font-family: 'Bodoni Moda', 'Cormorant Garamond', Georgia, serif;
  font-weight: 600; font-size: clamp(20px, 1.85vw, 25px); line-height: 1.18;
  margin: 0 0 10px; color: #1C1A17; text-wrap: balance;
}
.ar-item p { font-size: 15.5px; line-height: 1.5; color: #3A362F; margin: 0; }
/* capacidades concretas por área */
.ar-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ar-list li { position: relative; padding-left: 15px; font-size: 14.5px; line-height: 1.5; color: #3A362F; font-weight: 500; }
.ar-list li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px;
  border-radius: 50%; background: rgba(138, 109, 63, .55);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), background .3s ease;
}
.ar-item:hover .ar-list li::before { transform: scale(1.5); background: #8A6D3F; }
.ar-item:hover .ar-list li:nth-child(1)::before { transition-delay: 0s; }
.ar-item:hover .ar-list li:nth-child(2)::before { transition-delay: .07s; }
.ar-item:hover .ar-list li:nth-child(3)::before { transition-delay: .14s; }
/* hover editorial: filete dorado que crece bajo el titular */
.ar-item h4::after { content: ""; display: block; width: 0; height: 2px; background: #8A6D3F; margin-top: 10px; transition: width .45s cubic-bezier(.22,.61,.21,1); }
.ar-item:hover h4::after { width: 44px; }
/* raíl del proceso: línea dorada con nodos */
.ar-rail { display: flex; justify-content: space-between; margin-top: clamp(30px, 4vw, 46px); position: relative; }
.ar-rail::before { content: ""; position: absolute; left: 4%; right: 4%; top: 5px; height: 1px; background: rgba(138, 109, 63, .45); }
.ar-node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.ar-node::before {
  content: ""; width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid #8A6D3F; background: #FAF7F2; box-sizing: border-box;
  position: relative; z-index: 1;
}
.ar-node span { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #6F675C; white-space: nowrap; }
/* raíl animado: la línea se dibuja y los nodos se encienden en secuencia
   (gold-in la añade initReveals al entrar en viewport) */
.ar-rail::before { transform: scaleX(0); transform-origin: left center; transition: transform 1.2s cubic-bezier(.22,.61,.21,1) .1s; }
.ar-rail.gold-in::before { transform: scaleX(1); }
.ar-node::before { transform: scale(0); transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
.ar-rail.gold-in .ar-node::before { transform: scale(1); }
.ar-node span { opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; }
.ar-rail.gold-in .ar-node span { opacity: 1; transform: none; }
.ar-node:nth-child(1)::before, .ar-node:nth-child(1) span { transition-delay: .15s; }
.ar-node:nth-child(2)::before, .ar-node:nth-child(2) span { transition-delay: .3s; }
.ar-node:nth-child(3)::before, .ar-node:nth-child(3) span { transition-delay: .45s; }
.ar-node:nth-child(4)::before, .ar-node:nth-child(4) span { transition-delay: .6s; }
.ar-node:nth-child(5)::before, .ar-node:nth-child(5) span { transition-delay: .75s; }
.ar-node:nth-child(6)::before, .ar-node:nth-child(6) span { transition-delay: .9s; }
@media (prefers-reduced-motion: reduce) {
  .ar-rail::before, .ar-node::before, .ar-node span { transition: none !important; transform: none !important; opacity: 1 !important; }
}
@media print {
  .ar-rail::before { transform: scaleX(1) !important; }
  .ar-node::before { transform: scale(1) !important; }
  .ar-node span { opacity: 1 !important; transform: none !important; }
}
.ar-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: clamp(32px, 4.5vw, 50px); }
.ar-sectors { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #6F675C; }
.ar-cta {
  display: inline-flex; align-items: center; gap: 24px;
  border: 1px solid #8A6D3F; border-radius: 3px; text-decoration: none;
  padding: 14px 22px; font-size: 14px; font-weight: 700; letter-spacing: .02em; color: #1C1A17;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.ar-cta .ar-arrow { color: #8A6D3F; font-size: 18px; transition: color .25s ease, transform .25s ease; }
.ar-cta:hover { background: #1C1A17; color: #FAF7F2; border-color: #1C1A17; }
.ar-cta:hover .ar-arrow { color: #C4B399; transform: translateX(3px); }
@media (max-width: 1050px) {
  .ar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-item:nth-child(odd) { border-left: none; padding-left: 0; }
  .ar-item:nth-child(-n+2) { border-bottom: 1px solid rgba(28, 26, 23, .12); }
}
@media screen and (max-width: 719px) {
  .ar-grid { grid-template-columns: 1fr; }
  .ar-item { border-left: none; padding: 18px 0; border-top: 1px solid rgba(28, 26, 23, .1); }
  .ar-item:first-child { border-top: none; }
  .ar-item:nth-child(-n+2) { border-bottom: none; }
  .ar-rail { flex-wrap: wrap; gap: 20px 0; }
  .ar-rail::before { display: none; }
  .ar-node { flex: 1 1 33%; gap: 9px; }
  .ar-node span { font-size: 9.5px; letter-spacing: .12em; }
  .ar-foot { flex-direction: column; align-items: stretch; text-align: center; }
  .ar-cta { justify-content: center; }
}
@media print {
  .ar-cta { display: none !important; }
  .ar-grid { grid-template-columns: repeat(2, 1fr) !important; }
}


/* --- Interlineado compacto (estilo LinkedIn) + laterales ajustados -------- */
main p,
main [style*="line-height:1.75"],
main [style*="line-height:1.7"],
main [style*="line-height:1.65"] { line-height: 1.5 !important; }
@media screen and (max-width: 719px) {
  /* teléfono: interlineado 1 y párrafos a toda la anchura */
  main p:not(.dropcap),
  main [style*="line-height:1.75"],
  main [style*="line-height:1.7"],
  main [style*="line-height:1.65"] { line-height: 1.2 !important; }
  main p, main [style*="max-width:70ch"], main [style*="max-width:78ch"],
  main [style*="max-width:62ch"], main [style*="max-width:56ch"] { max-width: none !important; }
  main p.dropcap { line-height: 1.25 !important; }
  /* margen derecho más estrecho y párrafos justificados */
  [style*="max-width:1120px"] { padding-right: 8px !important; }
  main p:not(.dropcap),
  main [style*="line-height:1.75"],
  main [style*="line-height:1.7"],
  main [style*="line-height:1.65"] { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
}
/* laterales: 48px -> 28px en escritorio, 20px -> 14px en móvil */
[style*="max-width:1120px"] {
  padding-left: clamp(14px, 3vw, 28px) !important;
  padding-right: clamp(14px, 3vw, 28px) !important;
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #FAF7F2;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(138, 109, 63, .22); }

/* --- accent application ---------------------------------------------------
   Elements tagged with data-ac inherit the gold accent. `c` = text colour,
   `cl` = light (tinted) text used on the dark footer, `bg`/`bc` mirror the
   inline values so the accent stays consistent even if an inline value is
   ever dropped. */
[data-ac="c"]  { color: #8A6D3F; }
[data-ac="cl"] { color: rgb(196, 179, 153); }
[data-ac="bg"] { background: #8A6D3F; }
[data-ac="bc"] { border-color: #8A6D3F; }

/* --- keyframes ------------------------------------------------------------ */
@keyframes heroIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes growBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes driftL { from { transform: translateX(0); } to { transform: translateX(-20px); } }
@keyframes driftR { from { transform: translateX(0); } to { transform: translateX(20px); } }
@keyframes spin360 { to { transform: rotate(360deg); } }

/* --- hover states (ported from the prototype's `style-hover`) -------------
   !important donde la propiedad también existe como estilo inline en el
   elemento (el inline gana a :hover sin él y el feedback quedaba mudo). */
.logo-track:hover { animation-play-state: paused !important; }
.hov1:hover { color: #1C1A17 !important; }
.hov2:hover { background: #3A362F !important; }
.hov3:hover { background: rgba(28, 26, 23, .06); }
.hov4:hover { filter: none !important; opacity: 1 !important; transform: scale(1.07); }
.hov5:hover { border-color: #8A6D3F !important; background: rgba(138, 109, 63, .06); }
/* .hov6 = fichas de proyecto: borde + elevación sutil */
.hov6 { transition: border-color .25s ease, box-shadow .3s ease, transform .3s ease; }
.hov6:hover {
  border-color: rgba(28, 26, 23, .45) !important;
  box-shadow: 0 20px 44px -28px rgba(28, 26, 23, .35);
  transform: translateY(-3px);
}
.hov7:hover { filter: none; opacity: 1; }
.hov8:hover { background: #FFFFFF; }
.hov9:hover { background: rgba(243, 237, 226, .1); }

/* cifras alineadas ópticamente (contadores del hero) */
[data-count] { font-variant-numeric: tabular-nums; }

/* --- móvil: proyectos como lista de nombres desplegables (acordeón) --------
   main.js inserta un botón .pcard-head (el nombre) en cada ficha .pcard.
   En escritorio la cabecera queda oculta y las fichas se ven enteras; solo
   en móvil la ficha se colapsa a su nombre y se despliega al tocarla. */
.pcard-head { display: none; }   /* oculto en escritorio */
@media screen and (max-width: 719px) {
  /* el padding vertical vive en el botón para que toda la fila sea tocable */
  .pcard { padding: 0 18px !important; scroll-margin-top: 60px; }
  .pcard.open { padding-bottom: 18px !important; }
  .pcard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 14px 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: 'Bodoni Moda', 'Cormorant Garamond', Georgia, serif;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.25;
    color: #1C1A17;
  }
  /* cabecera en dos líneas: contexto (sector · cifra) + nombre */
  .pcard-txt { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
  .pcard-sub {
    font-family: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 10.5px; font-weight: 700; letter-spacing: .15em;
    text-transform: uppercase; color: #8A6D3F;
  }
  .pcard.open .pcard-sub { display: none; } /* la ficha abierta ya muestra su kicker */
  /* fichas colapsadas: solo el nombre visible (las fichas llevan display inline) */
  .pcard:not(.open) > *:not(.pcard-head) { display: none !important; }
  /* el título ya está en la cabecera del acordeón: evitar repetirlo dentro */
  .pcard .pcard-dupname { display: none !important; }

  /* icono + / − (la barra vertical se desvanece mientras el conjunto gira) */
  .pcard-ico { flex: none; width: 14px; height: 14px; position: relative; transition: transform .35s cubic-bezier(.22,.61,.21,1); }
  .pcard-ico::before, .pcard-ico::after {
    content: ""; position: absolute; background: #8A6D3F;
    transition: transform .25s ease, opacity .25s ease;
  }
  .pcard-ico::before { left: 0; top: 6.25px; width: 14px; height: 1.5px; }
  .pcard-ico::after  { left: 6.25px; top: 0; width: 1.5px; height: 14px; }
  .pcard.open .pcard-ico { transform: rotate(180deg); }
  .pcard.open .pcard-ico::after { transform: scaleY(0); opacity: 0; }
}

/* --- responsive: pantallas pequeñas ---------------------------------------
   Adaptación móvil premium ("hecha para el teléfono"). El diseño usa estilos
   inline heredados del prototipo, así que muchas reglas necesitan !important.
   El escritorio no se toca: todo vive dentro del media query. */
#menu-sheet, #action-bar { display: none; }
/* rebote de iOS: crema en el sobre-scroll superior, tinta (color del pie)
   en el inferior — asi nunca asoma una banda blanca */
html { background: linear-gradient(#FAF7F2, #FAF7F2 50%, #1C1A17 50%, #1C1A17); }

/* --- MENÚ FLOTANTE (dock): píldora con blur, escritorio y móvil ---------- */
#float-dock {
  /* barra lateral: píldora vertical fija en el borde derecho, centrada
     verticalmente en el viewport */
  position: fixed; right: calc(12px + env(safe-area-inset-right));
  top: calc(clamp(288px, 36vh, 408px) + 26px); /* junto a las cifras, algo mas arriba */
  transform: none;
  z-index: 250;
  display: flex; flex-direction: column; align-items: stretch;
  max-height: calc(100vh - 32px);
  /* vidrio esmerilado estilo iOS: translúcido, blur profundo y brillo interior */
  background: linear-gradient(135deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .08));
  -webkit-backdrop-filter: blur(28px) saturate(1.8); backdrop-filter: blur(28px) saturate(1.8);
  /* borde dorado discreto, con brillo interior calido */
  border: 1px solid rgba(138, 109, 63, .42);
  border-radius: 24px;
  box-shadow: 0 16px 44px -16px rgba(28, 26, 23, .32),
              inset 0 1px 1px rgba(255, 255, 255, .8),
              inset 0 0 0 1px rgba(255, 255, 255, .28),
              inset 0 -1px 1px rgba(255, 255, 255, .2);
  padding: 6px;
  animation: dockSide .45s ease both;
}
@keyframes dockSide { from { transform: translateX(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.fd-links { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.fd-links a {
  font: 500 12.5px/1 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: .02em; color: #6F675C; text-decoration: none; white-space: nowrap;
  text-align: center;
  padding: 10px 14px; border-radius: 999px;
  transition: color .25s ease, background .25s ease;
}
.fd-links a:hover { color: #1C1A17; background: rgba(255, 255, 255, .45); }
.fd-links a.fd-on { color: #8A6D3F; background: rgba(255, 255, 255, .55); font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.fd-mobile { display: none; }
/* icono del botón de menú (tres líneas que se convierten en ✕) */
#menu-btn .mb-ico { display: block; position: relative; width: 16px; height: 2px; background: currentColor; border-radius: 2px; transition: background .2s ease; }
#menu-btn .mb-ico::before, #menu-btn .mb-ico::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform .3s ease, top .3s ease;
}
#menu-btn .mb-ico::before { top: -5px; }
#menu-btn .mb-ico::after { top: 5px; }
#menu-btn.open .mb-ico { background: transparent; }
#menu-btn.open .mb-ico::before { top: 0; transform: rotate(45deg); }
#menu-btn.open .mb-ico::after { top: 0; transform: rotate(-45deg); }
@media print { #float-dock { display: none !important; } }

@media screen and (max-width: 719px) {
  /* ---- MENÚ FLOTANTE móvil: banda inferior ancha en todas las pantallas ---- */
  #float-dock {
    top: auto; bottom: calc(8px + env(safe-area-inset-bottom));
    left: 50%; right: auto; transform: translateX(-50%);
    flex-direction: row; justify-content: center;
    width: calc(100vw - 12px); max-width: calc(100vw - 12px); max-height: none;
    padding: 4px; border-radius: 18px;
    animation: none;
  }
  .fd-links { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .fd-links a { font-size: 11px; padding: 9px 12px; }
  .fd-mobile { display: none; }
  #menu-btn, .fd-mobile a {
    display: inline-flex; align-items: center; justify-content: center;
    font: 600 12.5px/1 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: .02em; color: #1C1A17; text-decoration: none; white-space: nowrap;
    padding: 13px 12px; border-radius: 999px;
    background: none; border: none; cursor: pointer;
    transition: background .25s ease, color .25s ease;
  }
  .fd-mobile a:active, #menu-btn:active { background: rgba(28, 26, 23, .07); }
  /* botón Perfil: mientras el índice está abierto queda en tinta (toque = cerrar) */
  #menu-btn.open { background: #1C1A17; color: #FAF7F2; }
  section[id], footer[id] { scroll-margin-top: 18px !important; }

  /* ---- ÍNDICE a pantalla completa: tipografía Bodoni + numeración ---- */
  #menu-sheet.open {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    position: fixed; inset: 0; z-index: 150;
    background: #FAF7F2;
    padding: calc(48px + env(safe-area-inset-top)) 30px calc(96px + env(safe-area-inset-bottom));
    animation: accIn .32s cubic-bezier(.22,.61,.21,1) both;
  }
  #menu-sheet a {
    font-family: 'Bodoni Moda', 'Cormorant Garamond', Georgia, serif;
    font-size: 33px; font-weight: 600; color: #1C1A17; text-decoration: none;
    display: flex; align-items: baseline; gap: 18px;
    padding: 13px 0; border-bottom: 1px solid rgba(28, 26, 23, .1);
  }
  #menu-sheet a span {
    font-size: 14px; color: #8A6D3F; font-variant-numeric: lining-nums; flex: none;
  }
  #menu-sheet .ms-cv {
    font-family: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: #8A6D3F; border-bottom: none; margin-top: 18px;
  }

  /* Mapa de trayectoria: en móvil queda bajo los párrafos del perfil */
  .map-col { margin-top: -4px; }
  /* rótulo "Trayectoria en" encima de la marquesina */
  .tray-en {
    flex-direction: column !important; align-items: stretch !important; gap: 14px !important;
  }
  .tray-en > span { flex: none; }
  .tray-en > div { max-width: none !important; }

  /* ---- FICHA DE CIFRAS 2×2 (franja de datos de revista) ---- */

  /* ---- CITA como doble página ---- */
  aside[aria-label="Cita destacada"] blockquote { font-size: 28px !important; line-height: 1.3 !important; }
  aside[aria-label="Cita destacada"] div[aria-hidden="true"] { font-size: 56px !important; }
  aside[aria-label="Cita destacada"] blockquote + div > span[aria-hidden] { width: 26px !important; }

  /* ---- FOOTER: pila de acciones nativas (ancho completo + flecha) ---- */
  #contacto div[style*="flex-wrap:wrap"][style*="gap:12px"] { flex: 1 1 100%; }
  #contacto a.hov8, #contacto a.hov9[style*="padding:12px"] {
    display: flex !important; width: 100%; box-sizing: border-box;
    justify-content: space-between; align-items: center; gap: 12px;
    min-height: 52px; padding: 14px 18px !important;
  }
  #contacto a.hov8::after, #contacto a.hov9[style*="padding:12px"]::after {
    content: "\2192"; font-weight: 400; opacity: .5; flex: none;
  }
  #contacto { padding-bottom: calc(84px + env(safe-area-inset-bottom)) !important; }

  /* ---- divisiones con contexto persistente: barra sticky + contador ---- */
  .div-bar { position: sticky; top: 0; z-index: 5; background: #FAF7F2; padding-top: 10px; }
  .div-count {
    display: inline-block; margin-left: auto;
    font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: none; color: #6F675C;
  }

  /* Educación: "Base académica" y "Especialización ejecutiva" apiladas. */
  .edu-grid { grid-template-columns: 1fr !important; }
}

/* contador de proyectos por división: solo existe en móvil */
@media (min-width: 720px) { .div-count { display: none; } }

/* --- lenguaje táctil: respuesta inmediata al toque (solo pantallas táctiles) */
html { -webkit-tap-highlight-color: transparent; }
.pcard-head, .sec-head, #contacto a, #inicio a, #float-dock a, #menu-btn, #menu-sheet a { touch-action: manipulation; }
@media (hover: none) {
  .sec-head:active { background: rgba(138, 109, 63, .06); }
  .pcard-head:active { background: rgba(138, 109, 63, .06); }
  .pcard-head:active .pcard-name { color: #8A6D3F; }
  .hov1:active { color: #1C1A17 !important; }
  .hov2:active { background: #3A362F !important; transform: scale(.985); }
  .hov3:active { background: rgba(28, 26, 23, .08); transform: scale(.985); }
  .hov5:active { border-color: #8A6D3F !important; background: rgba(138, 109, 63, .08); }
  .hov8:active { background: #FFFFFF; transform: scale(.985); }
  .hov9:active { background: rgba(243, 237, 226, .14); }
  .fd-mobile a:active, #menu-btn:active { transform: scale(.96); }
  .hov2, .hov3, .hov8, .hov9, .fd-mobile a { transition: background .15s ease, transform .15s ease; }
}

/* --- accesibilidad: foco visible ------------------------------------------ */
a:focus-visible, button:focus-visible {
  outline: 2px solid #8A6D3F;
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .logo-track, .skrow { animation: none !important; }
}

/* ============================================================================
   MEJORAS "PANEL DE DISEÑO" — editorial, motion, confianza, print, a11y
   ============================================================================ */

/* --- accesibilidad: skip-link ---------------------------------------------- */
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 300;
  background: #1C1A17; color: #FAF7F2;
  padding: 10px 16px; border-radius: 3px;
  font: 600 13.5px 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  text-decoration: none;
  transform: translateY(-250%);
}
.skip-link:focus-visible { transform: none; }

/* --- barra de progreso de lectura ------------------------------------------ */
#read-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 301;
  background: #8A6D3F;
  transform: scaleX(0); transform-origin: left;
  pointer-events: none;
}

/* --- numeración editorial de secciones ------------------------------------- */
.sec-num {
  display: inline-block; margin-right: 14px; padding-right: 14px;
  border-right: 1px solid rgba(138, 109, 63, .45);
  font-family: 'Bodoni Moda', 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5em; font-weight: 600; line-height: 1;
  letter-spacing: .06em; color: #8A6D3F;
  vertical-align: -.08em; font-variant-numeric: lining-nums;
}
[data-ac="cl"] .sec-num { color: rgb(196, 179, 153); border-right-color: rgba(196, 179, 153, .4); }

/* --- grano de papel sutil --------------------------------------------------- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 2000;
  pointer-events: none; opacity: .033;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* --- micro-tipografía ------------------------------------------------------- */
body { font-kerning: normal; }
h1, h2, h3, [style*="Cormorant"] { font-feature-settings: "kern" 1, "liga" 1, "dlig" 1; }
h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* --- unidades de cifra a tamaño óptico reducido (contadores del hero) ------- */
.unit {
  font-size: .55em; font-weight: 500; color: #8A6D3F;
  letter-spacing: .02em; margin-left: .12em;
}
[data-count] .unit:first-child { margin-left: 0; margin-right: .06em; }

/* --- el arco del retrato se dibuja al cargar -------------------------------- */
@keyframes arcDraw { from { stroke-dasharray: 0 100; } to { stroke-dasharray: 14 86; } }
.hero-arc circle { animation: arcDraw 1.3s cubic-bezier(.22,.61,.21,1) .8s both; }

/* --- microtransiciones (nada debe "saltar") --------------------------------- */
[data-nav] { transition: color .3s ease, border-bottom-color .3s ease; }
[data-dot] { transition: background .45s ease, box-shadow .45s ease; }

.hov1, .hov2, .hov3, .hov8, .hov9 { transition: background .25s ease, color .25s ease, border-color .25s ease; }

/* --- la línea de sección se "dora" al entrar en pantalla -------------------- */
.rule-gold { position: relative; }
.rule-gold::before {
  content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 100%;
  background: #8A6D3F; opacity: .5; transform: scaleX(0); transform-origin: left;
}
.rule-gold.gold-in::before { animation: growBar 1.2s cubic-bezier(.22,.61,.21,1) both; }

/* --- cascada de fichas de proyecto (solo escritorio; la asigna main.js) ----- */
@media (min-width: 720px) {
  .card-stagger { opacity: 0; transform: translateY(18px); }
  .card-stagger.card-in {
    opacity: 1; transform: none;
    transition: opacity .6s cubic-bezier(.22,.61,.21,1), transform .6s cubic-bezier(.22,.61,.21,1);
    transition-delay: var(--stagger, 0ms);
  }
}

/* --- acordeón móvil: el contenido entra con fundido ------------------------- */
@media screen and (max-width: 719px) {
  @keyframes accIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  .pcard.open > *:not(.pcard-head):not(.pcard-dupname) { animation: accIn .35s cubic-bezier(.22,.61,.21,1) both; }
}

/* --- safe-areas iOS y tap targets ------------------------------------------- */
#contacto { padding-bottom: env(safe-area-inset-bottom); }
@media screen and (max-width: 719px) {
  .nav-links a { padding-top: 12px !important; padding-bottom: 12px !important; }
  #trayectoria a[href^="http"], #contacto a[href^="http"] { display: inline-flex; align-items: center; min-height: 44px; }
}

/* --- primer render más rápido: aplazar layout de secciones bajas ------------ */
#publicaciones, #asociaciones { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* --- prefers-reduced-motion completo ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #float-dock, #menu-btn .mb-ico, #menu-btn .mb-ico::before, #menu-btn .mb-ico::after { transition: none; }
  #menu-sheet.open { animation: none; }
  .pcard-ico { transition: none; }
  #inicio [style*="animation"] { animation: none !important; }
  .hero-arc circle { animation: none; }
  .hov4:hover { transform: none; }
  .hov6 { transition: border-color .25s ease; }
  .hov6:hover { transform: none; box-shadow: none; }
  .rule-gold.gold-in::before { animation: none; transform: none; }
  .card-stagger { opacity: 1 !important; transform: none !important; }
  .pcard.open > * { animation: none !important; }
}

/* --- impresión: la web como dossier ejecutivo -------------------------------- */
@media print {
  @page { size: A4; margin: 14mm 16mm; }
  html { scroll-behavior: auto; background: #fff !important; }
  #contacto { break-before: page; }
  #inicio div[style*="grid-template-columns"] > div + div { border-left: none !important; }
  body, #cv-root { background: #fff !important; }
  #float-dock, .vista-btn, #tl-svg, .pcard-ico, #read-progress, .skip-link,
  #action-bar, #menu-sheet, #menu-btn, .div-count { display: none !important; }
  body::after { display: none; }
  header#inicio { padding-top: 0 !important; }
  /* neutralizar reveals/animaciones (main.js pone opacity/transform inline) */
  [data-reveal], .card-stagger { opacity: 1 !important; transform: none !important; transition: none !important; }
  [style*="animation"] { animation: none !important; }
  .hero-arc circle { animation: none; }
  /* marquesinas: estáticas, sin duplicado ni fundido lateral, y que quepan en A4 */
  .logo-track { animation: none !important; width: auto !important; flex-wrap: wrap; }
  .logo-track > div[aria-hidden] { display: none !important; }
  .logo-track > div { flex-wrap: wrap; }
  [style*="mask-image"] { -webkit-mask-image: none !important; mask-image: none !important; }
  /* acordeón móvil: todo el contenido visible, sin cabecera duplicada */
  .pcard:not(.open) > *:not(.pcard-head) { display: revert !important; }
  .pcard-head { display: none !important; }
  .pcard .pcard-dupname { display: revert !important; }
  /* paginación limpia */
  .hov6 { break-inside: avoid; box-shadow: none !important; }
  h3 { break-after: avoid; }
  h2 { break-after: avoid; }
  .rule-gold { break-inside: avoid; break-after: avoid; }
  section, footer { break-inside: auto; }
  /* trayectoria: las cuadrículas/columnas de fichas se fragmentan mal en
     Chromium (fichas superpuestas); en papel las fichas van en bloque */
  #proyectos [style*="display:grid"] { display: block !important; }
  #proyectos [style*="align-items:stretch"] { display: block !important; }
  #proyectos [style*="align-items:stretch"] > div { margin-top: 12px; }
  #proyectos .pcard { margin-top: 12px; break-inside: avoid; }
  #proyectos div[style*="border-bottom"] { break-after: avoid; }
  /* URLs visibles en enlaces externos (también en el footer verificable) */
  main a[href^="http"]::after, #contacto a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10px; color: #6F675C; word-break: break-all; }
  /* footer tinta -> papel */
  #contacto { background: #fff !important; color: #1C1A17 !important; margin-top: 40px !important; }
  #contacto a, #contacto h2, #contacto span { color: #1C1A17 !important; background: none !important; border-color: rgba(28,26,23,.4) !important; }
  [data-ac="cl"] { color: #8A6D3F !important; }
  [data-ac="cl"] .sec-num { color: #8A6D3F; border-right-color: rgba(138,109,63,.45); }
  /* secciones aplazadas: forzar render */
  #publicaciones, #asociaciones { content-visibility: visible; }
}


/* ============================================================================
   EDICIÓN "FORBES" — didona, capitular, divisores de cifras
   ============================================================================ */

/* letra capitular de revista en la apertura del perfil */
.dropcap::first-letter {
  float: left;
  font-family: 'Bodoni Moda', 'Cormorant Garamond', Georgia, serif;
  font-size: 3.05em;
  line-height: .78;
  font-weight: 600;
  color: #8A6D3F;
  padding: .07em .14em 0 0;
}

/* ficha de cifras con divisores verticales (perfil de portada) */
@media (min-width: 720px) {
  #inicio [data-count] { position: relative; }
  #inicio div[style*="grid-template-columns"] > div + div {
    border-left: 1px solid rgba(28, 26, 23, .12);
  }
}

/* impresión: las barras sticky de división no deben pintar banda crema */
@media print {
  .div-bar { background: transparent !important; position: static !important; }
}

/* --- par WhatsApp + LinkedIn: siempre juntos en escritorio -------------- */
.cta-pair { display: inline-flex; gap: 12px; }
@media screen and (max-width: 719px) {
  .cta-pair { display: flex; flex-direction: column; gap: 12px; flex: 1 1 100%; width: 100%; }
  .cta-pair a { width: 100%; }
}

/* ============================================================================
   SECCIONES DESPLEGABLES — dossier ejecutivo plegado por defecto
   ============================================================================ */
.sec-head {
  display: flex; align-items: baseline; gap: 10px 22px; flex-wrap: wrap;
  cursor: pointer; user-select: none; -webkit-user-select: none;
}
.sec-head:focus-visible { outline: 2px solid #8A6D3F; outline-offset: 4px; border-radius: 2px; }
.sec-summary { font-size: 13.5px; color: #6F675C; letter-spacing: .02em; }
.sec-ico {
  margin-left: auto; flex: none; width: 16px; height: 16px;
  position: relative; align-self: center;
  transition: transform .4s cubic-bezier(.22,.61,.21,1);
}
.sec-ico::before, .sec-ico::after {
  content: ""; position: absolute; background: #8A6D3F;
  transition: transform .3s ease, opacity .3s ease, background .25s ease;
}
.sec-ico::before { left: 0; top: 7.25px; width: 16px; height: 1.5px; }
.sec-ico::after  { left: 7.25px; top: 0; width: 1.5px; height: 16px; }
section.sec-open .sec-ico { transform: rotate(180deg); }
section.sec-open .sec-ico::after { transform: scaleY(0); opacity: 0; }
@media (hover: hover) {
  .sec-head:hover .sec-ico::before, .sec-head:hover .sec-ico::after { background: #1C1A17; }
}

/* cuerpo plegable: animación de altura con grid-template-rows */
.sec-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .55s cubic-bezier(.22,.61,.21,1);
}
.sec-body-in {
  overflow: hidden; min-height: 0; min-width: 0;
  /* plegado: fuera del orden de foco y de los lectores de pantalla; al abrir
     se hace visible al instante y al cerrar espera al final del colapso */
  visibility: hidden; transition: visibility .55s;
}
section.sec-open .sec-body .sec-body-in { visibility: visible; transition: visibility 0s; }
section.sec-open .sec-body { grid-template-rows: 1fr; }
/* tras abrirse, overflow visible (el SVG del timeline y las sombras de hover
   sobresalen del cuerpo); lo aplica main.js al terminar la transición */
.sec-body.over-visible .sec-body-in { overflow: visible; }

/* respiración inferior de cada fila plegada */
main section[id] { padding-bottom: clamp(6px, 1vw, 10px) !important; }

@media (prefers-reduced-motion: reduce) {
  .sec-body { transition: none; }
  .sec-ico { transition: none; }
}

@media print {
  .sec-body { grid-template-rows: 1fr !important; }
  .sec-body-in { overflow: visible !important; visibility: visible !important; }
  .sec-ico { display: none !important; }
  .sec-head { cursor: auto; }
}

/* teléfono: margen derecho reducido (debe ir al final para ganar a la regla base) */
@media screen and (max-width: 719px) {
  [style*="max-width:1120px"] { padding-right: 8px !important; }
}

/* --- VISTA INDEPENDIENTE: puntos 01-06 a pantalla completa desde la barra -- */
#solo-view { display: none; }
#solo-view.open {
  display: block; position: fixed; inset: 0; z-index: 200;
  background: #FAF7F2;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: calc(34px + env(safe-area-inset-top)) 0 calc(90px + env(safe-area-inset-bottom));
  animation: soloIn .3s cubic-bezier(.22, .61, .21, 1) both;
}
@keyframes soloIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
#solo-close { display: none; }
#solo-view.open #solo-close {
  position: fixed; top: calc(14px + env(safe-area-inset-top)); right: calc(14px + env(safe-area-inset-right));
  z-index: 210;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; padding: 0;
  font: 500 15px/1 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  color: #1C1A17; cursor: pointer;
  background: linear-gradient(135deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .12));
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: 0 10px 28px -12px rgba(28, 26, 23, .3), inset 0 1px 1px rgba(255, 255, 255, .7);
}
/* dentro de la vista, la sección va abierta y sin línea superior de sección */
#solo-body .sec-head { border-top: none !important; }
@media print { #solo-view, #solo-close { display: none !important; } }

/* --- los puntos 01-06 ya no viven en la landing: solo se muestran dentro de
   su vista independiente (barra lateral) y al imprimir --- */
#areas, #proyectos, #educacion, #trayectoria, #publicaciones, #asociaciones { display: none; }
#solo-body #areas, #solo-body #proyectos, #solo-body #educacion,
#solo-body #trayectoria, #solo-body #publicaciones, #solo-body #asociaciones { display: block; }
@media print {
  #areas, #proyectos, #educacion, #trayectoria, #publicaciones, #asociaciones { display: block !important; }
}

/* --- la barra convive a la derecha de las cifras y el slider --------------- */
@media screen and (min-width: 720px) and (max-width: 1460px) {
  /* en pantallas donde la barra invade el contenido: cifras y slider se
     estrechan y compactan para dejarle sitio */
  #inicio .stats-row,
  #inicio .stats-row ~ div[data-reveal] { margin-right: 175px !important; }
  .stat-box [data-count] { font-size: clamp(21px, 2.1vw, 32px) !important; }
  .stat-cap { font-size: 12px; }
  .pub-num { font-size: clamp(19px, 1.7vw, 27px); }
  .pub-lbl { font-size: 11.5px; }
}

/* --- TRACK RECORD: selector de sectores ------------------------------------ */
.pf-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-tab {
  font: 700 11px/1 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: .14em; text-transform: uppercase;
  color: #6F675C; background: none; cursor: pointer;
  border: 1px solid rgba(28, 26, 23, .22); border-radius: 999px;
  padding: 10px 16px;
  transition: color .25s ease, background .25s ease, border-color .25s ease;
}
.pf-tab:hover { color: #1C1A17; border-color: rgba(28, 26, 23, .4); }
.pf-tab.pf-on {
  color: #8A6D3F; border-color: rgba(138, 109, 63, .55);
  background: rgba(138, 109, 63, .09);
}
@media screen and (max-width: 719px) {
  .pf-tabs { gap: 6px; }
  .pf-tab { font-size: 9.5px; padding: 8px 11px; }
}
/* al filtrar: las fichas de otros sectores se ocultan */
.pf-grid .hov6[data-pf-hidden] { display: none !important; }
@media print { .pf-tabs { display: none !important; } .pf-grid .hov6[data-pf-hidden] { display: flex !important; } }

/* --- TRACK RECORD: 5 sectores como botones grandes (3 col x 2 filas) ------- */
.ps-menu {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: clamp(10px, 1.4vw, 16px);
}
.ps-tile {
  grid-column: span 2;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end;
  gap: 10px; text-align: left;
  min-height: clamp(180px, 30svh, 340px);
  padding: clamp(16px, 2.2vw, 28px);
  border: 1px solid rgba(28, 26, 23, .16); border-radius: 0;
  background: rgba(255, 255, 255, .4); cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform .35s cubic-bezier(.22,.61,.21,1), border-color .35s ease, box-shadow .35s ease;
}
/* fila 1: Agua e Infraestructura anchos; fila 2: los otros tres */
.ps-tile:nth-child(1), .ps-tile:nth-child(2) { grid-column: span 3; }
.ps-tile::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(120% 90% at 50% 100%, rgba(138, 109, 63, .14), transparent 60%);
  transition: opacity .35s ease;
}
.ps-tile:hover, .ps-tile:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(138, 109, 63, .5);
  box-shadow: 0 22px 40px -24px rgba(28, 26, 23, .35);
}
.ps-tile:hover::before, .ps-tile:focus-visible::before { opacity: 1; }
.ps-name {
  font-family: 'Bodoni Moda', 'Cormorant Garamond', Georgia, serif;
  font-weight: 600; font-size: clamp(24px, 2.6vw, 42px); line-height: 1.05;
  color: #1C1A17; text-wrap: balance;
}
.ps-count {
  font: 700 11px/1 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: .16em; text-transform: uppercase; color: #8A6D3F;
}
/* vista de proyectos del sector elegido */
.ps-view[hidden] { display: none; }
.ps-head {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  margin-top: clamp(20px, 3vw, 32px);
}
.ps-back {
  font: 700 11.5px/1 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: .14em; text-transform: uppercase; color: #6F675C;
  background: none; border: 1px solid rgba(28, 26, 23, .22); border-radius: 999px;
  padding: 10px 16px; cursor: pointer;
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.ps-back:hover { color: #8A6D3F; border-color: rgba(138, 109, 63, .5); background: rgba(138, 109, 63, .07); }
.ps-title {
  font-family: 'Bodoni Moda', 'Cormorant Garamond', Georgia, serif;
  font-weight: 600; font-size: clamp(28px, 3.2vw, 44px); line-height: 1; margin: 0;
}
.ps-n {
  font: 700 11px/1 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: .16em; text-transform: uppercase; color: #8A6D3F;
}
@media screen and (max-width: 719px) {
  .ps-menu { gap: 8px; }
  .ps-tile { min-height: clamp(120px, 22svh, 200px); padding: 12px 10px; gap: 7px; }
  .ps-name { font-size: clamp(10.5px, 3vw, 13px); white-space: nowrap; }
  .ps-count { font-size: 8.5px; letter-spacing: .1em; }
  .ps-title { font-size: 26px; }
}
@media print {
  .ps-menu, .ps-back { display: none !important; }
  .ps-view[hidden] { display: block !important; }
}

/* --- ilustración minimalista de cada sector (línea dorada) ----------------- */
.ps-art {
  position: absolute; top: clamp(10px, 1.6vw, 20px); right: clamp(10px, 1.6vw, 20px);
  width: min(56%, 210px); height: auto; max-height: 62%;
  color: #8A6D3F; opacity: .5; pointer-events: none;
  transition: opacity .35s ease, transform .35s cubic-bezier(.22,.61,.21,1);
}
.ps-tile:hover .ps-art, .ps-tile:focus-visible .ps-art { opacity: .85; transform: translateY(-2px) scale(1.03); }
@media screen and (max-width: 719px) {
  .ps-art { width: 74%; max-height: 52%; top: 8px; right: 8px; opacity: .45; }
}
@media print { .ps-art { display: none !important; } }

/* --- botones de sector con fotografía de fondo ------------------------------ */
.ps-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transition: transform .6s cubic-bezier(.22,.61,.21,1);
}
.ps-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(28,26,23,.06) 30%, rgba(28,26,23,.38) 62%, rgba(28,26,23,.78) 100%);
}
.ps-tile .ps-name, .ps-tile .ps-count { position: relative; z-index: 1; }
.ps-tile .ps-name { color: #FAF7F2; text-shadow: 0 1px 14px rgba(28,26,23,.35); }
.ps-tile .ps-count { color: rgb(224, 205, 168); }
.ps-tile:hover .ps-photo, .ps-tile:focus-visible .ps-photo { transform: scale(1.05); }
@media print { .ps-photo, .ps-shade { display: none !important; } }

/* --- con una seccion abierta a pantalla completa, la barra se recoloca
   abajo, centrada y horizontal, para no tapar el contenido --------------- */
html.solo-on #float-dock {
  top: auto; bottom: calc(12px + env(safe-area-inset-bottom));
  left: 50%; right: auto; transform: translateX(-50%);
  flex-direction: row;
  max-width: calc(100vw - 12px); max-height: none;
  animation: none;
}
html.solo-on .fd-links { flex-direction: row; flex-wrap: wrap; justify-content: center; }
@media screen and (max-width: 719px) {
  html.solo-on #float-dock { bottom: calc(8px + env(safe-area-inset-bottom)); }
  html.solo-on .fd-links a { padding: 8px 9px; }
}
