/* =========================================================
   Leonel Guillén · Sitio personal
   Tema oscuro con paleta de leoguillen.lovable.app
   Contrastes WCAG AA verificados (mínimo 4.5:1 en texto)
   ========================================================= */
:root {
  --bg: #080C16;          /* fondo general */
  --bg-2: #0B111E;        /* secciones alternas */
  --surface: #0B111E;     /* tarjetas */
  --surface-2: #191F2E;   /* tarjetas activas / hover */
  --tinta: #080C16;       /* marca */
  --line: #202838;
  --line-strong: #242D42;
  --text: #F8FAFC;        /* 14.2:1 sobre tarjeta */
  --text-2: #C5C1B9;      /* 8.2:1 */
  --muted: #94A3B8;       /* 5.3:1 */
  --cobalto: #F59F0A;
  --cobalto-2: #F59F0A;   /* acento de texto sobre oscuro */
  --cian: #F59F0A;        /* 10.8:1 */
  --white: #F8FAFC;
  --on-accent: #080C16;
  --radius: 16px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; background: var(--bg); }

body {
  margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.65;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.12; margin: 0; font-weight: 500; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--cian); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--cobalto); color: var(--on-accent); }

/* ---------- Barra de progreso ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 80; }
.progress span {
  display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--cobalto-2), var(--cian));
  box-shadow: 0 0 12px rgba(245, 159, 10, .6);
}

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 70;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(20px, 5vw, 56px);
  background: rgba(7, 14, 26, .6);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid transparent; transition: border-color .3s ease, background .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(7, 14, 26, .85); }
.brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; text-decoration: none; letter-spacing: -0.02em; color: var(--white); }
.brand span { color: var(--cian); }
.site-nav { display: flex; gap: 26px; align-items: center; }
.site-nav a { text-decoration: none; font-size: .95rem; color: var(--text-2); transition: color .2s ease; }
.site-nav a:hover { color: var(--white); }
.site-nav .nav-cta {
  color: var(--on-accent); background: var(--cobalto); padding: 9px 18px; border-radius: 999px;
  box-shadow: 0 6px 18px -8px rgba(245, 159, 10, .9);
}
.site-nav .nav-cta:hover { background: #D98A06; color: var(--white); }
.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
  width: 44px; height: 44px; position: relative;
}
.nav-toggle span {
  position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text);
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 26px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Utilidades ---------- */
.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--cian); margin-bottom: 14px;
}
.section { padding: clamp(80px, 10vw, 136px) clamp(20px, 5vw, 56px); max-width: 1180px; margin: 0 auto; position: relative; }
.section-alt { background: var(--bg-2); max-width: none; }
.section-alt > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.5rem); color: var(--white); }
.lede { font-size: 1.15rem; color: var(--text-2); max-width: 640px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: .97rem;
  text-decoration: none; border: 1.5px solid transparent; transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--cobalto); color: var(--on-accent); box-shadow: 0 14px 30px -14px rgba(245, 159, 10, .9); }
.btn-primary:hover { background: #D98A06; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--cian); color: var(--cian); }

/* ---------- Efecto spotlight en tarjetas ---------- */
.spot {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(148, 163, 184, .2), transparent 45%),
    var(--surface);
  border: 1px solid var(--line);
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--cian), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s ease;
}
.spot:hover { border-color: transparent; transform: translateY(-4px); box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .8); }
.spot:hover::before { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: calc(100vh - 62px); display: flex; align-items: center;
  padding: 72px clamp(20px, 5vw, 56px) 110px; overflow: hidden;
}
.aurora { position: absolute; inset: -20% -10% auto; height: 120%; pointer-events: none; z-index: 0; }
.aurora i {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55;
  animation: drift 16s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { width: 520px; height: 520px; background: #475569; top: 0; left: 8%; }
.aurora i:nth-child(2) { width: 420px; height: 420px; background: #64748B; top: 20%; right: 4%; animation-delay: -6s; opacity: .45; }
.aurora i:nth-child(3) { width: 360px; height: 360px; background: #475569; bottom: 0; left: 40%; animation-delay: -11s; opacity: .4; }
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, -40px) scale(1.12); }
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .11) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 0%, transparent 72%);
  animation: gridDrift 22s linear infinite;
}
@keyframes gridDrift { to { background-position: 56px 56px; } }

