/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #F4F6F8;
  --surface: #FFFFFF;
  --surface-muted: #EAEDF1;
  --cecabank-blue: #00476B;
  --cecabank-blue-hover: #003653;
  --row-hover: #EEF1F4;
  --ink: #0E1420;
  --text-2: #3B4453;
  --muted: #4B5565;
  --line: #DFE3E8;
  --line-strong: #C3C9D2;

  --accent: #B4182D;
  --accent-hover: #8F1023;
  --accent-soft: rgba(180, 24, 45, 0.14);
  --accent-tint: #F2B8C0;

  --dark-line: #2C3647;
  --dark-chip: #1E2738;
  --dark-muted: #B9C1CE;
  --dark-text: #D3D8E0;
  --dark-arrow: #6B7586;

  --font-sans: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p { margin: 0; }
img { display: block; }
a { color: var(--ink); }

::selection { background: var(--accent); color: #FFFFFF; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ==========================================================================
   Utilidades
   ========================================================================== */
.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 48px);
  padding-right: clamp(16px, 4vw, 48px);
}

.mono { font-family: var(--font-mono); }
.tab { font-variant-numeric: tabular-nums; }

.meta {
  font-size: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.h2 {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
}

.text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 60ch;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-family: var(--font-mono);
}

.tag { padding: 6px 10px; border-radius: 6px; background: var(--surface-muted); }
.tag--dark { background: var(--dark-chip); }

/* ==========================================================================
   Botones
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition:
    transform 140ms var(--ease-out),
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--cecabank-blue); color: #FFFFFF; }
.btn-primary:hover { color: #FFFFFF; }

.btn-ghost { color: var(--ink); border: 1px solid var(--line-strong); }

.btn-md { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; gap: 10px; }

/* ==========================================================================
   Cabecera
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244, 246, 248, 0.92);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--ink);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.brand-name { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }

.navlinks { display: flex; align-items: center; gap: 32px; font-size: 15px; }
.navlink { text-decoration: none; color: var(--muted); }
.navlink-cta { display: none; }

/* Botón hamburguesa: tres barras que se convierten en una X al abrir */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
.nav-toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 200ms var(--ease-out), opacity 160ms ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-top: 56px;
  padding-bottom: 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 64px;
  align-items: center;
}

.hero-copy { display: flex; flex-direction: column; gap: 28px; }

.hero-title {
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 600;
  text-wrap: balance;
}

.hero-lead {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 48ch;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }

/* La foto se limita también por el alto de la ventana para que el hero quepa sin scroll */
.hero-media { position: relative; justify-self: end; width: 100%; max-width: min(400px, 58vh); }

.hero-photo {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--line);
  box-shadow: 0 30px 60px -30px rgba(14, 20, 32, 0.35);
}
/* Retrato horizontal: se encuadra a la derecha, donde está la persona */
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }

/* Escritorio: la columna de la foto mide lo mismo que el alto del bloque de texto
   (--hero-copy-h lo calcula js/main.js), así la foto cuadrada queda alineada con el
   título y los botones y los márgenes izquierdo y derecho son iguales */
@media (min-width: 1024px) {
  .hero { grid-template-columns: minmax(0, 1fr) var(--hero-copy-h, 400px); gap: 48px; }
  .hero-media { max-width: none; }
}

/* ==========================================================================
   Entidades
   ========================================================================== */
.clients {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.clients-inner {
  padding-top: 32px;
  padding-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
}

.clients-intro { font-size: 15px; color: var(--muted); max-width: 22ch; line-height: 1.4; }

.clients-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 44px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.client { display: flex; align-items: center; gap: 10px; }

.client-logo { height: 34px; width: auto; }
.client-logo--xs { height: 22px; }
.client-logo--sm { height: 30px; }
.client-logo--lg { height: 42px; }
.client-logo--square { width: 34px; border-radius: 6px; }

/* ==========================================================================
   Especialización
   ========================================================================== */
.specialization {
  padding-top: 80px;
  padding-bottom: 64px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.section-head { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }

.section-lead { font-size: 18px; line-height: 1.65; color: var(--text-2); max-width: 62ch; }

/* Perfil: texto a la izquierda, panel de trayectoria a la derecha */
.profile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 40px 64px;
  align-items: center;
}

/* Escritorio: más ancho para el panel del diagrama */
@media (min-width: 1024px) {
  .profile { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 56px; }
}

.profile-copy { display: flex; flex-direction: column; gap: 18px; }
.profile-copy .section-lead { font-size: 17px; line-height: 1.6; }

/* Título discreto: menor que los h2 de sección */
.profile-title { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }

/* Panel de trayectoria con estética de datos: fondo azul Cecabank, red de nodos y flujo animado.
   Los tonos "dark" se ajustan aquí a ese azul */
.career {
  --dark-line: rgba(255, 255, 255, 0.18);
  --dark-muted: #BFD3DE;
  --dark-text: #E1EBF0;
  --dark-arrow: #7FA2B4;
  margin: 0;
  background: var(--cecabank-blue);
  color: #FFFFFF;
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 30px 60px -30px rgba(14, 20, 32, 0.45);
}

.career-stat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--dark-line);
}

