:root {
  --bg: #060911;
  --surface: #0C121E;
  --surface-2: #121B2C;
  --border: #1B283D;
  --border-hover: #2E486E;
  --text: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  /* Celeste más claro y brillante */
  --accent: #0EA5E9;
  --accent-light: #38BDF8;
  --accent-glow: #7DD3FC;
  --accent-soft: rgba(14, 165, 233, 0.15);

  /* Gris plateado metálico brillante */
  --silver: #CBD5E1;
  --silver-bright: #F8FAFC;
  --silver-mid: #E2E8F0;
  --silver-soft: rgba(226, 232, 240, 0.12);
  --silver-soft-hover: rgba(241, 245, 249, 0.22);
  --silver-border: rgba(226, 232, 240, 0.48);
  --silver-border-bright: rgba(248, 250, 252, 0.85);

  /* Amarillo restaurado */
  --yellow: #FACC15;
  --yellow-hover: #FDE047;
  --yellow-soft: rgba(250, 204, 21, 0.16);

  /* Verde secundario */
  --teal: #2DD4BF;
  --teal-soft: rgba(45, 212, 191, 0.11);
  --teal-border: rgba(45, 212, 191, 0.30);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --font-formula: Georgia, "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

em {
  font-family: inherit;
  font-style: italic;
  font-size: inherit;
  letter-spacing: inherit;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  background-image:
    linear-gradient(180deg, rgba(10, 22, 40, 0.72) 0%, rgba(6, 9, 17, 0.96) 52%, rgba(9, 14, 26, 0.98) 100%),
    radial-gradient(ellipse 75% 50% at 18% 12%, rgba(56, 189, 248, 0.24), transparent 70%),
    radial-gradient(ellipse 60% 45% at 84% 78%, rgba(56, 189, 248, 0.12), transparent 72%);
  background-attachment: fixed;
}

/* CAPA SUTIL DE NODOS Y CONEXIONES (VERDE2.jpg) */
.bg-network-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("VERDE2.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.09;
  mix-blend-mode: screen;
  filter: contrast(1.08) saturate(0.95);
}

/* PUNTO VERDE CON PULSO CONTINUO */
@keyframes tealDotPulse {
  0% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.85);
  }
  70% {
    transform: scale(1.35);
    box-shadow: 0 0 0 9px rgba(45, 212, 191, 0);
  }
  100% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
  }
}

.accent-dot-teal {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.85);
  animation: tealDotPulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

.contact-single-wrap {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

.contact-form-card {
  background: linear-gradient(155deg, rgba(18, 28, 46, 0.9) 0%, rgba(10, 15, 26, 0.96) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.contact-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

header, main, footer {
  position: relative;
  z-index: 1;
}

/* TOP NAVIGATION */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 9, 17, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  color: var(--text);
  background: none;
  border: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: var(--accent-glow);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.nav-btn:hover,
.nav-btn.active {
  background: var(--yellow-soft);
  color: var(--yellow);
  border-color: rgba(250, 204, 21, 0.45);
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.22);
}

.nav-btn:hover {
  transform: translateY(-1px);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-group {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  background: var(--accent);
  color: #FFFFFF;
}

.cta-nav {
  background: var(--yellow);
  color: #090A0F;
  border: none;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.25);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.cta-nav:hover {
  background: var(--yellow-hover);
  transform: translateY(-1px);
}

/* HAMBURGER BUTTON (HIDDEN ON DESKTOP) */
.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.menu-toggle:hover,
.menu-toggle[aria-expanded="true"] {
  border-color: var(--yellow);
  background: var(--yellow-soft);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* MAIN PAGE VIEWPORT */
main {
  flex: 1;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
}

.page {
  display: none;
  flex: 1;
  min-height: calc(100vh - 142px);
  flex-direction: column;
  justify-content: space-between;
}

.page.active {
  display: flex;
}

.page-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 0;
}

/* KEYFRAMES DE ANIMACIONES */
@keyframes revealUp {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.page.active .anim-item {
  opacity: 0;
  animation: revealUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--anim-delay, 0ms);
}

@keyframes aiYellowPulse {
  0% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.85);
  }
  70% {
    transform: scale(1.35);
    box-shadow: 0 0 0 9px rgba(250, 204, 21, 0);
  }
  100% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0);
  }
}