.hero-inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; width: 100%; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 {
  font-size: clamp(3.2rem, 9vw, 7rem); letter-spacing: -0.035em; font-weight: 700;
  margin-bottom: 24px; color: var(--white);
}
.hero h1 em { font-style: italic; font-weight: 500; color: var(--cian); }
.hero .lede { margin-bottom: 28px; }
.hero .eyebrow {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  background: rgba(245, 159, 10, .1); border: 1px solid rgba(245, 159, 10, .3);
  letter-spacing: .12em;
}
.rotator-line { font-size: 1.2rem; color: var(--text); font-weight: 600; margin-bottom: 26px; }
.rotator { display: inline-grid; color: var(--cian); font-weight: 700; vertical-align: bottom; min-width: 14ch; }
.rot-word {
  grid-area: 1 / 1; opacity: 0; transform: translateY(12px); white-space: nowrap;
  transition: opacity .5s ease, transform .5s ease;
}
.rot-word.is-on { opacity: 1; transform: none; }
.rot-word.is-out { opacity: 0; transform: translateY(-12px); }
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 32px; padding: 0; }
.badges li {
  font-size: .9rem; font-weight: 600; padding: 8px 15px; border-radius: 999px;
  color: var(--text); background: rgba(16, 31, 53, .7); border: 1px solid var(--line-strong);
  backdrop-filter: blur(8px);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero .meta { color: var(--muted); font-size: .95rem; margin: 0; }

.hero-photo { margin: 0; position: relative; justify-self: end; width: 100%; max-width: 330px; perspective: 900px; }
.hero-photo::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 26px;
  background: linear-gradient(135deg, var(--cobalto), var(--cian)); z-index: 0; opacity: .9;
}
.hero-photo img {
  position: relative; z-index: 1; display: block; width: 100%; height: auto;
  border-radius: 26px; border: 1px solid var(--line-strong); aspect-ratio: 896 / 1088; object-fit: cover;
  box-shadow: 0 40px 80px -36px rgba(0, 0, 0, .9);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d;
  transition: transform .35s ease;
}
.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 1;
  font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--muted);
}
.scroll-hint::after {
  content: ""; display: block; width: 1px; height: 36px; margin: 10px auto 0;
  background: linear-gradient(var(--cian), transparent);
}

/* ---------- Banda de tecnologías ---------- */
.marquee {
  position: relative; overflow: hidden; padding: 22px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee .track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee span {
  font-family: var(--serif); font-size: 1.6rem; font-weight: 500; color: var(--text-2);
  white-space: nowrap; padding: 0 28px; display: inline-flex; align-items: center; gap: 28px;
}
.marquee span::after { content: "◆"; color: var(--cian); font-size: .7rem; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .track { animation-play-state: paused; }

/* ---------- Estadísticas (bento) ---------- */
.stats { padding: 0 clamp(20px, 5vw, 56px); margin-top: -40px; position: relative; z-index: 2; }
.stats-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 26px 24px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 6px; }
.stat b {
  font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3.1rem); font-weight: 700;
  color: var(--white); line-height: 1; letter-spacing: -0.02em;
}
.stat span:last-child { font-size: .92rem; color: var(--text-2); }