.career-number {
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.career-plus { color: var(--accent-tint); }

.career-caption { font-size: 16px; line-height: 1.4; color: var(--dark-text); max-width: 24ch; }

.career-title { font-size: 12px; color: var(--dark-muted); font-family: var(--font-mono); letter-spacing: 0.02em; }

/* --- Diagrama --- */
.orbit { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font-sans); }

.orbit-grid { opacity: 0.5; }
#orbit-grid circle { fill: var(--dark-line); }

.orbit-mesh line { stroke: var(--dark-line); stroke-width: 0.6; }
.orbit-cloud > circle { fill: var(--dark-arrow); }
.orbit-cloud > circle.hot { fill: var(--accent-tint); }

.orbit-ring { fill: none; stroke: var(--dark-line); stroke-width: 1; }
.orbit-progress { fill: none; stroke: var(--dark-muted); stroke-width: 1.5; stroke-linecap: round; }

/* Flujo: los guiones avanzan desde cada especialidad hacia el núcleo */
.orbit-flow line {
  stroke: var(--dark-muted);
  stroke-width: 1;
  stroke-dasharray: 2 6;
  opacity: 0.6;
  animation: orbitFlow 1.6s linear infinite;
  transition: stroke 160ms ease, opacity 160ms ease, stroke-width 160ms ease;
}
.orbit-flow line.is-active {
  stroke: var(--accent-tint);
  stroke-width: 1.6;
  opacity: 1;
  animation-duration: 0.6s;
}