/* MOVIMIENTO UNIFORME EN TODAS LAS IMÁGENES */
@keyframes portraitSubtleMove {
  0% {
    transform: scale(1.04) translateY(0);
  }
  50% {
    transform: scale(1.07) translateY(-3px);
  }
  100% {
    transform: scale(1.04) translateY(0);
  }
}

@keyframes compassCalibrateFull {
  0%, 100% {
    transform: scale(1.015) rotate(0deg);
  }
  25% {
    transform: scale(1.03) rotate(2deg);
  }
  55% {
    transform: scale(1.025) rotate(-1.5deg);
  }
  78% {
    transform: scale(1.02) rotate(0.8deg);
  }
}

@keyframes thumbCalibrate {
  0% {
    transform: scale(1.05) rotate(0deg);
  }
  30% {
    transform: scale(1.09) rotate(3.5deg);
  }
  65% {
    transform: scale(1.08) rotate(-2.5deg);
  }
  100% {
    transform: scale(1.05) rotate(0deg);
  }
}

@keyframes titleWordPulse {
  0% {
    background-position: 0% 50%;
    transform: translateY(0) scale(1);
    filter:
      drop-shadow(0 0 10px rgba(125, 211, 252, 0.35))
      drop-shadow(0 0 22px rgba(56, 189, 248, 0.22));
  }
  50% {
    background-position: 100% 50%;
    transform: translateY(-1px) scale(1.02);
    filter:
      drop-shadow(0 0 16px rgba(255, 255, 255, 0.55))
      drop-shadow(0 0 30px rgba(56, 189, 248, 0.42));
  }
  100% {
    background-position: 0% 50%;
    transform: translateY(0) scale(1);
    filter:
      drop-shadow(0 0 10px rgba(125, 211, 252, 0.35))
      drop-shadow(0 0 22px rgba(56, 189, 248, 0.22));
  }
}

.ai-pulse {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--yellow);
  box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.85);
  animation: aiYellowPulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

/* HOME TWO-COLUMN SPLIT */
.hero-split {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 36px;
  align-items: center;
  text-align: center;
}

.hero-content {
  min-width: 0;
  max-width: 720px;
  margin: 0 auto;
}

.hero-content .eyebrow {
  margin-bottom: 24px;
}

.hero-content h1 {
  margin-bottom: 24px;
}

.hero-content .lead {
  margin-bottom: 34px;
}

.hero-portrait-wrap {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* =========================================================
   SECCIÓN ABOUT: ECUACIÓN ARRIBA + BRÚJULA + 4 BLOQUES
   ========================================================= */
.about-showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 16px;
  align-items: stretch;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}

.about-formula-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(18, 29, 48, 0.9) 0%, rgba(11, 16, 28, 0.96) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid var(--silver-border);
  border-radius: 14px;
  padding: 14px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 22px rgba(226, 232, 240, 0.08);
}

.about-compass-frame {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  align-self: stretch;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(18, 27, 44, 0.88) 0%, rgba(11, 16, 28, 0.96) 100%);
  border: 1px solid rgba(56, 189, 248, 0.38);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.45),
    0 0 32px rgba(56, 189, 248, 0.14);
}

.about-compass-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  filter: contrast(1.16) brightness(0.94) saturate(0.75);
  mix-blend-mode: luminosity;
  transform: scale(1.015);
  backface-visibility: hidden;
}

#page-about.active .about-compass-frame img {
  animation: compassCalibrateFull 2s ease-in-out 1s 1 normal both;
}

.about-compass-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 25%, rgba(56, 189, 248, 0.38), rgba(10, 17, 30, 0.56));
  mix-blend-mode: color;
  pointer-events: none;
}