/* ---------- Sobre mí ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.prose p { font-size: 1.12rem; color: var(--text-2); }
.prose p:first-child::first-letter {
  font-family: var(--serif); float: left; font-size: 4.2rem; line-height: .9;
  padding: 6px 12px 0 0; color: var(--cian); font-weight: 700;
}
.framework { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 26px 28px; }
.fw-title { font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--cian); margin: 0 0 8px; }
.fw-list { list-style: none; margin: 0; padding: 0; }
.fw-list li {
  display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: start;
  padding: 18px 0; border-bottom: 1px solid var(--line); transition: padding .3s ease;
}
.fw-list li:last-child { border-bottom: 0; }
.fw-list li:hover { padding-left: 8px; }
.fw-n { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; line-height: 1; color: var(--cobalto-2); }
.fw-list h3 { font-size: 1.32rem; margin: 0 0 4px; color: var(--white); }
.fw-list p { margin: 0; color: var(--text-2); font-size: .97rem; line-height: 1.55; }

/* ---------- Competencias (bento) ---------- */
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; grid-auto-flow: dense; }
.skill-card { border-radius: var(--radius); padding: 28px 28px 24px; }
.skills .skill-card:nth-child(1), .skills .skill-card:nth-child(4) { grid-column: span 2; }
.skills .skill-card:nth-child(1) {
  background:
    radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), rgba(148, 163, 184, .16), transparent 45%),
    linear-gradient(145deg, #0B111E, var(--surface));
}
.skills .skill-card:nth-child(4) {
  background:
    radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), rgba(148, 163, 184, .22), transparent 45%),
    linear-gradient(145deg, #1E293B, #080C16);
}
.skill-card h3 { font-size: 1.32rem; margin-bottom: 14px; color: var(--white); }
.skill-card ul { list-style: none; }
.skill-card li { font-size: .95rem; color: var(--text-2); padding: 7px 0; border-top: 1px dashed var(--line-strong); }
.skill-card li:first-child { border-top: 0; }
.stack { margin-top: 44px; }
.stack ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; }
.stack li {
  font-weight: 700; font-size: .92rem; padding: 9px 16px; border-radius: 999px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong);
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.stack li:hover { border-color: var(--cian); color: var(--cian); transform: translateY(-2px); }