/* Anillo tecnológico girando alrededor del núcleo */
.orbit-tech {
  transform-box: view-box;
  transform-origin: 280px 150px;
  animation: orbitSpin 40s linear infinite;
}
.orbit-tech text {
  fill: var(--accent-tint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

.orbit-core { cursor: pointer; outline: none; }
.orbit-hub { fill: var(--cecabank-blue-hover); stroke: var(--accent); stroke-width: 1.5; transition: fill 160ms ease; }
.orbit-core:hover .orbit-hub,
.orbit-core:focus-visible .orbit-hub,
.orbit-core.is-active .orbit-hub { fill: var(--accent); }
.orbit-hub-text { fill: #FFFFFF; font-size: 12px; font-weight: 600; letter-spacing: -0.01em; }
.orbit-hub-text .orbit-hub-tech { fill: var(--accent-tint); font-family: var(--font-mono); font-size: 10px; font-weight: 500; }
.orbit-core:hover .orbit-hub-tech,
.orbit-core.is-active .orbit-hub-tech { fill: #FFFFFF; }

/* Nodos */
.orbit-node { cursor: pointer; outline: none; transition: opacity 160ms ease; }
.orbit-halo { fill: transparent; stroke: transparent; stroke-width: 1; transition: stroke 160ms ease; }
.orbit-dot { fill: #FFFFFF; stroke: var(--cecabank-blue); stroke-width: 2; }
.orbit-area { fill: #FFFFFF; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.orbit-meta { fill: var(--dark-muted); font-size: 11.5px; font-family: var(--font-mono); }

.orbit-node--current .orbit-dot { fill: var(--accent); }
.orbit-node--current .orbit-meta { fill: var(--accent-tint); }

.orbit-node.is-active .orbit-halo,
.orbit-node:focus-visible .orbit-halo { stroke: var(--accent-tint); }
.orbit.has-active .orbit-node:not(.is-active) { opacity: 0.4; }

.orbit-pulse {
  fill: var(--accent);
  transform-box: fill-box;
  transform-origin: center;
  animation: orbitPulse 2.4s var(--ease-out) infinite;
}

/* Versión en lista del diagrama: solo se muestra en móvil */
.orbit-list { display: none; list-style: none; margin: 0; padding: 0; }
.orbit-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0 10px 16px;
  border-left: 3px solid var(--dark-line);
}
.orbit-item--current { border-left-color: var(--accent-tint); }
.orbit-item-area { font-size: 15px; font-weight: 600; }
.orbit-item-meta { font-size: 12px; color: var(--dark-muted); font-family: var(--font-mono); }
.orbit-item--current .orbit-item-meta { color: var(--accent-tint); }
.orbit-item { cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease; }
.orbit-item.is-active { background: rgba(255, 255, 255, 0.08); border-left-color: var(--accent-tint); }

/* Detalle de la especialidad seleccionada */
.orbit-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 72px;
  padding-top: 14px;
  border-top: 1px solid var(--dark-line);
}
.orbit-detail-label { font-size: 12px; color: var(--accent-tint); font-family: var(--font-mono); }
.orbit-detail-text { font-size: 15px; line-height: 1.5; color: var(--dark-text); }

@keyframes orbitFlow { to { stroke-dashoffset: -16; } }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes orbitPulse {
  from { opacity: 0.5; transform: scale(1); }
  to { opacity: 0; transform: scale(2.6); }
}

@media (prefers-reduced-motion: reduce) {
  .orbit-flow line,
  .orbit-tech { animation: none; }
  .orbit-pulse { animation: none; opacity: 0; }
}

/* ==========================================================================
   Portafolio
   ========================================================================== */
.portfolio {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.portfolio-inner {
  padding-top: 120px;
  padding-bottom: 120px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.portfolio-head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }

.portfolio-title {
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 600;
}


/* Proyecto destacado */
/* Fondo azul corporativo de Cecabank: los tonos "dark" se ajustan aquí a ese azul */
.featured {
  --dark-line: rgba(255, 255, 255, 0.18);
  --dark-chip: rgba(255, 255, 255, 0.12);
  --dark-muted: #BFD3DE;
  --dark-text: #E1EBF0;
  --dark-arrow: #7FA2B4;
  /* Paso "Destino" en el cian de Cecabank, de la misma familia que el fondo */
  --accent: #00B5DD;
  --accent-tint: #8FE0F2;
  --accent-soft: rgba(0, 181, 221, 0.16);
  background: var(--cecabank-blue);
  color: #FFFFFF;
  border-radius: 16px;
  padding: clamp(28px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.featured-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 32px;
  font-size: 14px;
  color: var(--dark-muted);
}

.featured-intro { display: flex; flex-direction: column; gap: 18px; max-width: 820px; }

.featured-title {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
  text-wrap: balance;
}

.featured-text { font-size: 17px; line-height: 1.65; color: var(--dark-text); max-width: 64ch; }

.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }

.flow-step {
  flex: 1 1 170px;
  border: 1px solid var(--dark-line);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flow-step--accent { border-color: var(--accent); background: var(--accent-soft); }

.flow-label { font-size: 13px; color: var(--dark-muted); font-family: var(--font-mono); }
.flow-step--accent .flow-label { color: var(--accent-tint); }

.flow-value { font-size: 17px; font-weight: 500; line-height: 1.3; }

.flow-arrow { display: flex; align-items: center; color: var(--dark-arrow); }

.featured-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 32px 56px;
  border-top: 1px solid var(--dark-line);
  padding-top: 32px;
}

.featured-col { display: flex; flex-direction: column; gap: 14px; }
.featured-col h4 { font-size: 16px; font-weight: 600; }

.featured-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--dark-text);
}

.featured-col p { font-size: 16px; line-height: 1.55; color: var(--dark-text); }

/* Más proyectos */
.projects { display: flex; flex-direction: column; gap: 24px; }

.projects-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.projects-title { font-size: 26px; letter-spacing: -0.02em; font-weight: 600; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }

.filter {
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.filter[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }

.project-list { display: flex; flex-direction: column; border-top: 1px solid var(--ink); }

.project { border-bottom: 1px solid var(--line); }

.project-row {
  width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--ink);
  padding: 24px 8px;
  display: grid;
  grid-template-columns: minmax(96px, 140px) minmax(0, 1fr) 28px;
  gap: 16px 24px;
  align-items: center;
  transition: background-color 160ms ease;
}

.project-heading { display: flex; flex-direction: column; gap: 4px; }

.project-title {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.project-org { font-size: 15px; color: var(--muted); }

.chev {
  flex-shrink: 0;
  justify-self: end;
  color: var(--muted);
  transition: transform 200ms var(--ease-out);
}
.project-row[aria-expanded="true"] .chev { transform: rotate(180deg); }

.project-panel {
  padding: 0 8px 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px 56px;
  animation: panelIn 240ms var(--ease-out) both;
}
.project-panel[hidden] { display: none; }

.project-col { display: flex; flex-direction: column; gap: 14px; }
.project-col + .project-col { gap: 16px; }

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 15px;
  color: var(--accent);
  text-underline-offset: 4px;
}

.project-points {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
}

/* ==========================================================================
   Experiencia
   ========================================================================== */
.experience {
  padding-top: 64px;
  padding-bottom: 120px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 48px 80px;
  align-items: start;
}

.experience-intro { display: flex; flex-direction: column; gap: 18px; max-width: 420px; }
.experience-intro p { font-size: 17px; line-height: 1.6; color: var(--text-2); }

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line-strong);
}

.timeline-item {
  position: relative;
  padding: 0 0 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -6px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
}
.timeline-dot--current { background: var(--accent); }

.job-title { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }

.job-org {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
}

.org-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}
.org-logo img { max-width: 100%; max-height: 100%; }

