/* ============================================================
   WEBMASTER LEO — Bloque de servicios y credenciales

   Los servicios dejan de ser seis tarjetas iguales y pasan a una
   retícula bento: cada pieza tiene el tamaño que merece y lleva
   una micro-visualización propia que muestra lo que hace el
   servicio, no un icono genérico que lo represente.
   ============================================================ */

/* ============================================================
   1. RETÍCULA BENTO
   ============================================================ */
.bento { display: grid; gap: var(--gutter); grid-template-columns: 1fr; }

@media (min-width: 48rem) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) {
  .bento { grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(0, auto); }
  .bento__hero  { grid-column: span 4; grid-row: span 2; }
  .bento__tall  { grid-column: span 2; grid-row: span 1; }
  .bento__third { grid-column: span 2; }
  .bento__half  { grid-column: span 3; }
}

/* ============================================================
   2. PIEZA
   ============================================================ */
.svc {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: var(--s-3);
  padding: var(--s-6);
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: linear-gradient(168deg, rgba(8,120,249,.06), transparent 46%), var(--surface);
  color: inherit;
  transition: border-color var(--d-base) var(--e-soft), box-shadow var(--d-base) var(--e-soft),
              transform var(--d-base) var(--e-out), background var(--d-base) var(--e-soft);
}
.svc:hover, .svc:focus-visible {
  color: inherit; transform: translateY(-6px); border-color: var(--line-hi);
  box-shadow: var(--sh-2), 0 0 44px rgba(0,200,255,.22);
  background: linear-gradient(168deg, rgba(8,120,249,.15), transparent 58%), var(--surface);
}

/* Filo superior que barre al entrar el puntero */
.svc::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; z-index: 4;
  background: var(--grad-tech); transform: scaleX(0); transform-origin: left;
  transition: transform var(--d-slow) var(--e-out);
}
.svc:hover::before, .svc:focus-visible::before { transform: scaleX(1); }

.svc__head { display: flex; align-items: flex-start; gap: var(--s-4); }
.svc__icon {
  width: 3rem; height: 3rem; flex: none; display: grid; place-items: center;
  border-radius: var(--r-md); color: var(--cyan);
  background: linear-gradient(150deg, rgba(8,120,249,.24), rgba(0,200,255,.05));
  border: 1px solid var(--line-2);
  transition: border-color var(--d-base) var(--e-soft), box-shadow var(--d-base) var(--e-soft),
              transform var(--d-base) var(--e-out);
}
.svc:hover .svc__icon { border-color: var(--cyan); box-shadow: var(--glow-cyan); transform: rotate(-5deg) translateY(-2px); }
.svc__icon svg { width: 1.4rem; height: 1.4rem; stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.svc__title { font-family: var(--f-display); font-weight: 800; font-size: var(--t-h3);
  letter-spacing: -.03em; line-height: 1.2; color: var(--ink); }
.svc__kicker {
  font-family: var(--f-tech); font-weight: 700; font-size: var(--t-2xs);
  letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--cyan);
  display: block; margin-bottom: .2rem;
}
.svc__desc { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.65; }

.svc__list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.svc__list li {
  margin: 0; font-family: var(--f-tech); font-weight: 600; font-size: var(--t-2xs);
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-3); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .25rem .6rem;
  transition: color var(--d-base) var(--e-soft), border-color var(--d-base) var(--e-soft);
}
.svc:hover .svc__list li { color: var(--ink-2); border-color: var(--line-2); }

.svc__more {
  margin-top: auto; padding-top: var(--s-2);
  font-family: var(--f-tech); font-weight: 700; font-size: var(--t-xs);
  letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--blue);
  display: inline-flex; align-items: center; gap: .5em;
  transition: color var(--d-fast) var(--e-soft);
}
.svc:hover .svc__more { color: var(--cyan); }
.svc__more::after { content: "\2192"; transition: transform var(--d-base) var(--e-out); }
.svc:hover .svc__more::after { transform: translateX(.35em); }

/* ============================================================
   3. MICRO-VISUALIZACIONES
   Cada una dice algo cierto del servicio. Se animan solo al pasar
   el puntero, para que la retícula en reposo esté quieta y no
   parezca un tablero de luces.
   ============================================================ */
.viz { position: relative; width: 100%; margin-top: auto; }
.viz svg { width: 100%; height: auto; display: block; overflow: visible; }