/* ---------- Tecnología en acción ---------- */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.tech-card { border-radius: var(--radius); display: flex; flex-direction: column; }
.tech-visual {
  aspect-ratio: 16 / 10; display: grid; place-items: center; border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
  background: radial-gradient(120% 90% at 50% 0%, #191F2E 0%, #080C16 75%); color: var(--text); margin: 0;
  border-bottom: 1px solid var(--line);
}
.tech-visual svg { width: 100%; height: 100%; }
.tech-card figcaption { padding: 22px 24px 26px; }
.tech-card h3 { font-size: 1.3rem; margin-bottom: 6px; color: var(--white); }
.tech-card p { margin: 0; font-size: .95rem; color: var(--text-2); }

.t-node { fill: #0B111E; stroke: #94A3B8; stroke-width: 1.5; }
.t-node-main { fill: var(--cobalto); stroke: var(--cian); stroke-width: 2; }
.t-label { fill: var(--text); font: 700 14px var(--sans); }
.t-label-main { fill: var(--white); font-size: 17px; }
.t-line path { stroke: #94A3B8; }
.t-ring { animation: ring 2.8s ease-out infinite; transform-origin: 160px 100px; transform-box: view-box; }
.t-ring-2 { animation-delay: 1.4s; }
@keyframes ring { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(2.1); opacity: 0; } }
.t-check { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 1.8s ease forwards infinite; animation-timing-function: ease-in-out; }
@keyframes draw { 0%, 20% { stroke-dashoffset: 60; } 60%, 100% { stroke-dashoffset: 0; } }
.t-synapse line { stroke-dasharray: 200; animation: fire 2.4s linear infinite; }
@keyframes fire { from { stroke-dashoffset: 200; } to { stroke-dashoffset: 0; } }
.t-node-dot { animation: glow 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.t-packet { animation: packet 2.4s ease-in-out infinite; }
.t-packet-2 { animation-delay: 1.2s; }
@keyframes packet { 0% { transform: translate(0, 0); opacity: 0; } 15%, 85% { opacity: 1; } 100% { transform: translate(72px, 0); opacity: 0; } }
.t-stack rect { animation: blink 3s ease-in-out infinite; }
.t-stack rect:nth-child(2) { animation-delay: .4s; }
.t-stack rect:nth-child(3) { animation-delay: .8s; }
@keyframes blink { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
.t-term { fill: var(--text); font: 500 12.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.t-term-dim { fill: var(--text-2); }
.t-cursor { animation: caret 1s steps(2, start) infinite; }
@keyframes caret { to { visibility: hidden; } }
.t-bar { transform-box: fill-box; transform-origin: bottom; animation: grow .9s cubic-bezier(.2,.7,.2,1) both infinite alternate; animation-delay: var(--d); }
@keyframes grow { from { transform: scaleY(.15); } to { transform: scaleY(1); } }
.t-trend { stroke-dasharray: 260; animation: trend 3.2s ease-in-out infinite alternate; }
@keyframes trend { from { stroke-dashoffset: 260; } to { stroke-dashoffset: 0; } }

/* ---------- Metodología: flujo ---------- */
.flow { position: relative; }
.flow-line {
  position: absolute; left: 6%; right: 6%; top: 46px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 10px, transparent 10px 18px);
}
.flow-dot {
  position: absolute; top: -5px; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--cian); box-shadow: 0 0 0 6px rgba(245, 159, 10, .18), 0 0 20px var(--cian);
  animation: travel 4.5s cubic-bezier(.5, 0, .5, 1) infinite;
}
@keyframes travel {
  0% { left: 0; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: calc(100% - 12px); opacity: 0; }
}
.flow-steps { list-style: none; position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.flow-step {
  border-radius: var(--radius); padding: 26px 24px 24px; position: relative; z-index: 1;
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease, border-color .3s ease, box-shadow .3s ease, background .3s ease;
  transition-delay: calc(var(--i) * 140ms);
}
.reveal.in .flow-step { opacity: 1; transform: none; }
.flow-num {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--bg); color: var(--cian); border: 1px solid var(--cian); font-weight: 700; font-size: .9rem; margin-bottom: 16px;
  transition: background .3s ease, color .3s ease;
}
.flow-step:hover .flow-num { background: var(--cian); color: var(--bg); }
.flow-step h3 { font-size: 1.3rem; margin-bottom: 8px; color: var(--white); }
.flow-step p { margin: 0; font-size: .95rem; color: var(--text-2); }

/* ---------- Mapa de conocimiento ---------- */
.kg-wrap { position: relative; max-width: 780px; margin: 0 auto; }
.kg { width: 100%; height: auto; color: var(--line-strong); display: block; }
.kg-links path { stroke: #242D42; stroke-dasharray: 6 6; animation: dashFlow 1.4s linear infinite; }
@keyframes dashFlow { to { stroke-dashoffset: -24; } }
.kg-core text { font-family: var(--serif); fill: var(--white); }
.kg-core-t { font-size: 22px; font-weight: 700; }
.kg-core-s { font-size: 15px; fill: var(--cian) !important; }
.kg-ring { transform-origin: 320px 220px; animation: pulseRing 2.8s ease-out infinite; transform-box: view-box; }
@keyframes pulseRing { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.kg-node { cursor: pointer; outline: none; opacity: 0; animation: nodeIn .6s ease forwards; }
.kg-node:nth-of-type(1) { animation-delay: .1s; } .kg-node:nth-of-type(2) { animation-delay: .2s; }
.kg-node:nth-of-type(3) { animation-delay: .3s; } .kg-node:nth-of-type(4) { animation-delay: .4s; }
.kg-node:nth-of-type(5) { animation-delay: .5s; } .kg-node:nth-of-type(6) { animation-delay: .6s; }
.kg-node:nth-of-type(7) { animation-delay: .7s; } .kg-node:nth-of-type(8) { animation-delay: .8s; }
@keyframes nodeIn { from { opacity: 0; } to { opacity: 1; } }
.kg-node circle {
  fill: var(--surface); stroke: var(--cobalto-2); stroke-width: 2;
  transition: fill .25s ease, transform .25s ease, stroke .25s ease;
  transform-box: fill-box; transform-origin: center;
}
.kg-node text { font-family: var(--sans); font-size: 13px; font-weight: 700; fill: var(--text); pointer-events: none; }
.kg-node:hover circle, .kg-node:focus-visible circle, .kg-node.active circle { fill: var(--cobalto); stroke: var(--cian); transform: scale(1.12); }
.kg-node:hover text, .kg-node:focus-visible text, .kg-node.active text { fill: var(--on-accent); }
.kg-node:focus-visible circle { stroke-width: 3; }
.kg-info {
  margin: 20px auto 0; max-width: 580px; text-align: center; min-height: 3.2em;
  font-size: 1rem; color: var(--text); padding: 16px 20px; border-radius: var(--radius);
  background: rgba(16, 31, 53, .6); border: 1px solid var(--line-strong);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}

/* ---------- Experiencia (timeline en tarjetas) ---------- */
.timeline { list-style: none; display: grid; gap: 14px; }
.job {
  display: grid; grid-template-columns: 210px 1fr; gap: 28px; border-radius: var(--radius); padding: 30px 32px;
}
.job-date {
  font-size: .9rem; font-weight: 700; color: var(--text-2); padding-top: 4px;
  display: flex; align-items: flex-start; gap: 10px;
}
.job-date::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none;
  background: var(--line-strong); box-shadow: 0 0 0 4px rgba(47, 72, 105, .35);
}
.job.current .job-date { color: var(--cian); }
.job.current .job-date::before { background: var(--cian); box-shadow: 0 0 0 4px rgba(245, 159, 10, .2), 0 0 16px var(--cian); }
.job h3 { font-size: 1.5rem; margin-bottom: 4px; color: var(--white); }
.job .org { font-weight: 700; color: var(--cobalto-2); margin-bottom: 14px; font-size: .98rem; }
.job ul { list-style: none; }
.job li { position: relative; padding-left: 22px; margin-bottom: 8px; color: var(--text-2); font-size: .98rem; }
.job li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 2px; background: var(--cian); }

/* ---------- Formación ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.edu-card { border-radius: var(--radius); padding: 32px; }
.edu-card .eyebrow { margin-bottom: 10px; }
.edu-card h3 { font-size: 1.4rem; margin-bottom: 8px; color: var(--white); }
.edu-card .org { font-size: .95rem; color: var(--text-2); margin-bottom: 16px; }
.edu-card ul { list-style: none; }
.edu-card li { font-size: .95rem; color: var(--text-2); padding: 6px 0 6px 20px; position: relative; }
.edu-card li::before { content: ""; position: absolute; left: 0; top: 12px; width: 8px; height: 2px; background: var(--cian); }
.certs { margin-top: 48px; }
.certs h3 { font-size: 1.6rem; margin-bottom: 18px; color: var(--white); }
.certs ul { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.certs li {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  font-size: .95rem; color: var(--text-2); transition: border-color .25s ease, transform .25s ease;
}
.certs li:hover { border-color: var(--cian); transform: translateX(4px); }
.certs li b { color: var(--cian); font-weight: 700; white-space: nowrap; }
.frameworks { margin-top: 22px; font-size: .92rem; color: var(--muted); }

/* ---------- Contacto ---------- */
.contact-inner { max-width: 820px; }
.contact h2 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.5rem); color: var(--white); }
.contact .lede { margin-bottom: 40px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 34px; }
.contact-item { display: flex; flex-direction: column; gap: 6px; text-decoration: none; border-radius: var(--radius); padding: 22px 24px; }
.contact-item .label { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cian); }
.contact-item .value { font-weight: 700; color: var(--white); word-break: break-word; }