.job-text { font-size: 15px; line-height: 1.6; color: var(--text-2); max-width: 60ch; }
.timeline-item .tags { padding-top: 6px; }

/* ==========================================================================
   Herramientas
   ========================================================================== */
.tools { background: var(--surface-muted); }

.tools-inner {
  padding-top: 104px;
  padding-bottom: 104px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.tools-title {
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 600;
  max-width: 20ch;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 40px 56px;
}

.tools-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid var(--ink);
  padding-top: 20px;
}
.tools-col h3 { font-size: 18px; font-weight: 600; }

.tools-head { display: flex; align-items: center; gap: 12px; }

.tools-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--cecabank-blue);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

/* Cada herramienta como pastilla con un check en azul Cecabank */
.tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  line-height: 1.2;
  color: var(--ink);
}
.tool::before {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300476B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ==========================================================================
   Formación
   ========================================================================== */
.education {
  padding-top: 120px;
  padding-bottom: 120px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 56px 80px;
}

.education-main { display: flex; flex-direction: column; gap: 28px; }
.education-head { display: flex; align-items: center; gap: 20px; }
.education-head img { width: 64px; height: auto; }

.degrees { display: flex; flex-direction: column; gap: 24px; }
.degree { display: flex; flex-direction: column; gap: 4px; }
.degree-title { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.degree-school { font-size: 16px; color: var(--text-2); }
.degree-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--cecabank-blue);
  text-underline-offset: 4px;
}

.extras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 40px;
  align-content: start;
  padding-top: 8px;
}

.extra { display: flex; flex-direction: column; gap: 12px; }
.extra h3 { font-size: 18px; font-weight: 600; }
.extra p { font-size: 16px; line-height: 1.6; color: var(--text-2); }