.viz .axis  { stroke: var(--line-2); stroke-width: 1; }
.viz .fill  { fill: url(#vizGrad); opacity: .22; }
.viz .lineg { fill: none; stroke: url(#irisGrad); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.viz .pt    { fill: var(--cyan); }
.viz .bar   { fill: var(--blue); opacity: .55; transform-origin: bottom; transition: opacity var(--d-base) var(--e-soft); }
.svc:hover .viz .bar { opacity: .95; }

/* Curva de crecimiento que se dibuja al pasar el puntero */
.viz .draw { stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 1.5s var(--e-out); }
.svc:hover .viz .draw { stroke-dashoffset: 0; }

/* Barras que crecen escalonadas */
.viz .grow { transform: scaleY(.25); transition: transform var(--d-slow) var(--e-out); }
.svc:hover .viz .grow { transform: scaleY(1); }
.svc:hover .viz .grow:nth-of-type(2) { transition-delay: 60ms; }
.svc:hover .viz .grow:nth-of-type(3) { transition-delay: 120ms; }
.svc:hover .viz .grow:nth-of-type(4) { transition-delay: 180ms; }
.svc:hover .viz .grow:nth-of-type(5) { transition-delay: 240ms; }
.svc:hover .viz .grow:nth-of-type(6) { transition-delay: 300ms; }

/* Aguja del velocímetro */
.viz .needle { transform-origin: 60px 56px; transform: rotate(-72deg); transition: transform 1s var(--e-out); }
.svc:hover .viz .needle { transform: rotate(48deg); }

/* Línea de escaneo del escudo */
.viz .scan { opacity: 0; }
.svc:hover .viz .scan { opacity: 1; animation: viz-scan 1.8s var(--e-soft) infinite; }
@keyframes viz-scan { 0% { transform: translateY(-14px); } 100% { transform: translateY(20px); } }

/* Ondas del radar local */
.viz .wave { fill: none; stroke: var(--cyan); stroke-width: 1.4; opacity: 0; }
.svc:hover .viz .wave { animation: viz-wave 2.4s var(--e-soft) infinite; }
.svc:hover .viz .wave:nth-of-type(2) { animation-delay: .6s; }
.svc:hover .viz .wave:nth-of-type(3) { animation-delay: 1.2s; }
@keyframes viz-wave {
  0%   { opacity: .7; transform: scale(.35); }
  100% { opacity: 0;  transform: scale(1.4); }
}

/* Maqueta de navegador de la pieza principal */
.viz--browser { border: 1px solid var(--line-2); border-radius: var(--r-md); overflow: hidden; background: var(--black); }
.viz--browser .chrome { fill: var(--surface-2); }
.viz--browser .dot3   { fill: var(--line-2); }

/* Posición de la escalera de rankings */
.viz .rank { fill: var(--surface-2); transition: fill var(--d-base) var(--e-soft); }
.svc:hover .viz .rank { fill: var(--blue-deep); }
.viz .rank--top { fill: var(--blue); }
.svc:hover .viz .rank--top { fill: var(--cyan); }

@media (prefers-reduced-motion: reduce) {
  .viz .draw { stroke-dashoffset: 0 !important; transition: none !important; }
  .viz .grow { transform: none !important; transition: none !important; }
  .viz .needle { transform: rotate(48deg) !important; transition: none !important; }
  .viz .scan, .viz .wave { animation: none !important; opacity: .5; }
}

/* ============================================================
   4. CREDENCIALES — la marca personal
   ============================================================ */
.creds { display: grid; gap: var(--s-8); }
@media (min-width: 64rem) { .creds { grid-template-columns: 22rem 1fr; align-items: start; } }

.creds__photo { position: relative; }
.creds__photo img {
  width: 100%; border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  filter: saturate(.9) contrast(1.05);
}
/* Marco de esquinas: recurso de instrumento, no de adorno */
.creds__photo::before, .creds__photo::after {
  content: ""; position: absolute; width: 2.5rem; height: 2.5rem; pointer-events: none;
}
.creds__photo::before {
  top: -6px; left: -6px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan);
  border-radius: var(--r-lg) 0 0 0;
}
.creds__photo::after {
  bottom: -6px; right: -6px; border-bottom: 2px solid var(--cyan); border-right: 2px solid var(--cyan);
  border-radius: 0 0 var(--r-lg) 0;
}

.creds__badge {
  position: absolute; left: 50%; bottom: -1.15rem; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
  background: var(--grad-tech); color: #04121C;
  font-family: var(--f-tech); font-weight: 700; font-size: var(--t-xs);
  letter-spacing: var(--ls-caps); text-transform: uppercase;
  padding: .45rem 1.1rem; border-radius: var(--r-full);
  box-shadow: 0 8px 26px rgba(0,200,255,.4);
}

/* Ficha de titulación */
.cred-line {
  display: flex; align-items: flex-start; gap: var(--s-4);
  padding: var(--s-4) 0; border-bottom: 1px solid var(--line);
}
.cred-line:last-child { border-bottom: 0; }
.cred-line__icon {
  width: 2.5rem; height: 2.5rem; flex: none; border-radius: var(--r-md);
  display: grid; place-items: center; color: var(--cyan);
  background: var(--accent-soft); border: 1px solid var(--line-2);
}
.cred-line__icon svg { width: 1.15rem; height: 1.15rem; stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cred-line__t { font-family: var(--f-display); font-weight: 700; font-size: 1.0625rem; letter-spacing: -.02em; color: var(--ink); }
.cred-line__d { font-size: var(--t-sm); color: var(--ink-3); line-height: 1.5; }

/* Las cuatro credenciales, con separación clara entre ellas */
.cred-lines {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-2) var(--s-5); background: var(--surface);
}

/* Encabezado de la matriz: separa el inventario de las credenciales
   para que la columna derecha no se vuelva infinita. */
.skills-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-5);
  padding-bottom: var(--s-3); border-bottom: 1px solid var(--line-2);
}
.skills-head__t {
  font-family: var(--f-display); font-weight: 800; font-size: var(--t-h3);
  letter-spacing: -.03em; color: var(--ink); margin: 0;
}
.skills-head__d { font-size: var(--t-sm); color: var(--ink-3); max-width: 52ch; }

/* Matriz de capacidades */
.skills { display: grid; gap: var(--s-6); }
@media (min-width: 40rem) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 68rem) { .skills { grid-template-columns: repeat(4, 1fr); } }

.skill { display: flex; flex-direction: column; gap: var(--s-3); }
.skill__t {
  font-family: var(--f-tech); font-weight: 700; font-size: var(--t-xs);
  letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--cyan);
  display: flex; align-items: center; gap: .5rem;
}
.skill__t::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.skill ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.skill li {
  margin: 0; font-size: var(--t-xs); color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding: .3rem .65rem;
  transition: all var(--d-fast) var(--e-soft);
}
.skill li:hover {
  color: var(--cyan); border-color: var(--cyan);
  background: var(--accent-soft); transform: translateY(-1px);
}