/* ---------- ERPLEXIA ---------- */
.venture { max-width: none; padding: 0 clamp(20px, 5vw, 56px) clamp(80px, 10vw, 120px); }
.venture-inner {
  max-width: 1180px; margin: 0 auto; border-radius: 24px; padding: clamp(32px, 5vw, 56px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
  background: linear-gradient(135deg, #1E293B 0%, #080C16 60%, #0B111E 100%);
  border: 1px solid var(--line-strong); position: relative; overflow: hidden;
}
.venture-inner::after {
  content: ""; position: absolute; width: 360px; height: 360px; right: -120px; top: -140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(148, 163, 184, .35), transparent 70%); pointer-events: none;
}
.venture .eyebrow { color: var(--cian); }
.venture h2 { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--white); margin-bottom: 8px; }
.venture p { color: var(--text-2); margin: 0; max-width: 560px; }
.venture .btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, .4); }
.venture .btn-ghost:hover { border-color: var(--cian); color: var(--cian); }

/* ---------- Pie ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding: 28px clamp(20px, 5vw, 56px); font-size: .9rem; color: var(--muted);
  border-top: 1px solid var(--line);
}
.site-footer p { margin: 0; }
.site-footer a { text-decoration: none; font-weight: 700; color: var(--text-2); }
.site-footer a:hover { color: var(--cian); }

/* ---------- Revelado ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@supports (animation-timeline: view()) {
  .job, .tech-card, .skill-card, .edu-card, .contact-item, .stat, .certs li {
    animation: scrollIn linear both; animation-timeline: view(); animation-range: entry 0% cover 30%;
  }
  .reveal { opacity: 1; transform: none; }
}
@keyframes scrollIn { from { opacity: 0; transform: translateY(40px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-line { display: none; }
  .stats-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills .skill-card:nth-child(1), .skills .skill-card:nth-child(4) { grid-column: span 2; }
}
@media (max-width: 900px) {
  .about-grid, .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; justify-self: center; max-width: 230px; }
  .hero-photo::before { inset: 12px -12px -12px 12px; }
  .job { grid-template-columns: 1fr; gap: 10px; }
  .certs ul { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; top: 62px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(7, 14, 26, .97); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px; transform: translateY(-120%); transition: transform .3s ease; visibility: hidden;
  }
  .site-nav.open { transform: none; visibility: visible; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav .nav-cta { border: 0; text-align: center; margin-top: 14px; padding: 14px; }
  .hero { min-height: auto; padding-top: 56px; padding-bottom: 96px; }
  .scroll-hint { display: none; }
  .stats { margin-top: -20px; }
  body { font-size: 16px; }
}
@media (max-width: 620px) {
  .skills { grid-template-columns: 1fr; }
  .skills .skill-card:nth-child(n) { grid-column: auto; }
  .flow-steps { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 20px 18px; }
  .kg-core-t { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .flow-step { opacity: 1; transform: none; }
  .rot-word:not(.is-on) { display: none; }
  .kg-node { opacity: 1; }
  .hero-photo img { transform: none !important; }
}


/* ---------- Principios de liderazgo ---------- */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.principle {
  border-radius: var(--radius); padding: 30px 28px 26px; display: flex; flex-direction: column; gap: 12px;
}
.p-num {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 700; color: var(--cian);
  letter-spacing: .04em;
}
.principle h3 { font-size: 1.42rem; color: var(--white); line-height: 1.18; }
.p-how { margin: 0; font-size: .96rem; color: var(--text-2); line-height: 1.6; }
.p-how b { color: var(--text); font-weight: 700; }
.p-ref {
  margin: auto 0 0; padding-top: 14px; border-top: 1px dashed var(--line-strong);
  font-size: .88rem; color: var(--text-2); line-height: 1.55;
}
.p-ref span {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--cobalto-2); margin-bottom: 4px;
}
@media (max-width: 1000px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .principles { grid-template-columns: 1fr; } }