.about-steps-grid {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about-steps-grid .card {
  padding: 10px 14px;
  border-radius: 11px;
}

.about-steps-grid .card h3 {
  font-size: 0.96rem;
  margin-bottom: 2px;
}

.about-steps-grid .card p {
  font-size: 0.82rem;
  line-height: 1.38;
}

.portrait-frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(56, 189, 248, 0.22), rgba(12, 18, 30, 0.92));
  border: 1px solid rgba(56, 189, 248, 0.42);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.55),
    0 0 42px rgba(56, 189, 248, 0.18);
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(6, 9, 17, 0.78) 100%);
  pointer-events: none;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transform: scale(1.04);
  animation: portraitSubtleMove 1.8s ease-in-out 1s 1 forwards;
}

.portrait-linkedin-badge {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 10px;
  background: rgba(12, 18, 30, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: var(--silver-bright);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  transition: all 0.2s ease;
}

.portrait-linkedin-badge svg {
  color: var(--accent-light);
  transition: transform 0.2s ease;
}

.portrait-linkedin-badge:hover {
  background: rgba(14, 165, 233, 0.24);
  border-color: var(--accent-glow);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.28);
}

.portrait-linkedin-badge:hover svg {
  transform: scale(1.08);
}

.section-head {
  text-align: center;
  max-width: 880px;
  margin: 0 auto 24px;
}

/* TÍTULOS DE CADA PÁGINA EN GRIS PLATEADO BRILLANTE */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--silver-bright);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.18) 0%, rgba(148, 163, 184, 0.10) 100%);
  border: 1px solid var(--silver-border);
  box-shadow: 0 0 18px rgba(226, 232, 240, 0.14);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(1.75rem, 3.1vw, 2.48rem);
  font-weight: 450;
  line-height: 1.24;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.24;
  margin-bottom: 12px;
}

/* PALABRAS DESTACADAS ANIMADAS UNA SOLA VEZ AL CARGAR */
h1 em,
h2 em,
.silver-glow {
  display: inline-block;
  font-style: normal;
  font-weight: inherit;
  background: linear-gradient(
    110deg,
    #ffffff 0%,
    #7dd3fc 32%,
    #e2e8f0 55%,
    #38bdf8 80%,
    #ffffff 100%
  );
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: titleWordPulse 1.8s ease-in-out 0.3s 1 forwards;
}

.lead {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 26px;
}

.section-head .lead {
  max-width: 840px;
  margin: 0 auto;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

/* BOTONES DE ACCIÓN EN GRIS PLATEADO BRILLANTE */
.btn-outline-sky {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.15) 0%, rgba(148, 163, 184, 0.08) 100%);
  color: var(--silver-bright);
  border: 1px solid var(--silver-border);
  box-shadow: 0 0 16px rgba(226, 232, 240, 0.10);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 11px 16px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-outline-sky:hover:not(:disabled) {
  border-color: var(--silver-border-bright);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.26) 0%, rgba(203, 213, 225, 0.16) 100%);
  box-shadow: 0 0 22px rgba(248, 250, 252, 0.22);
  transform: translateY(-1px);
}

.btn-outline-sky:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-ai {
  background: var(--yellow-soft);
  color: var(--yellow);
  border: 1px solid rgba(250, 204, 21, 0.45);
  font-weight: 650;
  font-size: 0.88rem;
  padding: 11px 16px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-ai:hover,
.btn-ai.active {
  background: var(--yellow);
  color: #090A0F;
}

.btn-ai:hover {
  transform: translateY(-1px);
}

.btn-ai.active {
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.35);
}

