/* =====================================================================
   SECCIONES — stack (viaje de una petición), proyectos, contacto y footer
   ===================================================================== */
.section { padding-block: clamp(88px, 12vw, 160px) 0; }

/* ---------- STACK: red de aparatos conectados ---------- */
.net { margin-top: 48px; --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace; }

.net-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 14px;
}
.net-run {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px 0 8px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  font-size: 14.5px;
  transition: transform .2s var(--ease), opacity .2s;
}
.net-run:hover { transform: translateY(-2px); }
.net-run:active { transform: scale(.97); }
.net-run:disabled { opacity: .55; cursor: default; transform: none; }
.net-run-icon {
  position: relative;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--accent);
}
.net-run-icon::after {
  content: '';
  position: absolute;
  left: 12px; top: 9px;
  border-left: 9px solid var(--ink);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.net.is-running .net-run-icon { animation: net-spin 1s linear infinite; }
.net.is-running .net-run-icon::after { left: 9px; top: 9px; width: 12px; height: 12px; border: 0; border-radius: 3px; background: var(--ink); }
@keyframes net-spin { to { transform: rotate(360deg); } }
.net-step { flex: 1 1 280px; font-size: 14px; line-height: 1.5; color: rgb(var(--ink-rgb) / .7); }
.net-step b { color: var(--ink); font-weight: 600; }
.net-step code { font-family: var(--mono); font-size: 12.5px; padding: 2px 6px; border-radius: 6px; background: rgb(var(--ink-rgb) / .06); color: var(--ink); }
.net-step-n {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11.5px;
  font-weight: 700;
}

/* La red */
.net-scene {
  position: relative;
  padding: 22px;
  border-radius: 28px;
  background:
    linear-gradient(rgb(var(--ink-rgb) / .035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgb(var(--ink-rgb) / .035) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--panel);
  box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -40px rgba(20, 22, 27, .35);
}
.net-cables { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.cable-base { fill: none; stroke: rgb(var(--ink-rgb) / .1); stroke-width: 6; stroke-linecap: round; }
.cable {
  fill: none;
  stroke: rgb(var(--ink-rgb) / .28);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 2 9;
  animation: cable-flow 1.4s linear infinite;
  transition: stroke .3s, stroke-width .3s;
}
.cable.is-hot { stroke: var(--c); stroke-width: 3.5; stroke-dasharray: none; }
@keyframes cable-flow { to { stroke-dashoffset: -22; } }

.net-packet {
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 0;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.net-packet::before {
  content: '';
  position: absolute;
  left: -9px; top: -9px;
  width: 18px; height: 18px;
  border-radius: 6px;
  background: var(--c, var(--accent));
  box-shadow: 0 0 0 4px var(--card), 0 0 0 5px rgba(20, 22, 27, .12), 0 6px 18px -2px var(--c, var(--accent));
}
.net-packet.is-on { opacity: 1; }

/* Clientes (web y Android, uno encima del otro) → backend → IA, en una fila */
.net-devices {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: 'pc phone' 'server server' 'robot robot';
  gap: 40px 14px;
}
.dev-server, .dev-robot { justify-self: center; width: min(100%, 300px); }
@media (min-width: 760px) {
  .net-devices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas: 'pc server robot' 'phone server robot';
    align-items: center;
    gap: 18px clamp(48px, 9vw, 120px);
  }
  .dev-server, .dev-robot { width: auto; justify-self: stretch; }
}
.dev-pc { grid-area: pc; }
.dev-phone { grid-area: phone; }
.dev-server { grid-area: server; }
.dev-robot { grid-area: robot; }

.dev {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 12px 14px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line), 0 14px 30px -22px rgba(20, 22, 27, .4);
  text-align: center;
  transition: transform .35s var(--ease), box-shadow .3s;
}
.dev:hover, .dev:focus-visible { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--c), 0 20px 36px -22px rgba(20, 22, 27, .5); }
.dev.is-hit { animation: dev-hit .6s var(--ease); }
@keyframes dev-hit { 30% { transform: scale(1.06); } }
.dev.is-busy { box-shadow: 0 0 0 2px var(--c), 0 0 0 7px color-mix(in srgb, var(--c) 18%, transparent), 0 14px 30px -18px var(--c); }
.dev-role { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--grey); }
.dev-art { display: grid; place-items: center; height: 92px; }
.dev-name { margin-top: 2px; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.dev-techs { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 6px; }
.dev-techs span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px 0 3px;
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.dev-techs i {
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--c);
  color: var(--t);
  font-style: normal;
  font-size: 8.5px;
  font-weight: 800;
}