/* ---------- Casos y arquitectura ---------- */
.flow-diagram { margin: 0 0 16px; border-radius: var(--radius); padding: clamp(18px, 3vw, 34px); }
.flow-diagram svg { width: 100%; height: auto; display: block; }
.flow-diagram figcaption { font-size: .85rem; color: var(--muted); margin-top: 12px; text-align: center; }
.fd-links path { stroke: #242D42; stroke-dasharray: 6 6; animation: dashFlow 1.4s linear infinite; }
.fd-pulses circle { fill: var(--cian); }
.fd-node rect { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.5; }
.fd-hub rect { fill: var(--cobalto); stroke: var(--cian); stroke-width: 2; }
.fd-label { font: 700 14px var(--sans); fill: var(--text); }
.fd-label-main { fill: var(--white); font-size: 16px; }
.fd-sub { font: 500 11.5px var(--sans); fill: var(--text-2); }

.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.case { border-radius: var(--radius); padding: 30px 28px; display: flex; flex-direction: column; gap: 12px; }
.case h3 { font-size: 1.4rem; color: var(--white); }
.steps-list, .impact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps-list li, .impact-list li { color: var(--text-2); font-size: .96rem; line-height: 1.55; padding-left: 26px; position: relative; }
.steps-list li::before, .impact-list li::before {
  content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 8px; border-radius: 50%; background: var(--cian);
}
.steps-list li b { color: var(--text); }

/* ---------- Sectores ---------- */
.sector-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sector { border-radius: var(--radius); padding: 30px 28px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.sector-tag {
  align-self: flex-start; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cian); background: rgba(245, 159, 10, .1); border: 1px solid rgba(245, 159, 10, .3);
  padding: 6px 12px; border-radius: 999px;
}
.sector h3 { font-size: 1.4rem; color: var(--white); margin-top: 4px; }
.sector p { margin: 0; color: var(--text-2); font-size: .95rem; line-height: 1.6; }
.sector p b { color: var(--text); }

@media (max-width: 900px) { .case-grid, .sector-grid { grid-template-columns: 1fr; } }


/* ---------- Ajustes de perfil (LinkedIn) ---------- */
.signature {
  font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-style: italic;
  color: var(--white); margin: 6px 0 14px; border-left: 3px solid var(--cian); padding-left: 16px;
}
.method-order { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0 0 40px; counter-reset: mo; }
.method-order li {
  font-weight: 700; font-size: .92rem; color: var(--text); padding: 9px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong);
}
.method-order li:not(:last-child)::after { content: "→"; margin-left: 10px; color: var(--cian); }
.solutions { margin-top: 40px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.solutions ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.solutions li {
  font-size: .95rem; font-weight: 600; color: var(--text); padding: 9px 16px; border-radius: 999px;
  background: rgba(245, 159, 10, .14); border: 1px solid rgba(245, 159, 10, .4);
}
.press-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .press-grid { grid-template-columns: 1fr; } }
.press-card {
  display: block; text-decoration: none; border-radius: var(--radius); padding: clamp(28px, 4vw, 44px); max-width: 880px;
}
.press-card .eyebrow { margin-bottom: 14px; }
.press-card h3 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); color: var(--white); margin-bottom: 14px; }
.press-card p { color: var(--text-2); font-size: 1.05rem; max-width: 640px; }
.press-link { display: inline-block; margin-top: 10px; font-weight: 700; color: var(--cian); }