/* Círculo amarillo "i" pequeño junto al botón de Lucas IA */
.btn-ai-info {
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0;
  margin-left: -4px;
  border-radius: 50%;
  border: 1px solid rgba(245, 197, 24, 0.55);
  background: rgba(245, 197, 24, 0.14);
  color: var(--yellow, #f5c518);
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(245, 197, 24, 0.16);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-ai-info:hover,
.btn-ai-info[aria-expanded="true"] {
  background: rgba(245, 197, 24, 0.28);
  border-color: var(--yellow, #f5c518);
  box-shadow: 0 0 14px rgba(245, 197, 24, 0.35);
  transform: scale(1.08);
}

/* Fondo y burbuja flotante */
.ai-info-backdrop[hidden],
.ai-info-bubble[hidden] {
  display: none !important;
}

.ai-info-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 12, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1190;
}

.ai-info-bubble {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(400px, calc(100vw - 32px));
  max-height: 82vh;
  overflow-y: auto;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(16, 19, 26, 0.98);
  border: 1px solid rgba(245, 197, 24, 0.36);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.75);
  z-index: 1200;
  text-align: left;
}

.ai-bubble-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-bubble-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--yellow, #f5c518);
}

.ai-bubble-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.ai-bubble-close:hover {
  background: rgba(245, 197, 24, 0.22);
  border-color: rgba(245, 197, 24, 0.5);
}

.ai-bubble-body {
  font-size: 0.93rem;
  line-height: 1.52;
  color: var(--text-muted);
}

.ai-bubble-body p + p {
  margin-top: 8px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.client-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 18px 20px;
  background: linear-gradient(155deg, rgba(18, 28, 46, 0.9) 0%, rgba(10, 15, 26, 0.96) 100%);
}

.client-card:hover {
  border-color: var(--silver-border);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(226, 232, 240, 0.08);
}

.client-card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.client-card-body {
  flex: 1;
  min-width: 0;
}

.card {
  background: linear-gradient(155deg, rgba(18, 27, 44, 0.84) 0%, rgba(11, 16, 28, 0.94) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--silver-border);
  box-shadow: 0 8px 28px rgba(226, 232, 240, 0.07);
}

.card h3 {
  font-size: 1.06rem;
  font-weight: 550;
  margin-bottom: 7px;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--text-muted);
  font-size: 0.89rem;
}

.sol-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 18px 20px;
}

.sol-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.sol-thumb {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 13px;
  overflow: hidden;
  background-color: var(--surface-2);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* MINIATURA COMPACTA UNIFORME PARA EXPERIENCIA Y SOCIOS */
.exp-badge-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--surface-2);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.exp-corner-thumb {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 2;
}

.exp-badge-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.05);
  animation: thumbCalibrate 1.8s ease-in-out 1s 1 forwards;
}

.sol-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.16) brightness(0.94) saturate(0.75);
  mix-blend-mode: luminosity;
  transform: scale(1.05);
  animation: thumbCalibrate 1.8s ease-in-out 1s 1 forwards;
}

.sol-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 25%, rgba(56, 189, 248, 0.38), rgba(10, 17, 30, 0.56));
  mix-blend-mode: color;
  pointer-events: none;
}

/* ECUACIÓN CON ESTILO TÉCNICO Y DEGRADADO CELESTE BRILLANTE */
.formula-code {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: clamp(0.95rem, 1.55vw, 1.15rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  background: linear-gradient(
    110deg,
    #ffffff 0%,
    #7dd3fc 32%,
    #e2e8f0 55%,
    #38bdf8 80%,
    #ffffff 100%
  );
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 0 10px rgba(125, 211, 252, 0.35))
    drop-shadow(0 0 22px rgba(56, 189, 248, 0.22));
  animation: titleWordPulse 1.8s ease-in-out 0.3s 1 forwards;
}


/* BOTONES DE NAVEGACIÓN INFERIOR */
.step-btn {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.14) 0%, rgba(148, 163, 184, 0.08) 100%);
  color: var(--silver-bright);
  border: 1px solid var(--silver-border);
  box-shadow: 0 0 14px rgba(226, 232, 240, 0.10);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.step-btn:hover {
  border-color: var(--silver-border-bright);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.24) 0%, rgba(203, 213, 225, 0.14) 100%);
  box-shadow: 0 0 20px rgba(248, 250, 252, 0.20);
  transform: translateY(-1px);
}