.languages {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 20px;
  font-size: 16px;
  align-items: center;
}
.languages dt { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.languages dt img { width: 24px; height: 24px; }
.languages dd { margin: 0; font-weight: 500; }

/* ==========================================================================
   Contacto
   ========================================================================== */
/* Fondo azul Cecabank: los tonos "dark" se ajustan aquí a ese azul */
.contact {
  --dark-line: rgba(255, 255, 255, 0.18);
  --dark-muted: #BFD3DE;
  --dark-text: #E1EBF0;
  background: var(--cecabank-blue);
  color: #FFFFFF;
}

.contact-inner {
  padding-top: 120px;
  padding-bottom: 96px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.contact-title {
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.contact-lead { font-size: 19px; line-height: 1.6; color: var(--dark-text); max-width: 52ch; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}

.contact-card {
  color: #FFFFFF;
  border: 1px solid var(--dark-line);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Icono de cada vía de contacto, en un recuadro translúcido */
.contact-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 160ms ease;
}
.contact-card:hover .contact-icon { background: rgba(255, 255, 255, 0.22); }

.contact-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.contact-card:hover { color: #FFFFFF; }

.contact-label { font-size: 14px; color: var(--dark-muted); }
.contact-value { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--dark-line);
  padding-top: 28px;
  font-size: 14px;
  color: var(--dark-muted);
}

/* ==========================================================================
   Ventana emergente de PDF
   ========================================================================== */
.pdf-modal {
  width: min(1000px, 92vw);
  height: 88vh;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(14, 20, 32, 0.5);
  overflow: hidden;
}
.pdf-modal[open] { display: flex; flex-direction: column; animation: panelIn 240ms var(--ease-out) both; }
.pdf-modal::backdrop { background: rgba(14, 20, 32, 0.6); }

.pdf-modal-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px 14px 24px;
  border-bottom: 1px solid var(--line);
}

.pdf-modal-title { flex: 1; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }

.pdf-modal-open { font-size: 14px; font-weight: 500; color: var(--cecabank-blue); text-underline-offset: 4px; }

.pdf-modal-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.pdf-modal-close:hover { background: var(--row-hover); }

.pdf-modal-frame { flex: 1; width: 100%; border: 0; background: var(--surface-muted); }

/* ==========================================================================
   Animaciones
   ========================================================================== */
.rise { animation: rise 720ms var(--ease-out) both; }
.d1 { animation-delay: 60ms; }
.d2 { animation-delay: 120ms; }
.d3 { animation-delay: 180ms; }
.reveal { animation: reveal 1100ms var(--ease-out) 120ms both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes reveal {
  from { clip-path: inset(10% 0 0 0); transform: scale(1.04); }
  to { clip-path: inset(0 0 0 0); transform: none; }
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@keyframes fadeOnly {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   Media queries
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background-color: var(--cecabank-blue-hover); }
  .btn-ghost:hover { border-color: var(--ink); }
  .project-row:hover { background-color: var(--row-hover); }
  .navlink:hover { color: var(--accent); }
}

@media (prefers-reduced-motion: reduce) {
  .rise,
  .project-panel { animation: fadeOnly 200ms ease both; }
  .reveal { animation: none; }
}

/* --------------------------------------------------------------------------
   Tableta y móvil (≤ 860px): menú hamburguesa
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .site-header { position: sticky; }
  .nav { position: relative; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  /* El menú se despliega bajo la cabecera, como columna flex */
  .navlinks {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px clamp(16px, 4vw, 48px) 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(14, 20, 32, 0.35);
  }
  .site-header.is-open .navlinks { display: flex; animation: panelIn 200ms var(--ease-out) both; }

  .navlink {
    display: flex;
    align-items: center;
    min-height: 52px;
    font-size: 17px;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .navlink-cta { display: inline-flex; justify-content: center; margin-top: 16px; height: 48px; font-size: 16px; }
}

/* --------------------------------------------------------------------------
   Móvil (≤ 640px)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  /* Espaciado vertical más compacto */
  .hero { padding-top: 32px; padding-bottom: 40px; gap: 32px; }
  .specialization { padding-top: 48px; padding-bottom: 40px; }
  .experience { padding-top: 40px; padding-bottom: 72px; gap: 32px; }
  .portfolio-inner { padding-top: 72px; padding-bottom: 72px; gap: 40px; }
  .tools-inner { padding-top: 64px; padding-bottom: 64px; gap: 32px; }
  .education { padding-top: 72px; padding-bottom: 72px; gap: 40px; }
  .contact-inner { padding-top: 72px; padding-bottom: 56px; gap: 40px; }

  /* Hero: botones a lo ancho y foto apaisada (muestra más del retrato y ocupa menos alto) */
  .hero-copy { gap: 22px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .hero-media { max-width: none; justify-self: stretch; }
  .hero-photo { aspect-ratio: 4 / 3; }

  /* Panel de trayectoria: lista legible en lugar del diagrama radial */
  .career { padding: 20px; }
  .career-number { font-size: 44px; }
  .career-caption { font-size: 15px; }
  /* Diagrama animado reencuadrado en el núcleo (js/main.js cambia el viewBox);
     las etiquetas pasan a la leyenda de debajo */
  .orbit { max-width: 340px; margin: 0 auto; }
  .orbit-node text { display: none; }
  .orbit-detail { display: none; }
  .orbit-list { display: flex; flex-direction: column; }

  /* Proyecto destacado: flujo en columna con flechas hacia abajo */
  .featured { padding: 24px; gap: 28px; }
  .flow { flex-direction: column; }
  .flow-step { flex: none; padding: 14px 16px; }
  .flow-arrow { justify-content: center; transform: rotate(90deg); }

  /* Filas de proyectos: año arriba y título a todo el ancho (flexbox) */
  .project-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 12px; padding: 20px 4px; }
  .project-row .meta { flex-basis: 100%; font-size: 13px; }
  .project-heading { flex: 1; min-width: 0; }
  .project-panel { padding: 0 4px 28px; }

  /* Experiencia: título y empresa más compactos */
  .job-title { font-size: 19px; }
  .timeline-item { padding-left: 24px; }

  /* Contacto y ventana del diploma */
  .contact-value { font-size: 16px; overflow-wrap: anywhere; }
  .pdf-modal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .pdf-modal-head { flex-wrap: wrap; padding: 12px 12px 12px 16px; gap: 8px 12px; }
  .pdf-modal-title { flex-basis: calc(100% - 52px); font-size: 15px; }
  .pdf-modal-close { order: 2; }
  .pdf-modal-open { order: 3; flex-basis: 100%; }
}