/* =========================================================
   Ajustes de color y maquetación (ronda de validación)
   ========================================================= */

/* 1) Cifras de estadísticas: el número no debe heredar el estilo de la etiqueta */
.stat > span:last-child { font-size: .92rem; }
.stat b .count { font-size: inherit; }

/* 2) Estadísticas debajo del cintillo, sin superponerse */
.stats { margin-top: 0; padding-top: 64px; padding-bottom: 64px; }
.stat { background: linear-gradient(160deg, rgba(148, 163, 184, .18), rgba(16, 31, 53, .9) 60%); }
.stat:nth-child(2) { background: linear-gradient(160deg, rgba(148, 163, 184, .16), rgba(16, 31, 53, .9) 60%); }
.stat:nth-child(3) { background: linear-gradient(160deg, rgba(148, 163, 184, .2), rgba(16, 31, 53, .9) 60%); }
.stat:nth-child(4) { background: linear-gradient(160deg, rgba(148, 163, 184, .22), rgba(148, 163, 184, .14)); }
.stat:nth-child(1) { border-top: 3px solid var(--cobalto-2); }
.stat:nth-child(2) { border-top: 3px solid var(--cian); }
.stat:nth-child(3) { border-top: 3px solid #94A3B8; }
.stat:nth-child(4) { border-top: 3px solid var(--white); }
.stat b { color: var(--white); }
.stat:nth-child(1) b { color: #94A3B8; }
.stat:nth-child(2) b { color: var(--cian); }
.stat:nth-child(3) b { color: #C5C1B9; }

/* 3) Cintillo con colores alternados */
.marquee {
  background: linear-gradient(90deg, rgba(148, 163, 184, .3), rgba(148, 163, 184, .14), rgba(148, 163, 184, .3), rgba(148, 163, 184, .14));
  background-size: 200% 100%; animation: bandShift 14s linear infinite;
  border-top-color: var(--cobalto-2); border-bottom-color: var(--cobalto-2);
}
@keyframes bandShift { to { background-position: 200% 0; } }
.marquee span:nth-child(4n+1) { color: var(--cian); }
.marquee span:nth-child(4n+2) { color: #94A3B8; }
.marquee span:nth-child(4n+3) { color: var(--white); }
.marquee span:nth-child(4n+4) { color: var(--cobalto-2); }
.marquee span::after { color: var(--white); }

/* 4) Ilustraciones: colores explícitos para que no se pierdan sobre el fondo */
.tech-visual svg [fill="currentColor"] { fill: var(--text) !important; }
.tech-visual svg [stroke="currentColor"] { stroke: var(--text) !important; }
.tech-visual .t-shield { fill: #D98A06 !important; stroke: var(--cian) !important; }
.tech-visual .t-bar { fill: var(--cobalto-2) !important; }
.tech-visual .t-bar:nth-of-type(2) { fill: var(--cian) !important; }
.tech-visual .t-bar:nth-of-type(3) { fill: #94A3B8 !important; }
.tech-visual .t-bar:nth-of-type(4) { fill: var(--cobalto) !important; }
.tech-visual .t-bar:nth-of-type(5) { fill: var(--cian) !important; }
.tech-visual .t-trend { stroke: var(--white) !important; stroke-width: 3.5 !important; filter: drop-shadow(0 0 6px rgba(245, 159, 10, .7)); }
.tech-visual .t-node-main { fill: var(--cobalto) !important; }
.tech-visual .t-node-dot { fill: var(--cian) !important; }
.tech-visual .t-packet { fill: var(--cian) !important; }
.tech-visual .t-packet-2 { fill: #94A3B8 !important; }
.tech-visual .t-stack rect:nth-child(1) { fill: var(--cian) !important; }
.tech-visual .t-stack rect:nth-child(2) { fill: #94A3B8 !important; }
.tech-visual .t-stack rect:nth-child(3) { fill: var(--cobalto-2) !important; }

@media (max-width: 760px) { .stats { margin-top: 0; padding-top: 48px; } }