/* TIMELINE UNIFORME */
.timeline-item {
  position: relative;
  background: linear-gradient(155deg, rgba(18, 27, 44, 0.84) 0%, rgba(11, 16, 28, 0.94) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  transition: border-color 0.2s ease;
}

.timeline-item:hover {
  border-color: var(--silver-border);
}

.timeline-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--silver);
}

.timeline-body-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-right: 68px;
  min-height: 96px;
  min-width: 0;
  width: 100%;
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.timeline-item.expanded .timeline-desc {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.timeline-footer-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  width: 100%;
}

.exp-more-btn {
  background: transparent;
  border: none;
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 4px;
  cursor: pointer;
  opacity: 0.82;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.exp-more-btn:hover {
  color: var(--silver-bright);
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* EXPERIENCIA: HABILIDADES, EDUCACIÓN, CERTIFICACIONES, IDIOMAS Y CV */
#page-experience .section-head {
  margin-bottom: 18px;
}

.exp-extra-block {
  margin-top: 24px;
}

.exp-subhead {
  text-align: center;
  margin-bottom: 14px;
}

.exp-subhead .eyebrow {
  margin-bottom: 0;
}

.edu-cert-grid,
.cert-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.edu-cert-card {
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.edu-cert-card.has-left-badge {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.edu-cert-card.has-left-badge .exp-badge-thumb {
  order: 2;
}

.edu-cert-card h3 {
  margin-bottom: 4px;
}

.edu-cert-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.cv-download-wrap {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* BOOKING SYSTEM */
.booking-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 22px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--silver-bright);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.18) 0%, rgba(148, 163, 184, 0.10) 100%);
  border: 1px solid var(--silver-border);
  box-shadow: 0 0 14px rgba(226, 232, 240, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.scheduler-panel {
  background: linear-gradient(155deg, rgba(18, 27, 44, 0.86) 0%, rgba(11, 16, 28, 0.95) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

.booking-step-panel {
  animation: revealUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.booking-step-panel.hidden {
  display: none;
}

.step-back-cal-btn {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.14) 0%, rgba(148, 163, 184, 0.08) 100%);
  color: var(--silver-bright);
  border: 1px solid var(--silver-border);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
}

.step-back-cal-btn:hover {
  border-color: var(--silver-border-bright);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.24) 0%, rgba(203, 213, 225, 0.14) 100%);
}

/* FULL MONTH CALENDAR WIDGET */
.calendar-box {
  background: rgba(9, 14, 24, 0.78);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin: 8px 0 4px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.calendar-month-label {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  text-transform: capitalize;
  color: var(--text);
}

.cal-nav-btn {
  background: var(--surface-2);
  border: 1px solid var(--silver-border);
  color: var(--silver-bright);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.cal-nav-btn:hover {
  border-color: var(--silver-border-bright);
  background: var(--silver-soft-hover);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  margin-bottom: 6px;
}

.calendar-weekday {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  padding: 4px 0;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.cal-day-btn {
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--text);
  height: 36px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.cal-day-btn:hover:not(:disabled) {
  border-color: rgba(250, 204, 21, 0.55);
  background: var(--yellow-soft);
}

.cal-day-btn.muted {
  color: var(--text-dim);
  background: rgba(12, 18, 30, 0.45);
  opacity: 0.55;
}

.cal-day-btn.today {
  border-color: var(--silver-border);
  color: var(--silver-bright);
}

.cal-day-btn.selected {
  background: var(--yellow-soft);
  color: var(--yellow);
  border-color: var(--yellow);
  font-weight: 700;
}

.cal-day-btn.blocked,
.cal-day-btn:disabled,
.cal-day-btn.blocked:hover,
.cal-day-btn:disabled:hover {
  background: rgba(15, 23, 42, 0.35);
  color: var(--text-dim);
  border-color: rgba(100, 116, 139, 0.18);
  opacity: 0.38;
  cursor: not-allowed;
  text-decoration: line-through;
}

.selected-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--silver-bright);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.18) 0%, rgba(148, 163, 184, 0.10) 100%);
  border: 1px solid var(--silver-border);
  box-shadow: 0 0 14px rgba(226, 232, 240, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 0;
}

.slots-box {
  background: rgba(9, 14, 24, 0.78);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-top: 8px;
}

.slots-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.slot-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.slot-btn:hover:not(:disabled) {
  border-color: rgba(250, 204, 21, 0.55);
}

.slot-btn.active {
  border-color: var(--yellow);
  background: var(--yellow-soft);
  color: var(--yellow);
  font-weight: 700;
}

.slot-btn.blocked,
.slot-btn:disabled {
  background: rgba(15, 23, 42, 0.35);
  border-color: rgba(100, 116, 139, 0.18);
  color: var(--text-dim);
  opacity: 0.38;
  cursor: not-allowed;
  text-decoration: line-through;
}

.form-group {
  margin-bottom: 12px;
}

label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

input, select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--silver-border-bright);
}