/* PC */
.art-pc { display: flex; flex-direction: column; align-items: center; }
.pc-screen {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 104px; height: 66px;
  padding: 9px 10px;
  border-radius: 7px;
  border: 4px solid #2B2D33;
  background: #1B1D22;
}
.pc-screen i { display: block; height: 4px; border-radius: 2px; background: var(--c); opacity: .9; }
.pc-screen i:nth-child(1) { width: 55%; }
.pc-screen i:nth-child(2) { width: 80%; margin-left: 10%; background: #F6B51E; }
.pc-screen i:nth-child(3) { width: 62%; margin-left: 10%; background: #7CC4E4; }
.pc-screen i:nth-child(4) { width: 40%; margin-left: 20%; background: #9ED39A; }
.pc-screen i:nth-child(5) { width: 30%; }
.pc-screen i { animation: pc-type 2.4s steps(6) infinite; transform-origin: left; }
.pc-screen i:nth-child(2) { animation-delay: .3s; }
.pc-screen i:nth-child(3) { animation-delay: .6s; }
.pc-screen i:nth-child(4) { animation-delay: .9s; }
@keyframes pc-type { 0% { transform: scaleX(.2); } 60%, 100% { transform: none; } }
.pc-neck { width: 14px; height: 10px; background: #3A3D45; }
.pc-foot { width: 46px; height: 5px; border-radius: 3px; background: #2B2D33; }

/* Móvil */
.art-phone {
  width: 48px; height: 88px;
  padding: 4px;
  border-radius: 11px;
  background: #1B1D22;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.ph-screen {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 5px 4px;
  border-radius: 8px;
  background: #F4F6F2;
}
.ph-screen i { display: block; border-radius: 3px; }
.ph-top { height: 7px; background: var(--c); }
.ph-card { height: 14px; background: #fff; box-shadow: 0 0 0 1px rgba(20, 22, 27, .08); }
.ph-btn { margin-top: auto; height: 9px; width: 70%; align-self: center; border-radius: 999px !important; background: var(--c); }
.ph-btn { animation: ph-tap 1.8s ease-in-out infinite; }
@keyframes ph-tap { 50% { transform: scale(.85); opacity: .7; } }

/* Servidor */
.art-server { display: flex; flex-direction: column; gap: 4px; width: 86px; }
.sv-unit {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  background: #2B2D33;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25);
}
.sv-unit i { width: 5px; height: 5px; border-radius: 50%; background: #5BD08A; animation: o-blink 1.3s steps(1) infinite; }
.sv-unit i:nth-child(2) { background: var(--c); animation-delay: -.5s; }
.sv-unit:nth-child(2) i { animation-delay: -.8s; }
.sv-unit:nth-child(3) i { animation-delay: -.2s; }
.sv-unit b { flex: 1; height: 3px; margin-left: 6px; border-radius: 2px; background: rgba(255, 255, 255, .14); }
.dev-server.is-busy .sv-unit i { animation-duration: .25s; }

/* Robot */
.art-robot { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 12px; }
.rb-ant {
  position: absolute;
  top: 0; left: 50%;
  width: 2px; height: 12px;
  margin-left: -1px;
  background: #3A3D45;
}
.rb-ant::after {
  content: '';
  position: absolute;
  top: -5px; left: -4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
  animation: rb-glow 2s ease-in-out infinite;
}
@keyframes rb-glow { 50% { opacity: .45; } }
.rb-head {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 14px;
  width: 70px; height: 46px;
  padding-top: 13px;
  border-radius: 16px;
  background: #E9EDF2;
  box-shadow: inset 0 0 0 3px #2B2D33;
}
.rb-eye {
  width: 10px; height: 12px;
  border-radius: 50%;
  background: #1B1D22;
  animation: rb-blink 4s infinite;
}
@keyframes rb-blink { 0%, 92%, 100% { transform: none; } 95% { transform: scaleY(.1); } }
.rb-mouth {
  position: absolute;
  left: 50%; bottom: 9px;
  width: 18px; height: 5px;
  margin-left: -9px;
  border-radius: 0 0 9px 9px;
  background: var(--c);
}
.rb-body {
  display: grid;
  place-items: center;
  width: 52px; height: 22px;
  margin-top: 3px;
  border-radius: 9px 9px 6px 6px;
  background: #2B2D33;
}
.rb-body i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
/* Pensando: los ojos miran a un lado y a otro y la antena parpadea rápido */
.dev-robot.is-think .rb-eye { animation: rb-think .9s ease-in-out infinite; }
.dev-robot.is-think .rb-ant::after { animation-duration: .4s; }
@keyframes rb-think { 50% { transform: translateX(4px); } }


/* Formación: cada tarjeta tiene otra debajo que asoma y sale con el detalle */
.net { position: relative; z-index: 2; }
.net-edu { display: grid; gap: 10px; margin-top: 14px; }
/* En fila, las tres tarjetas miden lo mismo (en una columna no: la de debajo va en el flujo) */
@media (min-width: 1024px) {
  .net-edu { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .edu-front { height: 100%; }
}
.edu { position: relative; }
.edu-front {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 14px 14px 16px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line);
  text-align: left;
  transition: box-shadow .3s;
}
.edu-front:active { transform: scale(.99); }
.edu-more {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--panel);
  color: var(--ink);
  transition: transform .4s var(--ease), background .3s, color .3s;
}
.edu-more svg { width: 16px; height: 16px; }
.edu-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--panel);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
}
.edu.is-done .edu-icon { background: #E3F3E6; color: #2F7A45; }
.edu.is-now .edu-icon { background: var(--accent-soft); }
.edu.is-cert .edu-icon { background: #DCEBF2; color: #1F6684; }
.edu-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.edu-k { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
.edu-text b { font-size: 14.5px; font-weight: 600; }

/* La tarjeta de debajo: cerrada solo asoma una franja con el color de su estado */
.edu-sheet {
  position: absolute;
  z-index: 1;
  top: calc(100% - 20px);
  left: 12px; right: 12px;
  max-height: 36px;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
  background: color-mix(in srgb, var(--c) 14%, var(--card));
  box-shadow: 0 0 0 1px var(--line);
  transition: max-height .5s var(--ease), left .4s var(--ease), right .4s var(--ease), background .3s, box-shadow .3s;
}
.edu-sheet-in {
  padding: 32px 16px 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility 0s .5s;
}
.edu.is-open { z-index: 3; }
.edu.is-open .edu-front { box-shadow: 0 0 0 1px var(--line), 0 10px 22px -16px rgba(20, 22, 27, .5); }
.edu.is-open .edu-more { transform: rotate(180deg); background: var(--ink); color: var(--on-ink); }
.edu.is-open .edu-sheet {
  left: 0; right: 0;
  max-height: 560px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line), 0 30px 50px -28px rgba(20, 22, 27, .45);
}
.edu.is-open .edu-sheet-in { opacity: 1; visibility: visible; transition: opacity .35s .12s, visibility 0s; }
/* Con ratón sale al pasar por encima (o con el teclado al enfocarla) */
@media (hover: hover) {
  .edu:hover, .edu:has(:focus-visible) { z-index: 3; }
  .edu:hover .edu-front, .edu:has(:focus-visible) .edu-front { box-shadow: 0 0 0 1px var(--line), 0 10px 22px -16px rgba(20, 22, 27, .5); }
  .edu:hover .edu-more, .edu:has(:focus-visible) .edu-more { transform: rotate(180deg); background: var(--ink); color: var(--on-ink); }
  .edu:hover .edu-sheet, .edu:has(:focus-visible) .edu-sheet {
    left: 0; right: 0;
    max-height: 560px;
    background: var(--card);
    box-shadow: 0 0 0 1px var(--line), 0 30px 50px -28px rgba(20, 22, 27, .45);
  }
  .edu:hover .edu-sheet-in, .edu:has(:focus-visible) .edu-sheet-in { opacity: 1; visibility: visible; transition: opacity .35s .12s, visibility 0s; }
}
/* En una sola columna la tarjeta de debajo empuja a las demás en lugar de taparlas */
@media (max-width: 1023px) {
  .net-edu { gap: 26px; }
  .edu-sheet { position: relative; top: auto; left: auto; right: auto; margin: -20px 12px 0; }
  .edu.is-open .edu-sheet { margin-inline: 0; }
}

.es-sum { font-size: 13.5px; line-height: 1.5; color: rgb(var(--ink-rgb) / .7); }
.es-k {
  margin: 14px 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--grey);
}
.es-k:first-child { margin-top: 0; }
.es-list, .es-certs { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.es-list li { display: flex; align-items: flex-start; gap: 10px; padding: 8px; border-radius: 12px; background: var(--panel); }
.es-ic {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--ic, var(--c));
  color: var(--it, #fff);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 800;
}
.es-ic.is-icon { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--c); }
.es-ic svg { width: 16px; height: 16px; }
.es-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.35; }
.es-item b { font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; }
.es-item span { font-size: 12.5px; color: rgb(var(--ink-rgb) / .65); }

.es-cert { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; background: var(--panel); }
a.es-cert { transition: box-shadow .25s; }
a.es-cert:hover { box-shadow: 0 0 0 1.5px var(--c); }
.es-cert img, .es-cert-art { flex: none; width: 64px; aspect-ratio: 4 / 3; border-radius: 8px; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.es-cert-art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: linear-gradient(135deg, #fff, #F2F7FA);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 0 0 3px #fff, inset 0 0 0 4px color-mix(in srgb, var(--c) 35%, transparent);
}
.es-cert-art i { display: block; width: 50%; height: 3px; border-radius: 2px; background: rgb(var(--ink-rgb) / .12); }
.es-cert-art i:first-child { height: 4px; background: color-mix(in srgb, var(--c) 55%, transparent); }
.es-cert-art b { position: absolute; right: 7px; bottom: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.es-cert-name { font-size: 13.5px; font-weight: 600; line-height: 1.35; }

@media (prefers-reduced-motion: reduce) {
  .edu-sheet, .edu-sheet-in { transition: none; }
}

/* ---------- PROYECTOS ---------- */
.filters { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line);
  font-size: 14px;
  font-weight: 500;
  transition: background .25s, color .25s, box-shadow .25s, transform .2s var(--ease);
}
.chip sup { font-size: 10.5px; font-weight: 700; color: var(--grey); top: 0; }
.chip:hover { box-shadow: 0 0 0 1px rgba(20, 22, 27, .3); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.chip[aria-pressed='true'] sup { color: var(--accent); }

.plist { margin-top: 28px; border-top: 1px solid rgb(var(--ink-rgb) / .14); counter-reset: p; }
.prow {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 6px 16px;
  padding: 26px 4px;
  border-bottom: 1px solid rgb(var(--ink-rgb) / .14);
}
.prow::before {
  content: '';
  position: absolute;
  inset: 0 calc(var(--gutter) * -0.4);
  z-index: -1;
  border-radius: 18px;
  background: var(--card);
  opacity: 0;
  transform: scaleY(.6);
  transition: opacity .35s, transform .45s var(--ease);
}
.prow.is-hidden { display: none; }
.prow.is-enter { animation: prow-in .5s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
@keyframes prow-in { from { opacity: 0; transform: translateY(14px); } }
.prow.is-flash::before { opacity: 1; transform: none; background: var(--accent-soft); animation: flash 2.2s var(--ease) forwards; }
@keyframes flash { 0%, 60% { background: var(--accent-soft); } 100% { background: var(--card); opacity: 0; } }

.prow-num { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--grey); padding-top: 8px; }
.prow-thumb { grid-column: 1 / -1; order: -1; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.prow-main { min-width: 0; }
.prow-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.3rem);
  line-height: 1.05;
  letter-spacing: -.045em;
  transition: transform .45s var(--ease);
}
.prow-arrow {
  display: grid;
  place-items: center;
  width: .9em; height: .9em;
  border-radius: 12px;
  background: var(--accent);
  opacity: 0;
  transform: scale(.4) rotate(-45deg);
  transition: opacity .3s, transform .45s var(--ease);
}
.prow-arrow svg { width: 50%; height: 50%; stroke-width: 2.6; }
.prow-desc { margin-top: 8px; max-width: 36rem; color: rgb(var(--ink-rgb) / .66); line-height: 1.55; }
.prow-meta { grid-column: 2; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.prow-kind { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
.prow-example { margin-left: 6px; padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: #8A5A00; font-style: normal; letter-spacing: .06em; }
.prow-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.prow-tags li { padding: 4px 10px; border-radius: 8px; background: rgb(var(--ink-rgb) / .06); font-size: 12.5px; font-weight: 500; }
.prow-links { grid-column: 2; display: flex; gap: 8px; margin-top: 12px; }
.plink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(20, 22, 27, .16);
  transition: background .25s, color .25s, box-shadow .25s;
}
.plink svg { width: 15px; height: 15px; }
.plink:hover { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.plink-main { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.plink-main svg { color: var(--accent); }
.plink-main:hover { background: var(--accent); color: var(--on-accent); }
.plink-main:hover svg { color: var(--on-accent); }

/* En móvil el número va encima del nombre y el resto usa todo el ancho */
@media (max-width: 559px) {
  .prow { grid-template-columns: minmax(0, 1fr); }
  .prow-num { padding-top: 0; }
  .prow-meta, .prow-links { grid-column: auto; }
}
@media (min-width: 900px) {
  .prow { grid-template-columns: 64px minmax(0, 1.5fr) minmax(0, 1fr) 150px; align-items: start; gap: 24px; padding: 34px 8px; }
  .prow-thumb { display: none; }
  .prow-meta, .prow-links { grid-column: auto; margin-top: 10px; }
  /* Botones centrados en vertical en la fila; la columna tiene ancho fijo para que la de tipo/año quede alineada */
  .prow-links { flex-direction: column; align-items: flex-end; align-self: center; margin-top: 0; }
  .prow-num { padding-top: 14px; }
}
@media (hover: hover) and (min-width: 900px) {
  .prow:hover::before { opacity: 1; transform: none; }
  .prow:hover .prow-name { transform: translateX(10px); }
  .prow:hover .prow-arrow { opacity: 1; transform: none; }
}

.plist-empty { padding: 40px 0; color: var(--grey); }

/* Vista previa que sigue al cursor */
.preview {
  position: fixed;
  top: 0; left: 0;
  z-index: 40;
  width: 300px;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 30px 60px -20px rgba(20, 22, 27, .5);
  transition: opacity .25s;
  will-change: transform;
}
.preview.is-on { opacity: 1; }
.preview .cover { position: absolute; inset: 0; }

/* ---------- CONTACTO ---------- */
.contact { padding: clamp(88px, 12vw, 160px) var(--frame) var(--frame); }
.contact-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: var(--night);
  color: #fff;
  padding-block: clamp(56px, 8vw, 112px);
}
.contact-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: rotate(-12deg) scale(1.6);
  -webkit-mask-image: radial-gradient(circle at 80% 30%, #000, transparent 70%);
  mask-image: radial-gradient(circle at 80% 30%, #000, transparent 70%);
  pointer-events: none;
}
.contact-panel::after {
  content: '';
  position: absolute;
  right: -10%; top: -30%;
  width: 60%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(246, 181, 30, .22), transparent);
  pointer-events: none;
}
.contact :where(a, button, input, textarea):focus-visible { outline-color: var(--accent); box-shadow: 0 0 0 6px rgba(246, 181, 30, .25); }

.contact-grid { position: relative; z-index: 1; display: grid; gap: 56px; }
@media (min-width: 960px) {
  .contact-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 72px; }
}
.eyebrow-dark { color: rgba(255, 255, 255, .6); }
.eyebrow-dark .eyebrow-num { background: var(--accent); color: var(--on-accent); }
.contact-title {
  margin-top: 20px;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(2.6rem, 1rem + 4.8vw, 5rem);
  /* Las frases que van rotando no se parten: el tamaño se ajusta al ancho de la columna
     para que la más larga ("tu próximo proyecto?") quepa sin meterse bajo el formulario */
  font-size: min(clamp(2.6rem, 1rem + 4.8vw, 5rem), 10.6cqi);
  line-height: 1;
  letter-spacing: -.05em;
}
.contact-copy { container-type: inline-size; }
.contact-accent { display: block; color: var(--accent); min-height: 1.05em; }
.contact-lede { margin-top: 22px; max-width: 30rem; color: rgba(255, 255, 255, .7); font-size: 17px; line-height: 1.6; }

.mail-row { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mail-big {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1rem + 1.4vw, 2rem);
  font-weight: 600;
  letter-spacing: -.03em;
  word-break: break-all;
}
.mail-big::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent);
  transform-origin: right;
  transition: transform .5s var(--ease);
}
.mail-big:hover::after { transform: scaleX(0); }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  font-size: 13.5px;
  font-weight: 600;
  transition: background .25s;
}
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn:hover { background: rgba(255, 255, 255, .16); }
.copy-btn.is-done { background: var(--accent); color: var(--on-accent); box-shadow: none; }

.socials { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.social {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  font-size: 14px;
  font-weight: 600;
  transition: background .25s, color .25s, transform .3s var(--ease);
}
.social svg { width: 18px; height: 18px; }
.social:hover { background: #fff; color: var(--ink); transform: translateY(-2px); }

.status { margin-top: 28px; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(255, 255, 255, .7); }

.contact-form {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 24px;
  background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  backdrop-filter: blur(6px);
}
.field { display: grid; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.field input, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 0;
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 15px;
  resize: vertical;
  transition: box-shadow .2s, background .2s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 255, 255, .38); }
.field input:focus, .field textarea:focus { outline: 0; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 2px var(--accent); }
.field.is-invalid input, .field.is-invalid textarea { box-shadow: inset 0 0 0 2px #FF6B57; }
.contact-form { position: relative; }
.contact-form > .cta { justify-self: center; }
.form-error, .form-ok { font-size: 13.5px; text-align: center; }
.form-error { color: #FF8A7A; }
.form-ok { color: #7BDCA0; }
.form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form .cta:disabled { opacity: .65; cursor: progress; }

.cta-accent { background: var(--accent); color: var(--on-accent); justify-self: start; }
.cta-accent .cta-fill { background: #fff; }
.cta-accent .cta-tile svg { stroke-width: 2.2; }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 28px 18px;
  font-size: 13.5px;
  color: var(--grey);
}
.to-top { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.to-top svg { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.to-top:hover svg { transform: translateY(-3px); }