.confirmation-box {
  display: none;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--silver-soft);
  border: 1px solid var(--silver-border);
}

.confirmation-box.visible {
  display: block;
}

/* BOTTOM STEPPER BAR */
.page-stepper {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

footer {
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  background: rgba(6, 9, 17, 0.8);
  backdrop-filter: blur(8px);
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 980px) {
  .nav-container {
    position: relative;
    height: 64px;
    padding: 0 16px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px 16px 18px;
    background: rgba(8, 13, 24, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-hover);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
    z-index: 60;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-btn {
    width: 100%;
    text-align: left;
    padding: 11px 14px;
    font-size: 0.92rem;
    border-radius: 9px;
  }

  .hero-split {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 22px;
  }

  /* Tablet y Móvil (<= 980px): Brújula arriba proporcionada y 4 bloques debajo */
  .about-showcase {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .about-compass-frame {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: 380px;
  }

  .about-compass-frame img {
    object-position: center 22%;
  }

  .about-steps-grid {
    grid-column: 1;
    grid-row: 3;
    gap: 10px;
  }

  .about-steps-grid .card {
    padding: 12px 15px;
  }

  .portrait-frame {
    max-width: 260px;
  }

  .timeline-item,
  .scheduler-panel {
    grid-template-columns: 1fr;
  }

  .timeline-body-col {
    padding-right: 68px;
  }

  .clients-grid {
    grid-template-columns: 1fr;
  }

  .page {
    min-height: auto;
  }

  .ai-bubble-close {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }
}

@media (max-width: 600px) {
  main {
    padding: 18px 14px 18px;
  }

  .brand span:last-child {
    font-size: 0.85rem;
  }

  .cta-nav {
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .lang-btn {
    padding: 4px 5px;
    font-size: 0.68rem;
  }

  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-row .btn-outline-sky,
  .btn-row .btn-ai {
    justify-content: center;
    width: 100%;
  }

  .about-showcase {
    gap: 14px;
  }

  .about-formula-card {
    padding: 12px 14px;
  }

  .about-compass-frame {
    max-width: 340px;
    aspect-ratio: 1 / 1;
    max-height: 340px;
  }

  .about-steps-grid {
    gap: 9px;
  }

  .about-steps-grid .card {
    padding: 12px 14px;
  }

  .about-steps-grid .card h3 {
    font-size: 0.96rem;
  }

  .about-steps-grid .card p {
    font-size: 0.84rem;
    line-height: 1.42;
  }

  .timeline-body-col {
    padding-right: 62px;
  }

  .slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cal-day-btn {
    height: 32px;
    font-size: 0.78rem;
  }

  .scheduler-panel,
  .contact-form-card {
    padding: 16px;
  }

  .page-stepper {
    justify-content: center;
  }
}
